/* ============================================
   Rainbow Six Siege Slots Machine
   MFGuy.TV Theme - Goblin Chaos Edition
   ============================================ */

/* CSS Variables - shared with randomizer.css */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: rgba(20, 20, 20, 0.6);
  --bg-tertiary: rgba(40, 40, 40, 0.5);
  --accent-crimson: #dc143c;
  --accent-crimson-light: #ff1744;
  --accent-crimson-glow: rgba(220, 20, 60, 0.6);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --text-muted: rgba(255, 255, 255, 0.5);
  --border-primary: #dc143c;
  --border-secondary: rgba(220, 20, 60, 0.3);
  --gradient-button: linear-gradient(135deg, #dc143c 0%, #ff1744 100%);
  --gradient-glow: radial-gradient(circle, rgba(220, 20, 60, 0.3) 0%, transparent 70%);
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --transition-fast: 0.15s ease-out;
  --transition-medium: 0.3s ease-in-out;
  --transition-slow: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   Base Styles
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================
   Header / Navigation (same as roulette)
   ============================================ */

.header {
  background: rgba(10, 10, 10, 0.95);
  border-bottom: 2px solid var(--border-secondary);
  padding: var(--space-md) var(--space-xl);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 60px;
  max-height: 60px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(220, 20, 60, 0.3));
  transition: all 0.3s ease;
}

.logo-img:hover {
  filter: drop-shadow(0 0 20px rgba(220, 20, 60, 0.6));
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border-radius: 4px;
  transition: all var(--transition-medium);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-crimson);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-crimson);
  transition: all var(--transition-medium);
  transform: translateX(-50%);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 80%;
}

/* ============================================
   Main Container
   ============================================ */

.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-xl);
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-crimson);
  margin-bottom: var(--space-md);
  text-shadow: 0 0 20px var(--accent-crimson-glow);
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
}

.hero-banner {
  max-width: 900px;
  width: 100%;
  height: auto;
  margin: 0 auto var(--space-lg);
  display: block;
  border-radius: 8px;
  filter: drop-shadow(0 0 20px rgba(220, 20, 60, 0.4));
  transition: all var(--transition-medium);
}

.hero-banner:hover {
  filter: drop-shadow(0 0 30px rgba(220, 20, 60, 0.6));
  transform: translateY(-2px);
}

/* ============================================
   Slots Layout
   ============================================ */

.slots-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
  width: 100%;
}

/* ============================================
   Slot Machine
   ============================================ */

.slot-machine-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  order: 1;
}

.slot-machine-frame {
  background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 100%);
  border: 3px solid var(--accent-crimson);
  border-radius: 16px;
  padding: var(--space-xl) var(--space-lg);
  box-shadow:
    0 0 40px var(--accent-crimson-glow),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.slot-machine-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-crimson), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Reels Container */
.reels-container {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  justify-content: center;
  position: relative;
}

.reel-wrapper {
  width: 140px;
  height: 360px;
  overflow: hidden;
  border-radius: 8px;
  border: 2px solid rgba(220, 20, 60, 0.4);
  background: rgba(0, 0, 0, 0.6);
  position: relative;
}

/* Payline indicator masks - top and bottom fade */
.reel-wrapper::before,
.reel-wrapper::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 120px;
  z-index: 2;
  pointer-events: none;
}

.reel-wrapper::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.85), transparent);
}

.reel-wrapper::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.85), transparent);
}

.reel-strip {
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.reel-symbol {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  margin: 0 auto;
  flex-shrink: 0;
}

.reel-symbol img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid rgba(220, 20, 60, 0.3);
  background: rgba(30, 30, 30, 0.5);
  transition: border-color 0.3s ease;
}

/* Idle state logo on reels */
.reel-symbol img.idle-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--accent-crimson);
  background: rgba(10, 10, 10, 0.8);
  box-shadow: 0 0 15px var(--accent-crimson-glow);
  padding: 8px;
}

/* Payline - center horizontal line */
.payline {
  position: absolute;
  top: 50%;
  left: -10px;
  right: -10px;
  height: 2px;
  background: var(--accent-crimson);
  box-shadow: 0 0 10px var(--accent-crimson-glow);
  z-index: 3;
  transform: translateY(-50%);
  pointer-events: none;
}

.payline::before,
.payline::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
}

.payline::before {
  left: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 10px solid var(--accent-crimson);
}

.payline::after {
  right: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 10px solid var(--accent-crimson);
}

/* Pull Button */
.pull-button {
  background: var(--gradient-button);
  color: white;
  border: none;
  padding: 16px 48px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all var(--transition-medium);
  box-shadow: 0 4px 20px var(--accent-crimson-glow);
  position: relative;
  overflow: hidden;
}

.pull-button:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 6px 30px var(--accent-crimson-glow);
}

.pull-button:active:not(:disabled) {
  transform: translateY(0);
}

.pull-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pull-button::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.pull-button:hover:not(:disabled)::after {
  left: 100%;
}

/* ============================================
   Session Stats
   ============================================ */

.session-stats {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  padding: var(--space-md) var(--space-lg);
  border-radius: 8px;
  border: 1px solid var(--border-secondary);
}

.stat-item {
  text-align: center;
}

.stat-item .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-crimson);
  display: block;
}

.stat-item .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-divider {
  width: 1px;
  height: 30px;
  background: var(--border-secondary);
}

.reset-stats-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-secondary);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.reset-stats-btn:hover {
  border-color: var(--accent-crimson);
  color: var(--accent-crimson);
}

/* ============================================
   Result Outcomes
   ============================================ */

/* Match highlight on reel symbols */
.reel-symbol.matched img {
  border-color: var(--accent-crimson);
  box-shadow: 0 0 20px var(--accent-crimson-glow);
}

/* Jackpot animation */
@keyframes jackpot-glow {
  0%, 100% {
    box-shadow: 0 0 40px var(--accent-crimson-glow), inset 0 0 30px rgba(0, 0, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 80px rgba(220, 20, 60, 0.8), 0 0 120px rgba(220, 20, 60, 0.4), inset 0 0 30px rgba(0, 0, 0, 0.5);
  }
}

.slot-machine-frame.jackpot {
  animation: jackpot-glow 0.5s ease-in-out 6;
}

@keyframes double-flash {
  0%, 100% { border-color: rgba(220, 20, 60, 0.4); }
  50% { border-color: var(--accent-crimson); box-shadow: 0 0 15px var(--accent-crimson-glow); }
}

.slot-machine-frame.double-match {
  animation: double-flash 0.4s ease-in-out 4;
}

/* ============================================
   Filter Panel (reused from randomizer)
   ============================================ */

.filter-panel {
  background: var(--bg-secondary);
  border: 2px solid var(--border-primary);
  border-radius: 8px;
  padding: var(--space-lg);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 20px rgba(220, 20, 60, 0.3);
  width: 100%;
  max-width: 1200px;
  order: 2;
}

.filter-toggle {
  display: none;
  width: 100%;
  background: var(--gradient-button);
  color: white;
  border: none;
  padding: var(--space-md);
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: var(--space-md);
  transition: all var(--transition-medium);
}

.filter-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-crimson-glow);
}

.filter-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  width: 100%;
}

.filter-group {
  background: rgba(40, 40, 40, 0.3);
  padding: var(--space-md);
  border-radius: 6px;
  border: 1px solid var(--border-secondary);
}

.filter-group:last-of-type {
  border-bottom: 1px solid var(--border-secondary);
}

.filter-section-toggle {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--accent-crimson);
  font-size: 14px;
  font-weight: 700;
  padding: 0;
  margin-bottom: var(--space-md);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  transition: all var(--transition-medium);
}

.filter-section-toggle:hover {
  opacity: 0.8;
}

.filter-section-toggle .toggle-icon {
  transition: transform var(--transition-medium);
  font-size: 10px;
  margin-left: var(--space-sm);
}

.filter-section-toggle.active .toggle-icon {
  transform: rotate(-180deg);
}

.filter-section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-medium);
}

.filter-section-content.active {
  max-height: 500px;
  margin-bottom: var(--space-md);
}

.filter-group h3 {
  color: var(--accent-crimson);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-md);
}

/* Button Groups */
.button-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.button-group.difficulty-group {
  flex-direction: row;
}

.filter-btn {
  background: var(--gradient-button);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.filter-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--accent-crimson-glow);
}

.filter-btn:not(.active) {
  background: var(--bg-tertiary);
  opacity: 0.6;
}

.filter-btn.small {
  padding: 8px 12px;
  font-size: 12px;
  flex: 1;
}

/* Checkboxes */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.filter-checkbox {
  display: flex;
  align-items: center;
  padding: var(--space-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
  border-radius: 4px;
}

.filter-checkbox:hover {
  background: rgba(220, 20, 60, 0.1);
}

.filter-checkbox input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent-crimson);
  border-radius: 3px;
  margin-right: 10px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.filter-checkbox input[type="checkbox"]:checked {
  background: var(--accent-crimson);
}

.filter-checkbox input[type="checkbox"]:checked::after {
  content: '\2713';
  position: absolute;
  color: white;
  font-size: 14px;
  top: -2px;
  left: 3px;
}

.filter-checkbox span {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Range Sliders */
.range-slider {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.range-slider label {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.range-slider input[type="range"] {
  flex: 1;
  accent-color: var(--accent-crimson);
  cursor: pointer;
}

/* Filter Stats */
.filter-stats {
  background: rgba(220, 20, 60, 0.1);
  padding: var(--space-sm) var(--space-md);
  border-radius: 6px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  grid-column: 1 / -1;
}

.filter-stats strong {
  color: var(--accent-crimson);
  font-size: 24px;
}

.filter-stats p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* Reset Button */
.reset-btn {
  background: transparent;
  color: var(--accent-crimson);
  border: 2px solid var(--accent-crimson);
  padding: var(--space-sm) var(--space-lg);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-medium);
  grid-column: 1 / -1;
}

.reset-btn:hover {
  background: var(--accent-crimson);
  color: white;
  transform: translateY(-2px);
}

/* Operator Selection Section */
.operator-selection-group {
  grid-column: 1 / -1;
  padding-top: var(--space-md);
  margin-top: var(--space-md);
}

.operator-selection-toggle {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  padding: var(--space-md);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition-medium);
}

.operator-selection-toggle:hover {
  color: var(--accent-crimson);
}

.toggle-icon {
  transition: transform var(--transition-medium);
  font-size: 12px;
}

.operator-selection-toggle.active .toggle-icon {
  transform: rotate(-180deg);
}

.operator-selection-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-medium);
}

.operator-selection-content.active {
  max-height: 500px;
  overflow-y: auto;
}

.operator-search {
  padding: var(--space-md) var(--space-md) 0;
}

.search-input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-tertiary);
  border: 2px solid var(--border-secondary);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-crimson);
  box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.operator-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  padding: var(--space-md);
  max-height: 400px;
  overflow-y: auto;
}

.operator-section {
  display: flex;
  flex-direction: column;
}

.operator-section h4 {
  color: var(--accent-crimson);
  margin: 0 0 var(--space-md) 0;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--accent-crimson);
}

.operator-section-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.operator-checkbox {
  display: flex;
  align-items: center;
  font-size: 14px;
  cursor: pointer;
  padding: var(--space-xs);
  transition: all var(--transition-fast);
}

.operator-checkbox:hover {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

.operator-checkbox input[type="checkbox"] {
  margin-right: var(--space-sm);
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: var(--accent-crimson);
}

.operator-checkbox.banned {
  opacity: 0.5;
  cursor: not-allowed;
  text-decoration: line-through;
}

.operator-checkbox.banned:hover {
  background: transparent;
}

.operator-selection-actions {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-top: 1px solid var(--border-secondary);
}

.select-all-btn,
.deselect-all-btn {
  flex: 1;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-secondary);
  padding: var(--space-sm);
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.select-all-btn:hover,
.deselect-all-btn:hover {
  border-color: var(--accent-crimson);
  color: var(--accent-crimson);
}

/* Banned Operators Section */
.banned-operators-group {
  grid-column: 1 / -1;
}

.quick-ban-search {
  padding: var(--space-md) var(--space-md) 0;
}

.quick-ban-results {
  display: none;
  margin-top: var(--space-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.quick-ban-result-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border-bottom: 1px solid var(--border-secondary);
  transition: all var(--transition-fast);
}

.quick-ban-result-item:last-child {
  border-bottom: none;
}

.quick-ban-result-item:hover {
  background: rgba(220, 20, 60, 0.1);
}

.quick-ban-op-name {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

.quick-ban-op-role {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(220, 20, 60, 0.2);
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
}

.quick-ban-btn {
  background: transparent;
  border: 1px solid #ff9800;
  color: #ff9800;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quick-ban-btn:hover {
  background: #ff9800;
  color: white;
}

.no-results {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding: var(--space-md);
  margin: 0;
}

.banned-operators-list {
  padding: var(--space-md);
  max-height: 200px;
  overflow-y: auto;
}

.no-bans-message {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
  margin: 0;
}

.banned-operator-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm);
  margin-bottom: var(--space-xs);
  background: rgba(220, 20, 60, 0.1);
  border: 1px solid rgba(220, 20, 60, 0.3);
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.banned-operator-item:hover {
  background: rgba(220, 20, 60, 0.15);
}

.banned-op-name {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

.unban-btn {
  background: transparent;
  border: 1px solid var(--accent-crimson);
  color: var(--accent-crimson);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0;
  transition: all var(--transition-fast);
}

.unban-btn:hover {
  background: var(--accent-crimson);
  color: white;
  transform: scale(1.1);
}

.reset-bans-sidebar-btn {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  margin-top: var(--space-md);
  background: transparent;
  color: #4caf50;
  border: 2px solid #4caf50;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.reset-bans-sidebar-btn:hover {
  background: #4caf50;
  color: white;
  transform: translateY(-1px);
}

/* ============================================
   Modal Popup (same as roulette)
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-medium);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  position: relative;
  max-width: 900px;
  max-height: 90vh;
  width: 90%;
  overflow-y: auto;
  animation: modalSlideIn var(--transition-slow);
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: var(--accent-crimson);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-medium);
  z-index: 10;
}

.modal-close:hover {
  background: var(--accent-crimson-light);
  transform: rotate(90deg) scale(1.1);
}

.modal-content {
  background: var(--bg-primary);
  border-radius: 12px;
}

.result-card {
  background: var(--bg-secondary);
  border: 2px solid var(--accent-crimson);
  border-radius: 12px;
  padding: var(--space-xl);
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 0 40px rgba(220, 20, 60, 0.5);
  animation: glow 2s ease-in-out infinite;
}

.result-header {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 2px solid var(--border-secondary);
}

.operator-portrait {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--accent-crimson);
  object-fit: cover;
  animation: fadeInRotate 0.6s ease-out;
}

.operator-info h2 {
  font-size: 32px;
  color: white;
  margin: 0 0 var(--space-sm) 0;
  font-weight: 700;
}

.operator-role {
  background: var(--gradient-button);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
}

.result-tier {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Stats Compact (Dots Style) */
.stats-compact {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  margin-bottom: var(--space-md);
  border-top: 1px solid var(--border-secondary);
  border-bottom: 1px solid var(--border-secondary);
}

.stat-dots-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.stats-compact .stat-label {
  font-size: 11px;
  color: var(--accent-crimson);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
  white-space: nowrap;
}

.stat-dots {
  display: flex;
  gap: 8px;
}

.stat-dots .dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(60, 60, 60, 0.5);
  transition: all var(--transition-medium);
}

.stat-dots .dot.filled {
  background: white;
  border-color: white;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Specialty Section */
.specialty-section {
  margin-bottom: var(--space-lg);
}

.specialty-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
}

.tag {
  background: rgba(220, 20, 60, 0.2);
  color: var(--accent-crimson);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(220, 20, 60, 0.3);
}

/* Weapon Loadout */
.weapon-loadout {
  background: rgba(10, 10, 10, 0.5);
  padding: var(--space-lg);
  border-radius: 8px;
  margin-bottom: var(--space-lg);
}

.weapon-loadout h3 {
  color: var(--accent-crimson);
  font-size: 18px;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.weapon-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border-radius: 6px;
  margin-bottom: var(--space-md);
  border-left: 4px solid var(--accent-crimson);
  animation: slideInLeft 0.4s ease-out;
  animation-delay: calc(var(--index) * 0.1s);
  animation-fill-mode: both;
}

.weapon-icon {
  width: 80px;
  height: 50px;
  object-fit: contain;
  margin-right: 15px;
}

.weapon-image {
  width: 80px;
  height: 50px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 4px;
}

.weapon-details {
  flex: 1;
}

.weapon-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.weapon-name {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: white;
  margin-top: 4px;
}

/* Result Actions */
.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.primary-btn,
.secondary-btn,
.ban-btn,
.reset-bans-btn {
  padding: var(--space-md) var(--space-lg);
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-medium);
  border: none;
}

.primary-btn {
  background: var(--gradient-button);
  color: white;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-crimson-glow);
}

.secondary-btn {
  background: transparent;
  color: var(--accent-crimson);
  border: 2px solid var(--accent-crimson);
}

.secondary-btn:hover {
  background: var(--accent-crimson);
  color: white;
  transform: translateY(-2px);
}

.ban-btn {
  background: transparent;
  color: #ff9800;
  border: 2px solid #ff9800;
}

.ban-btn:hover {
  background: #ff9800;
  color: white;
  transform: translateY(-2px);
}

.reset-bans-btn {
  background: transparent;
  color: #4caf50;
  border: 2px solid #4caf50;
}

.reset-bans-btn:hover {
  background: #4caf50;
  color: white;
  transform: translateY(-2px);
}

/* Confetti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--accent-crimson);
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* ============================================
   Footer
   ============================================ */

.footer {
  background: rgba(10, 10, 10, 0.95);
  border-top: 2px solid var(--border-secondary);
  padding: var(--space-xl);
  text-align: center;
  margin-top: var(--space-xl);
}

.footer p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: var(--space-sm) 0;
}

.footer a {
  color: var(--accent-crimson);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.footer a:hover {
  text-shadow: 0 0 10px var(--accent-crimson-glow);
}

/* ============================================
   Animations
   ============================================ */

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 40px rgba(220, 20, 60, 0.5); }
  50% { box-shadow: 0 0 60px rgba(220, 20, 60, 0.8); }
}

@keyframes fadeInRotate {
  from { opacity: 0; transform: rotate(-180deg) scale(0); }
  to { opacity: 1; transform: rotate(0) scale(1); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-50px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
  .filter-content {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 28px;
  }

  .hero-banner {
    max-width: 95%;
    margin-bottom: var(--space-sm);
  }

  .hero {
    margin-bottom: var(--space-md);
  }

  .nav-links {
    display: none;
  }

  .logo-img {
    height: 30px;
    max-height: 30px;
    max-width: 120px;
  }

  .header {
    padding: var(--space-sm) var(--space-md);
  }

  .main-container {
    padding: var(--space-md);
  }

  .filter-toggle {
    display: block;
  }

  .filter-content {
    grid-template-columns: 1fr;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-medium);
  }

  .filter-content.expanded {
    max-height: 3000px;
  }

  /* Smaller reels on mobile */
  .reel-wrapper {
    width: 100px;
    height: 260px;
  }

  .reel-symbol {
    width: 80px;
    height: 80px;
    padding: 5px;
  }

  .reel-symbol img {
    width: 70px;
    height: 70px;
  }

  .reel-wrapper::before,
  .reel-wrapper::after {
    height: 80px;
  }

  .slot-machine-frame {
    padding: var(--space-lg) var(--space-md);
  }

  .pull-button {
    padding: 14px 36px;
    font-size: 18px;
  }

  .session-stats {
    flex-wrap: wrap;
    gap: var(--space-md);
  }

  /* Fullscreen modal on mobile */
  .modal-overlay {
    align-items: flex-start;
    padding: 0;
  }

  .modal-container {
    max-width: 100%;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    animation: modalSlideUp var(--transition-slow);
  }

  .modal-close {
    top: var(--space-md);
    right: var(--space-md);
    width: 40px;
    height: 40px;
    font-size: 28px;
    z-index: 10;
  }

  .result-card {
    padding: var(--space-lg) var(--space-md);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .result-header {
    flex-direction: column;
    text-align: center;
    margin-bottom: var(--space-lg);
  }

  .operator-portrait {
    width: 120px;
    height: 120px;
    margin-bottom: var(--space-md);
  }

  .result-header h2 {
    font-size: 32px;
  }

  .stats-compact {
    flex-direction: column;
    gap: var(--space-md);
  }

  .result-actions {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    margin-top: var(--space-xl);
  }

  .primary-btn,
  .secondary-btn,
  .ban-btn,
  .reset-bans-btn {
    padding: var(--space-md);
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .reel-wrapper {
    width: 85px;
    height: 220px;
  }

  .reel-symbol {
    width: 65px;
    height: 65px;
    padding: 3px;
  }

  .reel-symbol img {
    width: 58px;
    height: 58px;
  }

  .reel-wrapper::before,
  .reel-wrapper::after {
    height: 65px;
  }

  .reels-container {
    gap: var(--space-sm);
  }

  .hero-banner {
    max-width: 100%;
  }

  .operator-portrait {
    width: 100px;
    height: 100px;
  }

  .result-header h2 {
    font-size: 28px;
  }
}

/* ============================================
   Overlay Mode
   ============================================ */

/* Floating Toggle Button */
.overlay-mode-toggle {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 9999;
  background: var(--gradient-button);
  color: white;
  border: 2px solid var(--accent-crimson);
  border-radius: 50px;
  padding: var(--space-sm) var(--space-lg);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transition: all var(--transition-medium);
  box-shadow: 0 4px 15px rgba(220, 20, 60, 0.4);
}

.overlay-mode-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 20, 60, 0.6);
}

.toggle-icon-overlay {
  font-size: 16px;
}

/* Overlay Mode Active State */
body.overlay-mode .overlay-mode-toggle {
  background: #4caf50;
  border-color: #4caf50;
  top: 20px;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

/* Hide elements in overlay mode */
body.overlay-mode .header,
body.overlay-mode .footer,
body.overlay-mode .hero {
  display: none !important;
}

/* Transparent background */
body.overlay-mode {
  background: transparent !important;
}

/* Compact layout for overlay */
body.overlay-mode .main-container {
  padding: 0;
  margin: 0;
  min-height: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

body.overlay-mode .slots-layout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-md);
  padding-top: 60px;
  min-height: auto;
  width: 100%;
  gap: var(--space-md);
}

/* Show only role filter in overlay mode */
body.overlay-mode .filter-panel {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  width: auto;
  max-width: none;
  order: 3;
  margin-top: var(--space-md);
  display: block;
}

body.overlay-mode .filter-toggle {
  display: none !important;
}

body.overlay-mode .filter-content {
  display: flex !important;
  justify-content: center;
  padding: 0;
  gap: 0;
  max-height: none !important;
  overflow: visible !important;
}

/* Hide all filter groups except role */
body.overlay-mode .filter-group:not(.role-filter) {
  display: none !important;
}

body.overlay-mode .filter-stats,
body.overlay-mode .reset-btn {
  display: none !important;
}

body.overlay-mode .role-filter {
  background: rgba(20, 20, 20, 0.95);
  border: 2px solid var(--border-primary);
  border-radius: 8px;
  padding: var(--space-md);
  box-shadow: 0 0 20px rgba(220, 20, 60, 0.3);
}

body.overlay-mode .role-filter h3 {
  margin-bottom: var(--space-sm);
  text-align: center;
  font-size: 12px;
}

/* Smaller slot machine in overlay */
body.overlay-mode .slot-machine-frame {
  padding: var(--space-lg) var(--space-md);
  background: rgba(20, 20, 20, 0.95);
  border: 3px solid var(--border-primary);
  box-shadow: 0 0 30px var(--accent-crimson-glow);
}

body.overlay-mode .reel-wrapper {
  width: 110px;
  height: 300px;
}

body.overlay-mode .reel-symbol {
  width: 100px;
  height: 100px;
  padding: 8px;
}

body.overlay-mode .reel-symbol img {
  width: 84px;
  height: 84px;
}

body.overlay-mode .reel-wrapper::before,
body.overlay-mode .reel-wrapper::after {
  height: 100px;
}

/* Compact session stats in overlay */
body.overlay-mode .session-stats {
  background: rgba(20, 20, 20, 0.95);
  border: 2px solid var(--border-primary);
  padding: var(--space-sm) var(--space-md);
}

body.overlay-mode .stat-item .stat-value {
  font-size: 20px;
}

body.overlay-mode .stat-item .stat-label {
  font-size: 10px;
}

/* Compact modal in overlay */
body.overlay-mode .modal-container {
  max-width: 450px;
  background: rgba(20, 20, 20, 0.98);
}

body.overlay-mode .result-card {
  padding: var(--space-lg);
}

body.overlay-mode .operator-portrait {
  width: 80px;
  height: 80px;
}

body.overlay-mode .result-header h2 {
  font-size: 24px;
}

body.overlay-mode .weapon-loadout h3 {
  font-size: 16px;
}

body.overlay-mode .weapon-item {
  padding: var(--space-sm);
}

body.overlay-mode .weapon-image {
  width: 50px;
  height: 35px;
}

/* Overlay mode responsive */
@media (max-width: 768px) {
  body.overlay-mode .reel-wrapper {
    width: 90px;
    height: 240px;
  }

  body.overlay-mode .reel-symbol {
    width: 80px;
    height: 80px;
  }

  body.overlay-mode .reel-symbol img {
    width: 68px;
    height: 68px;
  }

  body.overlay-mode .modal-container {
    max-width: 350px;
  }

  body.overlay-mode .role-filter {
    padding: var(--space-sm);
  }

  body.overlay-mode .role-filter h3 {
    font-size: 11px;
  }

  body.overlay-mode .button-group {
    gap: var(--space-sm);
  }

  body.overlay-mode .filter-btn {
    font-size: 13px;
    padding: var(--space-sm) var(--space-md);
  }

  .overlay-mode-toggle .toggle-text {
    display: none;
  }

  .overlay-mode-toggle {
    padding: var(--space-sm);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    justify-content: center;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
