:root {
      --gold: #d4af37;
      --gold-bright: #f0d070;
      --dark: #0a0c14;
      --navy: #111827;
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      padding: 0;
      background: #020306;
      color: #ccc;
      font-family: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      overflow-x: hidden;
    }
    .page {
      width: 100%;
      max-width: 1100px;
      padding: 40px 20px;
    }
    .banner-wrap {
      position: relative;
      width: 100%;
      aspect-ratio: 1100 / 250;
      height: auto;
      border-radius: 10px;
      overflow: hidden;
      box-shadow:
        0 0 35px rgba(212, 175, 55, 0.25),
        0 0 80px rgba(212, 175, 55, 0.12),
        inset 0 0 18px rgba(0, 0, 0, 0.85),
        inset 0 0 0 1px rgba(212, 175, 55, 0.15);
      transition: box-shadow 160ms ease;
      background: #0a0c14;
      cursor: crosshair;
    }
    .banner-wrap:hover {
      box-shadow:
        0 0 45px rgba(212, 175, 55, 0.45),
        0 0 120px rgba(212, 175, 55, 0.25),
        inset 0 0 24px rgba(0, 0, 0, 0.92),
        inset 0 0 0 1px rgba(212, 175, 55, 0.25);
    }
    .banner-wrap::after {
      content: " ";
      display: block;
      position: absolute;
      top: 0; left: 0; bottom: 0; right: 0;
      background: 
        radial-gradient(circle at 50% 10%, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 65%),
        radial-gradient(circle, rgba(0,0,0,0) 65%, rgba(0,0,0,0.45) 100%);
      pointer-events: none;
      z-index: 12;
    }
    #game {
      display: block;
      width: 100%;
      height: 100%;
      image-rendering: pixelated;
      cursor: inherit;
    }
    .footer {
      margin-top: 22px;
      text-align: center;
      font-size: 11px;
      opacity: 0.45;
      letter-spacing: 0.5px;
    }
    .controls {
      display: flex;
      gap: 6px;
      justify-content: center;
      margin-top: 10px;
      flex-wrap: wrap;
    }
    .controls button {
      background: #0f121a;
      color: #d4af37;
      border: 1px solid #d4af37;
      padding: 5px 13px;
      font-size: 9.5px;
      font-family: monospace;
      letter-spacing: 0.5px;
      cursor: pointer;
      transition: all 80ms ease;
      border-radius: 2px;
    }
    .controls button:hover {
      background: #1a1f2e;
      color: #f0d070;
      border-color: #f0d070;
    }
    .controls button.active {
      background: #d4af37;
      color: #0a0c14;
      border-color: #d4af37;
    }

    /* Mobile D-pad styling */
    #ios-dpad .dpad-arrow {
      width: 44px;
      height: 44px;
      font-size: 16px;
      font-family: monospace;
      background: #0f121a;
      color: #f4d97a;
      border: 1px solid #d4af37;
      border-radius: 4px;
      padding: 0;
      cursor: pointer;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.1s, transform 0.05s;
    }
    #ios-dpad .dpad-arrow:active {
      background: #d4af37;
      color: #0a0c14;
      transform: scale(0.92);
    }
    .scanlines {
      position: absolute;
      inset: 0;
      pointer-events: none;
      background: repeating-linear-gradient(
        to bottom,
        rgba(0,0,0,0) 0px,
        rgba(0,0,0,0) 2px,
        rgba(0,0,0,0.07) 2px,
        rgba(0,0,0,0.07) 4px
      );
      z-index: 10;
      mix-blend-mode: multiply;
    }
    .mode-label {
      position: absolute;
      top: 6px;
      right: 8px;
      font-size: 7px;
      font-family: monospace;
      color: rgba(212,175,55,0.3);
      pointer-events: none;
      z-index: 11;
    }

    /* Mobile: give a taller (more playable) preferred ratio than the ultra-wide desktop banner,
       but cap the height so the banner stays a "banner" and doesn't eat the whole phone
       in landscape or dominate portrait. The JS measures the *actual* laid-out size after
       these rules and sets the canvas bitmap to an exact matching aspect → zero stretch/squish
       on any orientation, any iOS Safari quirk, any container constraint. */
    @media (max-width: 768px) {
      .banner-wrap {
        aspect-ratio: 2.45 / 1;   /* ~2.45:1 → more vertical room on portrait phones than 4.5:1 */
        max-height: 205px;        /* keeps it banner-sized in landscape too */
      }
      .controls button {
        font-size: 10px;
        padding: 6px 11px;
      }
    }
    @keyframes screen-shake {
      0% { transform: translate(0, 0); }
      10% { transform: translate(-2px, -1px); }
      20% { transform: translate(1px, 2px); }
      30% { transform: translate(-1px, -2px); }
      40% { transform: translate(2px, 1px); }
      50% { transform: translate(-1px, 2px); }
      60% { transform: translate(2px, -1px); }
      70% { transform: translate(-2px, -2px); }
      80% { transform: translate(1px, 2px); }
      90% { transform: translate(-2px, 1px); }
      100% { transform: translate(0, 0); }
    }
    .shake {
      animation: screen-shake 0.15s ease-in-out;
    }


/* ============================================================
   HOMEPAGE STYLES (body.home-page)
   ============================================================ */

body.home-page {
  display: block;
  background: #020306;
  color: #ccc;
  justify-content: unset;
  align-items: unset;
}

/* --- NAV --- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(2, 3, 6, 0.92);
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #d4af37;
  text-decoration: none;
  letter-spacing: 2px;
}
.nav-logo span { color: rgba(212,175,55,0.55); }
.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  color: rgba(204,204,204,0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: color 120ms;
}
.nav-links a:hover { color: #d4af37; }

/* --- HERO --- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: center;
  padding: 80px 24px 90px;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 2;
}
.hero-eyebrow {
  font-family: monospace;
  font-size: 11px;
  letter-spacing: 2px;
  color: #d4af37;
  opacity: 0.7;
  margin: 0 0 18px;
  text-transform: uppercase;
}
.hero-headline {
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 700;
  color: #f5f0e8;
  line-height: 1.12;
  margin: 0 0 20px;
}
.hero-sub {
  font-size: 17px;
  color: rgba(204,204,204,0.65);
  max-width: 560px;
  line-height: 1.65;
  margin: 0 0 36px;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-primary {
  background: #d4af37;
  color: #0a0c14;
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  letter-spacing: 0.4px;
  transition: background 120ms, transform 80ms;
  display: inline-block;
}
.btn-primary:hover {
  background: #f0d070;
  transform: translateY(-1px);
}
.btn-ghost {
  border: 1px solid rgba(212,175,55,0.4);
  color: #d4af37;
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  letter-spacing: 0.4px;
  transition: border-color 120ms, color 120ms;
  display: inline-block;
}
.btn-ghost:hover {
  border-color: #d4af37;
  color: #f0d070;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(212,175,55,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,175,55,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

/* --- TOPICS --- */
.topics {
  padding: 70px 24px 90px;
}
.topics-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.section-heading {
  font-size: 13px;
  font-family: monospace;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #d4af37;
  opacity: 0.6;
  margin: 0 0 36px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.topic-card {
  background: #0a0c14;
  border: 1px solid rgba(212,175,55,0.12);
  border-radius: 8px;
  padding: 28px 26px 26px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 150ms, transform 150ms, box-shadow 150ms;
}
.topic-card:hover {
  border-color: rgba(212,175,55,0.45);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(212,175,55,0.08);
}
.card-icon {
  font-size: 28px;
  line-height: 1;
}
.topic-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: #f5f0e8;
  margin: 0;
}
.topic-card p {
  font-size: 14px;
  color: rgba(204,204,204,0.6);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}
.card-cta {
  font-size: 12px;
  color: #d4af37;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-top: 6px;
}

/* --- SITE FOOTER --- */
.site-footer {
  border-top: 1px solid rgba(212,175,55,0.1);
  padding: 32px 24px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  font-family: monospace;
  font-size: 11px;
  letter-spacing: 3px;
  color: #d4af37;
  opacity: 0.5;
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  font-size: 12px;
  color: rgba(204,204,204,0.45);
  text-decoration: none;
  transition: color 120ms;
}
.footer-links a:hover { color: #d4af37; }
.footer-copy {
  font-size: 11px;
  color: rgba(204,204,204,0.3);
  margin: 0;
  width: 100%;
  text-align: center;
}

/* Legal pages */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px;
}
.legal-header {
  margin-bottom: 48px;
}
.logo-link {
  font-family: monospace;
  font-size: 13px;
  letter-spacing: 3px;
  color: #d4af37;
  text-decoration: none;
  opacity: 0.7;
}
.legal-content h1 {
  font-size: 28px;
  color: #f5f0e8;
  margin: 0 0 6px;
}
.last-updated {
  font-size: 12px;
  color: rgba(204,204,204,0.4);
  margin: 0 0 36px;
  font-family: monospace;
}
.legal-content h2 {
  font-size: 16px;
  color: #d4af37;
  margin: 32px 0 10px;
}
.legal-content p, .legal-content li {
  font-size: 14px;
  line-height: 1.75;
  color: rgba(204,204,204,0.7);
}
.legal-content a { color: #d4af37; }
.legal-content ul { padding-left: 20px; }
.legal-footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid rgba(212,175,55,0.1);
  font-size: 12px;
}
.legal-footer a {
  color: rgba(212,175,55,0.6);
  text-decoration: none;
  margin-right: 12px;
}
.legal-footer p {
  color: rgba(204,204,204,0.3);
  margin: 10px 0 0;
  font-size: 11px;
}

/* --- RESPONSIVE --- */
@media (max-width: 640px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 13px; }
  .hero { padding: 60px 20px 70px; min-height: unset; }
  .hero-sub { font-size: 15px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-copy { text-align: left; }
}

/* ---- Link color overrides (iOS WebKit specificity fix) ---- */
.nav-logo:link, .nav-logo:visited { color: #d4af37; text-decoration: none; }
.nav-links a:link, .nav-links a:visited { color: rgba(204,204,204,0.7); text-decoration: none; }
.nav-links a:hover { color: #d4af37; }
.topic-card:link, .topic-card:visited { color: #ccc; text-decoration: none; }
.topic-card h3 { color: #f5f0e8; }
.topic-card p { color: rgba(204,204,204,0.6); }
.card-cta { color: #d4af37; }
.btn-primary:link, .btn-primary:visited { color: #0a0c14; text-decoration: none; }
.btn-ghost:link, .btn-ghost:visited { color: #d4af37; text-decoration: none; }
.footer-links a:link, .footer-links a:visited { color: rgba(204,204,204,0.45); text-decoration: none; }

/* ---- Newsletter Section ---- */
.newsletter {
  padding: 80px 24px;
  background: #0d0f1a;
  text-align: center;
  border-top: 1px solid rgba(212,175,55,0.1);
}
.newsletter-inner {
  max-width: 560px;
  margin: 0 auto;
}
.newsletter-heading {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: #f5f0e8;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.newsletter-sub {
  color: rgba(204,204,204,0.65);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 28px;
}
.newsletter-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.newsletter-input {
  flex: 1 1 220px;
  padding: 14px 18px;
  background: #0a0c14;
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 8px;
  color: #f5f0e8;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.newsletter-input:focus {
  border-color: #d4af37;
}
.newsletter-input::placeholder {
  color: rgba(204,204,204,0.3);
}
.newsletter-btn {
  padding: 14px 24px;
  background: #d4af37;
  color: #0a0c14;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.newsletter-btn:hover { opacity: 0.88; }
.newsletter-note {
  margin: 16px 0 0;
  font-size: 0.78rem;
  color: rgba(204,204,204,0.35);
}
.newsletter-note a:link,
.newsletter-note a:visited {
  color: rgba(204,204,204,0.45);
  text-decoration: underline;
}

/* ---- 404 Error Page ---- */
.error-page .error-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
}
.error-page .error-inner {
  max-width: 520px;
}
.error-page .error-code {
  font-size: 6rem;
  font-weight: 700;
  color: #d4af37;
  line-height: 1;
  margin: 0 0 16px;
  opacity: 0.6;
}
.error-page .error-heading {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  color: #f5f0e8;
  margin: 0 0 16px;
}
.error-page .error-sub {
  color: rgba(204,204,204,0.6);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 36px;
}
.error-page .error-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================
   PREMIUM POLISH v0.7.0
   ============================ */

/* Nav: gold underline slide-in on hover */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: #d4af37;
  transition: width 0.22s ease;
}
.nav-links a:hover::after { width: 100%; }

/* Card CTA base transition */
.card-cta {
  transition: color 0.22s ease, letter-spacing 0.22s ease;
}

/* Topic cards: lift + glow on hover */
.topic-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.topic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,175,55,0.2);
  border-color: rgba(212,175,55,0.25);
}
.topic-card:hover .card-cta {
  color: #f5e68a;
  letter-spacing: 0.02em;
}
.topic-card .card-icon {
  transition: transform 0.25s ease;
  display: inline-block;
}
.topic-card:hover .card-icon {
  transform: scale(1.14);
}

/* Buttons: press states */
.btn-primary {
  transition: opacity 0.18s ease, transform 0.1s ease;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.97); opacity: 0.85; }

.btn-ghost {
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.1s ease;
}
.btn-ghost:hover {
  background: rgba(212,175,55,0.08);
  border-color: rgba(212,175,55,0.65);
}
.btn-ghost:active { transform: scale(0.97); }

/* Hero grid: radial fade so it reads intentional */
.hero-grid-bg {
  opacity: 0.25;
  mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black 0%, transparent 100%);
}

/* Newsletter: premium card container */
.newsletter-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(212,175,55,0.12);
  border-top: 2px solid rgba(212,175,55,0.4);
  border-radius: 16px;
  padding: 48px 40px;
}
@media (max-width: 600px) {
  .newsletter-card { padding: 36px 22px; }
}
.newsletter-btn {
  transition: opacity 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease;
}
.newsletter-btn:hover {
  opacity: 0.9;
  box-shadow: 0 6px 20px rgba(212,175,55,0.28);
}
.newsletter-btn:active { transform: scale(0.97); }

/* 404: gold gradient number */
.error-code {
  background: linear-gradient(135deg, #b8921f 0%, #f5e68a 45%, #c9a227 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 1;
}

/* ============================
   HOMEPAGE ELEVATION v0.8.0
   ============================ */

/* Hero: warm ambient glow — the single change that makes dark feel alive */
.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -8%;
  width: 68%;
  height: 145%;
  background: radial-gradient(ellipse at center, rgba(212,175,55,0.055) 0%, transparent 65%);
  z-index: 1;
  pointer-events: none;
}

/* Hero: generous desktop breathing room */
@media (min-width: 768px) {
  .hero {
    min-height: 580px;
    padding: 110px 48px 120px;
  }
}

/* Hero eyebrow: confident, not whispered */
.hero-eyebrow {
  opacity: 0.88;
  letter-spacing: 3px;
}

/* Hero headline: barely-there warmth in the text */
.hero-headline {
  text-shadow: 0 2px 60px rgba(212,175,55,0.07);
}

/* Hero sub: slightly more readable */
.hero-sub {
  color: rgba(204,204,204,0.72);
}

/* Section heading: present, not apologetic */
.section-heading {
  opacity: 0.85;
  margin-bottom: 44px;
}

/* Card grid: 2-column editorial layout on desktop */
.card-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* Cards: breathing room + softer radius */
.topic-card {
  border-radius: 12px;
  padding: 32px 28px 28px;
  gap: 12px;
}
.topic-card h3 {
  font-size: 17px;
}
.topic-card p {
  color: rgba(204,204,204,0.68);
  line-height: 1.66;
}

/* Buttons: 6px radius — not sharp, not pill */
.btn-primary,
.btn-ghost {
  border-radius: 6px;
  padding: 13px 30px;
}

/* ============================
   HERO SPACING FIX v0.8.1
   ============================ */
@media (min-width: 768px) {
  .hero {
    min-height: 500px;
    padding: 90px 48px 80px;
  }
}
