/* ==========================================================================
   LearningGames.net — Geography
   Design concept: "World Passport" — a night-map navy base, warm parchment
   passport-style cards, and functional accent colours tied to each game
   mode (not decorative). Dotted flight-path motifs replace generic dividers.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* Core palette */
  --navy-900: #0c1030;
  --navy-800: #12163d;
  --navy-700: #1b2054;
  --navy-600: #262c6e;
  --parchment: #f8f2e2;
  --parchment-dim: #efe6cf;
  --ink: #1a1a2e;
  --ink-soft: #4a4a68;

  /* Functional accents (one per game mode) */
  --coral: #ff6b5b;       /* Flag Challenge */
  --teal: #23b39a;        /* Capital Challenge */
  --gold: #f2b705;        /* Currency Challenge / XP / Streak */
  --violet: #8c6bff;      /* Country Challenge */
  --sky: #3fa9f5;         /* Mixed Challenge */
  --rose: #ff4d6d;        /* Mistakes / wrong */

  --success: #23b39a;
  --error: #ff4d6d;

  --radius-card: 20px;
  --radius-pill: 999px;
  --shadow-deep: 0 24px 48px -20px rgba(6, 8, 26, 0.55);
  --shadow-soft: 0 12px 24px -14px rgba(6, 8, 26, 0.4);

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Manrope', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--navy-900);
  color: var(--parchment);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.1;
}

p { line-height: 1.6; margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Background: a faint dotted world-route texture, applied once per page */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(63, 169, 245, 0.16), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(255, 107, 91, 0.14), transparent 38%),
    radial-gradient(circle at 75% 85%, rgba(35, 179, 154, 0.14), transparent 42%),
    radial-gradient(circle at 10% 90%, rgba(140, 107, 255, 0.12), transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 16, 48, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(248, 242, 226, 0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -0.01em;
  color: var(--parchment);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--sky), var(--teal), var(--gold), var(--coral), var(--violet), var(--sky));
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  box-shadow: 0 0 0 3px rgba(248, 242, 226, 0.12);
}

.brand-mark span { transform: translateY(-1px); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.94rem;
  color: rgba(248, 242, 226, 0.78);
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(248, 242, 226, 0.1);
  color: var(--parchment);
}

.nav-cta {
  background: var(--coral) !important;
  color: var(--navy-900) !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 18px -8px rgba(255, 107, 91, 0.6);
}

.nav-cta:hover { background: #ff8071 !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--parchment);
  font-size: 1.6rem;
  padding: 4px 8px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: var(--radius-pill);
  border: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--coral);
  color: var(--navy-900);
  box-shadow: 0 14px 28px -12px rgba(255, 107, 91, 0.65);
}

.btn-primary:hover { background: #ff8071; transform: translateY(-2px); }

.btn-secondary {
  background: rgba(248, 242, 226, 0.08);
  color: var(--parchment);
  border: 1.5px solid rgba(248, 242, 226, 0.28);
}

.btn-secondary:hover { background: rgba(248, 242, 226, 0.16); }

.btn-ghost {
  background: transparent;
  color: var(--parchment);
  border: 1.5px solid rgba(248, 242, 226, 0.28);
}

.btn-block { width: 100%; }
.btn-lg { padding: 18px 36px; font-size: 1.08rem; }

/* ==========================================================================
   Hero — styled as an oversized boarding pass
   ========================================================================== */

.hero {
  position: relative;
  z-index: 1;
  padding: 64px 0 40px;
}

.hero-pass {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  background: var(--parchment);
  color: var(--ink);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-deep);
}

.hero-pass::before,
.hero-pass::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 2px dashed rgba(26, 26, 46, 0.18);
}

.hero-pass::before { left: calc(63.5% - 1px); }
.hero-pass::after { display: none; }

.hero-copy {
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 14px 7px 10px;
  border-radius: var(--radius-pill);
  background: rgba(35, 179, 154, 0.14);
  color: #147a68;
  font-weight: 700;
  font-size: 0.82rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  color: var(--ink);
  max-width: 12ch;
}

.hero-sub {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 42ch;
  margin-bottom: 6px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 14px;
  padding-top: 18px;
  border-top: 1px dashed rgba(26, 26, 46, 0.18);
}

.hero-stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
}

.hero-stat span {
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-transform: none;
}

.hero-stub {
  position: relative;
  padding: 40px 36px;
  background: repeating-linear-gradient(135deg, rgba(26,26,46,0.035) 0 10px, transparent 10px 20px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stub-label {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  font-weight: 700;
}

.globe-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 6px 0;
}

.globe {
  width: 78%;
  height: 78%;
  border-radius: 50%;
  background: conic-gradient(from 220deg, #3fa9f5, #23b39a, #f2b705, #ff6b5b, #8c6bff, #3fa9f5);
  box-shadow: inset -14px -14px 30px rgba(26,26,46,0.35), 0 20px 40px -18px rgba(26,26,46,0.4);
  animation: spin 18s linear infinite;
  position: relative;
}

@keyframes spin { to { transform: rotate(360deg); } }

.orbit-flag {
  position: absolute;
  font-size: 1.6rem;
  animation: orbit 12s linear infinite;
  filter: drop-shadow(0 4px 6px rgba(26,26,46,0.3));
}

.orbit-flag:nth-child(2) { animation-delay: -3s; font-size: 1.3rem; }
.orbit-flag:nth-child(3) { animation-delay: -7s; font-size: 1.45rem; }
.orbit-flag:nth-child(4) { animation-delay: -9.5s; font-size: 1.2rem; }

@keyframes orbit {
  from { transform: rotate(0deg) translateX(58px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(58px) rotate(-360deg); }
}

.stub-code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px dashed rgba(26,26,46,0.18);
  padding-top: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .globe, .orbit-flag { animation: none; }
}

/* ==========================================================================
   Section headings
   ========================================================================== */

.section { position: relative; z-index: 1; padding: 56px 0; }
.section-head { max-width: 640px; margin: 0 0 32px; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 10px; }
.section-head p { color: rgba(248, 242, 226, 0.7); }

/* ==========================================================================
   Game mode cards
   ========================================================================== */

.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.mode-card {
  position: relative;
  background: var(--navy-700);
  border-radius: var(--radius-card);
  padding: 26px 24px 24px;
  border: 1px solid rgba(248, 242, 226, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 210px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.mode-card::after {
  content: '';
  position: absolute;
  right: -30px;
  top: -30px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--accent, var(--sky));
  opacity: 0.16;
}

.mode-card:hover {
  transform: translateY(-4px);
  border-color: rgba(248, 242, 226, 0.2);
  box-shadow: var(--shadow-soft);
}

.mode-card .mode-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: var(--accent, var(--sky));
  color: var(--navy-900);
}

.mode-card h3 {
  font-size: 1.2rem;
  color: var(--parchment);
}

.mode-card p {
  color: rgba(248, 242, 226, 0.66);
  font-size: 0.94rem;
  margin: 0;
  flex-grow: 1;
}

.mode-card .mode-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--accent, var(--sky));
}

.mode-card[data-mode="flags"]      { --accent: var(--coral); }
.mode-card[data-mode="capitals"]   { --accent: var(--teal); }
.mode-card[data-mode="currency"]   { --accent: var(--gold); }
.mode-card[data-mode="country"]    { --accent: var(--violet); }
.mode-card[data-mode="mixed"]      { --accent: var(--sky); }
.mode-card[data-mode="mistakes"]   { --accent: var(--rose); }

/* ==========================================================================
   How it works
   ========================================================================== */

.flow-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.flow-step {
  background: var(--navy-700);
  border-radius: var(--radius-card);
  padding: 24px 20px;
  border: 1px solid rgba(248, 242, 226, 0.08);
  text-align: left;
}

.flow-step .flow-glyph {
  font-size: 1.8rem;
  margin-bottom: 10px;
  display: block;
}

.flow-step h4 { font-size: 1.05rem; margin-bottom: 6px; color: var(--parchment); }
.flow-step p { font-size: 0.9rem; color: rgba(248, 242, 226, 0.66); margin: 0; }

.flow-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 26px 0;
}

.flow-connector span {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(248, 242, 226, 0.35);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(248, 242, 226, 0.08);
  padding: 40px 0 28px;
  margin-top: 40px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: rgba(248, 242, 226, 0.6); font-size: 0.9rem; }
.footer-links a:hover { color: var(--parchment); }
.footer-fine { color: rgba(248, 242, 226, 0.4); font-size: 0.82rem; margin-top: 18px; }

/* ==========================================================================
   GAME SCREEN (game.html)
   ========================================================================== */

.game-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.game-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 16, 48, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(248, 242, 226, 0.08);
  padding: 14px 0;
}

.game-topbar .container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.exit-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(248, 242, 226, 0.08);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  border: 1px solid rgba(248, 242, 226, 0.14);
}

.progress-wrap { flex-grow: 1; }

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(248, 242, 226, 0.65);
  margin-bottom: 6px;
  font-weight: 600;
}

.progress-track {
  height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(248, 242, 226, 0.1);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--sky), var(--teal));
  width: 0%;
  transition: width 0.4s ease;
}

.game-hud {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
}

.hud-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(248, 242, 226, 0.08);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.hud-chip.streak { color: var(--gold); }
.hud-chip.score { color: var(--parchment); }

.game-main {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 0 50px;
  position: relative;
  z-index: 1;
}

.question-card {
  width: 100%;
  max-width: 640px;
  margin: 0 24px;
  background: var(--navy-700);
  border: 1px solid rgba(248, 242, 226, 0.1);
  border-radius: 26px;
  padding: 40px 36px;
  box-shadow: var(--shadow-deep);
}

.mode-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent, var(--sky));
  color: var(--navy-900);
  font-weight: 700;
  font-size: 0.76rem;
  margin-bottom: 20px;
}

.prompt-visual {
  text-align: center;
  margin-bottom: 18px;
}

.prompt-flag {
  font-size: 5.5rem;
  line-height: 1;
  filter: drop-shadow(0 10px 18px rgba(6,8,26,0.5));
}

.prompt-clues {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.clue-line {
  font-size: 0.98rem;
  color: rgba(248, 242, 226, 0.8);
}

.clue-line b { color: var(--parchment); }

.question-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  text-align: center;
  color: var(--parchment);
  margin: 6px 0 26px;
}

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

.answer-btn {
  text-align: left;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(248, 242, 226, 0.06);
  border: 1.5px solid rgba(248, 242, 226, 0.14);
  color: var(--parchment);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.answer-btn .answer-letter {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(248, 242, 226, 0.1);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.answer-btn:hover:not(:disabled) {
  background: rgba(248, 242, 226, 0.12);
  border-color: rgba(248, 242, 226, 0.3);
}

.answer-btn:active:not(:disabled) { transform: scale(0.98); }

.answer-btn:disabled { cursor: default; }

.answer-btn.correct {
  background: rgba(35, 179, 154, 0.22);
  border-color: var(--teal);
}
.answer-btn.correct .answer-letter { background: var(--teal); color: var(--navy-900); }

.answer-btn.incorrect {
  background: rgba(255, 77, 109, 0.18);
  border-color: var(--rose);
}
.answer-btn.incorrect .answer-letter { background: var(--rose); color: var(--navy-900); }

.answer-btn.faded { opacity: 0.5; }

/* Feedback panel */
.feedback-panel {
  margin-top: 22px;
  border-radius: 18px;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.35s ease;
}

.feedback-panel.show {
  max-height: 400px;
  opacity: 1;
  margin-top: 22px;
}

.feedback-inner {
  padding: 20px 22px;
  border-radius: 18px;
  background: rgba(248, 242, 226, 0.06);
  border: 1px solid rgba(248, 242, 226, 0.12);
}

.feedback-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.feedback-status.correct { color: var(--teal); }
.feedback-status.incorrect { color: var(--rose); }

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.fact-item { font-size: 0.9rem; }
.fact-item .fact-label { color: rgba(248, 242, 226, 0.55); font-size: 0.78rem; display: block; margin-bottom: 2px; }
.fact-item .fact-value { color: var(--parchment); font-weight: 700; }

.fact-tip {
  font-size: 0.9rem;
  color: rgba(248, 242, 226, 0.78);
  padding-top: 10px;
  border-top: 1px dashed rgba(248, 242, 226, 0.18);
}

.fact-tip b { color: var(--gold); }

.feedback-actions { margin-top: 16px; display: flex; justify-content: flex-end; }

/* Points fly-up */
.points-pop {
  position: fixed;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--gold);
  pointer-events: none;
  z-index: 200;
  animation: popUp 0.9s ease forwards;
}

@keyframes popUp {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-60px); opacity: 0; }
}

/* Streak flash */
@keyframes streakPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.hud-chip.streak.pulse { animation: streakPulse 0.4s ease; }

/* End screen */
.end-screen {
  width: 100%;
  max-width: 560px;
  margin: 0 24px;
  text-align: center;
}

.end-badge {
  width: 96px; height: 96px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  background: conic-gradient(from 180deg, var(--gold), var(--coral), var(--violet), var(--sky), var(--gold));
  box-shadow: var(--shadow-deep);
}

.end-screen h1 { font-size: 1.9rem; margin-bottom: 6px; }
.end-rating { color: var(--gold); font-weight: 700; margin-bottom: 24px; }

.end-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.end-stat {
  background: var(--navy-700);
  border: 1px solid rgba(248, 242, 226, 0.1);
  border-radius: 16px;
  padding: 18px 10px;
}

.end-stat b { display: block; font-family: var(--font-display); font-size: 1.5rem; color: var(--parchment); }
.end-stat span { font-size: 0.78rem; color: rgba(248, 242, 226, 0.6); }

.end-actions { display: flex; flex-direction: column; gap: 10px; }

/* Difficulty select */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 22px 0 6px;
}

.diff-btn {
  padding: 16px;
  border-radius: 14px;
  background: rgba(248, 242, 226, 0.06);
  border: 1.5px solid rgba(248, 242, 226, 0.14);
  color: var(--parchment);
  text-align: left;
}

.diff-btn b { display: block; font-family: var(--font-display); font-size: 1rem; margin-bottom: 3px; }
.diff-btn span { font-size: 0.8rem; color: rgba(248, 242, 226, 0.6); }
.diff-btn.selected { border-color: var(--sky); background: rgba(63, 169, 245, 0.14); }

/* Mistakes list */
.mistake-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--navy-700);
  border: 1px solid rgba(248, 242, 226, 0.1);
  border-radius: 14px;
  margin-bottom: 10px;
}

.mistake-item .mistake-flag { font-size: 1.8rem; }
.mistake-item .mistake-name { font-weight: 700; flex-grow: 1; }
.mistake-item .mistake-meta { font-size: 0.82rem; color: rgba(248, 242, 226, 0.6); }
.mistake-count {
  background: rgba(255, 77, 109, 0.16);
  color: var(--rose);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: rgba(248, 242, 226, 0.6);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 14px; }

/* Loading */
.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 60px 24px;
  color: rgba(248, 242, 226, 0.6);
}
.spinner {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(248, 242, 226, 0.18);
  border-top-color: var(--sky);
  animation: spin 0.9s linear infinite;
}

/* Static pages (privacy/terms/how-it-works) */
.page-copy { max-width: 720px; }
.page-copy h2 { margin: 32px 0 12px; font-size: 1.3rem; }
.page-copy h2:first-child { margin-top: 0; }
.page-copy p, .page-copy li { color: rgba(248, 242, 226, 0.75); }
.page-copy ul { padding-left: 20px; }

/* Categories page */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.category-card {
  background: var(--navy-700);
  border-radius: var(--radius-card);
  padding: 24px;
  border: 1px solid rgba(248, 242, 226, 0.08);
}

.category-card.active-cat { border-color: var(--teal); }

.category-card .cat-icon { font-size: 2rem; margin-bottom: 10px; }
.category-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.category-card p { font-size: 0.88rem; color: rgba(248, 242, 226, 0.6); margin-bottom: 14px; }

.status-pill {
  display: inline-block;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.status-pill.live { background: rgba(35, 179, 154, 0.18); color: var(--teal); }
.status-pill.soon { background: rgba(248, 242, 226, 0.1); color: rgba(248, 242, 226, 0.55); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .hero-pass { grid-template-columns: 1fr; }
  .hero-pass::before { display: none; }
  .hero-stub { border-top: 1px dashed rgba(26,26,46,0.18); }
  .flow-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .main-nav { position: fixed; top: 72px; left: 0; right: 0; bottom: 0; background: var(--navy-900); flex-direction: column; align-items: stretch; padding: 20px; gap: 6px; transform: translateX(100%); transition: transform 0.25s ease; z-index: 90; }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { padding: 16px; font-size: 1.05rem; }
  .nav-toggle { display: block; }
  .hero-copy { padding: 36px 24px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { flex-wrap: wrap; row-gap: 12px; }
  .answers-grid { grid-template-columns: 1fr; }
  .game-hud { gap: 8px; }
  .hud-chip { padding: 7px 10px; font-size: 0.82rem; }
  .question-card { padding: 28px 20px; }
  .end-stats { grid-template-columns: 1fr; }
  .diff-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .prompt-flag { font-size: 4.2rem; }
}

/* Focus visibility for accessibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
}
