/* =========================================================================
   GameDaily.ai — "Arcade Cabinet" theme
   Light + dark via [data-theme] on <html>. Neon-on-charcoal / sunlit cabinet,
   heavy uppercase display type, scoreboard mono numerals, scanline texture.
   ========================================================================= */

/* === Design tokens ===================================================== */
:root {
  /* Dark = neon arcade (default; the no-flash script sets data-theme early) */
  --bg:          #0c0a13;
  --bg-grid:     rgba(255, 255, 255, 0.022);
  --bg-elev:     #15121f;
  --bg-elev-2:   #1f1a2e;
  --text:        #f3eeff;
  --text-muted:  #9a90ba;
  --border:      #2b2640;
  --border-soft: #211d31;

  --accent:      #ff2d92;   /* hot magenta — primary action / "play" */
  --accent-ink:  #ffffff;   /* text on accent */
  --accent-2:    #1fe0ff;   /* cyan — secondary highlight */
  --gotd:        #ffce3a;   /* arcade gold — game of the day */
  --gotd-ink:    #1a1206;

  --glow:        0 0 18px rgba(255, 45, 146, 0.45);
  --glow-2:      0 0 18px rgba(31, 224, 255, 0.40);
  --glow-text:   0 0 12px rgba(255, 45, 146, 0.55);

  /* CRT screen + 90s hard-edged shadow */
  --crt-bezel:      #1a1626;
  --crt-bezel-edge: #2c2640;
  --crt-glow:       rgba(255, 45, 146, 0.12);
  --crt-grille-line: rgba(255, 255, 255, 0.16);
  --shadow-hard:    #050409;

  --radius:      12px;
  --radius-sm:   7px;
  --maxw:        1100px;

  --font-body:   ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-body);
  --font-mono:   ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}

:root[data-theme="light"] {
  /* Light = sunlit cabinet: warm paper, ink text, deepened neons for contrast */
  --bg:          #f4f0e6;
  --bg-grid:     rgba(20, 12, 40, 0.030);
  --bg-elev:     #fffdf7;
  --bg-elev-2:   #ece5d6;
  --text:        #1d1730;
  --text-muted:  #6a6385;
  --border:      #d8cfbd;
  --border-soft: #e6ddcb;

  --accent:      #d2117a;
  --accent-ink:  #ffffff;
  --accent-2:    #0a86a3;
  --gotd:        #b9810c;
  --gotd-ink:    #fff8e8;

  --glow:        0 4px 14px rgba(210, 17, 122, 0.20);
  --glow-2:      0 4px 14px rgba(10, 134, 163, 0.18);
  --glow-text:   none;

  --crt-bezel:      #d8cdb8;
  --crt-bezel-edge: #c3b596;
  --crt-glow:       rgba(210, 17, 122, 0.10);
  --crt-grille-line: rgba(50, 36, 70, 0.22);
  --shadow-hard:    rgba(60, 40, 90, 0.22);
}

/* === Reset & base ====================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Subtle scanline + grid texture — pure decoration, never blocks input. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 44px 44px, 44px 44px;
}
body > * { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-2); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }

/* Shared "arcade label" — small uppercase eyebrow with neon weight */
.eyebrow,
.game-player-label,
.game-of-the-day h2,
.gotd-highlight h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  font-weight: 800;
}

/* === Nav =============================================================== */
.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(var(--bg-elev), var(--bg));
}

/* Header counter — centered, decorative, hidden when the bar gets cramped */
.nav-counter {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  white-space: nowrap;
  pointer-events: none;
}
.nav-counter strong { color: var(--accent-2); font-weight: 700; }
.nav-counter-sep { opacity: 0.5; }
.count-up { font-variant-numeric: tabular-nums; }
@media (max-width: 820px) { .nav-counter { display: none; } }
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.nav-logo:hover { color: var(--text); text-shadow: var(--glow-text); }
.nav-icon {
  width: 1.5em; height: 1.5em;
  max-width: 1.5em; max-height: 1.5em;
  flex-shrink: 0;
  border-radius: 5px;
  object-fit: contain;
}
.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-links { display: flex; align-items: center; gap: 1.25rem; }
.nav-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.nav-links a:hover { color: var(--text); }

/* Theme toggle — a little cabinet switch */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-elev-2);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.theme-toggle:hover { border-color: var(--accent-2); box-shadow: var(--glow-2); transform: translateY(-1px); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: inline; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* === Main & footer ===================================================== */
main { max-width: var(--maxw); margin: 0 auto; padding: 2.25rem 1.5rem; }
footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 3.5rem;
}
footer a { font-weight: 600; }
.footer-links { margin-top: 0.5rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* === Hero ============================================================== */
.hero { text-align: center; padding: 2.5rem 0 0.5rem; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-shadow: var(--glow-text);
}
.hero-sub { color: var(--text-muted); margin-top: 0.75rem; font-size: 1rem; max-width: 46rem; margin-inline: auto; }
.hero-date { color: var(--text-muted); margin-top: 0.5rem; }

/* === Stats bar (homepage) ============================================= */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0 1rem;
  padding: 1.25rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-image: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}
.stat { text-align: center; padding: 0.25rem; }
.stat-num {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-2);
  text-shadow: var(--glow-2);
  line-height: 1.1;
}
.stat-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
}

/* End-of-page counter (homepage): two big numbers */
.end-counter { margin: 3rem 0 1rem; }
.stats-bar-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 520px;
  margin-inline: auto;
}

/* === Buttons =========================================================== */
.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--shadow-hard);
  transition: transform .1s, box-shadow .12s, background .15s;
}
.btn:hover { color: var(--accent-ink); transform: translate(-1px, -2px); box-shadow: 5px 6px 0 var(--shadow-hard), var(--glow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-hard); }
.btn-secondary {
  background: var(--bg-elev-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { color: var(--text); border-color: var(--accent-2); box-shadow: var(--glow-2); }
.btn-secondary:active { box-shadow: 1px 1px 0 var(--shadow-hard); }
.btn-block { display: block; width: 100%; text-align: center; }

/* Big call-to-action (e.g. Play a Random Game) */
.btn-lg {
  padding: 1rem 2.3rem;
  font-size: 1.05rem;
  box-shadow: 4px 4px 0 var(--shadow-hard);
}
.btn-lg:hover { box-shadow: 6px 8px 0 var(--shadow-hard), var(--glow); }
.btn-lg:active { box-shadow: 1px 1px 0 var(--shadow-hard); }
.hero-actions { margin-top: 1.6rem; }

/* Make the global Random link pop a little */
.nav-links a.nav-random { color: var(--accent-2); }
.nav-links a.nav-random:hover { color: var(--text); text-shadow: var(--glow-2); }

/* === Game frame / embed =============================================== */
/* CRT housing: square-ish plastic bezel that wraps the rounder screen. */
.crt {
  position: relative;
  margin-bottom: 1.5rem;
  padding: clamp(12px, 2.4vw, 26px);
  border-radius: 16px;
  background: linear-gradient(155deg, var(--crt-bezel-edge), var(--crt-bezel) 72%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 0 0 1px rgba(0, 0, 0, 0.55),
    0 18px 42px rgba(0, 0, 0, 0.45),
    0 0 26px var(--crt-glow);
}
/* The screen: small, slightly-elliptical rounded corners (kept small so games
   with score/status in their corners aren't clipped). No on-screen overlay. */
.game-frame-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  border-radius: 22px / 18px;
  overflow: hidden;
  background: #04030a;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.05); /* thin glass rim only */
}
.game-frame-large {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
  background: #04030a; /* avoid a white flash before the game paints */
}

/* Click-to-load poster — sits over the (empty) iframe until you press play */
.game-poster {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  border-radius: inherit;
  background: radial-gradient(ellipse at center, #1b1233 0%, #06040c 78%);
}
.game-poster-play {
  width: 78px; height: 78px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  padding-left: 5px; /* optically centre the triangle */
  font-size: 1.9rem;
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: var(--glow);
  transition: transform .15s, box-shadow .15s;
}
.game-poster:hover .game-poster-play { transform: scale(1.08); box-shadow: var(--glow), 0 0 0 6px rgba(255, 45, 146, 0.14); }
.game-poster-label {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1rem;
  text-align: center;
  padding: 0 1rem;
}
.game-loaded .game-poster { display: none; }

/* CRT power-on: a dot blooms into a bright line, then snaps to full screen. */
@keyframes crt-power-on {
  0%   { transform: scale(0.6, 0.005); filter: brightness(8) saturate(1.5); opacity: 0.8; }
  14%  { transform: scale(1, 0.005);   filter: brightness(8) saturate(1.5); opacity: 1; }
  32%  { transform: scale(1, 0.012);   filter: brightness(7); }
  60%  { transform: scale(1, 1);       filter: brightness(2.8); }
  82%  { transform: scale(1, 1);       filter: brightness(1.4); }
  100% { transform: scale(1, 1);       filter: brightness(1); opacity: 1; }
}
.game-frame-large.crt-animate,
.game-frame-full.crt-animate {
  transform-origin: center center;
  animation: crt-power-on 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  .crt-animate { animation: none !important; }
}

/* CRT control chin: the Play Fullscreen button lives on the bezel, flanked
   by faux speaker-grille lines. */
.crt-chin {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: clamp(8px, 1.6vw, 16px);
  padding: 0 0.15rem;
}
.crt-grille {
  flex: 1;
  height: 10px;
  min-width: 16px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--crt-grille-line) 0 2px, transparent 2px 6px);
}
.crt-btn {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  white-space: nowrap;
  box-shadow: 2px 2px 0 var(--shadow-hard);
  transition: transform .1s, box-shadow .12s;
}
.crt-btn:hover { color: var(--accent-ink); transform: translateY(-1px); box-shadow: 3px 4px 0 var(--shadow-hard), var(--glow); }
.crt-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--shadow-hard); }
/* Two buttons in one chin (game landing): keep them grouped + wrap on mobile */
.crt-chin-btns { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
/* Secondary chin button — cyan outline so it reads against the primary */
.crt-btn-2 { background: transparent; color: var(--accent-2); box-shadow: inset 0 0 0 2px var(--accent-2); }
.crt-btn-2:hover { color: var(--accent-2); transform: translateY(-1px); box-shadow: inset 0 0 0 2px var(--accent-2), var(--glow-2); }
.crt-btn-2:active { transform: translate(1px, 1px); box-shadow: inset 0 0 0 2px var(--accent-2); }
@media (max-width: 600px) { .crt-chin .crt-grille { display: none; } }

/* === Game player ====================================================== */
.game-player { margin-bottom: 1.5rem; }
.game-player-header { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.game-player-label { color: var(--text-muted); }
.game-player-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; }

/* === Game selector heading ============================================ */
.game-selector-heading {
  color: var(--accent-2);
  font-size: 1rem;
  font-weight: 700;
  margin: 1.5rem 0 1rem;
}

/* === Game grid / cards ================================================ */
.game-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1rem;
  text-align: center;
  color: var(--text);
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
  min-height: 104px;
  cursor: pointer;
}
.game-card:hover { background: var(--bg-elev-2); border-color: var(--accent); color: var(--text); transform: translateY(-3px); box-shadow: var(--glow); }
.game-card.gotd { border-color: var(--gotd); }
.game-card.active { border-color: var(--accent); background: var(--bg-elev-2); box-shadow: 0 0 0 1px var(--accent), var(--glow); }
.game-card.active.gotd { border-color: var(--gotd); box-shadow: 0 0 0 1px var(--gotd), 0 0 18px rgba(255, 206, 58, 0.4); }
.game-card-title { font-weight: 700; font-size: 1rem; }

/* === Badges =========================================================== */
.badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  background: var(--gotd);
  color: var(--gotd-ink);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-top: 0.5rem;
  font-weight: 800;
}
.badge-latest { background: var(--accent); color: var(--accent-ink); margin-left: 0.75rem; margin-top: 0; vertical-align: middle; }

/* === Tags (genre / keywords) ========================================== */
.tag-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.5rem 0; }
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.tag-genre { color: var(--accent-2); border-color: var(--accent-2); }
a.tag:hover { color: var(--text); border-color: var(--accent); }

/* === Breadcrumb ======================================================= */
.breadcrumb { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent-2); }
.breadcrumb span { margin: 0 0.4rem; opacity: 0.5; }

/* === Game landing page ================================================ */
.game-landing { max-width: 920px; margin: 0 auto; }
.game-landing-head { margin-bottom: 1.25rem; }
.game-landing h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: var(--glow-text);
}
.game-tagline { color: var(--text-muted); font-size: 1.1rem; margin-top: 0.5rem; }
.game-desc { font-size: 1.05rem; margin: 1.25rem 0; max-width: 70ch; }
.game-info-list { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 1rem 0 1.5rem; color: var(--text-muted); font-size: 0.9rem; }
.game-info-list strong { color: var(--text); font-weight: 700; }
.game-section-title { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.08em; font-size: 1rem; font-weight: 800; margin: 2rem 0 0.75rem; color: var(--accent-2); }
.game-instructions { color: var(--text-muted); max-width: 70ch; }
.play-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }

/* Related / same-day list */
.related-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-top: 0.5rem; }
.related-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  color: var(--text);
  font-weight: 600;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.related-card:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--glow); }
.related-card small { display: block; color: var(--text-muted); font-weight: 500; margin-top: 0.2rem; font-size: 0.75rem; }

/* === Day sections (index) ============================================= */
.day-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.day-section-latest { border-top: none; padding-top: 0; }
.day-section-date { font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; margin-bottom: 1.5rem; }
.day-section-date a { color: var(--text); }
.day-section-date a:hover { color: var(--accent-2); }

/* === Day navigation =================================================== */
.day-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.day-nav h1 { text-align: center; flex: 1; font-family: var(--font-display); text-transform: uppercase; font-weight: 800; }
.day-nav-btn { min-width: 140px; }
.day-nav-bottom { margin-top: 2rem; margin-bottom: 0; justify-content: center; gap: 1rem; }

/* === Archive ========================================================== */
.archive h1, .content-page h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 800; text-transform: uppercase; margin-bottom: 1.5rem; text-shadow: var(--glow-text); }
.day-list { display: flex; flex-direction: column; gap: 0.75rem; }
.day-card {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  color: var(--text);
  transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.day-card:hover { background: var(--bg-elev-2); border-color: var(--accent); color: var(--text); transform: translateX(3px); box-shadow: var(--glow); }
.day-card-date { font-weight: 700; }
.day-card-info { display: flex; align-items: center; gap: 1rem; }
.day-card-gotd { color: var(--gotd); font-weight: 700; }
.day-card-count { color: var(--text-muted); font-size: 0.85rem; font-family: var(--font-mono); }

/* === Archive accordion ================================================ */
.day-acc-list { display: flex; flex-direction: column; gap: 0.75rem; }
.day-acc {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--shadow-hard);
  overflow: hidden;
}
.day-acc[open] { border-color: var(--accent); box-shadow: 4px 4px 0 var(--shadow-hard), var(--glow); }
.day-acc-head {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 1rem 1.5rem;
  cursor: pointer;
  list-style: none;
  transition: background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.day-acc-head::-webkit-details-marker { display: none; }
.day-acc-head:hover { background: var(--bg-elev-2); }
.day-acc-tri {
  flex: 0 0 auto;
  width: 0; height: 0;
  border-style: solid;
  border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent var(--accent);
  transition: transform .18s ease;
}
.day-acc[open] .day-acc-tri { transform: rotate(90deg); }
.day-acc-date { font-weight: 700; }
.day-acc-info { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.day-acc-gotd { color: var(--gotd); font-weight: 700; }
.day-acc-count { color: var(--text-muted); font-size: 0.85rem; font-family: var(--font-mono); white-space: nowrap; }

.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 0 1.5rem 1.5rem;
}
.archive-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: transform .15s, border-color .15s, box-shadow .15s;
  box-shadow: 3px 3px 0 var(--shadow-hard);
}
.archive-card:hover { border-color: var(--accent); color: var(--text); transform: translateY(-3px); box-shadow: 6px 7px 0 var(--shadow-hard), var(--glow); }
.archive-card.gotd { border-color: var(--gotd); }
.archive-card.gotd:hover { box-shadow: 6px 7px 0 var(--shadow-hard), 0 0 18px rgba(255, 206, 58, 0.4); }
.archive-thumb { position: relative; display: block; aspect-ratio: 1200 / 630; background: var(--bg); overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.archive-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.archive-badge { position: absolute; top: -0.6rem; left: 0.6rem; margin: 0; z-index: 2; }
.archive-card-body { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.85rem 1rem 1rem; border-radius: 0 0 var(--radius) var(--radius); }
:root[data-theme="light"] .archive-card-body { background: #f7f7f7; }
.archive-card-title { font-weight: 700; font-size: 1rem; line-height: 1.25; }
.archive-card-tagline { color: var(--text-muted); font-size: 0.82rem; line-height: 1.35; }

/* === Collections ====================================================== */
.collection-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.collection-card {
  display: block;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: var(--text);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.collection-card:hover { color: var(--text); border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--glow); }
.collection-card h2 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.2rem; font-weight: 800; }
.collection-card p { color: var(--text-muted); margin-top: 0.5rem; font-size: 0.92rem; }
.collection-card .count { color: var(--accent-2); font-family: var(--font-mono); font-size: 0.82rem; margin-top: 0.75rem; display: inline-block; }

/* === Prose / content pages ============================================ */
.content-page { max-width: 760px; margin: 0 auto; }
.content-page h2 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; font-size: 1.3rem; font-weight: 800; margin: 2.25rem 0 0.75rem; color: var(--accent-2); }
.content-page h3 { font-size: 1.05rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.content-page p, .content-page li { color: var(--text); opacity: 0.92; margin-bottom: 0.85rem; }
.content-page ul, .content-page ol { margin-left: 1.4rem; margin-bottom: 1rem; }
.content-page .lead { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.home-about { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); text-align: left; }
.faq { margin: 0.5rem 0 0; }
.faq dt { font-weight: 700; margin-top: 1.1rem; color: var(--text); }
.faq dd { margin: 0.3rem 0 0; color: var(--text); opacity: 0.92; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.25rem 0; }
.feature-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.feature-card h3 { margin-top: 0; color: var(--accent-2); }
.feature-card p { color: var(--text-muted); margin-bottom: 0; font-size: 0.92rem; }

/* === CTA ============================================================== */
.cta { text-align: center; margin-top: 2.5rem; }
.cta-text { color: var(--text-muted); margin-bottom: 0.75rem; }

/* === Legacy game-of-the-day blocks ==================================== */
.game-of-the-day, .gotd-highlight { margin: 2rem 0; }
.game-of-the-day h2, .gotd-highlight h2 { color: var(--gotd); margin-bottom: 1rem; }
.gotd-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; text-align: center; }
.gotd-card h3 { font-size: 1.5rem; margin-bottom: 1rem; }

/* === Full-screen game page ============================================ */
.game-page-body {
  display: flex; flex-direction: column; box-sizing: border-box;
  height: 100vh; height: 100dvh; overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.game-page-body::before { display: none; } /* no grid texture over the player */
.game-topbar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0; min-width: 0;
}
.back-link { color: var(--text-muted); font-size: 0.9rem; flex-shrink: 0; font-weight: 600; }
.back-link:hover { color: var(--text); }
.game-topbar-title { font-family: var(--font-display); font-weight: 800; font-size: 1rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-home { display: flex; align-items: center; gap: 0.35rem; color: var(--text-muted); font-size: 0.85rem; font-weight: 700; margin-left: auto; white-space: nowrap; flex-shrink: 0; }
.topbar-home:hover { color: var(--text); }
.topbar-home-text { display: inline; }
.topbar-random {
  display: inline-flex; align-items: center; gap: 0.3rem;
  color: var(--accent-2); font-size: 0.85rem; font-weight: 700;
  white-space: nowrap; flex-shrink: 0;
}
.topbar-random:hover { color: var(--text); text-shadow: var(--glow-2); }
.topbar-random-text { display: inline; }
.game-frame-full { flex: 1; width: 100%; border: none; background: #04030a; }

/* === Terms page ======================================================= */
.terms-page h1 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.8rem; font-weight: 800; margin-bottom: 0.5rem; }
.terms-updated { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 2rem; }
.terms-page h2 { font-size: 1.1rem; margin-top: 2rem; margin-bottom: 0.5rem; }
.terms-page p, .terms-page ul { color: var(--text-muted); margin-bottom: 0.75rem; }
.terms-page ul { margin-left: 1.5rem; }
.terms-page li { margin-bottom: 0.25rem; }

/* === Consent banner =================================================== */
.consent-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-elev); border-top: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: center; gap: 1.5rem;
  z-index: 1000; font-size: 0.85rem;
}
.consent-banner p { color: var(--text-muted); margin: 0; }
.consent-btn { padding: 0.45rem 1.2rem; font-size: 0.78rem; }

/* === 90s retro accents =============================================== */
/* Hard-edged offset shadows give cards a blocky, sticker-like lift. */
.game-card, .collection-card, .related-card, .day-card { box-shadow: 3px 3px 0 var(--shadow-hard); }
.game-card:hover, .collection-card:hover, .related-card:hover { box-shadow: 6px 7px 0 var(--shadow-hard), var(--glow); }
.day-card:hover { box-shadow: 6px 6px 0 var(--shadow-hard), var(--glow); }
.game-card.active { box-shadow: 0 0 0 2px var(--accent), 4px 4px 0 var(--shadow-hard), var(--glow); }
.game-card.active.gotd { box-shadow: 0 0 0 2px var(--gotd), 4px 4px 0 var(--shadow-hard); }

/* === Responsive ======================================================= */
@media (max-width: 900px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .related-list { grid-template-columns: repeat(2, 1fr); }
  .feature-grid, .collection-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .site-nav { padding: 0.75rem 1rem; }
  main { padding: 1.5rem 1rem; }
  .hero { padding: 1.5rem 0 0.5rem; }
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .related-list { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; padding: 1rem; }
  .day-card { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .day-acc-head { padding: 0.85rem 1rem; gap: 0.6rem; }
  .archive-grid { gap: 0.6rem; padding: 0 1rem 1rem; }
  .archive-card-body { padding: 0.6rem 0.7rem 0.75rem; }
  .archive-card-title { font-size: 0.9rem; }
  .nav-links a { margin: 0; }

  .day-nav { flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
  .day-nav h1 { order: -1; flex: 0 0 100%; font-size: 1.3rem; margin-bottom: 0.25rem; text-align: center; }
  .day-nav-btn { min-width: auto; font-size: 0.85rem; }

  .game-topbar { gap: 0.5rem; padding: 0.5rem 0.75rem; }
  .game-topbar .badge { font-size: 0.55rem; padding: 0.1rem 0.4rem; margin-top: 0; }
  .topbar-home-text { display: none; }
  .topbar-random-text { display: none; }

  .game-frame-wrapper { min-height: 50vh; }
  .game-player-header { flex-direction: column; gap: 0.25rem; align-items: flex-start; }
  .consent-banner { flex-direction: column; gap: 0.75rem; text-align: center; padding: 1rem; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .btn:hover, .game-card:hover, .day-card:hover, .collection-card:hover, .related-card:hover { transform: none; }
}
