/* =============================================================================
   ROMP — Design System v2  "Neon Arcade"
   A premium, playful arcade aesthetic. Dark-first synthwave energy with a
   crisp, high-contrast light mode. Every class name is preserved from v1 so
   the React markup renders unchanged — this file is a pure visual overhaul.
   ========================================================================== */

/* ---- Tokens --------------------------------------------------------------- */
:root {
  /* brand */
  --primary: #7c3aed;          /* electric violet */
  --primary-600: #6d28d9;
  --primary-300: #a78bfa;
  --secondary: #06b6d4;        /* cyan */
  --accent: #f43f5e;           /* rose / CTA */
  --accent-2: #fb7185;
  --amber: #f59e0b;
  --lime: #22c55e;

  /* signature gradients */
  --grad-brand: linear-gradient(135deg, #7c3aed 0%, #d946ef 50%, #f43f5e 100%);
  --grad-cool:  linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --grad-sheen: linear-gradient(135deg, rgba(255,255,255,.9), rgba(255,255,255,0));

  /* surfaces — light */
  --bg: #f4f3fb;
  --bg-tint-a: rgba(124,58,237,.07);
  --bg-tint-b: rgba(244,63,94,.06);
  --surface: #ffffff;
  --surface-2: #f0eefb;
  --surface-3: #e9e7f7;
  --text: #14112b;
  --text-soft: #3a3658;
  --muted: #6f6b8c;
  --border: #e7e4f5;
  --border-strong: #d9d4ee;

  /* depth */
  --shadow: 0 1px 2px rgba(20,17,43,.04), 0 6px 18px rgba(20,17,43,.07);
  --shadow-md: 0 8px 30px rgba(20,17,43,.10);
  --shadow-lg: 0 22px 60px rgba(20,17,43,.18);
  --glow: 0 8px 28px rgba(124,58,237,.34);
  --glow-accent: 0 8px 28px rgba(244,63,94,.34);
  --ring: 0 0 0 3px color-mix(in srgb, var(--primary) 26%, transparent);

  --r-sm: 11px; --r-md: 16px; --r-lg: 22px; --r-xl: 30px;
  --maxw: 1300px;
  --header-h: 66px;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;

  --ease: cubic-bezier(.22,.68,.32,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

[data-theme="dark"] {
  --primary: #a78bfa;
  --primary-600: #8b5cf6;
  --primary-300: #c4b5fd;
  --secondary: #22d3ee;
  --accent: #fb7185;
  --accent-2: #f9a8d4;

  --grad-brand: linear-gradient(135deg, #8b5cf6 0%, #d946ef 50%, #fb7185 100%);

  --bg: #08060f;
  --bg-tint-a: rgba(124,58,237,.20);
  --bg-tint-b: rgba(217,70,239,.14);
  --surface: #120f20;
  --surface-2: #1a1630;
  --surface-3: #241e3f;
  --text: #f3f0ff;
  --text-soft: #c9c3e6;
  --muted: #938daf;
  --border: #272138;
  --border-strong: #352c4f;

  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.45);
  --shadow-md: 0 14px 40px rgba(0,0,0,.5);
  --shadow-lg: 0 26px 70px rgba(0,0,0,.62);
  --glow: 0 10px 36px rgba(167,139,250,.45);
  --glow-accent: 0 10px 36px rgba(251,113,133,.4);
  --ring: 0 0 0 3px color-mix(in srgb, var(--primary) 40%, transparent);
}

/* ---- Base ----------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .3s var(--ease), color .3s var(--ease);
  position: relative;
  overflow-x: hidden;
}
/* Ambient aurora — sits behind everything, gives the page depth */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 12% -5%, var(--bg-tint-a), transparent 70%),
    radial-gradient(55% 45% at 95% 0%, var(--bg-tint-b), transparent 70%),
    radial-gradient(45% 40% at 60% 110%, color-mix(in srgb, var(--secondary) 12%, transparent), transparent 70%);
}

h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; line-height: 1.08; margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--primary); color: #fff; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

/* custom scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: content-box; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.main { flex: 1; padding-top: 26px; padding-bottom: 64px; }

/* shared chip-button base reused by primary/ghost */
.btn-primary, .btn-ghost, .hero-cta, .fs-btn { font-family: var(--font-body); }

/* ---- Header --------------------------------------------------------------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--border);
}
.header-row { height: var(--header-h); display: flex; align-items: center; gap: 18px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--grad-brand); background-size: 160% 160%;
  display: grid; place-items: center; box-shadow: var(--glow);
  position: relative; transition: transform .3s var(--ease);
  animation: hue 9s linear infinite;
}
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
@keyframes hue { to { filter: hue-rotate(360deg); } }
.logo-word { font-family: var(--font-display); font-weight: 700; font-size: 23px; letter-spacing: -.04em; }
.logo-word b {
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.search { flex: 1; max-width: 480px; position: relative; display: flex; align-items: center; }
.search input {
  width: 100%; height: 44px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); padding: 0 18px 0 44px;
  font-family: inherit; font-size: 15px; outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--primary); background: var(--surface); box-shadow: var(--ring); }
.search > .ico {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; color: var(--muted); pointer-events: none; transition: color .18s;
}
.search:focus-within > .ico { color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); display: grid; place-items: center;
  transition: background .18s, transform .12s, border-color .18s, color .18s;
}
.icon-btn:hover { background: var(--surface); border-color: var(--primary); color: var(--primary); }
.icon-btn:active { transform: scale(.92); }

.btn-primary {
  position: relative; height: 44px; padding: 0 22px; border-radius: 999px; border: none;
  font-weight: 700; font-size: 14.5px; color: #fff; white-space: nowrap;
  background: var(--grad-brand); background-size: 180% 180%;
  box-shadow: var(--glow); overflow: hidden;
  transition: transform .12s var(--ease), box-shadow .2s, filter .2s;
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--grad-sheen); opacity: 0; transition: opacity .25s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(124,58,237,.42); }
.btn-primary:hover::after { opacity: .25; }
.btn-primary:active { transform: translateY(0); }

/* ---- Category nav --------------------------------------------------------- */
.catnav {
  position: sticky; top: var(--header-h); z-index: 40;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.catnav-row { display: flex; gap: 7px; overflow-x: auto; padding: 11px 0; scrollbar-width: none; }
.catnav-row::-webkit-scrollbar { display: none; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  color: var(--muted); background: transparent; border: 1px solid transparent; white-space: nowrap;
  transition: background .18s, color .18s, border-color .18s, transform .12s;
}
.cat-pill:hover { background: var(--surface-2); color: var(--text); transform: translateY(-1px); }
.cat-pill.active {
  color: #fff; background: var(--grad-brand); background-size: 160% 160%;
  box-shadow: var(--glow); border-color: transparent;
}
.cat-pill.active .ico { opacity: 1; }
.cat-pill .ico { opacity: .85; }

/* ---- Section headers ------------------------------------------------------ */
.section-head { display: flex; align-items: center; gap: 13px; margin: 38px 0 18px; }
.section-head h2 { font-size: 24px; letter-spacing: -.025em; }
.section-head .dot {
  width: 11px; height: 22px; border-radius: 5px;
  background: var(--grad-brand); box-shadow: var(--glow);
}
.section-head .more {
  margin-left: auto; font-size: 14px; font-weight: 700; color: var(--muted);
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px;
  transition: color .18s, background .18s, gap .18s;
}
.section-head .more:hover { color: var(--primary); background: var(--surface-2); gap: 9px; }

/* ---- Game grid + cards ---------------------------------------------------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); }
.grid.dense { grid-template-columns: repeat(auto-fill, minmax(154px, 1fr)); gap: 14px; }

.card {
  position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow); display: block; isolation: isolate;
  transition: transform .26s var(--ease), box-shadow .26s var(--ease), border-color .26s;
}
/* gradient glow ring revealed on hover */
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.4px; z-index: 3;
  background: var(--grad-brand); opacity: 0; transition: opacity .26s;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::after { opacity: 1; }

.card-thumb { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--surface-3); }
.card-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; background: #000; }
.card-thumb .badge-hot, .card-thumb .badge-play, .card-thumb .play-overlay { z-index: 2; }
.card-thumb .art { position: absolute; inset: 0; transition: transform .5s var(--ease); }
.card:hover .art { transform: scale(1.09); }
/* shine sweep on hover */
.card-thumb::before {
  content: ""; position: absolute; top: 0; left: -60%; width: 50%; height: 100%; z-index: 2;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-18deg); opacity: 0; transition: opacity .1s;
}
.card:hover .card-thumb::before { animation: sweep .8s var(--ease) .05s; }
@keyframes sweep { 0% { left: -60%; opacity: .9; } 100% { left: 130%; opacity: 0; } }

.card-thumb .play-overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(to top, rgba(8,6,15,.55), rgba(8,6,15,.18));
  opacity: 0; transition: opacity .22s;
}
.card:hover .play-overlay { opacity: 1; }
.play-overlay .pbtn {
  width: 56px; height: 56px; border-radius: 999px; background: #fff;
  display: grid; place-items: center; color: var(--primary-600);
  box-shadow: 0 8px 26px rgba(0,0,0,.4); transform: scale(.7) translateY(8px); transition: transform .26s var(--ease-out);
}
.card:hover .pbtn { transform: scale(1) translateY(0); }

.badge-hot {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--amber));
  box-shadow: 0 4px 14px rgba(244,63,94,.45);
}
.badge-play {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; color: var(--text);
  background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: blur(6px);
  border: 1px solid var(--border); display: inline-flex; align-items: center; gap: 4px;
}
.card-body { padding: 12px 13px 13px; }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.2; letter-spacing: -.02em; }
.card:hover .card-title { color: var(--primary); }
.card-meta { margin-top: 5px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.card-meta .like { display: inline-flex; align-items: center; gap: 3px; color: var(--accent); font-weight: 700; margin-left: auto; }

/* thumbnail generated art */
.art-title { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 13px; }
.art-title span {
  font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 18px; line-height: 1.05;
  text-shadow: 0 2px 14px rgba(0,0,0,.4); letter-spacing: -.02em;
}
.art-deco { position: absolute; inset: 0; opacity: .9; }
.art-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Hero ----------------------------------------------------------------- */
.hero {
  position: relative; border-radius: var(--r-xl); overflow: hidden; padding: 52px 48px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255,255,255,.18), transparent 45%),
    var(--grad-brand);
  background-size: 100% 100%, 220% 220%;
  animation: heroflow 14s ease infinite;
  color: #fff; display: flex; align-items: center; gap: 32px; margin-bottom: 10px;
  box-shadow: var(--shadow-lg);
}
@keyframes heroflow { 0%,100% { background-position: 0 0, 0% 50%; } 50% { background-position: 0 0, 100% 50%; } }
/* grid texture + glow blob */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 38px 38px;
  -webkit-mask-image: radial-gradient(120% 90% at 80% 30%, #000, transparent 75%);
  mask-image: radial-gradient(120% 90% at 80% 30%, #000, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; right: -80px; top: -90px; width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(255,255,255,.35), transparent 70%); pointer-events: none;
}
.hero-text { position: relative; z-index: 1; max-width: 580px; }
.hero-text .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  padding: 6px 13px; border-radius: 999px; background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(4px);
}
.hero-text .eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff; animation: pulse 1.8s ease infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .4; transform: scale(.7);} }
.hero-text h1 { font-size: clamp(32px, 5vw, 54px); margin: 16px 0 14px; letter-spacing: -.035em; text-shadow: 0 4px 30px rgba(0,0,0,.18); }
.hero-text p { font-size: 17px; line-height: 1.55; opacity: .95; margin: 0 0 26px; max-width: 30em; }
.hero-cta {
  display: inline-flex; align-items: center; gap: 10px; background: #fff; color: var(--primary-600);
  font-weight: 800; font-size: 15.5px; padding: 14px 26px; border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0,0,0,.22); transition: transform .15s var(--ease), box-shadow .2s;
}
.hero-cta:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,.3); }
.hero-cta:active { transform: translateY(0); }
.hero-stats { display: flex; align-items: center; gap: 16px; margin-top: 24px; font-size: 14px; opacity: .95; }
.hero-stats b { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-right: 5px; }
.hero-stats .sep { width: 1px; height: 22px; background: rgba(255,255,255,.35); }
@media (max-width: 480px) { .hero-stats { gap: 11px; font-size: 13px; } .hero-stats b { font-size: 16px; } }
.hero-art {
  position: relative; z-index: 1; flex: 1; display: grid; grid-template-columns: repeat(3,1fr);
  gap: 12px; max-width: 360px;
}
.hero-art .mini {
  aspect-ratio: 1; border-radius: 16px; box-shadow: 0 10px 26px rgba(0,0,0,.3);
  border: 1px solid rgba(255,255,255,.22); position: relative; overflow: hidden;
  background-size: cover !important; background-position: center !important;
  animation: float 5s var(--ease) infinite; transition: transform .25s var(--ease);
}
.hero-art .mini::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255,255,255,.25), transparent 55%); }
.hero-art .mini:nth-child(2) { animation-delay: .4s; } .hero-art .mini:nth-child(3) { animation-delay: .8s; }
.hero-art .mini:nth-child(4) { animation-delay: 1.2s; } .hero-art .mini:nth-child(5) { animation-delay: 1.6s; } .hero-art .mini:nth-child(6) { animation-delay: 2s; }
.hero-art .mini:hover { transform: translateY(-6px) scale(1.04); z-index: 2; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (max-width: 860px) { .hero-art { display: none; } .hero { padding: 34px 28px; } }

/* ---- Category banner ------------------------------------------------------ */
.cat-banner {
  border-radius: var(--r-xl); padding: 40px 42px; color: #fff; margin-bottom: 8px;
  display: flex; align-items: center; gap: 22px; box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden; background-size: 180% 180%; animation: heroflow 16s ease infinite;
}
.cat-banner::before {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(100% 100% at 90% 0%, #000, transparent 70%);
  mask-image: radial-gradient(100% 100% at 90% 0%, #000, transparent 70%);
}
.cat-banner > * { position: relative; z-index: 1; }
.cat-banner .cb-icon {
  width: 66px; height: 66px; border-radius: 20px; background: rgba(255,255,255,.2);
  display: grid; place-items: center; backdrop-filter: blur(4px); flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.3);
}
.cat-banner h1 { font-size: clamp(28px,4vw,40px); letter-spacing: -.03em; }
.cat-banner p { margin: 8px 0 0; opacity: .94; font-size: 15px; }
.cat-intro { color: var(--muted); font-size: 15px; line-height: 1.75; max-width: 75ch; margin: 22px 0 6px; }

/* ---- Ad slots ------------------------------------------------------------- */
.ad {
  position: relative; display: grid; place-items: center; border-radius: var(--r-md);
  border: 1.5px dashed var(--border-strong); background: var(--surface-2); color: var(--muted); overflow: hidden;
}
.ad::before {
  content: "Advertisement"; position: absolute; top: 8px; left: 12px;
  font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 800; opacity: .6;
}
.ad-label { font-size: 12px; font-weight: 600; opacity: .7; }
.ad-leaderboard { height: 96px; margin: 22px 0 6px; }
.ad-rect { height: 250px; }
.ad-inline { height: 116px; margin: 28px 0; }
@media (max-width: 600px) { .ad-leaderboard { height: 68px; } }

/* ---- Game page ------------------------------------------------------------ */
.game-layout { display: grid; grid-template-columns: 1fr 308px; gap: 28px; align-items: start; }
@media (max-width: 980px) { .game-layout { grid-template-columns: 1fr; } }
.stage {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: #050309; aspect-ratio: 16/10;
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
/* neon frame glow */
.stage::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; z-index: 3;
  background: var(--grad-brand); opacity: .55;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.stage iframe { width: 100%; height: 100%; border: 0; display: block; position: relative; z-index: 1; }
.stage-cover { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; }
.stage-cover .bigplay { display: flex; flex-direction: column; align-items: center; gap: 16px; color: #fff; }
.stage-cover .bigplay .ring {
  width: 92px; height: 92px; border-radius: 999px; background: var(--grad-brand);
  display: grid; place-items: center; box-shadow: 0 14px 46px rgba(124,58,237,.6);
  transition: transform .2s var(--ease); position: relative;
}
.stage-cover .bigplay .ring::before {
  content: ""; position: absolute; inset: -10px; border-radius: 999px;
  border: 2px solid rgba(255,255,255,.4); animation: ripple 2.2s ease infinite;
}
@keyframes ripple { 0% { transform: scale(.9); opacity: .7; } 100% { transform: scale(1.35); opacity: 0; } }
.stage-cover .bigplay:hover .ring { transform: scale(1.08); }
.stage-cover .bigplay span { font-weight: 700; font-size: 15.5px; letter-spacing: .01em; text-shadow: 0 2px 12px rgba(0,0,0,.5); }

.stage-bar { display: flex; align-items: center; gap: 12px; padding: 16px 4px 0; flex-wrap: wrap; }
.stage-bar .title-blk { margin-right: auto; }
.stage-bar h1 { font-size: 27px; letter-spacing: -.03em; }
.stage-bar .crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.stage-bar .crumb a:hover { color: var(--primary); }
.vote {
  display: flex; align-items: center; gap: 6px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; padding: 5px; box-shadow: var(--shadow);
}
.vote button {
  border: none; background: transparent; color: var(--muted); display: inline-flex; align-items: center;
  gap: 6px; padding: 8px 13px; border-radius: 999px; font-weight: 700; font-size: 13.5px;
  transition: background .18s, color .18s;
}
.vote button:hover { background: var(--surface-2); color: var(--text); }
.vote button.up.on { color: var(--lime); background: color-mix(in srgb, var(--lime) 16%, transparent); }
.vote button.down.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.vote .divider { width: 1px; height: 20px; background: var(--border); }
.share-row { display: flex; gap: 8px; }
.fs-btn { display: inline-flex; align-items: center; gap: 8px; }

.content { margin-top: 36px; max-width: 75ch; }
.content h2 { font-size: 22px; margin: 32px 0 12px; display: flex; align-items: center; gap: 11px; letter-spacing: -.02em; }
.content h2 .bar { width: 5px; height: 22px; border-radius: 3px; background: var(--grad-brand); box-shadow: var(--glow); }
.content p { color: var(--text-soft); line-height: 1.8; font-size: 15.5px; margin: 0 0 13px; }
.content ul { margin: 0 0 13px; padding-left: 4px; list-style: none; }
.content ul li { position: relative; padding-left: 28px; margin-bottom: 10px; line-height: 1.65; font-size: 15.5px; color: var(--text-soft); }
.content ul li::before {
  content: ""; position: absolute; left: 4px; top: 8px; width: 9px; height: 9px;
  border-radius: 3px; background: var(--grad-brand); box-shadow: var(--glow);
}
.kv {
  display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 18px 20px; margin: 4px 0 8px; box-shadow: var(--shadow);
}
.kv .row { display: flex; gap: 14px; font-size: 14.5px; }
.kv .row .k { color: var(--muted); width: 100px; flex-shrink: 0; font-weight: 700; }

.sidebar { display: flex; flex-direction: column; gap: 22px; }
.side-block {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 18px; box-shadow: var(--shadow);
}
.side-block h3 { font-size: 15.5px; margin-bottom: 14px; display: flex; align-items: center; gap: 9px; letter-spacing: -.01em; }
.side-list { display: grid; gap: 8px; }
.side-game { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: var(--r-sm); transition: background .18s, transform .15s; }
.side-game:hover { background: var(--surface-2); transform: translateX(3px); }
.side-game .sg-thumb { width: 58px; height: 58px; border-radius: 12px; overflow: hidden; flex-shrink: 0; position: relative; box-shadow: var(--shadow); }
.side-game .sg-name { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: -.01em; }
.side-game:hover .sg-name { color: var(--primary); }
.side-game .sg-cat { font-size: 11.5px; color: var(--muted); text-transform: capitalize; margin-top: 2px; }

/* ---- Footer --------------------------------------------------------------- */
.footer { position: relative; border-top: 1px solid var(--border); background: var(--surface); margin-top: auto; }
.footer::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 2px; background: var(--grad-brand); opacity: .8; }
.footer-grid { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 36px; padding: 50px 0 30px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
.footer h4 { font-family: var(--font-body); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 16px; }
.footer-links { display: grid; gap: 10px; }
.footer-links a { font-size: 14.5px; color: var(--text-soft); width: fit-content; transition: color .18s, transform .15s; }
.footer-links a:hover { color: var(--primary); transform: translateX(3px); }
.footer-blurb { color: var(--muted); font-size: 14px; line-height: 1.65; max-width: 300px; margin: 14px 0 0; }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

/* ---- Cookie banner -------------------------------------------------------- */
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80; max-width: 740px; margin: 0 auto;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 18px 22px; display: flex; align-items: center; gap: 18px;
  animation: cookie-in .45s var(--ease-out);
}
@keyframes cookie-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.cookie .ck-ico { width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0; display: grid; place-items: center;
  background: color-mix(in srgb, var(--primary) 15%, transparent); color: var(--primary); }
.cookie p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.cookie p b { color: var(--text); }
.cookie .ck-actions { display: flex; gap: 9px; flex-shrink: 0; margin-left: auto; }
.btn-ghost { height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 13.5px; transition: background .18s, border-color .18s; }
.btn-ghost:hover { background: var(--surface-3); border-color: var(--border-strong); }
@media (max-width: 600px) { .cookie { flex-direction: column; align-items: flex-start; } .cookie .ck-actions { margin-left: 0; width: 100%; } .cookie .ck-actions button { flex: 1; } }

/* ---- Misc ----------------------------------------------------------------- */
.empty { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty .big { display: inline-grid; place-items: center; width: 96px; height: 96px; border-radius: 28px;
  background: var(--surface-2); color: var(--primary); margin-bottom: 18px; box-shadow: var(--shadow); }
.empty h2 { font-size: 24px; color: var(--text); margin-bottom: 8px; letter-spacing: -.02em; }
.pagewrap { animation: fade .35s var(--ease-out); }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.results-count { color: var(--muted); font-size: 14.5px; margin: 2px 0 0; }
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 90;
  background: var(--text); color: var(--bg); font-weight: 700; font-size: 13.5px; padding: 12px 22px;
  border-radius: 999px; box-shadow: var(--shadow-lg); animation: cookie-in .25s;
}

/* ---- FAQ + Game info ------------------------------------------------------ */
.faq { display: flex; flex-direction: column; gap: 11px; margin-top: 8px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--r-md); padding: 0 18px; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.faq-item:hover { border-color: var(--border-strong); }
.faq-item[open] { border-color: var(--primary); box-shadow: var(--shadow); }
.faq-item summary { cursor: pointer; font-weight: 700; font-size: 15px; padding: 16px 32px 16px 0; list-style: none; position: relative; color: var(--text); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%); font-size: 22px; line-height: 1; color: var(--primary); font-weight: 700; transition: transform .2s; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item > p { margin: 0; padding: 0 0 17px; color: var(--muted); line-height: 1.7; font-size: 14.5px; }
.game-info { display: flex; flex-direction: column; }
.gi-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.gi-row:last-child { border-bottom: none; }
.gi-k { color: var(--muted); white-space: nowrap; }
.gi-v { font-weight: 700; text-align: right; color: var(--text); }

/* ---- Fullscreen stage ------------------------------------------------------
   Native :fullscreen where supported; .fs-on is the CSS-overlay fallback for
   browsers without the Fullscreen API (iPhone Safari). */
.stage:fullscreen { aspect-ratio: auto; border-radius: 0; border: none; background: #050309; }
.stage:fullscreen::after { display: none; }
.stage.fs-on {
  position: fixed; inset: 0; z-index: 300;
  width: 100vw; height: 100vh; height: 100dvh;
  aspect-ratio: auto; border-radius: 0; border: none;
}
.stage.fs-on::after { display: none; }
body.fs-lock { overflow: hidden; }
.stage-exit {
  position: absolute; top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right));
  z-index: 6; width: 42px; height: 42px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28); background: rgba(8,6,15,.55); color: #fff;
  display: grid; place-items: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .18s, transform .12s;
}
.stage-exit:hover { background: rgba(8,6,15,.85); }
.stage-exit:active { transform: scale(.92); }

/* ---- Responsive: tablet ---------------------------------------------------- */
@media (max-width: 860px) {
  .main { padding-top: 18px; padding-bottom: 48px; }
  .section-head { margin: 28px 0 14px; }
  .section-head h2 { font-size: 20px; }
  .content h2 { font-size: 20px; margin: 28px 0 10px; }
}

/* ---- Responsive: large phones --------------------------------------------- */
@media (max-width: 760px) {
  .container { padding: 0 14px; }
  .header-row { gap: 10px; }
  .logo-word { font-size: 20px; }
  .search input { height: 42px; font-size: 14px; padding: 0 14px 0 40px; }
  .search > .ico { left: 13px; }
  /* "Surprise me" becomes icon-only so the search bar keeps room */
  .header .btn-primary { width: 44px; padding: 0; display: grid; place-items: center; }
  .header .btn-primary .bp-text { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 13px; }
  .grid.dense { grid-template-columns: repeat(auto-fill, minmax(134px, 1fr)); gap: 11px; }
}

/* ---- Responsive: phones ---------------------------------------------------- */
@media (max-width: 700px) {
  /* taller inline stage so touch games aren't a letterboxed sliver */
  .stage { aspect-ratio: auto; height: clamp(300px, 58vh, 540px); }
  .stage-bar { padding-top: 12px; gap: 9px; }
  .stage-bar .title-blk { flex-basis: 100%; margin-right: 0; }
  .stage-bar h1 { font-size: 21px; }
  .fs-btn { margin-left: auto; height: 40px; padding: 0 16px; font-size: 13.5px; }
  .vote button { padding: 7px 11px; font-size: 13px; }
  .content { margin-top: 26px; }
  .content p, .content ul li { font-size: 15px; }
  .kv { padding: 14px 16px; }
  .kv .row .k { width: 76px; }
}

@media (max-width: 480px) {
  .grid, .grid.dense { grid-template-columns: 1fr 1fr; }
  .hero { padding: 26px 20px; border-radius: var(--r-lg); }
  .hero-text h1 { margin: 13px 0 11px; }
  .hero-text p { font-size: 15px; margin-bottom: 20px; }
  .hero-cta { padding: 12px 20px; font-size: 14.5px; }
  .cat-banner { padding: 24px 18px; gap: 14px; border-radius: var(--r-lg); }
  .cat-banner .cb-icon { width: 52px; height: 52px; border-radius: 16px; }
  .catnav-row { padding: 9px 0; }
  .cat-pill { padding: 8px 13px; font-size: 13.5px; }
  .stage-bar h1 { font-size: 19px; }
}

/* ---- Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
