﻿/* ==========================================================================
   TRIVIA.GRIMALDI.TV - Premium Patriotic Design System & Enhanced Experience
   3 Game Modes, Dynamic Liberty Torch, Fanfares, Keyboard Shortcuts, Glassmorphism
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Oswald:wght@500;600;700;800;900&display=swap');

:root {
  --bg-dark: #040711;
  --bg-card: rgba(12, 19, 36, 0.82);
  --bg-card-hover: rgba(20, 31, 58, 0.95);
  
  --patriot-blue: #2563eb;
  --patriot-blue-bright: #3b82f6;
  --patriot-blue-glow: rgba(37, 99, 235, 0.5);
  --patriot-red: #ef4444;
  --patriot-red-bright: #f87171;
  --patriot-red-glow: rgba(239, 68, 68, 0.5);
  --patriot-gold: #f59e0b;
  --patriot-gold-bright: #fbbf24;
  --patriot-gold-glow: rgba(245, 158, 11, 0.5);
  --patriot-white: #ffffff;
  
  --correct-green: #10b981;
  --correct-green-glow: rgba(16, 185, 129, 0.5);
  --wrong-red: #f43f5e;
  
  --border-subtle: rgba(255, 255, 255, 0.12);
  --border-patriot: rgba(59, 130, 246, 0.45);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --nav-height: 64px;
  --banner-height: 38px;
  
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Oswald', 'Impact', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(239, 68, 68, 0.14) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.08) 0%, transparent 60%);
  background-attachment: fixed;
  position: relative;
}

/* Background Animated Starfield */
.starry-sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #ffffff 100%, transparent),
    radial-gradient(2.5px 2.5px at 90px 80px, #93c5fd 100%, transparent),
    radial-gradient(1.5px 1.5px at 150px 120px, #ffffff 100%, transparent),
    radial-gradient(2px 2px at 280px 210px, #fca5a5 100%, transparent),
    radial-gradient(1.5px 1.5px at 340px 90px, #ffffff 100%, transparent),
    radial-gradient(2.5px 2.5px at 450px 320px, #93c5fd 100%, transparent),
    radial-gradient(1.5px 1.5px at 580px 180px, #ffffff 100%, transparent),
    radial-gradient(2px 2px at 700px 260px, #fca5a5 100%, transparent),
    radial-gradient(1.5px 1.5px at 850px 130px, #ffffff 100%, transparent),
    radial-gradient(2.5px 2.5px at 950px 380px, #93c5fd 100%, transparent);
  background-size: 1000px 500px;
  opacity: 0.7;
}

/* Frosty Freeze Screen Overlay */
#freezeOverlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99998;
  border: 8px solid rgba(56, 189, 248, 0.6);
  box-shadow: inset 0 0 60px rgba(56, 189, 248, 0.45);
  opacity: 0;
  transition: opacity 0.4s ease;
}

#freezeOverlay.active {
  opacity: 1;
}

/* Fireworks Canvas */
#fireworksCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99999;
}

/* Milestone Popup Fanfare */
#milestonePopup {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.3);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.95));
  border: 2px solid #fbbf24;
  border-radius: 28px;
  padding: 30px 40px;
  text-align: center;
  z-index: 100030;
  box-shadow: 0 0 60px rgba(245, 158, 11, 0.6), 0 20px 60px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#milestonePopup.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.milestone-icon {
  font-size: 56px;
  margin-bottom: 8px;
  display: inline-block;
  animation: bounceIn 0.6s ease;
}

.milestone-text {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #fbbf24;
  text-transform: uppercase;
}

.milestone-sub {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
}

/* Unified Navigation Header */
#grimaldi-unified-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background-color: #000000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.85);
}

.hamburger-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  transition: all 0.2s;
}

.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hamburger-btn span {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#grimaldi-nav-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

#grimaldi-nav-logo img {
  height: 42px;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
}

.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.nav-icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--patriot-blue);
}

/* Red Announcement Banner */
#static-promo-banner {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  height: var(--banner-height);
  background: linear-gradient(90deg, #b91c1c 0%, #dc2626 50%, #b91c1c 100%);
  color: white;
  text-decoration: none;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99990;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: opacity 0.2s;
  padding: 0 10px;
  text-align: center;
}

#static-promo-banner:hover {
  opacity: 0.95;
}

/* Slide-out Menu Drawer */
#grimaldiMenuBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#grimaldiMenuBackdrop.open {
  opacity: 1;
  pointer-events: auto;
}

#grimaldiMenuDrawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 310px;
  max-width: 85vw;
  background: #090e1a;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 100002;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.9);
}

#grimaldiMenuDrawer.open {
  transform: translateX(0);
}

.grit-nav-link {
  display: block;
  padding: 12px 20px;
  color: #e2e8f0;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: all 0.2s;
}

.grit-nav-link:hover {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  padding-left: 26px;
}

/* Main Container */
.main-wrapper {
  margin-top: calc(var(--nav-height) + var(--banner-height) + 16px);
  padding: 0 16px 60px 16px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

/* Hero Header Card */
.hero-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18) 0%, rgba(13, 20, 38, 0.88) 50%, rgba(239, 68, 68, 0.16) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  border-radius: 24px;
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6);
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ef4444 0%, #ffffff 50%, #3b82f6 100%);
}

.hero-badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.hero-badge {
  background: rgba(37, 99, 235, 0.25);
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: #93c5fd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
}

.hero-badge-gold {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 6vw, 48px);
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 70%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  max-width: 680px;
  margin: 0 auto 12px auto;
  line-height: 1.5;
}

/* Game Mode Selection Row */
.modes-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.mode-card-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 12px 14px;
  color: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mode-card-btn:hover {
  background: rgba(37, 99, 235, 0.18);
  border-color: #3b82f6;
  transform: translateY(-2px);
}

.mode-card-btn.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(30, 58, 138, 0.6));
  border-color: #60a5fa;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
}

.mode-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.mode-info-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 1.2;
}

.mode-info-desc {
  font-size: 11px;
  color: var(--text-dim);
}

/* Category Selection Pills Bar */
.category-pills-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cat-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cat-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.4);
}

.cat-pill.active {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border-color: #60a5fa;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

/* Patriot Game Arena HUD */
.game-hud-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.hud-stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s;
}

.hud-stat-box:hover {
  border-color: var(--border-patriot);
  transform: translateY(-2px);
}

.hud-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.hud-stat-meta {
  display: flex;
  flex-direction: column;
}

.hud-stat-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hud-stat-value {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
}

/* Dynamic Flame Torch Effect */
.hud-streak-box {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(37, 99, 235, 0.18));
  border-color: rgba(239, 68, 68, 0.4);
}

.hud-streak-box.flaming {
  border-color: #f59e0b;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
  animation: torchPulse 1.8s infinite ease-in-out;
}

@keyframes torchPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.35); }
  50% { box-shadow: 0 0 35px rgba(239, 68, 68, 0.7), 0 0 20px rgba(245, 158, 11, 0.6); }
}

/* Rank Ribbon Banner */
.rank-ribbon-card {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(30, 58, 138, 0.4), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 16px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.rank-title-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fbbf24;
  text-transform: uppercase;
}

.rank-next-text {
  font-size: 12px;
  color: var(--text-muted);
}

.rank-next-text strong {
  color: #ffffff;
}

/* Patriotic Lifelines Bar */
.lifelines-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.lifeline-btn {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 9px 16px;
  border-radius: 30px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.lifeline-btn:hover:not(:disabled) {
  background: rgba(37, 99, 235, 0.25);
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.lifeline-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.05);
  filter: grayscale(1);
}

/* Question Arena Card */
.question-arena-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  border-radius: 24px;
  padding: 26px 22px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  transition: border-color 0.3s;
}

.question-arena-card.pulse-correct {
  border-color: var(--correct-green);
  box-shadow: 0 0 35px var(--correct-green-glow);
}

.question-arena-card.pulse-wrong {
  border-color: var(--wrong-red);
  box-shadow: 0 0 35px var(--patriot-red-glow);
}

/* Timer Bar */
.timer-bar-container {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
}

.timer-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #10b981, #3b82f6);
  border-radius: 10px;
  transition: width 0.1s linear, background-color 0.3s;
}

.timer-bar-fill.warning {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.timer-bar-fill.frozen {
  background: linear-gradient(90deg, #38bdf8, #0ea5e9);
}

/* Category & Question Meta Row */
.question-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.question-cat-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.12);
  padding: 4px 12px;
  border-radius: 14px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.question-index-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
}

/* Main Question Text */
.question-prompt {
  font-family: var(--font-main);
  font-size: clamp(18px, 3.2vw, 24px);
  font-weight: 800;
  line-height: 1.4;
  color: #ffffff;
  margin-bottom: 24px;
  text-align: left;
}

/* Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .options-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.option-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 15px 18px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  outline: none;
}

.option-left-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.option-btn:hover:not(:disabled) {
  background: rgba(37, 99, 235, 0.18);
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
}

.option-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 14px;
  color: #94a3b8;
  flex-shrink: 0;
  transition: all 0.2s;
}

.option-key-hint {
  font-size: 10px;
  font-family: var(--font-heading);
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.option-btn:hover:not(:disabled) .option-badge {
  background: #3b82f6;
  color: #ffffff;
}

/* Option States */
.option-btn.correct {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: var(--correct-green) !important;
  box-shadow: 0 0 25px var(--correct-green-glow);
  color: #ffffff;
}

.option-btn.correct .option-badge {
  background: var(--correct-green);
  color: #ffffff;
}

.option-btn.wrong {
  background: rgba(244, 63, 94, 0.25) !important;
  border-color: var(--wrong-red) !important;
  box-shadow: 0 0 25px var(--patriot-red-glow);
  animation: shake 0.4s ease-in-out;
}

.option-btn.wrong .option-badge {
  background: var(--wrong-red);
  color: #ffffff;
}

.option-btn.eliminated {
  opacity: 0.25;
  filter: blur(1px);
  cursor: not-allowed;
  pointer-events: none;
  text-decoration: line-through;
}

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

/* Educational Fun Fact Banner */
.fact-banner {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 16px;
  padding: 14px 18px;
  margin-top: 20px;
  display: none;
  align-items: flex-start;
  gap: 12px;
  animation: fadeIn 0.3s ease;
}

.fact-banner.visible {
  display: flex;
}

.fact-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.fact-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: #e2e8f0;
}

.fact-text strong {
  color: #60a5fa;
  display: block;
  margin-bottom: 2px;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 100010;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: #0d1426;
  border: 1px solid var(--border-patriot);
  border-radius: 28px;
  padding: 32px 28px;
  max-width: 500px;
  width: 100%;
  color: #ffffff;
  text-align: center;
  position: relative;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.95);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.modal-badge-icon {
  font-size: 44px;
  margin-bottom: 8px;
  display: inline-block;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.modal-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Callsign Form */
.callsign-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.callsign-input {
  background: none;
  border: none;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  outline: none;
  width: 100%;
}

.callsign-input::placeholder {
  color: var(--text-dim);
}

/* Recap Stats Grid */
.recap-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.recap-stat-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.recap-stat-item.highlight {
  background: rgba(37, 99, 235, 0.15);
  border-color: #3b82f6;
}

.recap-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.recap-val {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 900;
  color: #ffffff;
}

/* Action Buttons */
.btn-primary {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border: none;
  border-radius: 30px;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.45);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.6);
}

.btn-secondary {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Leaderboard List */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  max-height: 260px;
  overflow-y: auto;
  text-align: left;
}

.lb-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lb-item.top-1 {
  border-color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
}

.lb-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lb-rank {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 16px;
  width: 24px;
  color: #94a3b8;
}

.lb-item.top-1 .lb-rank {
  color: #fbbf24;
}

.lb-name {
  font-weight: 700;
  font-size: 13.5px;
  color: #ffffff;
}

.lb-title {
  font-size: 11px;
  color: var(--text-dim);
}

.lb-streak {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 900;
  color: #60a5fa;
}

/* Toast Message */
#triviaToast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #111827;
  border: 1px solid #3b82f6;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  z-index: 100020;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

#triviaToast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Keyframes */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.1); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 600px) {
  .hero-card {
    padding: 18px 14px;
  }
  .question-arena-card {
    padding: 18px 14px;
  }
  .game-hud-bar {
    grid-template-columns: 1fr 1fr;
  }
  .hud-stat-box {
    padding: 10px 12px;
  }
  .hud-icon-badge {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  .hud-stat-value {
    font-size: 20px;
  }
  .option-btn {
    padding: 12px 14px;
    font-size: 14px;
  }
}
