/**
 * XRayders Elegant Gaming Theme
 * Clean, modern gaming UI with refined aesthetics
 */

/* =====================================================
   CSS Custom Properties (Variables)
   ===================================================== */
:root {
  /* Base Dark Theme - Deeper, more uniform */
  --bg-primary: #0a0f1a;
  --bg-secondary: #0f1625;
  --bg-card: #141b2d;
  --bg-elevated: #1e2942;
  --bg-hover: #243352;

  /* Legacy aliases for compatibility */
  --esports-bg-primary: var(--bg-primary);
  --esports-bg-secondary: var(--bg-secondary);
  --esports-bg-card: var(--bg-card);
  --esports-bg-elevated: var(--bg-elevated);

  /* Accent Colors - Saturated but not neon */
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-green: #22c55e;
  --accent-gold: #fbbf24;
  --accent-red: #ef4444;
  --accent-purple: #a855f7;
  --accent-cyan: #06b6d4;

  /* Legacy neon aliases */
  --neon-cyan: var(--accent-cyan);
  --neon-cyan-dim: #0891b2;
  --neon-cyan-glow: 0 0 10px rgba(6, 182, 212, 0.3);
  --neon-purple: var(--accent-purple);
  --neon-purple-glow: 0 0 10px rgba(168, 85, 247, 0.3);
  --neon-gold: var(--accent-gold);
  --neon-gold-glow: 0 0 10px rgba(251, 191, 36, 0.3);

  /* Feedback Colors */
  --feedback-correct: var(--accent-green);
  --feedback-correct-glow: 0 0 15px rgba(34, 197, 94, 0.4);
  --feedback-wrong: var(--accent-red);
  --feedback-wrong-glow: 0 0 15px rgba(239, 68, 68, 0.4);

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Rank Colors - Keep gradients for badges */
  --rank-bronze: #cd7f32;
  --rank-bronze-bg: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%);
  --rank-silver: #c0c0c0;
  --rank-silver-bg: linear-gradient(135deg, #e8e8e8 0%, #a0a0a0 100%);
  --rank-gold: #fbbf24;
  --rank-gold-bg: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  --rank-diamond: #67e8f9;
  --rank-diamond-bg: linear-gradient(135deg, #67e8f9 0%, #06b6d4 100%);
  --rank-master: #f87171;
  --rank-master-bg: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
  --rank-grandmaster: #a855f7;
  --rank-grandmaster-bg: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);

  /* Typography */
  --font-display: 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, sans-serif;

  /* Spacing & Sizing */
  --hud-height: 64px;
  --card-radius: 16px;
  --badge-radius: 8px;
  --button-radius: 12px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-medium: 300ms ease;
  --transition-slow: 500ms ease;
}

/* =====================================================
   Base Overrides
   ===================================================== */

/* CRITICAL: Prevent horizontal overflow on all screens */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body.esports-theme {
  background: var(--esports-bg-primary);
  font-family: var(--font-body);
}

/* Landscape mode for play buttons */
@media (orientation: landscape) and (max-height: 500px) {
  .landscape\:flex-row {
    flex-direction: row !important;
  }
}

/* =====================================================
   Neon Text Effects
   ===================================================== */
.neon-text-cyan {
  color: var(--neon-cyan);
  text-shadow: var(--neon-cyan-glow);
}

.neon-text-gold {
  color: var(--neon-gold);
  text-shadow: var(--neon-gold-glow);
}

.neon-text-purple {
  color: var(--neon-purple);
  text-shadow: var(--neon-purple-glow);
}

.neon-text-correct {
  color: var(--feedback-correct);
  text-shadow: var(--feedback-correct-glow);
}

.neon-text-wrong {
  color: var(--feedback-wrong);
  text-shadow: var(--feedback-wrong-glow);
}

/* =====================================================
   Font Display (Orbitron)
   ===================================================== */
.font-display {
  font-family: var(--font-display);
}

/* =====================================================
   Esports Card Component
   ===================================================== */
.esports-card {
  background: linear-gradient(145deg, rgba(22, 25, 35, 0.95) 0%, rgba(12, 15, 22, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--card-radius);
  position: relative;
  overflow: hidden;
  transition: var(--transition-medium);
}

.esports-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-cyan));
  background-size: 200% 100%;
  animation: card-border-flow 4s linear infinite;
  opacity: 0.9;
}

@keyframes card-border-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.esports-card:hover {
  border-color: rgba(0, 240, 255, 0.3);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.15), inset 0 0 30px rgba(0, 240, 255, 0.02);
}

/* =====================================================
   LEADERBOARD ENHANCEMENTS
   ===================================================== */
.leaderboard-header {
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
}

.leaderboard-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--neon-cyan) 0%, #fff 50%, var(--neon-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
}

.leaderboard-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* Mode filter pills */
.leaderboard-mode-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.mode-pill {
  padding: 8px 16px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.25s ease;
}

.mode-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.mode-pill-active-cyan {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2) 0%, rgba(0, 180, 220, 0.1) 100%);
  border-color: rgba(0, 240, 255, 0.5);
  color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.mode-pill-active-gold {
  background: linear-gradient(135deg, rgba(255, 200, 0, 0.2) 0%, rgba(255, 160, 0, 0.1) 100%);
  border-color: rgba(255, 200, 0, 0.5);
  color: var(--neon-gold);
  box-shadow: 0 0 15px rgba(255, 200, 0, 0.2);
}

.mode-pill-active-green {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 160, 74, 0.1) 100%);
  border-color: rgba(34, 197, 94, 0.5);
  color: #22c55e;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

/* Period filter tabs */
.period-filter {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 1.5rem;
}

.period-tab {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.period-tab:hover {
  color: rgba(255, 255, 255, 0.8);
}

.period-tab-active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15) 0%, rgba(176, 38, 255, 0.1) 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* User rank banner */
.user-rank-banner {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.1) 0%, rgba(176, 38, 255, 0.05) 100%);
  border: 2px solid rgba(0, 240, 255, 0.3);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-rank-position {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--neon-cyan);
  text-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.user-rank-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

.user-rank-score {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--neon-gold);
}

/* Ranking list item */
.ranking-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all 0.25s ease;
}

.ranking-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.ranking-item-current {
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.3);
}

.ranking-position {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  margin-right: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
}

.ranking-position-1 {
  background: linear-gradient(135deg, rgba(255, 200, 0, 0.3) 0%, rgba(255, 150, 0, 0.2) 100%);
  color: var(--neon-gold);
  box-shadow: 0 0 10px rgba(255, 200, 0, 0.3);
}

.ranking-position-2 {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.2) 0%, rgba(150, 150, 150, 0.15) 100%);
  color: #c0c0c0;
}

.ranking-position-3 {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.2) 0%, rgba(180, 100, 30, 0.15) 100%);
  color: #cd7f32;
}

.ranking-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15) 0%, rgba(176, 38, 255, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  margin-right: 12px;
}

.ranking-info {
  flex: 1;
}

.ranking-name {
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.ranking-name-current {
  color: var(--neon-cyan);
}

.ranking-stats {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

.ranking-score {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--neon-gold);
  text-shadow: 0 0 10px rgba(255, 200, 0, 0.3);
}

.esports-card-gold::before {
  background: linear-gradient(90deg, var(--neon-gold), #ff8800);
}

.esports-card-gold:hover {
  border-color: rgba(255, 215, 0, 0.3);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.15), inset 0 0 30px rgba(255, 215, 0, 0.02);
}

/* =====================================================
   Rank Badges
   ===================================================== */
.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--badge-radius);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.rank-badge-bronze {
  background: var(--rank-bronze-bg);
  color: #fff;
  box-shadow: 0 2px 10px rgba(205, 127, 50, 0.3);
}

.rank-badge-silver {
  background: var(--rank-silver-bg);
  color: #333;
  box-shadow: 0 2px 10px rgba(192, 192, 192, 0.3);
}

.rank-badge-gold {
  background: var(--rank-gold-bg);
  color: #333;
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.rank-badge-diamond {
  background: var(--rank-diamond-bg);
  color: #333;
  box-shadow: 0 2px 10px rgba(185, 242, 255, 0.3);
}

.rank-badge-master {
  background: var(--rank-master-bg);
  color: #fff;
  box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
}

.rank-badge-grandmaster {
  background: var(--rank-grandmaster-bg);
  color: #fff;
  box-shadow: 0 2px 10px rgba(176, 38, 255, 0.3);
}

/* Large Rank Badge */
.rank-badge-lg {
  padding: 6px 16px;
  font-size: 0.85rem;
}

/* =====================================================
   Game HUD Styling - MEDICAL COMMAND CENTER
   ===================================================== */
.game-hud {
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.95) 0%, rgba(10, 10, 15, 0.8) 100%);
  backdrop-filter: blur(10px);
  height: var(--hud-height);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  max-width: 100vw;
  padding-left: 1rem;
  padding-right: 1rem;
}

.game-hud-bar {
  position: relative;
  background:
    linear-gradient(180deg, rgba(8, 12, 18, 0.98) 0%, rgba(12, 16, 22, 0.95) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.5), rgba(176, 38, 255, 0.5), transparent) 1;
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.6),
    inset 0 -1px 0 rgba(0, 240, 255, 0.1);
  width: 100%;
  max-width: 100vw;
}

/* Old round badge - kept for backward compatibility */
.hud-round-badge {
  display: none;
}

.hud-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
}

/* =====================================================
   HUD BOXES - Rounded containers for Image/Score
   ===================================================== */
.hud-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 14px;
  background: linear-gradient(145deg, rgba(20, 25, 35, 0.9) 0%, rgba(12, 15, 22, 0.95) 100%);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  min-width: 70px;
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hud-box-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 2px;
}

.hud-box-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.hud-box-value-lg {
  font-size: 1.4rem;
}

/* Cyan variant (Classic) */
.hud-box-cyan {
  border-color: rgba(0, 240, 255, 0.35);
  background: linear-gradient(145deg, rgba(0, 240, 255, 0.08) 0%, rgba(12, 15, 22, 0.95) 100%);
}
.hud-box-cyan .hud-box-label {
  color: rgba(0, 240, 255, 0.7);
}
.hud-box-cyan .hud-box-value {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

/* Gold variant (Spot the Nodule) */
.hud-box-gold {
  border-color: rgba(255, 200, 0, 0.4);
  background: linear-gradient(145deg, rgba(255, 200, 0, 0.08) 0%, rgba(12, 15, 22, 0.95) 100%);
}
.hud-box-gold .hud-box-label {
  color: rgba(255, 200, 0, 0.7);
}
.hud-box-gold .hud-box-value {
  color: var(--neon-gold);
  text-shadow: 0 0 10px rgba(255, 200, 0, 0.4);
}

/* Green variant (Ortho) */
.hud-box-green {
  border-color: rgba(34, 197, 94, 0.4);
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.08) 0%, rgba(12, 15, 22, 0.95) 100%);
}
.hud-box-green .hud-box-label {
  color: rgba(34, 197, 94, 0.7);
}
.hud-box-green .hud-box-value {
  color: #22c55e;
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

/* Score box - slightly larger */
.hud-box-score {
  border-color: rgba(255, 200, 0, 0.3);
  background: linear-gradient(145deg, rgba(255, 200, 0, 0.06) 0%, rgba(12, 15, 22, 0.95) 100%);
  min-width: 85px;
}
.hud-box-score .hud-box-label {
  color: rgba(255, 200, 0, 0.6);
}

/* =====================================================
   CIRCULAR TIMER - LARGE VERSION
   ===================================================== */
.hud-timer-circle-lg {
  position: relative;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-ring-lg {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-ring-bg {
  stroke: rgba(255, 255, 255, 0.1);
}

.timer-ring-progress {
  stroke: var(--neon-cyan);
  transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.6));
}

.timer-ring-progress.timer-warning {
  stroke: #ffaa00;
  filter: drop-shadow(0 0 8px rgba(255, 170, 0, 0.7));
}

.timer-ring-progress.timer-danger {
  stroke: #ff4444;
  filter: drop-shadow(0 0 10px rgba(255, 68, 68, 0.8));
  animation: timer-ring-danger 0.5s ease-in-out infinite;
}

@keyframes timer-ring-danger {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 10px rgba(255, 68, 68, 0.8)); }
  50% { opacity: 0.7; filter: drop-shadow(0 0 15px rgba(255, 68, 68, 1)); }
}

.timer-value-lg {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.timer-value-lg.timer-warning {
  color: #ffaa00;
  text-shadow: 0 0 8px rgba(255, 170, 0, 0.5);
}

.timer-value-lg.timer-danger {
  color: #ff4444;
  text-shadow: 0 0 10px rgba(255, 68, 68, 0.6);
  animation: timer-text-danger 0.5s ease-in-out infinite;
}

@keyframes timer-text-danger {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* =====================================================
   SCORE BLOCK WITH STREAK
   ===================================================== */
.hud-score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hud-streak-inline {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, rgba(255, 180, 0, 0.2) 0%, rgba(255, 140, 0, 0.1) 100%);
  border: 1px solid rgba(255, 180, 0, 0.4);
  border-radius: 10px;
  padding: 2px 8px;
  color: #ffb400;
  animation: streak-glow-inline 2s ease-in-out infinite;
}

.hud-streak-inline.streak-fire-inline {
  background: linear-gradient(135deg, rgba(255, 80, 80, 0.25) 0%, rgba(255, 50, 100, 0.15) 100%);
  border-color: rgba(255, 80, 80, 0.5);
  color: #ff5555;
  animation: streak-fire-inline 0.8s ease-in-out infinite;
}

@keyframes streak-glow-inline {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 180, 0, 0.3); }
  50% { box-shadow: 0 0 12px rgba(255, 180, 0, 0.5); }
}

@keyframes streak-fire-inline {
  0%, 100% {
    box-shadow: 0 0 8px rgba(255, 80, 80, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 15px rgba(255, 80, 80, 0.7);
    transform: scale(1.05);
  }
}

/* =====================================================
   HEARTS / LIVES
   ===================================================== */
.hud-heart {
  transition: all 0.3s ease;
}

.hud-heart-active {
  color: #ef4444;
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.8));
  animation: heart-beat 2s ease-in-out infinite;
}

.hud-heart-empty {
  color: rgba(255, 255, 255, 0.15);
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* =====================================================
   SPEED BONUS BADGE
   ===================================================== */
.hud-speed-bonus {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-family: var(--font-display);
  transition: all 0.3s ease;
}

.hud-speed-bonus.speed-excellent {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.2) 0%, rgba(0, 200, 100, 0.1) 100%);
  border: 1px solid rgba(0, 255, 136, 0.4);
  color: #00ff88;
  animation: speed-pulse 1s ease-in-out infinite;
}

.hud-speed-bonus.speed-good {
  background: linear-gradient(135deg, rgba(0, 200, 255, 0.15) 0%, rgba(0, 150, 200, 0.08) 100%);
  border: 1px solid rgba(0, 200, 255, 0.3);
  color: #00c8ff;
}

.hud-speed-bonus.speed-normal {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
}

@keyframes speed-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(0, 255, 136, 0.3); }
  50% { box-shadow: 0 0 15px rgba(0, 255, 136, 0.5); }
}

/* =====================================================
   QUIT BUTTON
   ===================================================== */
.hud-quit-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.2s ease;
  cursor: pointer;
}

.hud-quit-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* =====================================================
   TOOL BUTTONS (Zoom, Invert, Aiuto)
   ===================================================== */
.tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(30, 35, 45, 0.95) 0%, rgba(20, 25, 32, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
  min-width: 52px;
}

.tool-btn-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: all 0.25s ease;
}

.tool-btn-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tool-btn:hover {
  border-color: rgba(0, 200, 255, 0.4);
  background: linear-gradient(180deg, rgba(0, 200, 255, 0.1) 0%, rgba(20, 25, 32, 0.98) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.tool-btn:hover .tool-btn-icon {
  background: rgba(0, 200, 255, 0.15);
  color: #00c8ff;
}

.tool-btn-active {
  border-color: rgba(0, 240, 255, 0.6) !important;
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.15) 0%, rgba(0, 180, 220, 0.08) 100%) !important;
  color: #00f0ff;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.tool-btn-active .tool-btn-icon {
  background: rgba(0, 240, 255, 0.2);
  color: #00f0ff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

/* HELP button - GOLD color for visibility */
.tool-btn-help {
  border-color: rgba(255, 200, 0, 0.5);
  background: linear-gradient(180deg, rgba(255, 200, 0, 0.15) 0%, rgba(20, 25, 32, 0.98) 100%);
  animation: help-btn-glow 2s ease-in-out infinite;
}

.tool-btn-help .tool-btn-icon {
  background: rgba(255, 200, 0, 0.2);
  color: #ffc800;
}

.tool-btn-help .tool-btn-label {
  color: #ffc800;
  font-weight: 700;
}

.tool-btn-help:hover:not(.tool-btn-used) {
  border-color: rgba(255, 200, 0, 0.8);
  background: linear-gradient(180deg, rgba(255, 200, 0, 0.25) 0%, rgba(20, 25, 32, 0.98) 100%);
  box-shadow: 0 0 25px rgba(255, 200, 0, 0.35);
  transform: translateY(-2px) scale(1.02);
}

.tool-btn-help:hover:not(.tool-btn-used) .tool-btn-icon {
  background: rgba(255, 200, 0, 0.3);
  box-shadow: 0 0 12px rgba(255, 200, 0, 0.5);
}

@keyframes help-btn-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 200, 0, 0.2); }
  50% { box-shadow: 0 0 20px rgba(255, 200, 0, 0.35); }
}

.tool-btn-used {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: rgba(20, 25, 32, 0.8) !important;
}

.tool-btn-used .tool-btn-icon {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.3);
}

/* =====================================================
   50/50 HINT BUTTON
   ===================================================== */
.hint-5050-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(139, 69, 219, 0.08) 100%);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 10px;
  color: #a855f7;
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.hint-5050-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(168, 85, 247, 0.2);
  border-radius: 6px;
}

.hint-5050-label {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.hint-5050-btn:hover:not(.hint-5050-used) {
  border-color: rgba(168, 85, 247, 0.7);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25) 0%, rgba(139, 69, 219, 0.15) 100%);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
  transform: translateY(-1px);
}

.hint-5050-used {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: rgba(40, 40, 50, 0.5) !important;
  color: rgba(255, 255, 255, 0.4);
}

.hint-5050-used .hint-5050-icon {
  background: rgba(255, 255, 255, 0.05);
}

/* Old streak badge - kept for backward compatibility */
.hud-streak-badge {
  display: none; /* Hidden - using inline version now */
}

.hud-stat {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
}

.hud-round {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.hud-round-dim {
  color: rgba(255, 255, 255, 0.4);
}


/* =====================================================
   Streak Badge Animation
   ===================================================== */
.streak-badge {
  background: linear-gradient(135deg, var(--neon-gold) 0%, #ff8800 100%);
  color: #000;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  animation: streak-pulse 1.5s ease-in-out infinite;
}

@keyframes streak-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.7);
  }
}

/* =====================================================
   XP Progress Bar
   ===================================================== */
.xp-progress-container {
  background: var(--esports-bg-primary);
  border-radius: 10px;
  height: 20px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.xp-progress-fill {
  background: linear-gradient(90deg, var(--neon-cyan) 0%, var(--neon-purple) 100%);
  height: 100%;
  border-radius: 10px;
  transition: width 1s ease-out;
  position: relative;
}

.xp-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Mini XP Bar (for navbar) */
.xp-progress-mini {
  height: 6px;
  border-radius: 3px;
}

.xp-progress-mini .xp-progress-fill {
  border-radius: 3px;
}

/* =====================================================
   Player Card (Profile)
   ===================================================== */
.player-card {
  background: var(--esports-bg-card);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--card-radius);
  overflow: hidden;
  position: relative;
}

.player-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.player-card.rank-bronze { border-color: var(--rank-bronze); }
.player-card.rank-silver { border-color: var(--rank-silver); }
.player-card.rank-gold { border-color: var(--rank-gold); }
.player-card.rank-diamond { border-color: var(--rank-diamond); }
.player-card.rank-master { border-color: var(--rank-master); }
.player-card.rank-grandmaster { border-color: var(--rank-grandmaster); }

/* =====================================================
   Leaderboard Tournament Style
   ===================================================== */
.leaderboard-row {
  transition: var(--transition-fast);
}

.leaderboard-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.leaderboard-rank-1 {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.15) 0%, transparent 100%);
  border-left: 3px solid var(--neon-gold);
}

.leaderboard-rank-2 {
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.15) 0%, transparent 100%);
  border-left: 3px solid var(--rank-silver);
}

.leaderboard-rank-3 {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.15) 0%, transparent 100%);
  border-left: 3px solid var(--rank-bronze);
}

.leaderboard-current-user {
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.1) 0%, transparent 100%);
  border-left: 3px solid var(--neon-cyan);
}

/* Rank Position Numbers */
.rank-position {
  font-family: var(--font-display);
  font-weight: 700;
  min-width: 32px;
}

.rank-position-1 { color: var(--neon-gold); }
.rank-position-2 { color: var(--rank-silver); }
.rank-position-3 { color: var(--rank-bronze); }

/* Leaderboard Desktop Layout */
.leaderboard-content {
  width: 100%;
}

/* Custom scrollbar for leaderboard list on desktop */
@media (min-width: 1024px) {
  .leaderboard-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(6, 182, 212, 0.4) rgba(20, 27, 45, 0.6);
  }

  .leaderboard-list::-webkit-scrollbar {
    width: 6px;
  }

  .leaderboard-list::-webkit-scrollbar-track {
    background: rgba(20, 27, 45, 0.6);
    border-radius: 3px;
  }

  .leaderboard-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.6), rgba(6, 182, 212, 0.3));
    border-radius: 3px;
  }

  .leaderboard-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.8), rgba(6, 182, 212, 0.5));
  }

  .leaderboard-podium {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 1.5rem;
  }
}

/* =====================================================
   Victory/Defeat Screen
   ===================================================== */
.result-victory {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.08) 0%, transparent 50%);
}

.result-defeat {
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.08) 0%, transparent 50%);
}

.result-title-victory {
  color: var(--feedback-correct);
  text-shadow: var(--feedback-correct-glow);
  font-family: var(--font-display);
}

.result-title-defeat {
  color: var(--feedback-wrong);
  text-shadow: var(--feedback-wrong-glow);
  font-family: var(--font-display);
}

/* =====================================================
   Mode Selection Cards
   ===================================================== */
.mode-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-medium);
}

.mode-card-icon-cyan {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2) 0%, rgba(0, 240, 255, 0.05) 100%);
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.mode-card-icon-gold {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.05) 100%);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.esports-card:hover .mode-card-icon-cyan {
  border-color: rgba(0, 240, 255, 0.6);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.esports-card:hover .mode-card-icon-gold {
  border-color: rgba(255, 215, 0, 0.6);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

/* =====================================================
   Stat Badges
   ===================================================== */
.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-badge-cyan {
  background: rgba(0, 240, 255, 0.15);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.stat-badge-gold {
  background: rgba(255, 215, 0, 0.15);
  color: var(--neon-gold);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.stat-badge-green {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.stat-badge-purple {
  background: rgba(176, 38, 255, 0.15);
  color: var(--neon-purple);
  border: 1px solid rgba(176, 38, 255, 0.3);
}

.stat-badge-red {
  background: rgba(255, 51, 102, 0.15);
  color: var(--feedback-wrong);
  border: 1px solid rgba(255, 51, 102, 0.3);
}

/* =====================================================
   Navigation Esports Style
   ===================================================== */
.navbar-esports {
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  max-width: 100vw;
}

/* Prevent navbar content from overflowing */
.navbar-esports .flex-1 {
  min-width: 0;
  overflow: hidden;
}

.navbar-esports .flex-none {
  flex-shrink: 0;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--neon-cyan);
  text-shadow: var(--neon-cyan-glow);
  letter-spacing: 0.05em;
}

/* =====================================================
   Button Neon Styles
   ===================================================== */
.btn-neon-cyan {
  background: transparent;
  border: 2px solid var(--neon-cyan);
  color: var(--neon-cyan);
  transition: var(--transition-medium);
}

.btn-neon-cyan:hover {
  background: rgba(0, 240, 255, 0.1);
  box-shadow: var(--neon-cyan-glow);
}

.btn-neon-gold {
  background: transparent;
  border: 2px solid var(--neon-gold);
  color: var(--neon-gold);
  transition: var(--transition-medium);
}

.btn-neon-gold:hover {
  background: rgba(255, 215, 0, 0.1);
  box-shadow: var(--neon-gold-glow);
}

/* Filled variants */
.btn-filled-cyan {
  background: var(--neon-cyan);
  color: #000;
  font-weight: 600;
}

.btn-filled-cyan:hover {
  box-shadow: var(--neon-cyan-glow);
}

.btn-filled-gold {
  background: var(--neon-gold);
  color: #000;
  font-weight: 600;
}

.btn-filled-gold:hover {
  box-shadow: var(--neon-gold-glow);
}

/* =====================================================
   Avatar Ring Colors
   ===================================================== */
.avatar-ring-bronze { --tw-ring-color: var(--rank-bronze); }
.avatar-ring-silver { --tw-ring-color: var(--rank-silver); }
.avatar-ring-gold { --tw-ring-color: var(--rank-gold); }
.avatar-ring-diamond { --tw-ring-color: var(--rank-diamond); }
.avatar-ring-master { --tw-ring-color: var(--rank-master); }
.avatar-ring-grandmaster { --tw-ring-color: var(--rank-grandmaster); }

/* =====================================================
   Score Popup Animation (CSS Fallback)
   ===================================================== */
@keyframes score-float {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-60px) scale(1.2);
    opacity: 0;
  }
}

.score-popup-anim {
  animation: score-float 1.2s ease-out forwards;
}

/* =====================================================
   Level Up Animation (CSS Fallback)
   ===================================================== */
@keyframes level-up-appear {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.level-up-anim {
  animation: level-up-appear 0.6s ease-out;
}

/* =====================================================
   Glow Effects
   ===================================================== */
.glow-cyan {
  box-shadow: var(--neon-cyan-glow);
}

.glow-gold {
  box-shadow: var(--neon-gold-glow);
}

.glow-purple {
  box-shadow: var(--neon-purple-glow);
}

.glow-correct {
  box-shadow: var(--feedback-correct-glow);
}

.glow-wrong {
  box-shadow: var(--feedback-wrong-glow);
}

/* =====================================================
   Responsive Adjustments
   ===================================================== */
@media (max-width: 640px) {
  :root {
    --hud-height: 56px;
    --card-radius: 12px;
  }

  .hud-score {
    font-size: 1.25rem;
  }

  .hud-timer {
    font-size: 1rem;
  }

  .rank-badge {
    padding: 3px 8px;
    font-size: 0.65rem;
  }

  .streak-badge {
    padding: 3px 10px;
    font-size: 0.75rem;
  }
}

/* =====================================================
   Sound Toggle Button
   ===================================================== */
.sound-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  transition: var(--transition-fast);
}

.sound-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sound-toggle.muted {
  color: rgba(255, 255, 255, 0.3);
}

.sound-toggle.muted:hover {
  color: rgba(255, 255, 255, 0.5);
}

/* =====================================================
   Gaming Popup Styles
   ===================================================== */
.game-popup {
  background: linear-gradient(180deg, #1a1a24 0%, #12121a 100%);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 20px;
  box-shadow:
    0 0 40px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(0, 240, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  min-width: 340px;
  max-width: 90vw;
  width: 380px;
  position: fixed;
  animation: popup-gaming-appear 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: visible;
}

.game-popup-compact {
  width: 340px;
  min-width: 300px;
  padding: 24px;
}

@keyframes popup-gaming-appear {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Popup Header */
.game-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Hint Button Gaming Style */
.hint-btn-gaming {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 10px;
  color: #60a5fa;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.hint-btn-gaming:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(59, 130, 246, 0.2) 100%);
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.hint-btn-gaming.hint-btn-used {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Options List */
.game-popup-options {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 45vh;
  overflow-y: auto;
}

.game-popup-options::-webkit-scrollbar {
  width: 6px;
}

.game-popup-options::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.game-popup-options::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.3);
  border-radius: 3px;
}

/* Pathology Option Button */
.pathology-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(20, 25, 35, 0.9) 0%, rgba(15, 18, 25, 0.95) 100%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: #e5e5e5;
  text-align: left;
  transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
}

/* Animated gradient border on hover */
.pathology-option::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.4), rgba(176, 38, 255, 0.4), transparent);
  background-size: 200% 100%;
  border-radius: 16px;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

/* Inner shine effect */
.pathology-option::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.pathology-option:hover {
  border-color: rgba(0, 240, 255, 0.5);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.08) 0%, rgba(15, 18, 25, 0.95) 100%);
  transform: translateX(4px);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    -4px 0 20px rgba(0, 240, 255, 0.15);
}

.pathology-option:hover::before {
  opacity: 1;
  animation: gradient-slide 2s linear infinite;
}

.pathology-option:hover::after {
  left: 150%;
}

@keyframes gradient-slide {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.pathology-option:active {
  transform: translateX(2px) scale(0.98);
}

/* Selected State - More dramatic */
.pathology-option-selected {
  border-color: var(--neon-cyan) !important;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15) 0%, rgba(0, 180, 220, 0.08) 100%) !important;
  transform: translateX(6px);
  box-shadow:
    0 0 25px rgba(0, 240, 255, 0.25),
    -6px 0 30px rgba(0, 240, 255, 0.2),
    inset 0 0 20px rgba(0, 240, 255, 0.05);
}

.pathology-option-selected .pathology-option-index {
  background: linear-gradient(135deg, var(--neon-cyan) 0%, #00b8d4 100%);
  color: #000;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.6);
  transform: scale(1.1);
}

.pathology-option-selected .pathology-option-label {
  color: #fff;
  text-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

/* Index Number - Enhanced */
.pathology-option-index {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
  transition: all 0.25s ease;
  transition: all 0.15s ease;
}

/* Label */
.pathology-option-label {
  flex: 1;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.3;
}

/* Check Icon */
.pathology-option-check {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-cyan);
  animation: check-appear 0.2s ease-out;
}

@keyframes check-appear {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Action Buttons Container */
.game-popup-actions {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  max-width: 100%;
}

/* Cancel Button */
.btn-popup-cancel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-display);
  white-space: nowrap;
  overflow: visible;
  font-weight: 700;
  font-size: 0.8rem;
  transition: all 0.15s ease;
}

.btn-popup-cancel:hover {
  background: rgba(255, 51, 102, 0.1);
  border-color: rgba(255, 51, 102, 0.3);
  color: #ff6b6b;
}

/* Confirm Button */
.btn-popup-confirm {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  background: rgba(0, 240, 255, 0.1);
  border: 2px solid rgba(0, 240, 255, 0.3);
  border-radius: 12px;
  color: rgba(0, 240, 255, 0.5);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: visible;
}

.btn-popup-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-popup-confirm-active {
  background: linear-gradient(135deg, var(--neon-cyan) 0%, #00b8c5 100%);
  border-color: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
}

.btn-popup-confirm-active:hover:not(:disabled) {
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.6);
  transform: translateY(-2px);
}

/* Gold variant for Spot the Nodule */
.btn-popup-confirm-gold {
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.3);
  color: rgba(255, 215, 0, 0.5);
}

.btn-popup-confirm-gold.btn-popup-confirm-active {
  background: linear-gradient(135deg, var(--neon-gold) 0%, #ffa500 100%);
  border-color: var(--neon-gold);
  color: #000;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
}

.btn-popup-confirm-gold.btn-popup-confirm-active:hover:not(:disabled) {
  box-shadow: 0 0 35px rgba(255, 215, 0, 0.6);
}

/* Pulse glow effect for icon */
.pulse-glow-gold {
  animation: pulse-gold 2s ease-in-out infinite;
}

@keyframes pulse-gold {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.6), 0 0 60px rgba(255, 215, 0, 0.2);
  }
}

/* =====================================================
   Result Popup Specific Styles
   ===================================================== */

/* Overlay variant for top positioning - transparent to see image */
.popup-overlay-top {
  align-items: flex-start;
  padding-top: 70px;
  background: transparent;
  pointer-events: none;
}

.popup-overlay-top > * {
  pointer-events: auto;
}

.game-popup-top {
  position: relative;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  animation: popup-slide-down 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Stronger shadow to stand out without overlay */
  box-shadow:
    0 10px 50px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

@keyframes popup-slide-down {
  0% {
    opacity: 0;
    transform: translateY(-30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.game-popup-result {
  width: 340px;
  text-align: center;
}

.game-popup-result.result-correct {
  border-color: rgba(0, 255, 136, 0.3);
  box-shadow:
    0 0 40px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(0, 255, 136, 0.15);
}

.game-popup-result.result-wrong {
  border-color: rgba(255, 51, 102, 0.3);
  box-shadow:
    0 0 40px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(255, 51, 102, 0.15);
}

.result-header {
  padding: 20px 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.result-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: result-icon-appear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.result-icon-correct {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.2) 0%, rgba(0, 255, 136, 0.05) 100%);
  border: 2px solid var(--feedback-correct);
  color: var(--feedback-correct);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
}

.result-icon-wrong {
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.2) 0%, rgba(255, 51, 102, 0.05) 100%);
  border: 2px solid var(--feedback-wrong);
  color: var(--feedback-wrong);
  box-shadow: 0 0 30px rgba(255, 51, 102, 0.3);
}

@keyframes result-icon-appear {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

.result-scores {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.2);
}

.result-score-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.result-score-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
}

.level-up-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.2) 50%, rgba(255, 215, 0, 0.1) 100%);
  border-top: 1px solid rgba(255, 215, 0, 0.3);
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
  animation: level-up-shine 2s ease-in-out infinite;
}

@keyframes level-up-shine {
  0%, 100% {
    background-position: -200% 0;
  }
  50% {
    background-position: 200% 0;
  }
}

.result-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 16px;
}

.result-answer {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.result-answer-correct {
  border-color: rgba(0, 255, 136, 0.3);
  background: rgba(0, 255, 136, 0.05);
}

.result-answer-correct .font-medium {
  color: var(--feedback-correct);
}

.result-answer-wrong {
  border-color: rgba(255, 51, 102, 0.3);
  background: rgba(255, 51, 102, 0.05);
}

.result-answer-wrong .font-medium {
  color: var(--feedback-wrong);
}

/* =====================================================
   Round Progress Bar - Enhanced
   ===================================================== */
.round-progress-bar {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
  border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.round-progress-segment {
  position: relative;
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  overflow: hidden;
}

/* Inner glow track */
.round-progress-segment::before {
  content: '';
  position: absolute;
  inset: 1px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 2px;
}

.round-progress-segment.completed {
  background: linear-gradient(90deg, var(--neon-cyan) 0%, rgba(0, 200, 255, 0.8) 100%);
  box-shadow:
    0 0 8px rgba(0, 240, 255, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.3);
}

.round-progress-segment.completed::before {
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 50%);
}

.round-progress-segment.current {
  background: linear-gradient(90deg, var(--neon-cyan) 0%, var(--neon-purple) 100%);
  box-shadow:
    0 0 12px rgba(0, 240, 255, 0.6),
    0 0 25px rgba(176, 38, 255, 0.3);
  animation: progress-current-pulse 1.2s ease-in-out infinite;
}

.round-progress-segment.current::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: progress-shine 2s ease-in-out infinite;
}

@keyframes progress-current-pulse {
  0%, 100% {
    box-shadow:
      0 0 12px rgba(0, 240, 255, 0.6),
      0 0 25px rgba(176, 38, 255, 0.3);
  }
  50% {
    box-shadow:
      0 0 18px rgba(0, 240, 255, 0.8),
      0 0 35px rgba(176, 38, 255, 0.5);
  }
}

@keyframes progress-shine {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

/* =====================================================
   Result Toast - Compact Bar for Mobile Image Visibility
   ===================================================== */
.result-toast-container {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  z-index: 55;
  display: flex;
  justify-content: center;
  padding: 12px 16px;
  pointer-events: none;
}

.result-toast {
  pointer-events: auto;
  background: linear-gradient(180deg, rgba(15, 18, 25, 0.92) 0%, rgba(10, 12, 18, 0.95) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  cursor: grab;
  user-select: none;
  touch-action: none;
  box-shadow:
    0 15px 50px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: toast-entrance 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 520px;
  width: 100%;
  animation: toast-slide-down 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  transition: transform 0.1s ease-out;
}

.result-toast:active {
  cursor: grabbing;
}

.result-toast.dragging {
  cursor: grabbing;
  transition: none;
}

.result-toast-correct {
  border-color: rgba(0, 255, 136, 0.5);
  background: linear-gradient(180deg, rgba(0, 255, 136, 0.08) 0%, rgba(10, 12, 18, 0.95) 100%);
  box-shadow:
    0 15px 50px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 255, 136, 0.2),
    inset 0 1px 0 rgba(0, 255, 136, 0.2);
  animation: toast-entrance 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), toast-correct-glow 2s ease-in-out infinite;
}

.result-toast-wrong {
  border-color: rgba(255, 51, 102, 0.5);
  background: linear-gradient(180deg, rgba(255, 51, 102, 0.08) 0%, rgba(10, 12, 18, 0.95) 100%);
  box-shadow:
    0 15px 50px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(255, 51, 102, 0.2),
    inset 0 1px 0 rgba(255, 51, 102, 0.2);
  animation: toast-entrance 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), toast-wrong-shake 0.5s ease-out;
}

@keyframes toast-entrance {
  0% {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-correct-glow {
  0%, 100% {
    box-shadow:
      0 15px 50px rgba(0, 0, 0, 0.5),
      0 0 30px rgba(0, 255, 136, 0.15);
  }
  50% {
    box-shadow:
      0 15px 50px rgba(0, 0, 0, 0.5),
      0 0 50px rgba(0, 255, 136, 0.3);
  }
}

@keyframes toast-wrong-shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

@keyframes toast-slide-down {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Main row: Icon + Title + Scores in horizontal layout */
.result-toast-main {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
}

.result-toast-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

/* Animated ring around icon */
.result-toast-icon::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  animation: icon-ring-spin 3s linear infinite;
}

.result-toast-icon-correct {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.25) 0%, rgba(0, 200, 100, 0.1) 100%);
  border: 2px solid var(--feedback-correct);
  color: var(--feedback-correct);
  box-shadow:
    0 0 20px rgba(0, 255, 136, 0.4),
    inset 0 0 15px rgba(0, 255, 136, 0.1);
  animation: icon-correct-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.result-toast-icon-correct::before {
  border-color: rgba(0, 255, 136, 0.3) transparent rgba(0, 255, 136, 0.3) transparent;
}

.result-toast-icon-wrong {
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.25) 0%, rgba(200, 40, 80, 0.1) 100%);
  border: 2px solid var(--feedback-wrong);
  color: var(--feedback-wrong);
  box-shadow:
    0 0 20px rgba(255, 51, 102, 0.4),
    inset 0 0 15px rgba(255, 51, 102, 0.1);
  animation: icon-wrong-pulse 0.6s ease-out;
}

.result-toast-icon-wrong::before {
  border-color: rgba(255, 51, 102, 0.3) transparent rgba(255, 51, 102, 0.3) transparent;
}

@keyframes icon-ring-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes icon-correct-pop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes icon-wrong-pulse {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.15); }
  50% { transform: scale(0.95); }
  75% { transform: scale(1.05); }
}

.result-toast-title {
  flex: 1;
  font-size: 1.15rem;
  white-space: nowrap;
}

.result-toast-scores {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  white-space: nowrap;
}

/* Answers row - compact horizontal */
.result-toast-answers {
  display: flex;
  gap: 16px;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.result-toast-answer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

/* Level Up Banner in Toast */
.result-toast-levelup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.2) 50%, rgba(255, 215, 0, 0.1) 100%);
  border-top: 1px solid rgba(255, 215, 0, 0.3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--neon-gold);
  text-shadow: var(--neon-gold-glow);
}

/* Continue Button */
.result-toast-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--neon-cyan) 0%, #00b8c5 100%);
  border: none;
  border-radius: 0 0 18px 18px;
  color: #000;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  cursor: pointer;
}

.result-toast-btn:hover {
  background: linear-gradient(135deg, #00d8e8 0%, var(--neon-cyan) 100%);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.result-toast-btn:active {
  transform: scale(0.98);
}

/* =====================================================
   Double or Nothing (Lascia o Raddoppia) Styles
   ===================================================== */
.double-lost-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(90deg, rgba(255, 51, 102, 0.15) 0%, rgba(255, 51, 102, 0.25) 50%, rgba(255, 51, 102, 0.15) 100%);
  border-top: 1px solid rgba(255, 51, 102, 0.4);
  color: var(--feedback-wrong);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  animation: lost-shake 0.5s ease-in-out;
}

@keyframes lost-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.double-or-nothing-section {
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 215, 0, 0.03) 100%);
  border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.double-or-nothing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.double-or-nothing-buttons {
  display: flex;
  gap: 10px;
}

.don-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all 0.2s ease;
  cursor: pointer;
}

.don-btn-keep {
  background: rgba(0, 255, 136, 0.1);
  border: 2px solid rgba(0, 255, 136, 0.3);
  color: var(--feedback-correct);
}

.don-btn-keep:hover {
  background: rgba(0, 255, 136, 0.2);
  border-color: var(--feedback-correct);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.don-btn-double {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 140, 0, 0.15) 100%);
  border: 2px solid rgba(255, 215, 0, 0.4);
  color: var(--neon-gold);
  position: relative;
  overflow: hidden;
}

.don-btn-double::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255, 215, 0, 0.1) 50%, transparent 60%);
  animation: shine-sweep 2s ease-in-out infinite;
}

@keyframes shine-sweep {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

.don-btn-double:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25) 0%, rgba(255, 140, 0, 0.25) 100%);
  border-color: var(--neon-gold);
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
  transform: scale(1.02);
}

.don-potential {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  margin-left: 4px;
}

/* =====================================================
   Hero Section - Home Page
   ===================================================== */
.hero-section {
  position: relative;
}

.hero-logo-container {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto;
}

.hero-logo-ring {
  position: absolute;
  inset: -8px;
  border: 2px solid rgba(0, 240, 255, 0.3);
  border-radius: 50%;
  animation: hero-ring-spin 10s linear infinite;
}

.hero-logo-ring::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon-cyan);
  transform: translateX(-50%);
}

@keyframes hero-ring-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-logo-icon {
  width: 80px;
  height: 80px;
  color: var(--neon-cyan);
  filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.5));
}

.hero-title {
  letter-spacing: 0.1em;
}

.hero-title-x {
  color: var(--neon-cyan);
  text-shadow: 0 0 30px rgba(0, 240, 255, 0.8), 0 0 60px rgba(0, 240, 255, 0.4);
}

.hero-title-ray {
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Player Stats Bar */
.player-stats-bar {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.05) 0%, rgba(176, 38, 255, 0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px 16px;
}

/* Mode Card Enhanced */
.mode-card-enhanced {
  transition: all 0.3s ease;
}

.mode-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

/* Feature Highlight */
.feature-highlight {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 140, 0, 0.03) 100%);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  position: relative;
  overflow: hidden;
}

.feature-highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 215, 0, 0.1) 50%, transparent 100%);
  animation: feature-shine 3s ease-in-out infinite;
}

@keyframes feature-shine {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(50%); }
}

.feature-highlight-content {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.feature-highlight-icon {
  font-size: 1.5rem;
  animation: icon-bounce 2s ease-in-out infinite;
}

@keyframes icon-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* =====================================================
   Results Page Stats Cards
   ===================================================== */
.results-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #12121a;
  border-radius: 12px;
  padding: 12px 8px;
  min-height: 70px;
}

.results-stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
}

/* =====================================================
   Home Page Tiles - Arcade Style (matching game-mode-card)
   ===================================================== */
.home-tile {
  --tile-color: 180, 100, 255;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 12px;
  background: linear-gradient(180deg, rgba(var(--tile-color), 0.08) 0%, rgba(8, 8, 12, 0.98) 100%);
  border: 2px solid rgba(var(--tile-color), 0.4);
  border-radius: 1rem;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Scanline overlay */
.home-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
  z-index: 10;
  opacity: 0.5;
}

/* Corner accents */
.home-tile::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(var(--tile-color), 0.3);
  border-radius: 0.75rem;
  pointer-events: none;
  transition: all 0.4s ease;
  clip-path: polygon(
    0 0, 16px 0, 16px 2px, 2px 2px, 2px 16px, 0 16px,
    0 100%, 0 calc(100% - 16px), 2px calc(100% - 16px), 2px calc(100% - 2px), 16px calc(100% - 2px), 16px 100%,
    100% 100%, calc(100% - 16px) 100%, calc(100% - 16px) calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) calc(100% - 16px), 100% calc(100% - 16px),
    100% 0, 100% 16px, calc(100% - 2px) 16px, calc(100% - 2px) 2px, calc(100% - 16px) 2px, calc(100% - 16px) 0
  );
}

.home-tile:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(var(--tile-color), 0.9);
  box-shadow:
    0 0 30px rgba(var(--tile-color), 0.4),
    0 0 60px rgba(var(--tile-color), 0.2),
    inset 0 0 30px rgba(var(--tile-color), 0.1);
}

.home-tile:hover::after {
  border-color: rgba(var(--tile-color), 0.7);
  box-shadow: 0 0 8px rgba(var(--tile-color), 0.5);
}

.home-tile:active {
  transform: translateY(-2px) scale(0.98);
  transition-duration: 0.1s;
}

/* Icon wrapper with glow */
.home-tile-icon {
  position: relative;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(var(--tile-color));
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  filter: drop-shadow(0 0 8px rgba(var(--tile-color), 0.4));
  z-index: 1;
}

/* Glow orb behind icon */
.home-tile-icon::before {
  content: '';
  position: absolute;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(var(--tile-color), 0.25) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(12px);
  opacity: 0.6;
  transition: all 0.4s ease;
  z-index: -1;
}

.home-tile:hover .home-tile-icon {
  transform: scale(1.15) translateY(-2px);
  filter: drop-shadow(0 0 15px rgba(var(--tile-color), 0.6));
}

.home-tile:hover .home-tile-icon::before {
  width: 100%;
  height: 100%;
  opacity: 1;
}

.home-tile-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgb(var(--tile-color));
  text-shadow: 0 0 10px currentColor;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.home-tile:hover .home-tile-label {
  text-shadow: 0 0 15px currentColor, 0 0 30px currentColor;
  letter-spacing: 0.15em;
}

.home-tile-sub {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.home-tile:hover .home-tile-sub {
  color: rgba(255, 255, 255, 0.8);
}

/* Color variants with idle pulse animation */
.home-tile-purple {
  --tile-color: 180, 100, 255;
  animation: tilePulsePurple 4s ease-in-out infinite;
}
.home-tile-red {
  --tile-color: 255, 80, 80;
  animation: tilePulseRed 4s ease-in-out infinite 0.5s;
}
.home-tile-gray {
  --tile-color: 160, 170, 190;
  animation: tilePulseGray 4s ease-in-out infinite 1s;
}
.home-tile-cyan {
  --tile-color: 0, 220, 255;
  animation: tilePulseCyan 4s ease-in-out infinite;
}
.home-tile-gold {
  --tile-color: 255, 180, 20;
  animation: tilePulseGold 4s ease-in-out infinite 0.5s;
}
.home-tile-green {
  --tile-color: 50, 220, 120;
  animation: tilePulseGreen 4s ease-in-out infinite 1s;
}

@keyframes tilePulsePurple {
  0%, 100% { box-shadow: 0 0 15px rgba(180, 100, 255, 0.15); }
  50% { box-shadow: 0 0 25px rgba(180, 100, 255, 0.3); }
}
@keyframes tilePulseRed {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 80, 80, 0.15); }
  50% { box-shadow: 0 0 25px rgba(255, 80, 80, 0.3); }
}
@keyframes tilePulseGray {
  0%, 100% { box-shadow: 0 0 15px rgba(160, 170, 190, 0.1); }
  50% { box-shadow: 0 0 25px rgba(160, 170, 190, 0.2); }
}
@keyframes tilePulseCyan {
  0%, 100% { box-shadow: 0 0 15px rgba(0, 220, 255, 0.15); }
  50% { box-shadow: 0 0 25px rgba(0, 220, 255, 0.3); }
}
@keyframes tilePulseGold {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 180, 20, 0.15); }
  50% { box-shadow: 0 0 25px rgba(255, 180, 20, 0.3); }
}
@keyframes tilePulseGreen {
  0%, 100% { box-shadow: 0 0 15px rgba(50, 220, 120, 0.15); }
  50% { box-shadow: 0 0 25px rgba(50, 220, 120, 0.3); }
}

/* Mobile Optimizations for HUD */
@media (max-width: 480px) {
  .hud-box {
    padding: 4px 10px;
    min-width: 60px;
    border-radius: 10px;
  }

  .hud-box-label {
    font-size: 0.5rem;
  }

  .hud-box-value {
    font-size: 0.95rem;
  }

  .hud-box-value-lg {
    font-size: 1.15rem;
  }

  .hud-box-score {
    min-width: 70px;
  }

  .hud-timer-circle-lg {
    width: 46px;
    height: 46px;
  }

  .timer-value-lg {
    font-size: 0.9rem;
  }

  .hud-streak-inline {
    padding: 1px 6px;
  }

  .hud-streak-inline svg {
    width: 10px;
    height: 10px;
  }

  .hud-streak-inline span {
    font-size: 0.6rem;
  }

  .tool-btn {
    padding: 5px 7px;
    min-width: 42px;
  }

  .tool-btn-icon {
    width: 22px;
    height: 22px;
  }

  .tool-btn-icon svg {
    width: 14px;
    height: 14px;
  }

  .tool-btn-label {
    font-size: 0.5rem;
  }

  .hint-5050-btn {
    padding: 5px 8px;
  }

  .hint-5050-icon {
    width: 18px;
    height: 18px;
  }

  .hint-5050-label {
    font-size: 0.65rem;
  }
}

/* Mobile Optimizations for Popup */
@media (max-width: 480px) {
  .game-popup {
    width: calc(100vw - 32px);
    min-width: unset;
    max-width: unset;
    border-radius: 16px;
  }

  .game-popup-compact {
    width: calc(100vw - 32px);
    padding: 20px;
  }

  .game-popup-result {
    width: calc(100vw - 32px);
    margin: 0 auto;
  }

  /* Top positioning adjustments for mobile - very top to show image */
  .popup-overlay-top {
    padding-top: 56px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .game-popup-top {
    max-height: 55vh;
    overflow-y: auto;
  }

  .game-popup-options {
    max-height: 40vh;
    padding: 10px 14px;
    gap: 6px;
  }

  .pathology-option {
    padding: 12px 14px;
    gap: 12px;
  }

  .pathology-option:hover {
    transform: translateX(3px);
  }

  .pathology-option-selected {
    transform: translateX(4px);
  }

  .pathology-option-label {
    font-size: 0.9rem;
  }

  .pathology-option-index {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .game-popup-actions {
    padding: 14px 20px;
  }

  .btn-popup-cancel,
  .btn-popup-confirm {
    padding: 12px 16px;
    font-size: 0.75rem;
  }

  /* Result popup mobile improvements - compact to show image */
  .result-header {
    padding: 12px 16px 8px;
  }

  .result-icon {
    width: 44px;
    height: 44px;
  }

  .result-icon svg {
    width: 24px;
    height: 24px;
  }

  .result-title {
    font-size: 1.1rem !important;
    margin-top: 8px !important;
  }

  .result-scores {
    gap: 16px;
    padding: 10px 16px;
  }

  .result-score-item span:first-child {
    font-size: 0.6rem !important;
  }

  .result-score-item span:last-child {
    font-size: 1.25rem !important;
  }

  .result-score-divider {
    height: 30px;
  }

  .result-answers {
    padding: 8px 12px;
    gap: 6px;
  }

  .result-answer {
    padding: 8px 10px;
  }

  .result-answer .text-xs {
    font-size: 0.6rem;
  }

  .result-answer .font-medium {
    font-size: 0.75rem;
  }

  .level-up-banner {
    padding: 8px 12px;
    font-size: 0.75rem;
    gap: 6px;
  }

  .level-up-banner svg {
    width: 18px;
    height: 18px;
  }

  .game-popup-actions {
    padding: 10px 12px;
  }

  .btn-popup-confirm {
    padding: 10px 14px;
    font-size: 0.7rem;
  }

  /* Round progress bar mobile */
  .round-progress-bar {
    gap: 3px;
    padding: 0 12px;
  }

  .round-progress-segment {
    height: 3px;
  }

  /* Result Toast Mobile */
  .result-toast-container {
    top: 65px;
    padding: 8px 12px;
  }

  .result-toast {
    border-radius: 16px;
  }

  .result-toast-main {
    gap: 12px;
    padding: 12px 14px;
  }

  .result-toast-icon {
    width: 40px;
    height: 40px;
  }

  .result-toast-icon::before {
    inset: -3px;
  }

  .result-toast-icon svg {
    width: 20px;
    height: 20px;
  }

  .result-toast-title {
    font-size: 1rem;
  }

  .result-toast-scores {
    font-size: 0.85rem;
    gap: 8px;
  }

  .result-toast-answers {
    padding: 10px 14px;
    gap: 10px;
  }

  .result-toast-answer {
    font-size: 0.8rem;
  }

  .result-toast-levelup {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .result-toast-btn {
    padding: 12px 14px;
    font-size: 0.85rem;
    border-radius: 0 0 14px 14px;
  }

  /* Double or Nothing Mobile */
  .double-lost-banner {
    padding: 8px 12px;
    font-size: 0.75rem;
    gap: 6px;
  }

  .double-or-nothing-section {
    padding: 10px 12px;
  }

  .double-or-nothing-header {
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 4px;
  }

  .double-or-nothing-buttons {
    gap: 8px;
  }

  .don-btn {
    padding: 10px 12px;
    font-size: 0.7rem;
    gap: 4px;
  }

  .don-potential {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  /* Home Tiles Mobile */
  .home-tile {
    padding: 16px 10px;
  }

  .home-tile-icon {
    width: 44px;
    height: 44px;
  }

  .home-tile-label {
    font-size: 0.7rem;
  }

  .home-tile-sub {
    font-size: 0.6rem;
  }
}

/* =====================================================
   ELEGANT GAMING UI - New Design System
   ===================================================== */

/* Elegant Cards */
.elegant-card {
  background: var(--bg-card);
  border-radius: var(--card-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.elegant-card-elevated {
  background: var(--bg-elevated);
  border-radius: var(--card-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Impact Titles - Bold with 3D shadow effect */
.title-impact {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.title-impact-xl {
  font-size: 2.5rem;
  line-height: 1.1;
  text-shadow:
    2px 2px 0 rgba(0, 0, 0, 0.3),
    4px 4px 0 rgba(0, 0, 0, 0.15);
}

.title-impact-lg {
  font-size: 1.75rem;
  line-height: 1.2;
  text-shadow:
    1px 2px 0 rgba(0, 0, 0, 0.3),
    2px 3px 0 rgba(0, 0, 0, 0.15);
}

.title-impact-md {
  font-size: 1.25rem;
  line-height: 1.3;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

/* Elegant Subtitle */
.subtitle-elegant {
  font-family: var(--font-display);
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* XP Card - Clean design */
.xp-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.xp-card-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.xp-card-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.xp-earned {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-green);
}

.xp-level-info {
  text-align: right;
}

.xp-level-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.xp-level-progress {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* XP Progress Bar - Elegant version */
.xp-progress-elegant {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.xp-progress-elegant-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), #60a5fa);
  border-radius: 4px;
  transition: width 0.6s ease-out;
}

/* XP Bonuses */
.xp-bonuses {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.xp-bonus {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
}

.xp-bonus-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.xp-bonus-speed .xp-bonus-dot { background: var(--accent-green); }
.xp-bonus-accuracy .xp-bonus-dot { background: var(--accent-purple); }
.xp-bonus-streak .xp-bonus-dot { background: var(--accent-gold); }
.xp-bonus-precision .xp-bonus-dot { background: var(--accent-cyan); }

.xp-bonus-speed { color: var(--accent-green); }
.xp-bonus-accuracy { color: var(--accent-purple); }
.xp-bonus-streak { color: var(--accent-gold); }
.xp-bonus-precision { color: var(--accent-cyan); }

/* Elegant Buttons */
.btn-elegant-primary {
  background: var(--accent-blue);
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 16px 32px;
  border-radius: var(--button-radius);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-elegant-primary:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.btn-elegant-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 20px;
  border-radius: var(--button-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  transition: all var(--transition-fast);
}

.btn-elegant-secondary:hover {
  background: var(--bg-elevated);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-elegant-tertiary {
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 16px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: color var(--transition-fast);
}

.btn-elegant-tertiary:hover {
  color: var(--text-secondary);
}

/* Streak Badge - Elegant */
.streak-badge-elegant {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 24px;
  padding: 8px 16px;
}

.streak-badge-icon {
  color: var(--accent-gold);
}

.streak-badge-label {
  font-size: 0.7rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.streak-badge-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Double Badge */
.double-badge {
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}

/* Case Label */
.case-label {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Image Container with Overlay */
.image-result-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
}

.image-result-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
}

.image-result-checkmark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
}

.image-result-x {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--accent-red);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-red);
}

/* Result Colors */
.result-title-success { color: var(--accent-green); }
.result-title-partial { color: var(--accent-gold); }
.result-title-fail { color: var(--accent-red); }

.result-subtitle-success { color: var(--accent-green); }
.result-subtitle-partial { color: var(--accent-gold); }
.result-subtitle-fail { color: var(--accent-red); }

/* Elegant Result Toast */
.elegant-result-toast {
  background: var(--bg-primary);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 420px;
  margin: 0 auto;
}

.elegant-result-header {
  text-align: center;
}

.elegant-result-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Stats Grid - Clean */
.stats-grid-elegant {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-card-elegant {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.stat-card-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.stat-card-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Responsive for Elegant Components */
@media (max-width: 480px) {
  .title-impact-xl {
    font-size: 2rem;
  }

  .title-impact-lg {
    font-size: 1.5rem;
  }

  .xp-earned {
    font-size: 1.75rem;
  }

  .btn-elegant-primary {
    padding: 14px 24px;
    font-size: 0.9rem;
  }

  .elegant-result-toast {
    padding: 20px 16px;
  }
}

/* ========================================
   PLAY BUTTON - NUOVA PARTITA (Arcade Style)
   ======================================== */

.play-button {
  --btn-color: 0, 240, 255;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgb(var(--btn-color));
  background: linear-gradient(180deg, rgba(var(--btn-color), 0.12) 0%, rgba(8, 8, 12, 0.98) 100%);
  border: 2px solid rgba(var(--btn-color), 0.5);
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  animation: playBtnPulse 3s ease-in-out infinite;
}

@keyframes playBtnPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(var(--btn-color), 0.2); }
  50% { box-shadow: 0 0 35px rgba(var(--btn-color), 0.4); }
}

/* Scanline overlay */
.play-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 4px
  );
  pointer-events: none;
  z-index: 10;
  opacity: 0.5;
}

/* Corner accents */
.play-button::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(var(--btn-color), 0.3);
  border-radius: 10px;
  pointer-events: none;
  transition: all 0.4s ease;
  clip-path: polygon(
    0 0, 16px 0, 16px 2px, 2px 2px, 2px 16px, 0 16px,
    0 100%, 0 calc(100% - 16px), 2px calc(100% - 16px), 2px calc(100% - 2px), 16px calc(100% - 2px), 16px 100%,
    100% 100%, calc(100% - 16px) 100%, calc(100% - 16px) calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) calc(100% - 16px), 100% calc(100% - 16px),
    100% 0, 100% 16px, calc(100% - 2px) 16px, calc(100% - 2px) 2px, calc(100% - 16px) 2px, calc(100% - 16px) 0
  );
}

.play-button:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(var(--btn-color), 0.9);
  color: #fff;
  text-shadow: 0 0 20px rgba(var(--btn-color), 0.8);
  box-shadow:
    0 0 40px rgba(var(--btn-color), 0.5),
    0 0 80px rgba(var(--btn-color), 0.3),
    inset 0 0 30px rgba(var(--btn-color), 0.1);
}

.play-button:hover::after {
  border-color: rgba(var(--btn-color), 0.7);
  box-shadow: 0 0 8px rgba(var(--btn-color), 0.5);
}

.play-button:active {
  transform: translateY(-1px) scale(0.98);
  transition-duration: 0.1s;
}

.play-button-text {
  position: relative;
  z-index: 1;
}

.play-button svg {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 8px rgba(var(--btn-color), 0.5));
}

/* Tournament Button - Gold/Amber theme */
.tournament-button-unlocked {
  --btn-color: 245, 158, 11; /* amber-500 */
  animation: tournamentBtnPulse 3s ease-in-out infinite;
}

.tournament-button-unlocked:hover {
  --btn-color: 251, 191, 36; /* amber-400 */
}

@keyframes tournamentBtnPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.2); }
  50% { box-shadow: 0 0 35px rgba(245, 158, 11, 0.4); }
}

/* Tournament Button - Locked (Gray) */
.tournament-button-locked {
  --btn-color: 107, 114, 128; /* gray-500 */
  animation: none;
  cursor: not-allowed;
  opacity: 0.6;
}

.tournament-button-locked:hover {
  transform: none;
  box-shadow: 0 0 20px rgba(107, 114, 128, 0.2);
}

/* ========================================
   TOURNAMENT MODAL - ARCADE STYLE
   ======================================== */

.tournament-modal {
  background: linear-gradient(180deg, rgba(20, 22, 30, 0.98) 0%, rgba(10, 12, 18, 0.99) 100%);
  border: 2px solid rgba(245, 158, 11, 0.4);
  border-radius: 1.25rem;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.15);
}

/* Scanline overlay */
.tournament-modal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.08) 3px,
    rgba(0, 0, 0, 0.08) 6px
  );
  pointer-events: none;
  z-index: 100;
  opacity: 0.4;
}

.tournament-modal-header {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12) 0%, transparent 100%);
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

.tournament-modal-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tournament-modal-title h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: rgb(245, 158, 11);
  text-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
  letter-spacing: 0.1em;
}

.tournament-info-box {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 0.75rem;
  padding: 1rem;
  position: relative;
}

.tournament-info-box::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* Tournament Card */
.tournament-card {
  background: linear-gradient(180deg, rgba(20, 22, 30, 0.98) 0%, rgba(8, 8, 12, 0.95) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 0.75rem;
  position: relative;
  overflow: hidden;
}

.tournament-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.tournament-card > * {
  position: relative;
  z-index: 2;
}

/* HUD Box Amber (for tournaments) */
.hud-box-amber {
  --hud-color: 245, 158, 11;
  border-color: rgba(var(--hud-color), 0.5);
  background: linear-gradient(180deg, rgba(var(--hud-color), 0.15) 0%, rgba(var(--hud-color), 0.05) 100%);
}

.hud-box-amber .hud-box-label {
  color: rgba(var(--hud-color), 0.7);
}

.hud-box-amber .hud-box-value {
  color: rgb(var(--hud-color));
  text-shadow: 0 0 10px rgba(var(--hud-color), 0.5);
}

/* Tournament timer danger colors */
.timer-danger .timer-ring-progress,
.timer-danger.timer-ring-progress {
  stroke: #ef4444 !important;
}

.timer-warning .timer-ring-progress,
.timer-warning.timer-ring-progress {
  stroke: #f59e0b !important;
}

.timer-danger {
  color: #ef4444 !important;
}

.timer-warning {
  color: #f59e0b !important;
}

/* Badge items for profile */
.badge-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid;
  font-size: 1rem;
}

.badge-info {
  display: flex;
  flex-direction: column;
}

/* ========================================
   GAME MODE CARDS - ARCADE NEON EDITION
   ======================================== */

.game-mode-card {
  --card-color: 0, 200, 255;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  padding-top: 0.75rem;
  background:
    linear-gradient(180deg, rgba(var(--card-color), 0.08) 0%, rgba(8, 8, 12, 0.98) 100%);
  border: 2px solid rgba(var(--card-color), 0.4);
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  overflow: hidden;
  isolation: isolate;
}

/* Scanline overlay */
.game-mode-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
  z-index: 10;
  opacity: 0.5;
}

/* Animated corner accents */
.game-mode-card::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(var(--card-color), 0.3);
  border-radius: 0.75rem;
  pointer-events: none;
  transition: all 0.4s ease;
  clip-path: polygon(
    0 0, 20px 0, 20px 2px, 2px 2px, 2px 20px, 0 20px,
    0 100%, 0 calc(100% - 20px), 2px calc(100% - 20px), 2px calc(100% - 2px), 20px calc(100% - 2px), 20px 100%,
    100% 100%, calc(100% - 20px) 100%, calc(100% - 20px) calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) calc(100% - 20px), 100% calc(100% - 20px),
    100% 0, 100% 20px, calc(100% - 2px) 20px, calc(100% - 2px) 2px, calc(100% - 20px) 2px, calc(100% - 20px) 0
  );
}

.game-mode-mascot-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 0.75rem;
  background: radial-gradient(ellipse at center, rgba(var(--card-color), 0.12) 0%, transparent 70%);
  transition: all 0.4s ease;
}

/* Glow orb behind mascot */
.game-mode-mascot-wrapper::before {
  content: '';
  position: absolute;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(var(--card-color), 0.25) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.6;
  transition: all 0.4s ease;
  z-index: -1;
}

/* Mascot image float animation */
.game-mode-card img {
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  filter: drop-shadow(0 4px 12px rgba(var(--card-color), 0.3));
}

/* Hover state - power surge */
.game-mode-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(var(--card-color), 0.9);
  box-shadow:
    0 0 30px rgba(var(--card-color), 0.4),
    0 0 60px rgba(var(--card-color), 0.2),
    inset 0 0 30px rgba(var(--card-color), 0.1);
}

.game-mode-card:hover::after {
  border-color: rgba(var(--card-color), 0.7);
  box-shadow: 0 0 8px rgba(var(--card-color), 0.5);
}

.game-mode-card:hover .game-mode-mascot-wrapper::before {
  width: 80%;
  height: 80%;
  opacity: 1;
}

.game-mode-card:hover img {
  transform: scale(1.15) translateY(-4px);
  filter: drop-shadow(0 8px 20px rgba(var(--card-color), 0.5));
}

.game-mode-card:active {
  transform: translateY(-2px) scale(0.98);
  transition-duration: 0.1s;
}

/* Color variants */
.game-mode-cyan { --card-color: 0, 220, 255; }
.game-mode-amber { --card-color: 255, 170, 20; }
.game-mode-green { --card-color: 50, 220, 120; }
.game-mode-purple { --card-color: 180, 100, 255; }

/* Idle pulse animation per card */
.game-mode-cyan { animation: cardPulseCyan 4s ease-in-out infinite; }
.game-mode-amber { animation: cardPulseAmber 4s ease-in-out infinite 0.5s; }
.game-mode-green { animation: cardPulseGreen 4s ease-in-out infinite 1s; }
.game-mode-purple { animation: cardPulsePurple 4s ease-in-out infinite 1.5s; }

@keyframes cardPulseCyan {
  0%, 100% { box-shadow: 0 0 15px rgba(0, 220, 255, 0.15); }
  50% { box-shadow: 0 0 25px rgba(0, 220, 255, 0.3); }
}
@keyframes cardPulseAmber {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 170, 20, 0.15); }
  50% { box-shadow: 0 0 25px rgba(255, 170, 20, 0.3); }
}
@keyframes cardPulseGreen {
  0%, 100% { box-shadow: 0 0 15px rgba(50, 220, 120, 0.15); }
  50% { box-shadow: 0 0 25px rgba(50, 220, 120, 0.3); }
}
@keyframes cardPulsePurple {
  0%, 100% { box-shadow: 0 0 15px rgba(180, 100, 255, 0.15); }
  50% { box-shadow: 0 0 25px rgba(180, 100, 255, 0.3); }
}

.game-mode-label {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-shadow: 0 0 10px currentColor;
  transition: all 0.3s ease;
}

.game-mode-card:hover .game-mode-label {
  text-shadow: 0 0 15px currentColor, 0 0 30px currentColor;
  letter-spacing: 0.18em;
}

.game-mode-sub {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  text-align: center;
  margin-top: 0.25rem;
  transition: all 0.3s ease;
}

.game-mode-card:hover .game-mode-sub {
  color: rgba(255,255,255,0.8);
}

/* ========================================
   GUEST NOTIFICATION BANNER
   ======================================== */

.guest-notification {
  background: linear-gradient(90deg, rgba(0,240,255,0.15) 0%, rgba(176,38,255,0.15) 100%);
  border: 1px solid rgba(0,240,255,0.3);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  animation: guestPulse 3s ease-in-out infinite;
}

@keyframes guestPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0,240,255,0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(0,240,255,0.4);
  }
}

/* ========================================
   INFO MODAL - ARCADE STYLE
   ======================================== */

.info-modal {
  background: linear-gradient(180deg, rgba(20, 22, 30, 0.98) 0%, rgba(10, 12, 18, 0.99) 100%);
  border: 2px solid rgba(0, 220, 255, 0.3);
  border-radius: 1.25rem;
  overflow: hidden;
  position: relative;
}

/* Scanline overlay for modal */
.info-modal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.08) 3px,
    rgba(0, 0, 0, 0.08) 6px
  );
  pointer-events: none;
  z-index: 100;
  opacity: 0.4;
}

/* Header styling */
.info-modal-header {
  background: linear-gradient(180deg, rgba(0, 220, 255, 0.08) 0%, transparent 100%);
  border-bottom: 1px solid rgba(0, 220, 255, 0.2);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.info-modal-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-modal-title h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: rgb(0, 220, 255);
  text-shadow: 0 0 15px rgba(0, 220, 255, 0.5);
  letter-spacing: 0.1em;
}

.info-modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.info-modal-close:hover {
  background: rgba(255, 80, 80, 0.15);
  border-color: rgba(255, 80, 80, 0.4);
  color: rgb(255, 80, 80);
}

/* Scrollable content area */
.info-modal-content {
  padding: 1rem 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}

/* Profile Modal - Rank-based border colors */
.profile-modal.rank-bronze {
  border-color: rgba(205, 127, 50, 0.5);
}
.profile-modal.rank-bronze .info-modal-header {
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.15) 0%, transparent 100%);
  border-bottom-color: rgba(205, 127, 50, 0.3);
}
.profile-modal.rank-bronze .info-modal-title h3 {
  color: var(--rank-bronze);
  text-shadow: 0 0 15px rgba(205, 127, 50, 0.5);
}

.profile-modal.rank-silver {
  border-color: rgba(192, 192, 192, 0.5);
}
.profile-modal.rank-silver .info-modal-header {
  background: linear-gradient(180deg, rgba(192, 192, 192, 0.12) 0%, transparent 100%);
  border-bottom-color: rgba(192, 192, 192, 0.3);
}
.profile-modal.rank-silver .info-modal-title h3 {
  color: var(--rank-silver);
  text-shadow: 0 0 15px rgba(192, 192, 192, 0.5);
}

.profile-modal.rank-gold {
  border-color: rgba(251, 191, 36, 0.5);
}
.profile-modal.rank-gold .info-modal-header {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.15) 0%, transparent 100%);
  border-bottom-color: rgba(251, 191, 36, 0.3);
}
.profile-modal.rank-gold .info-modal-title h3 {
  color: var(--rank-gold);
  text-shadow: 0 0 15px rgba(251, 191, 36, 0.5);
}

.profile-modal.rank-diamond {
  border-color: rgba(103, 232, 249, 0.5);
}
.profile-modal.rank-diamond .info-modal-header {
  background: linear-gradient(180deg, rgba(103, 232, 249, 0.12) 0%, transparent 100%);
  border-bottom-color: rgba(103, 232, 249, 0.3);
}
.profile-modal.rank-diamond .info-modal-title h3 {
  color: var(--rank-diamond);
  text-shadow: 0 0 15px rgba(103, 232, 249, 0.5);
}

.profile-modal.rank-master {
  border-color: rgba(248, 113, 113, 0.5);
}
.profile-modal.rank-master .info-modal-header {
  background: linear-gradient(180deg, rgba(248, 113, 113, 0.15) 0%, transparent 100%);
  border-bottom-color: rgba(248, 113, 113, 0.3);
}
.profile-modal.rank-master .info-modal-title h3 {
  color: var(--rank-master);
  text-shadow: 0 0 15px rgba(248, 113, 113, 0.5);
}

.profile-modal.rank-grandmaster {
  border-color: rgba(168, 85, 247, 0.5);
}
.profile-modal.rank-grandmaster .info-modal-header {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.15) 0%, transparent 100%);
  border-bottom-color: rgba(168, 85, 247, 0.3);
}
.profile-modal.rank-grandmaster .info-modal-title h3 {
  color: var(--rank-grandmaster);
  text-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
}

/* Tab bar */
.info-tabs {
  display: flex;
  background: rgba(8, 10, 15, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 6px;
  gap: 4px;
}

.info-tab {
  --tab-color: 160, 170, 190;
  flex: 1;
  padding: 10px 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.info-tab-icon {
  font-size: 1rem;
  line-height: 1;
}

.info-tab:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
}

.info-tab-active {
  color: rgb(var(--tab-color));
  background: linear-gradient(180deg, rgba(var(--tab-color), 0.15) 0%, rgba(var(--tab-color), 0.05) 100%);
  border-color: rgba(var(--tab-color), 0.4);
  box-shadow: 0 0 15px rgba(var(--tab-color), 0.2);
}

/* Tab color variants */
.info-tab-cyan { --tab-color: 0, 220, 255; }
.info-tab-purple { --tab-color: 180, 100, 255; }
.info-tab-amber { --tab-color: 255, 180, 20; }
.info-tab-green { --tab-color: 50, 220, 120; }
.info-tab-gold { --tab-color: 255, 200, 0; }

/* Content area */
.info-content {
  padding: 1.25rem;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

/* Info sections styling */
.info-section {
  background: rgba(12, 14, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.info-section-header {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-section-cyan .info-section-header { color: rgb(0, 220, 255); }
.info-section-purple .info-section-header { color: rgb(180, 100, 255); }
.info-section-amber .info-section-header { color: rgb(255, 180, 20); }
.info-section-green .info-section-header { color: rgb(50, 220, 120); }

/* Game mode cards carousel */
.arcade-cards-container {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 0.25rem 1rem;
  margin: 0 -1.25rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.arcade-cards-container::-webkit-scrollbar {
  display: none;
}

/* Arcade style card */
.arcade-card {
  --card-color: 0, 220, 255;
  flex: 0 0 140px;
  min-width: 140px;
  background: linear-gradient(180deg, rgba(var(--card-color), 0.12) 0%, rgba(8, 10, 15, 0.98) 100%);
  border: 2px solid rgba(var(--card-color), 0.4);
  border-radius: 16px;
  padding: 1rem 0.75rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Scanline effect */
.arcade-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.1) 2px,
    rgba(0, 0, 0, 0.1) 4px
  );
  pointer-events: none;
  opacity: 0.5;
}

/* Glow effect on hover/active */
.arcade-card:hover,
.arcade-card:active {
  border-color: rgba(var(--card-color), 0.8);
  box-shadow:
    0 0 20px rgba(var(--card-color), 0.3),
    inset 0 0 30px rgba(var(--card-color), 0.1);
  transform: translateY(-2px);
}

.arcade-card-mascot {
  width: 60px;
  height: 60px;
  margin: 0 auto 0.5rem;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(var(--card-color), 0.5));
}

.arcade-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.7rem;
  color: rgb(var(--card-color));
  text-shadow: 0 0 10px rgba(var(--card-color), 0.5);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.arcade-card-sub {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.75rem;
}

.arcade-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.4rem 0.75rem;
  background: rgba(var(--card-color), 0.2);
  border: 1px solid rgba(var(--card-color), 0.5);
  border-radius: 8px;
  color: rgb(var(--card-color));
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

.arcade-card-btn:hover {
  background: rgba(var(--card-color), 0.3);
  box-shadow: 0 0 10px rgba(var(--card-color), 0.4);
}

/* Color variants */
.arcade-card-cyan { --card-color: 0, 220, 255; }
.arcade-card-amber { --card-color: 255, 180, 20; }
.arcade-card-green { --card-color: 50, 220, 120; }
.arcade-card-purple { --card-color: 180, 100, 255; }
.arcade-card-orange { --card-color: 255, 140, 0; }

/* Desktop: larger cards */
@media (min-width: 640px) {
  .arcade-cards-container {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .arcade-card {
    flex: 0 0 160px;
    min-width: 160px;
  }
}

/* ========================================
   TUTORIAL PAGES - Horizontal Scroll
   ======================================== */

.tutorial-pages-container {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 0;
  margin: 0 -1.25rem 0.5rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tutorial-pages-container::-webkit-scrollbar {
  display: none;
}

.tutorial-page {
  --page-color: 0, 220, 255;
  flex: 0 0 85%;
  min-width: 85%;
  max-width: 280px;
  background: linear-gradient(180deg, rgba(var(--page-color), 0.08) 0%, rgba(8, 10, 15, 0.98) 100%);
  border: 2px solid rgba(var(--page-color), 0.3);
  border-radius: 16px;
  overflow: hidden;
  scroll-snap-align: center;
  position: relative;
}

/* Scanline effect on pages */
.tutorial-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.05) 2px,
    rgba(0, 0, 0, 0.05) 4px
  );
  pointer-events: none;
  opacity: 0.5;
}

.tutorial-page-header {
  background: rgba(var(--page-color), 0.15);
  border-bottom: 1px solid rgba(var(--page-color), 0.3);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.7rem;
  color: rgb(var(--page-color));
  text-align: center;
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px rgba(var(--page-color), 0.5);
}

.tutorial-page-content {
  padding: 0.75rem;
  position: relative;
  z-index: 1;
}

/* Color variants */
.tutorial-page-cyan { --page-color: 0, 220, 255; }
.tutorial-page-amber { --page-color: 255, 180, 20; }
.tutorial-page-green { --page-color: 50, 220, 120; }

/* Tutorial steps */
.tutorial-step {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 0.5rem;
}

.tutorial-step-num {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(0, 220, 255, 0.2);
  border: 1px solid rgba(0, 220, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.65rem;
  color: rgb(0, 220, 255);
}

.tutorial-step-num-amber {
  background: rgba(255, 180, 20, 0.2);
  border-color: rgba(255, 180, 20, 0.4);
  color: rgb(255, 180, 20);
}

.tutorial-step-num-green {
  background: rgba(50, 220, 120, 0.2);
  border-color: rgba(50, 220, 120, 0.4);
  color: rgb(50, 220, 120);
}

/* Desktop: slightly larger pages */
@media (min-width: 640px) {
  .tutorial-page {
    flex: 0 0 75%;
    min-width: 75%;
  }
}

/* Legacy support for expanded cards */
.info-mode-card {
  --card-color: 0, 220, 255;
  background: linear-gradient(180deg, rgba(var(--card-color), 0.06) 0%, rgba(8, 10, 15, 0.95) 100%);
  border: 1px solid rgba(var(--card-color), 0.3);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.info-mode-card:hover {
  border-color: rgba(var(--card-color), 0.5);
}

.info-mode-card-expanded {
  border-color: rgba(var(--card-color), 0.6);
  box-shadow: 0 0 20px rgba(var(--card-color), 0.15);
}

.info-mode-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.info-mode-card-header:hover {
  background: rgba(var(--card-color), 0.08);
}

.info-mode-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: rgb(var(--card-color));
}

.info-mode-card-sub {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
}

.info-mode-card-content {
  padding: 0.75rem;
  border-top: 1px solid rgba(var(--card-color), 0.15);
  background: rgba(0, 0, 0, 0.2);
}

/* Color variants for mode cards */
.info-mode-cyan { --card-color: 0, 220, 255; }
.info-mode-amber { --card-color: 255, 180, 20; }
.info-mode-green { --card-color: 50, 220, 120; }
.info-mode-purple { --card-color: 180, 100, 255; }

/* ========================================
   INFO PAGE - FULL PAGE VIEW
   ======================================== */

/* Tab Navigation */
.info-page-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
}

.info-page-tab:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
}

.info-page-tab-active {
  color: white;
  border-bottom-color: currentColor;
}

.info-page-tab-cyan.info-page-tab-active { color: rgb(0, 220, 255); }
.info-page-tab-purple.info-page-tab-active { color: rgb(180, 100, 255); }
.info-page-tab-amber.info-page-tab-active { color: rgb(255, 180, 20); }
.info-page-tab-green.info-page-tab-active { color: rgb(50, 220, 120); }
.info-page-tab-gray.info-page-tab-active { color: rgb(180, 180, 190); }
.info-page-tab-gold.info-page-tab-active { color: rgb(255, 200, 0); }

/* Info Cards */
.info-card {
  background: rgba(20, 20, 30, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--card-accent, rgba(255,255,255,0.1)), transparent);
}

.info-card-cyan {
  --card-accent: rgba(0, 220, 255, 0.8);
  border-color: rgba(0, 220, 255, 0.2);
}

.info-card-purple {
  --card-accent: rgba(180, 100, 255, 0.8);
  border-color: rgba(180, 100, 255, 0.2);
}

.info-card-amber {
  --card-accent: rgba(255, 180, 20, 0.8);
  border-color: rgba(255, 180, 20, 0.2);
}

.info-card-green {
  --card-accent: rgba(50, 220, 120, 0.8);
  border-color: rgba(50, 220, 120, 0.2);
}

.info-card-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: white;
  margin-bottom: 0.5rem;
}

/* Game Mode Cards on Info Page */
.info-game-mode-card {
  background: rgba(20, 20, 30, 0.9);
  border: 1px solid rgba(var(--mode-color, 255, 255, 255), 0.2);
  border-radius: 1rem;
  padding: 1.25rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.info-game-mode-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: rgb(var(--mode-color, 255, 255, 255));
}

.info-game-mode-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--mode-color, 255, 255, 255), 0.4);
  box-shadow: 0 10px 30px -10px rgba(var(--mode-color, 255, 255, 255), 0.2);
}

.info-game-mode-cyan { --mode-color: 0, 220, 255; }
.info-game-mode-amber { --mode-color: 255, 180, 20; }
.info-game-mode-green { --mode-color: 50, 220, 120; }
.info-game-mode-purple { --mode-color: 180, 100, 255; }

/* ========================================
   CHALLENGE WHEEL - SPIN TO SELECT MODE
   ======================================== */

.wheel-container {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto;
}

.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  background: conic-gradient(
    from -60deg,
    rgba(0, 220, 255, 0.5) 0deg 120deg,
    rgba(255, 180, 20, 0.5) 120deg 240deg,
    rgba(50, 220, 120, 0.5) 240deg 360deg
  );
  border: 4px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 0 30px rgba(0, 0, 0, 0.5),
    inset 0 0 30px rgba(0, 0, 0, 0.2);
}

/* Section divider lines */
.wheel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    linear-gradient(30deg, transparent 49%, rgba(255,255,255,0.3) 49%, rgba(255,255,255,0.3) 51%, transparent 51%),
    linear-gradient(150deg, transparent 49%, rgba(255,255,255,0.3) 49%, rgba(255,255,255,0.3) 51%, transparent 51%),
    linear-gradient(270deg, transparent 49%, rgba(255,255,255,0.3) 49%, rgba(255,255,255,0.3) 51%, transparent 51%);
  pointer-events: none;
}

/* Mascot positions - positioned around the wheel */
.wheel-mascot-wrapper {
  position: absolute;
  width: 60px;
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.wheel-mascot-wrapper img {
  width: 45px;
  height: 45px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.wheel-mascot-wrapper span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.6rem;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  margin-top: 2px;
}

/* Position each mascot at 60deg intervals (center of each section) */
/* Classic CXR - top (60deg from start which is -60deg, so at 0deg/top) */
.wheel-mascot-1 {
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
}

/* Spot Nodule - bottom right (180deg from -60 = 120deg position) */
.wheel-mascot-2 {
  bottom: 25px;
  right: 10px;
}

/* Classic Ortho - bottom left (300deg from -60 = 240deg position) */
.wheel-mascot-3 {
  bottom: 25px;
  left: 10px;
}

.wheel-pointer {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  animation: pointerBounce 0.5s ease-in-out infinite;
}

@keyframes pointerBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(3px); }
}

.wheel-spin-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff4444 0%, #cc0000 100%);
  border: 3px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  z-index: 10;
  box-shadow:
    0 4px 15px rgba(255, 0, 0, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.wheel-spin-btn:hover:not(:disabled) {
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow:
    0 6px 25px rgba(255, 0, 0, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.wheel-spin-btn:active:not(:disabled) {
  transform: translate(-50%, -50%) scale(0.95);
}

.wheel-spin-btn:disabled {
  cursor: not-allowed;
}

/* ========================================
   CHALLENGE STATS BOXES (Profile)
   ======================================== */

.challenge-stat-box {
  --stat-color: 160, 170, 190;
  background: linear-gradient(180deg, rgba(var(--stat-color), 0.15) 0%, rgba(var(--stat-color), 0.05) 100%);
  border: 1px solid rgba(var(--stat-color), 0.3);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  transition: all 0.3s ease;
}

.challenge-stat-box:hover {
  border-color: rgba(var(--stat-color), 0.6);
  box-shadow: 0 0 15px rgba(var(--stat-color), 0.2);
}

.challenge-stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: rgb(var(--stat-color));
  line-height: 1;
  margin-bottom: 4px;
  text-shadow: 0 0 10px rgba(var(--stat-color), 0.4);
}

.challenge-stat-label {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

/* Wins - Green */
.challenge-stat-wins {
  --stat-color: 34, 197, 94;
}

/* Losses - Red */
.challenge-stat-losses {
  --stat-color: 239, 68, 68;
}

/* Draws - Yellow */
.challenge-stat-draws {
  --stat-color: 250, 204, 21;
}

/* ========================================
   BO3 MATCH INDICATORS
   ======================================== */

.bo3-match-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.bo3-match-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bo3-match-dot .round-label {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 2px;
}

.bo3-match-dot .dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.bo3-match-dot .dot.win {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.bo3-match-dot .dot.loss {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.bo3-match-dot .dot.draw {
  background: linear-gradient(135deg, #facc15, #eab308);
  color: #1a1a24;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
}

.bo3-match-dot .dot.pending {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.bo3-match-dot .mode-icon {
  font-size: 10px;
  margin-top: 2px;
}

/* ========================================
   HOME FOOTER
   ======================================== */

.home-footer {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 768px) {
  .home-footer {
    margin-top: 1rem;
    padding-top: 1rem;
  }
}

.home-footer-links {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .home-footer-links {
    gap: 0.75rem;
  }
}

.home-footer-link {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0.25rem 0.35rem;
  border-radius: 4px;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .home-footer-link {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}

.home-footer-link:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
}

.home-footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.home-footer-link-gold {
  color: rgba(255, 200, 0, 0.6);
}

.home-footer-link-gold:hover {
  color: rgba(255, 200, 0, 1);
  background: rgba(255, 200, 0, 0.1);
  text-shadow: 0 0 10px rgba(255, 200, 0, 0.3);
}

/* ========================================
   HOME MASCOT GLOW
   ======================================== */

.home-mascot-wrapper {
  position: relative;
  display: inline-block;
}

.home-mascot-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.2) 0%, transparent 70%);
  filter: blur(30px);
  z-index: -1;
  animation: mascotGlow 4s ease-in-out infinite;
}

@keyframes mascotGlow {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

/* ========================================
   HOME - ARCADE CABINET STYLE
   ======================================== */

.home-arcade-cabinet {
  background: linear-gradient(180deg,
    rgba(8, 8, 20, 0.98) 0%,
    rgba(5, 5, 15, 0.99) 100%);
  border: 4px solid #1a1a3a;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}
.home-arcade-cabinet::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #06b6d4, #a855f7, #06b6d4);
  animation: arcadeBorderGlow 3s ease-in-out infinite;
}
.home-arcade-cabinet::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #a855f7, #06b6d4, #a855f7);
  animation: arcadeBorderGlow 3s ease-in-out infinite reverse;
}

/* ---- Home Navigation Buttons (2x2 grid) ---- */
.home-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.home-nav-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0, 0, 0, 0.08) 2px, rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  opacity: 0.4;
}
.home-nav-btn:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}
.home-nav-btn:active {
  transform: translateY(-1px) scale(0.98);
  transition-duration: 0.1s;
}
.home-nav-locked {
  opacity: 0.45;
}
.home-nav-locked:hover {
  opacity: 0.6;
}

.home-nav-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}
.home-nav-icon-amber {
  background: rgba(245, 158, 11, 0.12);
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}
.home-nav-icon-purple {
  background: rgba(168, 85, 247, 0.12);
  border: 1.5px solid rgba(168, 85, 247, 0.3);
  color: #a855f7;
}
.home-nav-icon-red {
  background: rgba(239, 68, 68, 0.12);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}
.home-nav-icon-cyan {
  background: rgba(6, 182, 212, 0.12);
  border: 1.5px solid rgba(6, 182, 212, 0.3);
  color: #06b6d4;
}
.home-nav-btn:hover .home-nav-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px currentColor);
}

.home-nav-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  z-index: 1;
  min-width: 0;
}
.home-nav-label {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 1px;
  line-height: 1.2;
}
.home-nav-sub {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.5px;
  line-height: 1.2;
}
.home-nav-btn:hover .home-nav-label {
  color: #fff;
}
.home-nav-btn:hover .home-nav-sub {
  color: rgba(255, 255, 255, 0.55);
}

/* ---- Home Arcade Footer ---- */
.home-arcade-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}
.home-arcade-footer-line {
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.2), rgba(168, 85, 247, 0.2), transparent);
}
.home-arcade-footer-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.home-arcade-footer-link {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}
.home-arcade-footer-link:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
}
.home-arcade-footer-sep {
  color: rgba(255, 255, 255, 0.1);
  font-size: 0.7rem;
  user-select: none;
}
.home-arcade-footer-gold {
  color: rgba(255, 200, 0, 0.5);
}
.home-arcade-footer-gold:hover {
  color: rgba(255, 200, 0, 1);
  background: rgba(255, 200, 0, 0.08);
}

/* ========================================
   ARCADE BUTTONS (Survival Mode)
   ======================================== */

.btn-arcade {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-arcade:active {
  transform: scale(0.96);
}

.btn-arcade::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.15) 0%, transparent 50%);
  pointer-events: none;
}

.btn-arcade::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn-arcade:hover::after {
  transform: translateX(100%);
}

/* Green Arcade Button */
.btn-arcade-green {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
  color: white;
  box-shadow:
    0 4px 0 #14532d,
    0 6px 20px rgba(34, 197, 94, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-arcade-green:hover {
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 50%, #16a34a 100%);
  box-shadow:
    0 4px 0 #14532d,
    0 8px 30px rgba(34, 197, 94, 0.5),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn-arcade-green:active {
  box-shadow:
    0 2px 0 #14532d,
    0 4px 15px rgba(34, 197, 94, 0.4);
  transform: translateY(2px) scale(0.98);
}

/* Red Arcade Button */
.btn-arcade-red {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  color: white;
  box-shadow:
    0 4px 0 #7f1d1d,
    0 6px 20px rgba(239, 68, 68, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-arcade-red:hover {
  background: linear-gradient(180deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
  box-shadow:
    0 4px 0 #7f1d1d,
    0 8px 30px rgba(239, 68, 68, 0.5),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn-arcade-red:active {
  box-shadow:
    0 2px 0 #7f1d1d,
    0 4px 15px rgba(239, 68, 68, 0.4);
  transform: translateY(2px) scale(0.98);
}

/* Timer states for survival */
.timer-danger .timer-ring-progress { stroke: #ef4444 !important; }
.timer-warning .timer-ring-progress { stroke: #f59e0b !important; }
.timer-safe .timer-ring-progress { stroke: #22c55e !important; }

/* =====================================================
   ARCADE CABINET STYLES (Tournament Survival)
   ===================================================== */
.font-arcade { font-family: 'Press Start 2P', cursive; }

/* Arcade Background */
.arcade-bg {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
    linear-gradient(180deg, #0a0a12 0%, #0d0d18 50%, #0a0a12 100%);
}

/* Scanlines overlay - subtle CRT effect, must stay BEHIND content */
.scanlines::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* Arcade Cabinet */
.arcade-cabinet {
  background: linear-gradient(180deg,
    rgba(8, 8, 20, 0.98) 0%,
    rgba(5, 5, 15, 0.99) 100%);
  border: 4px solid #1a1a3a;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}
.arcade-cabinet::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #06b6d4, #a855f7, #06b6d4);
  animation: arcadeBorderGlow 3s ease-in-out infinite;
}
.arcade-cabinet::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #a855f7, #06b6d4, #a855f7);
  animation: arcadeBorderGlow 3s ease-in-out infinite reverse;
}
@keyframes arcadeBorderGlow {
  0%, 100% { opacity: 0.5; filter: blur(0px); }
  50% { opacity: 1; filter: blur(2px); }
}

/* Neon Title */
.neon-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  color: #fff;
  text-shadow:
    0 0 10px #06b6d4,
    0 0 20px #06b6d4,
    0 0 40px #06b6d4,
    0 0 80px #0891b2;
  animation: neonFlicker 4s ease-in-out infinite;
  letter-spacing: 4px;
}
@keyframes neonFlicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.8; }
  94% { opacity: 1; }
  96% { opacity: 0.9; }
  97% { opacity: 1; }
}

/* Arcade Subtitle */
.arcade-subtitle {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.6rem;
  color: #a855f7;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
  letter-spacing: 2px;
  animation: subtitlePulse 2s ease-in-out infinite;
}
@keyframes subtitlePulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Insert Coin / START Button */
.insert-coin-btn {
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  border: 4px solid #fcd34d;
  border-radius: 12px;
  padding: 16px 32px;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.85rem;
  color: #1a1a2e;
  text-shadow: none;
  box-shadow:
    0 6px 0 #b45309,
    0 0 30px rgba(251, 191, 36, 0.4),
    inset 0 -4px 0 rgba(0,0,0,0.2);
  transition: all 0.1s ease;
  position: relative;
  overflow: hidden;
}
.insert-coin-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: arcadeBtnShine 3s ease-in-out infinite;
}
@keyframes arcadeBtnShine {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}
.insert-coin-btn:hover {
  transform: translateY(2px);
  box-shadow:
    0 4px 0 #b45309,
    0 0 40px rgba(251, 191, 36, 0.6);
}
.insert-coin-btn:active {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 #b45309,
    0 0 20px rgba(251, 191, 36, 0.4);
}

/* Blinking text */
.blink-text {
  animation: blinkText 1s step-end infinite;
}
@keyframes blinkText {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Arcade stat display boxes */
.arcade-display {
  background: #000;
  border: 3px solid #333;
  border-radius: 8px;
  padding: 8px 12px;
  position: relative;
}
.arcade-display::before {
  content: '';
  position: absolute;
  inset: 2px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent);
  border-radius: 4px;
  pointer-events: none;
}
.arcade-display-value {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  text-shadow: 0 0 10px currentColor;
}
.arcade-display-label {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.45rem;
  color: #64748b;
  margin-top: 2px;
}

/* Decorative corners */
.corner-decor {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid #06b6d4;
  opacity: 0.5;
}
.corner-tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.corner-tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.corner-bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.corner-br { bottom: 10px; right: 10px; border-left: none; border-top: none; }

/* Mascot float animation */
.mascot-float {
  animation: mascotFloat 3s ease-in-out infinite;
}
@keyframes mascotFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Progress dots for rounds */
.progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(50, 50, 80, 0.5);
  border: 2px solid rgba(100, 100, 150, 0.3);
  transition: all 0.3s ease;
}
.progress-dot.current {
  background: #06b6d4;
  border-color: #06b6d4;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.6);
  transform: scale(1.2);
}
.progress-dot.correct {
  background: #22c55e;
  border-color: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}
.progress-dot.wrong {
  background: #ef4444;
  border-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* Arcade HUD */
.arcade-hud {
  background: linear-gradient(180deg, rgba(10, 10, 20, 0.95), rgba(5, 5, 15, 0.9));
  border-bottom: 3px solid rgba(6, 182, 212, 0.3);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.arcade-stat-box {
  background: linear-gradient(180deg, rgba(20, 20, 40, 0.9), rgba(10, 10, 25, 0.95));
  border: 2px solid rgba(6, 182, 212, 0.3);
  border-radius: 8px;
  padding: 6px 12px;
  text-align: center;
}
.arcade-stat-label {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748b;
  font-weight: bold;
}
.arcade-stat-value {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
}

/* Big Arcade Timer */
.arcade-timer {
  width: 56px;
  height: 56px;
  position: relative;
}
.arcade-timer-bg {
  position: absolute;
  inset: 0;
  border: 4px solid rgba(50, 50, 80, 0.5);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 10, 20, 0.9), rgba(5, 5, 15, 0.95));
}
.arcade-timer-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
}
.timer-critical {
  animation: timerPulse 0.5s ease-in-out infinite;
}
@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Streak badge */
.streak-badge {
  background: linear-gradient(135deg, #f97316, #ea580c);
  border-radius: 20px;
  padding: 2px 10px;
  font-family: 'Orbitron', sans-serif;
  font-weight: bold;
  font-size: 0.7rem;
  color: white;
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.5);
  animation: streakGlow 1s ease-in-out infinite alternate;
}
@keyframes streakGlow {
  from { box-shadow: 0 0 15px rgba(249, 115, 22, 0.5); }
  to { box-shadow: 0 0 25px rgba(249, 115, 22, 0.8); }
}

/* Score display */
.score-display {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

/* Skip Button */
.skip-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(30, 30, 50, 0.8);
  border: 2px solid rgba(100, 100, 150, 0.4);
  border-radius: 8px;
  padding: 8px 16px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease;
  z-index: 50;
}
.skip-btn:hover {
  background: rgba(50, 50, 80, 0.9);
  border-color: rgba(150, 150, 200, 0.5);
  color: rgba(255, 255, 255, 0.9);
}
