/* ════════════════════════════════════════════════════════════════════
   VG90 — Video Game 90's · main stylesheet
   Premium retro-futuristic design system. No frameworks, no CDN.
   ════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Press Start 2P';
  src: url('/assets/fonts/pressstart2p.woff2') format('woff2');
  font-display: swap;
  font-weight: 400;
}

:root {
  --bg:        #06060f;
  --bg-alt:    #0a0a1c;
  --panel:     #10102a;
  --panel-2:   #161636;
  --line:      #23234d;
  --text:      #e9e9f7;
  --muted:     #9d9dc0;
  --cyan:      #22d3ee;
  --magenta:   #f042c8;
  --purple:    #a855f7;
  --green:     #39ff8e;
  --orange:    #ff9e3d;
  --blue:      #5b8cff;
  --danger:    #ff5470;
  --font-px:   'Press Start 2P', monospace;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius:    12px;
  --shadow:    0 18px 50px rgba(0, 0, 0, .55);
  --glow-cyan:    0 0 18px rgba(34, 211, 238, .45);
  --glow-magenta: 0 0 18px rgba(240, 66, 200, .45);
  --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
}

/* Subtle global grid texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(34, 211, 238, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
}

img, svg, video { max-width: 100%; height: auto; display: block; }

/* Dark scrollbars (WebKit + Firefox) */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #34346a; }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: #7ee7f7; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; font-weight: 800; letter-spacing: .01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 1em; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -60px; left: 1rem; z-index: 200;
  background: var(--panel); color: var(--text);
  padding: .6rem 1.1rem; border-radius: 0 0 8px 8px;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ── CRT overlay ─────────────────────────────────────────────────── */
.crt-overlay {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background: repeating-linear-gradient(
    0deg, rgba(0, 0, 0, .10) 0 1px, transparent 1px 3px);
  opacity: .5;
  mix-blend-mode: overlay;
}

/* ── Header ──────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6, 6, 15, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow .25s;
}
.site-header::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .55) 18%,
              rgba(168, 85, 247, .55) 50%, rgba(240, 66, 200, .55) 82%, transparent);
  opacity: .65;
}
.site-header.is-scrolled { box-shadow: 0 8px 32px rgba(0, 0, 0, .5); }
.site-header.is-scrolled::after { opacity: 1; }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.2rem; min-height: 66px;
}

.brand { display: inline-flex; align-items: center; gap: .65rem; }
.brand-mark { flex: none; }
.brand-text {
  font-family: var(--font-px);
  font-size: .95rem;
  color: var(--text);
  letter-spacing: .06em;
}
.brand-90 {
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.nav-menu {
  display: flex; align-items: center; gap: .15rem;
  list-style: none; margin: 0; padding: 0;
}
.nav-menu > li > a, .sub-toggle {
  position: relative;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem .85rem;
  color: var(--muted);
  font-size: .92rem; font-weight: 600;
  border-radius: 9px;
  background: none; border: 0; cursor: pointer; font-family: inherit;
  transition: color .18s, background .18s;
}
.nav-ico { flex: none; opacity: .65; transition: opacity .18s, color .18s, transform .18s; }
.nav-menu > li > a:hover, .sub-toggle:hover,
.nav-menu > li > a:focus-visible, .sub-toggle:focus-visible {
  color: var(--text); background: rgba(255, 255, 255, .05);
}
.nav-menu > li > a:hover .nav-ico, .sub-toggle:hover .nav-ico,
.nav-menu > li > a:focus-visible .nav-ico {
  opacity: 1; color: var(--cyan); transform: translateY(-1px);
}
/* Current-page indicator: neon underline + lit icon */
.nav-menu > li > a[aria-current="page"] { color: var(--text); background: none; }
.nav-menu > li > a[aria-current="page"] .nav-ico { opacity: 1; color: var(--cyan); }
.nav-menu > li > a[aria-current="page"]::after {
  content: ''; position: absolute; left: .85rem; right: .85rem; bottom: .2rem; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 8px rgba(34, 211, 238, .6);
}
/* Search styled as a pill CTA */
.nav-cta { margin-left: .4rem; }
.nav-search {
  border: 1px solid var(--line) !important;
  background: rgba(255, 255, 255, .03) !important;
}
.nav-search:hover {
  border-color: var(--cyan) !important;
  color: var(--cyan) !important;
  box-shadow: 0 0 14px rgba(34, 211, 238, .25);
}
.nav-search:hover .nav-ico { color: var(--cyan); }

.has-sub { position: relative; }
.caret { flex: none; opacity: .6; transition: transform .2s; margin-left: -.1rem; }
.has-sub.open .caret, .has-sub:focus-within .caret { transform: rotate(180deg); }
.sub-menu {
  position: absolute; top: calc(100% + 10px); left: 50%; min-width: 218px;
  background: rgba(13, 13, 33, .97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 24px rgba(34, 211, 238, .08);
  list-style: none; margin: 0; padding: .5rem;
  opacity: 0; visibility: hidden; transform: translate(-50%, -6px);
  transition: opacity .18s, transform .18s, visibility .18s;
}
/* Little arrow tip pointing at the trigger */
.sub-menu::before {
  content: ''; position: absolute; top: -5px; left: 50%; width: 9px; height: 9px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(13, 13, 33, .97);
  border-left: 1px solid var(--line); border-top: 1px solid var(--line);
}
.has-sub.open .sub-menu, .has-sub:focus-within .sub-menu {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}
.sub-menu a {
  display: flex; align-items: center; gap: .65rem;
  padding: .58rem .75rem; border-radius: 9px;
  color: var(--muted); font-size: .9rem; font-weight: 600;
  transition: color .15s, background .15s, padding-left .15s;
}
.sub-menu a .nav-ico { opacity: .6; }
.sub-menu a:hover, .sub-menu a:focus-visible {
  color: var(--text); background: rgba(34, 211, 238, .09);
  padding-left: .95rem;
}
.sub-menu a:hover .nav-ico, .sub-menu a:focus-visible .nav-ico { opacity: 1; color: var(--cyan); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .6rem; }
.nav-toggle .bar {
  display: block; width: 24px; height: 2px; margin: 5px 0;
  background: var(--text); border-radius: 2px; transition: transform .25s, opacity .25s;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .68rem 1.4rem;
  border-radius: 10px;
  font-weight: 700; font-size: .95rem; font-family: inherit;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .18s, box-shadow .18s, background .18s, color .18s;
  will-change: transform;
}
.btn-lg { padding: .9rem 1.9rem; font-size: 1.02rem; }
.btn-sm { padding: .45rem .95rem; font-size: .85rem; }
.btn-primary {
  background: linear-gradient(120deg, var(--cyan), #3b82f6 55%, var(--magenta));
  background-size: 180% 100%;
  color: #04040c;
  box-shadow: var(--glow-cyan);
}
.btn-primary:hover {
  background-position: 95% 0;
  transform: translateY(-2px);
  box-shadow: var(--glow-magenta);
  color: #04040c;
}
.btn-ghost {
  background: rgba(255, 255, 255, .04);
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none; }

/* ── Badges ──────────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: .22rem .6rem;
  border-radius: 999px; font-size: .72rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid var(--line); color: var(--muted);
}
.badge-platform { border-color: rgba(34, 211, 238, .5); color: var(--cyan); }
.badge-genre    { border-color: rgba(240, 66, 200, .5); color: var(--magenta); }
.badge-year     { border-color: rgba(57, 255, 142, .5); color: var(--green); }
a.badge:hover   { background: rgba(255, 255, 255, .06); }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: clamp(560px, 92vh, 900px);
  display: flex; align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.15) brightness(.9);
  transform: scale(1.06);
}
.hero-starfield { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-vignette {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(6,6,15,.92) 0%, rgba(6,6,15,.55) 40%, rgba(6,6,15,.15) 70%),
    linear-gradient(0deg, var(--bg) 0%, transparent 26%),
    linear-gradient(180deg, rgba(6,6,15,.6) 0%, transparent 22%);
}

.hero-float { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.float-item {
  position: absolute; opacity: .8;
  filter: drop-shadow(0 0 14px rgba(34, 211, 238, .35));
  animation: floaty 7s ease-in-out infinite;
}
.float-item.f1 { top: 18%; right: 12%; animation-delay: 0s; }
.float-item.f2 { top: 58%; right: 26%; animation-delay: -2.2s; }
.float-item.f3 { top: 30%; right: 34%; animation-delay: -4.1s; }
.float-item.f4 { top: 72%; right: 8%;  animation-delay: -5.6s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-22px) rotate(4deg); }
}

.hero-inner { position: relative; padding: 7rem 0 5rem; }
.hero-inner > * { max-width: 640px; }
.hero-kicker {
  font-family: var(--font-px); font-size: .62rem; letter-spacing: .18em;
  color: var(--green); text-transform: uppercase;
  margin-bottom: 1.4rem;
}
.hero-title {
  font-family: var(--font-px);
  font-size: clamp(1.5rem, 5vw, 3rem);
  line-height: 1.35;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
}
.hero-title span { display: block; }
.hero-90s {
  font-size: clamp(2.4rem, 8vw, 5rem);
  background: linear-gradient(100deg, var(--cyan) 10%, var(--purple) 50%, var(--magenta) 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 0 22px rgba(168, 85, 247, .55));
}
.hero-lead { color: var(--muted); font-size: 1.12rem; max-width: 34rem; margin-bottom: 2rem; }
.hero-search {
  display: flex; align-items: center; gap: .6rem;
  max-width: 520px; margin-bottom: 1.6rem;
  padding: .4rem .4rem .4rem 1rem;
  background: rgba(10, 10, 24, .72); border: 1px solid var(--line); border-radius: 12px;
  backdrop-filter: blur(6px);
  transition: border-color .2s, box-shadow .2s;
}
.hero-search:focus-within { border-color: var(--cyan); box-shadow: 0 0 18px rgba(34, 211, 238, .25); }
.hero-search-ico { flex: 0 0 auto; color: var(--muted); }
.hero-search input {
  flex: 1 1 auto; min-width: 0;
  background: none; border: none; outline: none;
  color: var(--text); font: inherit; font-size: 1rem;
}
.hero-search input::placeholder { color: var(--muted); }
.hero-search .btn { flex: 0 0 auto; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2.6rem; }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 2.2rem;
  list-style: none; margin: 0; padding: 0;
}
.hero-stats li { display: grid; gap: .15rem; }
.hero-stats strong {
  font-family: var(--font-px); font-size: 1.3rem; color: var(--text);
}
.hero-stats span { color: var(--muted); font-size: .85rem; }

.hero-scroll {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  width: 22px; height: 36px; border: 2px solid var(--muted); border-radius: 12px;
}
.hero-scroll span {
  position: absolute; top: 6px; left: 50%; width: 4px; height: 8px;
  margin-left: -2px; border-radius: 2px; background: var(--cyan);
  animation: scrollhint 1.8s ease-in-out infinite;
}
@keyframes scrollhint {
  0%, 100% { transform: translateY(0); opacity: 1; }
  70%      { transform: translateY(10px); opacity: 0; }
}

/* Glitch + flicker */
.glitch { position: relative; }
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  clip-path: inset(0 0 55% 0);
  opacity: 0;
}
.glitch::before { color: var(--cyan); }
.glitch::after  { color: var(--magenta); clip-path: inset(55% 0 0 0); }
@keyframes glitchshift {
  0%, 91%, 100% { opacity: 0; transform: none; }
  92% { opacity: .8; transform: translate(-3px, 1px); }
  94% { opacity: .8; transform: translate(3px, -1px); }
  96% { opacity: .6; transform: translate(-2px, 2px); }
  98% { opacity: 0; }
}
.glitch::before { animation: glitchshift 6s infinite steps(1); }
.glitch::after  { animation: glitchshift 6s infinite steps(1) .12s; }

.neon-flicker { animation: flicker 9s linear infinite; }
@keyframes flicker {
  0%, 100% { opacity: 1; }
  3%  { opacity: .75; } 4%  { opacity: 1; }
  52% { opacity: 1; }   53% { opacity: .6; } 54% { opacity: 1; }
  55% { opacity: .85; } 56% { opacity: 1; }
}

/* ── Sections ────────────────────────────────────────────────────── */
.section { padding: 4.5rem 0; }
.section-alt {
  background: linear-gradient(180deg, transparent, rgba(16, 16, 42, .55) 18% 82%, transparent);
}
.section-head {
  display: flex; align-items: baseline; gap: 1.2rem; flex-wrap: wrap;
  margin-bottom: 2.2rem;
}
.section-head h2 { margin: 0; }
.section-kicker {
  font-family: var(--font-px); font-size: .58rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--cyan);
  margin: 0 0 .5rem; width: 100%;
}
.section-more { margin-left: auto; font-weight: 700; font-size: .92rem; white-space: nowrap; }

.page-head { padding: 3.6rem 0 .4rem; }
.page-lead { color: var(--muted); font-size: 1.08rem; max-width: 44rem; }

.h-underline {
  padding-bottom: .45rem; margin-top: 2.2rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.h-underline::after {
  content: ''; position: absolute; bottom: -1px; left: 0;
  width: 72px; height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ── Game cards ──────────────────────────────────────────────────── */
.game-grid {
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.game-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  transform-style: preserve-3d;
}
.game-card:hover {
  border-color: rgba(34, 211, 238, .55);
  box-shadow: var(--shadow), var(--glow-cyan);
}
.game-card-link { display: block; color: inherit; }
.game-card-cover { position: relative; aspect-ratio: 3 / 4; overflow: hidden; }
.game-card-cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.game-card:hover .game-card-cover img { transform: scale(1.06); }
.game-card-shine {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.14) 48%, transparent 62%);
  transform: translateX(-110%);
  transition: transform .6s ease;
}
.game-card:hover .game-card-shine { transform: translateX(110%); }
.game-card-year {
  position: absolute; top: .7rem; right: .7rem;
  font-family: var(--font-px); font-size: .6rem;
  background: rgba(4, 4, 12, .8); color: var(--green);
  padding: .35rem .55rem; border-radius: 6px;
  border: 1px solid rgba(57, 255, 142, .4);
}
.game-card-body { padding: 1.1rem 1.2rem 1.3rem; }
.game-card-title { font-size: 1.06rem; margin-bottom: .5rem; color: var(--text); }
.game-card-platforms { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .5rem; }
.game-card-meta {
  display: flex; justify-content: space-between; gap: .8rem;
  font-size: .82rem; color: var(--muted); margin-bottom: .55rem;
}
.game-card-meta .rating { color: var(--orange); font-weight: 700; }
.game-card-desc { color: var(--muted); font-size: .88rem; margin-bottom: .9rem; min-height: 2.6em; }

/* ── Carousel ────────────────────────────────────────────────────── */
.carousel-wrap { position: relative; }
.carousel {
  display: flex; gap: 1.4rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: .5rem calc((100vw - min(100vw - 2.5rem, var(--container))) / 2) 1.4rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.carousel-item { flex: 0 0 min(270px, 78vw); scroll-snap-align: start; }
.carousel-nav {
  position: absolute; top: -4.4rem; right: calc((100vw - min(100vw - 2.5rem, var(--container))) / 2);
  display: flex; gap: .5rem;
}
.carousel-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); font-size: 1.3rem; cursor: pointer;
  transition: border-color .2s, color .2s, transform .2s;
}
.carousel-btn:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }

/* ── Year chips ──────────────────────────────────────────────────── */
.year-strip { display: flex; flex-wrap: wrap; gap: .8rem; }
.year-chip {
  display: grid; gap: .1rem; text-align: center;
  padding: .8rem 1.15rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.year-chip:hover { transform: translateY(-3px); border-color: var(--green); box-shadow: 0 0 16px rgba(57,255,142,.25); }
.year-num { font-family: var(--font-px); font-size: .85rem; color: var(--text); }
.year-count { font-size: .74rem; color: var(--muted); }
.decade-block { margin-bottom: 2.4rem; }
.decade-title {
  font-family: var(--font-px); font-size: 1.1rem; color: var(--purple);
  margin-bottom: 1.1rem;
}

/* ── Decade tabs (homepage year browser, CSS-only) ──────────────── */
.decade-radio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.decade-tabbar { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.4rem; }
.decade-tabbar label {
  display: grid; gap: .1rem; text-align: center; cursor: pointer;
  padding: .65rem 1.2rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.decade-tabbar label:hover { transform: translateY(-2px); border-color: var(--cyan); }
.dec-name { font-family: var(--font-px); font-size: .8rem; color: var(--text); }
.dec-count { font-size: .68rem; color: var(--muted); }
#dec-pre80:checked ~ .decade-tabbar label[for="dec-pre80"],
#dec-dec80:checked ~ .decade-tabbar label[for="dec-dec80"],
#dec-dec90:checked ~ .decade-tabbar label[for="dec-dec90"],
#dec-dec00:checked ~ .decade-tabbar label[for="dec-dec00"],
#dec-post10:checked ~ .decade-tabbar label[for="dec-post10"] {
  border-color: var(--green); box-shadow: 0 0 16px rgba(57, 255, 142, .25);
}
#dec-pre80:checked ~ .decade-tabbar label[for="dec-pre80"] .dec-name,
#dec-dec80:checked ~ .decade-tabbar label[for="dec-dec80"] .dec-name,
#dec-dec90:checked ~ .decade-tabbar label[for="dec-dec90"] .dec-name,
#dec-dec00:checked ~ .decade-tabbar label[for="dec-dec00"] .dec-name,
#dec-post10:checked ~ .decade-tabbar label[for="dec-post10"] .dec-name { color: var(--green); }
#dec-pre80:focus-visible ~ .decade-tabbar label[for="dec-pre80"],
#dec-dec80:focus-visible ~ .decade-tabbar label[for="dec-dec80"],
#dec-dec90:focus-visible ~ .decade-tabbar label[for="dec-dec90"],
#dec-dec00:focus-visible ~ .decade-tabbar label[for="dec-dec00"],
#dec-post10:focus-visible ~ .decade-tabbar label[for="dec-post10"] {
  outline: 2px solid var(--cyan); outline-offset: 2px;
}
.decade-panel { display: none; gap: .8rem; flex-wrap: wrap; }
#dec-pre80:checked ~ .decade-panel-pre80,
#dec-dec80:checked ~ .decade-panel-dec80,
#dec-dec90:checked ~ .decade-panel-dec90,
#dec-dec00:checked ~ .decade-panel-dec00,
#dec-post10:checked ~ .decade-panel-post10 { display: flex; }
.year-chip-bar {
  flex: 0 0 92px;
  display: flex; flex-direction: column; align-items: center; gap: .55rem;
  padding: 1rem .6rem .9rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.year-chip-bar:hover, .year-chip-bar:focus-visible {
  transform: translateY(-3px); border-color: var(--green); box-shadow: 0 0 16px rgba(57, 255, 142, .25);
}
.year-bar-track { width: 100%; height: 46px; display: flex; align-items: flex-end; }
.year-bar {
  width: 100%; min-height: 4px; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--green), rgba(57, 255, 142, .18));
}
.year-chip-bar .year-num { font-family: var(--font-px); font-size: .8rem; color: var(--text); }
.year-chip-bar .year-count { font-size: .66rem; color: var(--muted); text-align: center; }
@media (max-width: 640px) {
  .decade-panel { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .8rem; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  .year-chip-bar { scroll-snap-align: start; }
}

/* ── Platform / taxonomy cards ───────────────────────────────────── */
.platform-grid, .tax-grid {
  display: grid; gap: 1.3rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.platform-card, .tax-card {
  --mk: var(--purple);
  display: block; padding: 1.4rem 1.5rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  color: inherit;
  transition: transform .22s, border-color .22s, box-shadow .22s;
}
.platform-card:hover, .tax-card:hover {
  border-color: var(--mk);
  box-shadow: 0 0 20px color-mix(in srgb, var(--mk) 35%, transparent);
}
.platform-card h3, .tax-card h2 { color: var(--text); font-size: 1.12rem; margin: .2rem 0 .35rem; }
.platform-card p, .tax-sub { color: var(--muted); font-size: .86rem; margin: 0; }
.platform-gen {
  font-family: var(--font-px); font-size: .55rem; letter-spacing: .12em;
  color: var(--mk, var(--cyan)); text-transform: uppercase;
}

/* Platform brand marks */
.platform-card { display: flex; align-items: flex-start; gap: 1.05rem; }
.platform-mark {
  flex: none;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--mk) 40%, transparent));
  transition: transform .22s, filter .22s;
}
.platform-card:hover .platform-mark, .tax-card--mark:hover .platform-mark {
  transform: translateY(-2px) scale(1.05);
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--mk) 70%, transparent));
}
.platform-card-body { min-width: 0; }
.tax-card--mark .platform-mark { display: block; margin-bottom: .8rem; }
.tax-card > .genre-ico { display: block; margin-bottom: .7rem; }
.tax-desc { color: var(--muted); font-size: .88rem; margin: .5rem 0 .7rem; }
.tax-count {
  display: inline-block; font-size: .78rem; font-weight: 700; color: var(--green);
}

/* ── Genre cards ─────────────────────────────────────────────────── */
.genre-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.genre-card {
  --gc: var(--cyan);
  position: relative; display: grid; gap: .3rem; align-content: start;
  min-height: 128px;
  padding: 1.4rem 1.3rem;
  background:
    linear-gradient(rgba(10, 10, 26, .88), rgba(10, 10, 26, .94)),
    var(--gbg, url('/assets/images/generated/neon-texture.jpg')) center / cover;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gc);
  border-radius: 10px;
  color: inherit; overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.genre-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 0% 120%, var(--gc), transparent 55%);
  opacity: .14; transition: opacity .25s;
}
.genre-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--gc) 65%, transparent);
  box-shadow: var(--shadow), 0 0 18px color-mix(in srgb, var(--gc) 30%, transparent);
}
.genre-card:hover::after { opacity: .3; }
.genre-ico { position: relative; z-index: 1; margin-bottom: .35rem; }
.genre-card h3 { position: relative; z-index: 1; margin: 0; color: var(--text); font-size: 1.02rem; }
.genre-card span { position: relative; z-index: 1; color: var(--muted); font-size: .82rem; }
.genre-watermark {
  position: absolute; right: -18px; bottom: -22px;
  opacity: .1; transform: rotate(-12deg);
  transition: opacity .25s, transform .25s;
}
.genre-card:hover .genre-watermark { opacity: .22; transform: rotate(-6deg) scale(1.06); }

/* ── Hall of fame ────────────────────────────────────────────────── */
.fame-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.fame-row {
  display: grid; grid-template-columns: auto 60px 1fr auto;
  align-items: center; gap: 1.1rem;
  padding: .8rem 1.1rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  color: inherit;
  transition: transform .2s, border-color .2s;
}
.fame-row:hover { transform: translateX(6px); border-color: var(--orange); }
.fame-rank {
  font-family: var(--font-px); font-size: 1rem;
  color: var(--orange); min-width: 2.2rem;
}
.fame-cover { width: 60px; height: 80px; object-fit: cover; border-radius: 6px; }
.fame-info { display: grid; }
.fame-info strong { color: var(--text); font-size: 1.02rem; }
.fame-info em { color: var(--muted); font-style: normal; font-size: .84rem; }
.fame-score { font-weight: 800; color: var(--orange); white-space: nowrap; }

/* ── Objects / hardware ──────────────────────────────────────────── */
.objects-grid {
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
}
.object-card {
  margin: 0; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.object-card:hover { border-color: var(--magenta); box-shadow: var(--shadow), var(--glow-magenta); }
.object-card img { width: 100%; aspect-ratio: auto; }
.object-card figcaption { padding: 1.2rem 1.4rem 1.4rem; }
.object-card h3 { margin-bottom: .3rem; }
.object-card p { color: var(--muted); font-size: .92rem; margin: 0; }
.object-card img { aspect-ratio: 4 / 3; object-fit: cover; }
.object-specs { list-style: none; margin: 1rem 0 0; padding: 0; }
.object-specs li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .5rem 0; border-top: 1px solid var(--line);
  font-size: .82rem;
}
.spec-k {
  flex: 0 0 auto;
  font-family: var(--font-px); font-size: .58rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--magenta); padding-top: .15rem;
}
.spec-v { color: var(--text); text-align: right; }

/* ── Mini timeline (home) ────────────────────────────────────────── */
.mini-timeline {
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  position: relative;
}
.mini-stop {
  padding: 1.2rem 1.2rem 1.3rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  border-top: 3px solid var(--cyan);
}
.mini-stop:nth-child(2) { border-top-color: var(--purple); }
.mini-stop:nth-child(3) { border-top-color: var(--magenta); }
.mini-stop:nth-child(4) { border-top-color: var(--orange); }
.mini-stop:nth-child(5) { border-top-color: var(--green); }
.mini-year { font-family: var(--font-px); font-size: .95rem; display: block; margin-bottom: .5rem; }
.mini-stop p { color: var(--muted); font-size: .88rem; margin: 0; }

/* ── Timeline page ───────────────────────────────────────────────── */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 74px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--purple), var(--magenta));
  opacity: .5;
}
.timeline-item {
  display: grid; grid-template-columns: 150px 1fr; gap: 1.6rem;
  margin-bottom: 1.8rem; position: relative;
}
.timeline-year {
  font-family: var(--font-px); font-size: 1rem; color: var(--cyan);
  text-align: right; padding-top: 1.35rem; position: relative;
}
.timeline-year::after {
  content: ''; position: absolute; right: -1.05rem; top: 1.55rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--cyan);
}
.timeline-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
}
.timeline-card h2 { font-size: 1.15rem; margin-bottom: .4rem; }
.timeline-card p { color: var(--muted); margin: 0; }
.timeline-cta { text-align: center; margin-top: 3rem; }
.timeline-cta p { color: var(--muted); }

/* ── Articles ────────────────────────────────────────────────────── */
.article-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.article-card {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: inherit;
  transition: transform .22s, border-color .22s, box-shadow .22s;
}
.article-card:hover { transform: translateY(-4px); border-color: var(--cyan); box-shadow: var(--shadow); }
.article-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.article-card-body { padding: 1.2rem 1.35rem 1.4rem; }
.article-card time {
  font-family: var(--font-px); font-size: .55rem; letter-spacing: .1em;
  color: var(--green); text-transform: uppercase;
}
.article-card h2, .article-card h3 { font-size: 1.08rem; margin: .55rem 0 .45rem; color: var(--text); }
.article-card p { color: var(--muted); font-size: .9rem; margin-bottom: .6rem; }
.read-more { font-size: .88rem; font-weight: 700; color: var(--cyan); }

.article-head h1 { max-width: 56rem; }
.article-byline { color: var(--muted); font-size: .95rem; }
.article-hero { margin: 1rem 0 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.article-body-section { padding-top: 2.6rem; }
.article-body { max-width: 46rem; font-size: 1.08rem; }
.article-body p { margin-bottom: 1.35em; color: #d5d5ea; }

.prose { max-width: 46rem; }
.prose p, .prose li { color: #d5d5ea; }
.prose ul { padding-left: 1.3rem; }

/* ── Catalogue layout ────────────────────────────────────────────── */
.catalogue-layout {
  display: grid; grid-template-columns: 260px 1fr; gap: 2.2rem;
  align-items: start;
}
.filters { position: sticky; top: 84px; }
.filters-toggle { display: none; width: 100%; }
.filters-form {
  display: grid; gap: 1rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.filter-group { display: grid; gap: .35rem; }
.filter-group label { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
input[type="search"], input[type="text"], input[type="email"], input[type="number"],
input[type="password"], select, textarea {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: .6rem .8rem;
  font-family: inherit; font-size: .95rem;
  transition: border-color .2s;
}
select:hover, input:hover, textarea:hover { border-color: #3a3a72; }
select:focus, input:focus, textarea:focus { border-color: var(--cyan); }
.filter-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .3rem; }

.results-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.6rem;
}
.results-count { margin: 0; color: var(--muted); font-weight: 600; }
.sort-form { display: flex; align-items: center; gap: .6rem; }
.sort-form label { color: var(--muted); font-size: .85rem; }
.sort-form select { width: auto; }

.empty-state {
  text-align: center; padding: 4rem 1rem;
  border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty-title { font-family: var(--font-px); font-size: .95rem; color: var(--magenta); }

/* ── Advanced search ─────────────────────────────────────────────── */
.adv-search {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem;
}
.adv-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  margin-bottom: 1.4rem;
}
.adv-q { grid-column: 1 / -1; }

/* ── Pagination ──────────────────────────────────────────────────── */
.pagination {
  display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center;
  margin-top: 2.6rem;
}
.page-link {
  min-width: 42px; padding: .5rem .8rem; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  color: var(--muted); font-weight: 700;
  transition: border-color .2s, color .2s;
}
.page-link:hover { border-color: var(--cyan); color: var(--cyan); }
.page-link.is-current {
  background: linear-gradient(120deg, var(--cyan), var(--purple));
  color: #04040c; border-color: transparent;
}
.page-gap { align-self: center; color: var(--muted); }

/* ── Breadcrumbs ─────────────────────────────────────────────────── */
.breadcrumbs { margin-bottom: 1.2rem; font-size: .85rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: '›'; margin-right: .4rem; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--cyan); }
.breadcrumbs [aria-current] { color: var(--text); }

/* ── Game detail ─────────────────────────────────────────────────── */
/* ── Game detail: hero ───────────────────────────────────────────── */
.game-hero { position: relative; padding: 2.4rem 0 3rem; overflow: hidden; }
.game-hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background-image: var(--banner, none);
  background-size: cover; background-position: center;
  filter: blur(8px) brightness(.28) saturate(1.25);
  transform: scale(1.1);
}
.game-hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(34,211,238,.12), transparent 55%),
    linear-gradient(180deg, rgba(6,6,15,.62), var(--bg) 97%);
}
.game-hero-grid {
  display: grid; grid-template-columns: 288px minmax(0, 1fr); gap: 2.8rem;
  align-items: start;
}
.game-cover-wrap {
  position: relative; aspect-ratio: 3 / 4;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-2);
  box-shadow: var(--shadow), var(--glow-cyan);
}
.game-cover { width: 100%; height: 100%; object-fit: cover; }

.game-hero-info { max-width: 640px; }
.game-hero-info h1 { margin: .1rem 0 .4rem; }
.game-subtitle { color: var(--cyan); font-size: 1.12rem; font-weight: 600; margin: 0 0 1rem; }
.game-badges {
  display: flex; flex-wrap: wrap; gap: .45rem;
  list-style: none; margin: 0 0 1.2rem; padding: 0;
}
.game-short { font-size: 1.1rem; line-height: 1.6; color: #d9d9ec; margin-bottom: 1.5rem; }

/* Quick facts grid */
.game-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .9rem 1.6rem; margin: 0 0 1.7rem; padding: 1.1rem 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.game-facts div { display: grid; gap: .15rem; }
.game-facts dt {
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}
.game-facts dd { margin: 0; font-size: .96rem; color: var(--text); font-weight: 600; }

/* Action bar: score + rating side by side */
.game-actions {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: stretch;
}
.score-card, .rate-card {
  flex: 1 1 220px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.3rem;
}
.score-card {
  display: grid; grid-template-columns: auto 1fr; align-items: center;
  gap: .1rem 1rem;
  border-color: rgba(255, 158, 61, .35);
}
.score-num {
  grid-row: 1 / 3; font-family: var(--font-px);
  font-size: 1.9rem; color: var(--orange); line-height: 1;
}
.score-num small { font-size: .8rem; color: var(--muted); }
.score-num--empty { font-family: var(--font-body); font-size: 1.15rem; font-weight: 800; color: var(--muted); }
.score-stars { color: var(--orange); font-size: 1.05rem; letter-spacing: .12em; align-self: end; }
.score-sub { color: var(--muted); font-size: .82rem; align-self: start; }

.rate-card { display: grid; gap: .5rem; align-content: center; }
.rate-label {
  margin: 0; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}
.rate-form { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin: 0; }
.rate-form fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: row-reverse; }
.rate-star {
  background: none; border: 0; cursor: pointer;
  font-size: 1.65rem; line-height: 1; color: #34346a;
  padding: .3rem; min-width: 44px; min-height: 44px;
  transition: color .12s, transform .12s;
}
.rate-star:hover, .rate-star:focus-visible,
.rate-star:hover ~ .rate-star, .rate-star:focus-visible ~ .rate-star {
  color: var(--orange); transform: scale(1.14);
}
.rate-hint { color: var(--muted); font-size: .8rem; }
.rated-note { margin: 0; color: var(--green); font-size: .95rem; font-weight: 600; }

/* ── Game detail: body ───────────────────────────────────────────── */
.game-body { padding-top: 3rem; }
.game-body-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 3rem; align-items: start; }
.game-main { min-width: 0; }
.game-main p { color: #d5d5ea; }
.game-main > h2:first-child { margin-top: 0; }
.why-box {
  margin: 2.2rem 0; padding: 1.6rem 1.8rem;
  background: linear-gradient(120deg, rgba(34,211,238,.08), rgba(240,66,200,.08));
  border: 1px solid rgba(34, 211, 238, .35);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius);
}
.why-box h2 { color: var(--cyan); font-size: 1.2rem; margin-top: 0; }
.why-box p:last-child { margin-bottom: 0; }

.shot-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.shot { position: relative; margin: 0; aspect-ratio: 16 / 9; overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot-zoom {
  position: absolute; top: .6rem; right: .6rem;
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 9px; color: var(--text);
  background: rgba(4, 4, 12, .7); border: 1px solid var(--line);
  opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s;
}
.shot-btn:hover .shot-zoom, .shot-btn:focus-visible .shot-zoom { opacity: 1; transform: none; }
.shot-btn:hover { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.game-video { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }

.legal-note {
  margin-top: 2.8rem; padding: 1.5rem 1.7rem;
  background: rgba(255, 158, 61, .05);
  border: 1px dashed rgba(255, 158, 61, .4); border-radius: var(--radius);
}
.legal-note h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; color: var(--orange); }
.legal-note p { color: var(--muted); font-size: .93rem; }

/* Metadata card (sticky sidebar) */
.game-side { position: sticky; top: 84px; }
.meta-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.meta-title {
  font-family: var(--font-px); font-size: .62rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--cyan);
  margin: 0; padding: 1rem 1.1rem .9rem;
  border-bottom: 1px solid var(--line);
}
.meta-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.meta-table th, .meta-table td { padding: .6rem 1.1rem; text-align: left; vertical-align: top; }
.meta-table tr + tr th, .meta-table tr + tr td { border-top: 1px solid var(--line); }
.meta-table th { color: var(--muted); font-weight: 600; white-space: nowrap; width: 42%; }
.meta-table td { color: var(--text); }

/* ── Contact ─────────────────────────────────────────────────────── */
.contact-layout { display: grid; grid-template-columns: 1fr 300px; gap: 2.6rem; align-items: start; }
.contact-form { display: grid; gap: 1.1rem; }
.contact-side h2 { font-size: 1.05rem; color: var(--cyan); }
.contact-side p { color: var(--muted); font-size: .92rem; }
.hp-field { position: absolute; left: -9999px; }
.alert { grid-column: 1 / -1; padding: 1rem 1.3rem; border-radius: 10px; margin-bottom: 1.4rem; }
.alert-success { background: rgba(57, 255, 142, .1); border: 1px solid rgba(57, 255, 142, .5); color: #b7ffd9; }

/* ── Newsletter ──────────────────────────────────────────────────── */
.newsletter-box {
  text-align: center;
  padding: 3rem 1.5rem;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 50% -30%, rgba(168, 85, 247, .25), transparent 60%),
    var(--panel);
  border: 1px solid var(--line);
}
.newsletter-box p { color: var(--muted); }
.newsletter-form {
  display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap;
  max-width: 460px; margin: 1.4rem auto .8rem;
}
.newsletter-form input { flex: 1 1 220px; }
.newsletter-note { font-size: .82rem; color: var(--muted); opacity: .8; }

/* ── 404 ─────────────────────────────────────────────────────────── */
.notfound { padding: 5rem 0; }
.notfound-inner { text-align: center; max-width: 640px; }
.notfound-inner .nf-art {
  margin: 0 auto 1.5rem; max-width: 460px;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.notfound-inner .nf-code { margin-top: 0; }
.nf-code {
  font-family: var(--font-px);
  font-size: clamp(4rem, 14vw, 8rem);
  margin: 0 0 1rem;
  background: linear-gradient(100deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 0 30px rgba(240, 66, 200, .4));
}

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(10, 10, 28, .9));
  padding: 3.5rem 0 2rem;
}
.footer-grid {
  display: grid; gap: 2.4rem;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  margin-bottom: 2.6rem;
}
.footer-brand p { color: var(--muted); font-size: .9rem; max-width: 26rem; margin-top: .8rem; }
.site-footer h3 {
  font-family: var(--font-px); font-size: .6rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: .9rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer ul a { color: var(--muted); font-size: .9rem; }
.site-footer ul a:hover { color: var(--text); }
.footer-legal { border-top: 1px solid var(--line); padding-top: 1.6rem; }
.footer-legal p { color: var(--muted); font-size: .8rem; margin-bottom: .4rem; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1020px) {
  .game-body-grid { grid-template-columns: 1fr; }
  .game-side { position: static; }
  .meta-card { max-width: 520px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed; inset: 66px 0 auto 0; z-index: 99;
    flex-direction: column; align-items: stretch; gap: .2rem;
    background: rgba(6, 6, 15, .97);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.2rem 1.4rem;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
  }
  .nav-menu.open { visibility: visible; opacity: 1; transform: none; }
  .nav-open .nav-toggle .bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle .bar:nth-child(3) { opacity: 0; }
  .nav-open .nav-toggle .bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }
  .nav-menu > li > a, .sub-toggle { width: 100%; min-height: 46px; }
  .nav-menu > li > a[aria-current="page"]::after { left: .85rem; right: auto; width: 34px; }
  .nav-cta { margin-left: 0; margin-top: .5rem; }
  .sub-menu {
    position: static; opacity: 1; visibility: hidden; height: 0; overflow: hidden;
    left: auto; transform: none; box-shadow: none; border: 0; background: transparent;
    backdrop-filter: none; -webkit-backdrop-filter: none;
    padding: 0 0 0 1.4rem; transition: none;
  }
  .sub-menu::before { display: none; }
  .sub-menu a { min-height: 44px; }
  .has-sub.open .sub-menu { visibility: visible; height: auto; }
  .catalogue-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .filters-toggle { display: inline-flex; margin-bottom: 1rem; }
  .filters-form { display: none; }
  .filters-form.open { display: grid; }
  .game-hero-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .game-hero-media { max-width: 240px; }
  .game-actions { flex-direction: column; }
  .contact-layout { grid-template-columns: 1fr; }
  .timeline::before { left: 8px; }
  .timeline-item { grid-template-columns: 1fr; gap: .5rem; padding-left: 2rem; }
  .timeline-year { text-align: left; padding-top: 0; }
  .timeline-year::after { left: -1.72rem; right: auto; top: .35rem; }
  .carousel-nav { display: none; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  /* Phones: the hero art's focal point is cropped out anyway — tighten the
     dead space below the stats so Featured Games surfaces sooner. */
  .hero { min-height: clamp(520px, 82vh, 760px); }
  .hero-inner { padding-top: 5rem; }
  .hero-stats { gap: 1.4rem; }
  .fame-row { grid-template-columns: auto 1fr auto; }
  .fame-cover { display: none; }
}

/* ════════════════════════════════════════════════════════════════════
   Polish layer — view transitions, skeletons, chips, lightbox, nav UX
   ════════════════════════════════════════════════════════════════════ */

/* ── Cross-document view transitions (progressive, MPA) ──────────── */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .16s ease both; }
::view-transition-new(root) { animation: vt-in .22s ease both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }

/* ── Image skeleton shimmer + fade-in ────────────────────────────── */
.game-card-cover, .fame-cover, .article-card > img, .object-card > img, .shot {
  background:
    linear-gradient(110deg, transparent 30%, rgba(233, 233, 247, .06) 46%, transparent 62%) no-repeat,
    var(--panel-2);
  background-size: 220% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { from { background-position: 180% 0; } to { background-position: -60% 0; } }
html.js .img-fade { opacity: 0; transition: opacity .45s ease; }
html.js .img-fade.is-loaded { opacity: 1; }
.is-settled { animation: none; }

/* ── Active filter chips ─────────────────────────────────────────── */
.active-chips { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.4rem; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 44px; padding: .35rem .5rem .35rem .9rem;
  background: rgba(34, 211, 238, .08);
  border: 1px solid rgba(34, 211, 238, .45);
  border-radius: 999px;
  color: var(--text); font-size: .85rem; font-weight: 600;
  transition: border-color .2s, background .2s;
}
.chip:hover { border-color: var(--magenta); background: rgba(240, 66, 200, .1); color: var(--text); }
.chip .chip-k { color: var(--muted); font-weight: 500; }
.chip .chip-x {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  font-size: .95rem; line-height: 1;
}
.chip:hover .chip-x { background: rgba(240, 66, 200, .3); }
.chip-clear { border-style: dashed; background: transparent; color: var(--muted); }

/* ── Lightbox gallery ────────────────────────────────────────────── */
.shot-btn {
  display: block; width: 100%; padding: 0; margin: 0;
  border: 0; background: none; cursor: zoom-in; border-radius: 10px;
}
.shot-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.lightbox {
  border: 0; padding: 0; margin: auto;
  background: transparent;
  max-width: min(94vw, 1400px); max-height: 92vh;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(4, 4, 12, .92); backdrop-filter: blur(6px); }
.lightbox img {
  max-width: min(94vw, 1400px); max-height: 84vh;
  width: auto; height: auto; margin: 0 auto;
  border-radius: 12px; border: 1px solid var(--line);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .7), var(--glow-cyan);
}
.lightbox-bar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; margin-top: .9rem;
}
.lightbox-caption { color: var(--muted); font-size: .88rem; }
.lightbox-btn {
  min-width: 44px; min-height: 44px; border-radius: 10px;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); font-size: 1.05rem; cursor: pointer;
  transition: border-color .2s, color .2s;
}
.lightbox-btn:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── Scroll progress + back to top ───────────────────────────────── */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120;
  background: linear-gradient(90deg, var(--cyan), var(--purple), var(--magenta));
  transform-origin: 0 50%; transform: scaleX(0);
  pointer-events: none;
}
.to-top {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 110;
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--panel); color: var(--cyan);
  border: 1px solid var(--line);
  display: grid; place-items: center; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .25s, transform .25s, visibility .25s, border-color .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--cyan); box-shadow: var(--glow-cyan); }

/* ── Nav & touch-target refinements ──────────────────────────────── */
body.nav-open { overflow: hidden; }
.carousel-btn { width: 44px; height: 44px; }
.rate-star { padding: .35rem; min-width: 44px; min-height: 44px; }
.newsletter-box {
  background-image:
    linear-gradient(rgba(6, 6, 15, .78), rgba(6, 6, 15, .88)),
    url('/assets/images/generated/neon-texture.jpg');
  background-size: cover; background-position: center;
}
.nf-art { max-width: 420px; margin: 0 auto 1.6rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.contact-side-art { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 1.4rem; }

/* ── Motion preferences ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @view-transition { navigation: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-starfield { display: none; }
}
