/* =========================================================================
   PixelPop Arcade — main stylesheet
   Aesthetic: editorial-arcade. Dark background, electric-green accent,
   chunky display type set against a refined sans body.
   ========================================================================= */

:root {
  /* Palette */
  --bg:        #0a0a0f;
  --bg-2:      #11111a;
  --surface:   #16161d;
  --surface-2: #1c1c26;
  --border:    #262630;
  --border-2:  #34344a;
  --text:      #f5f5f0;
  --text-dim:  #b4b4bf;
  --text-mute: #6f6f80;
  --accent:    #39ff14;
  --accent-2:  #b8ff5a;
  --danger:    #ff4d6d;

  /* Typography */
  --font-display: 'Bricolage Grotesque', ui-serif, Georgia, serif;
  --font-body:    'Geist', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'Geist Mono', ui-monospace, 'SF Mono', 'Roboto Mono', monospace;

  /* Layout */
  --wrap-max: 1240px;
  --gutter:   clamp(16px, 4vw, 32px);
  --radius:   14px;
  --radius-sm: 8px;
  --radius-lg: 22px;

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; tab-size: 4; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  /* subtle grain overlay */
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(800px 600px at 80% -10%, rgba(57, 255, 20, .06), transparent 60%),
    radial-gradient(600px 400px at 0% 100%, rgba(57, 255, 20, .04), transparent 60%);
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
input, button { font: inherit; }
ul, ol { padding: 0; margin: 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }

/* ---- Utilities ----------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap-max); margin: 0 auto; padding: 0 var(--gutter); }

.visually-hidden {
  position: absolute !important; 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: -40px; left: 16px; background: var(--accent); color: #000;
  padding: 8px 14px; border-radius: 6px; font-weight: 600; z-index: 100;
}
.skip-link:focus { top: 12px; }

.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* ---- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10, 10, 15, .82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  height: 64px;
}

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -.02em;
  color: var(--text);
  flex-shrink: 0;
}
.logo:hover { color: var(--text); }
.logo-mark {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
}
.logo-word { line-height: 1; }
.logo-accent { color: var(--accent); }
.logo-sm { font-size: 18px; }
.logo-sm .logo-mark { width: 30px; height: 30px; }

.primary-nav {
  display: none;
}
.primary-nav ul { display: flex; gap: 4px; align-items: center; }
.primary-nav a, .cat-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 500;
  color: var(--text-dim);
  border: 1px solid transparent;
  transition: color .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease);
}
.primary-nav a:hover, .cat-toggle:hover, .cat-toggle[aria-expanded="true"] {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}
.has-menu { position: relative; }
.cat-menu {
  position: absolute; top: calc(100% + 6px); left: 0;
  display: none; grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  min-width: 360px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.has-menu.is-open .cat-menu { display: grid; }
.cat-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-dim);
}
.cat-menu a:hover { background: var(--surface-2); color: var(--accent); }

.search {
  margin-left: auto;
  display: none;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 8px 6px 12px;
  width: 240px;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.search:focus-within { border-color: var(--accent); background: var(--bg-2); }
.search input {
  flex: 1; background: transparent; border: 0; color: var(--text);
  outline: none; font-size: 14px;
}
.search input::placeholder { color: var(--text-mute); }
.search button {
  display: inline-grid; place-items: center; width: 28px; height: 28px;
  border-radius: 6px; color: var(--text-dim);
}
.search button:hover { color: var(--accent); }

.nav-toggle {
  margin-left: auto;
  width: 40px; height: 40px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: ''; display: block;
  width: 18px; height: 2px;
  background: currentColor;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before { position: absolute; top: -6px; left: 0; }
.nav-toggle-bars::after  { position: absolute; top:  6px; left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after  { transform: translateY(-6px) rotate(-45deg); }

@media (min-width: 880px) {
  .nav-toggle { display: none; }
  .primary-nav { display: block; margin-left: 24px; }
  .search { display: flex; }
}

@media (max-width: 879px) {
  .primary-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 16px var(--gutter) 24px;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .primary-nav a, .cat-toggle {
    width: 100%; justify-content: space-between;
    padding: 12px 14px; font-size: 15px;
  }
  .has-menu { position: static; }
  .cat-menu {
    position: static; display: none; margin-top: 4px;
    grid-template-columns: 1fr 1fr; min-width: 0; box-shadow: none;
  }
  .has-menu.is-open .cat-menu { display: grid; }
  .search { display: none; }
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .01em;
  border: 1px solid transparent;
  transition: transform .12s var(--ease), background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--accent);
  color: #061002;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #061002;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); }
.btn-xl {
  padding: 16px 28px;
  font-size: 16px;
  border-radius: 12px;
}

/* ---- Hero (homepage) ----------------------------------------------------- */
.hero {
  padding: clamp(40px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(57,255,20,.04) 60%, transparent 100%),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(255,255,255,.015) 28px 29px);
  pointer-events: none;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 50%, transparent 100%);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
.hero-copy { max-width: 620px; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 9vw, 92px);
  line-height: .95;
  letter-spacing: -.035em;
  margin-top: 18px;
  margin-bottom: 22px;
}
.hero-accent {
  font-style: italic;
  color: var(--accent);
  text-shadow: 0 0 30px rgba(57,255,20,.35);
}
.hero-lede {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-dim);
  max-width: 56ch;
  margin-bottom: 28px;
}
.hero-ctas {
  display: flex; flex-wrap: wrap; gap: 12px;
}
.hero-card {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.hero-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.hero-card-media {
  aspect-ratio: 16 / 9;
  background: var(--bg-2);
  overflow: hidden;
}
.hero-card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s var(--ease);
}
.hero-card:hover .hero-card-media img { transform: scale(1.04); }
.hero-card-meta {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(57,255,20,.03));
}
.hero-card-title {
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  letter-spacing: -.01em; flex: 1;
}
.hero-card-cat {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-mute);
}

@media (min-width: 880px) {
  .hero-inner { grid-template-columns: 1.1fr 1fr; }
}

.badge {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #061002;
}

/* ---- Section heads ------------------------------------------------------- */
section { padding: clamp(48px, 8vw, 96px) 0; }
.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.6vw, 40px);
  letter-spacing: -.02em;
  display: flex; align-items: baseline; gap: 14px;
}
.section-head .num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .04em;
}
.section-head p { color: var(--text-dim); max-width: 50ch; }

/* ---- Trending strip (horizontal rail) ----------------------------------- */
.strip { padding-top: 64px; padding-bottom: 32px; }
.strip-rail {
  display: flex; gap: 16px; overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 18px;
  margin: 0 calc(var(--gutter) * -1);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}
.strip-rail::-webkit-scrollbar { height: 8px; }
.strip-rail::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; }
.strip-rail .game-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
}
@media (min-width: 700px) { .strip-rail .game-card { flex-basis: 280px; } }

/* ---- Category cards ----------------------------------------------------- */
.cats { padding-top: 32px; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 600px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 880px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .cat-grid { grid-template-columns: repeat(6, 1fr); } }

.cat-card {
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 16px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 120px;
  transition: transform .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
  position: relative;
  overflow: hidden;
}
.cat-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--surface), rgba(57,255,20,.05));
  color: var(--text);
}
.cat-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.01em;
  line-height: 1.1;
}
.cat-card-count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.cat-card-arrow {
  position: absolute;
  right: 14px; bottom: 14px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: transform .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.cat-card:hover .cat-card-arrow {
  background: var(--accent); color: #061002; border-color: var(--accent);
  transform: translate(2px, -2px);
}

/* ---- Game grid + card --------------------------------------------------- */
.grid-section { padding-top: 48px; }
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 520px) { .game-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 760px) { .game-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1080px){ .game-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1280px){ .game-grid { grid-template-columns: repeat(6, 1fr); } }

.game-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .15s var(--ease), border-color .15s var(--ease);
}
.game-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--text);
}
.game-card-media {
  aspect-ratio: 16 / 10;
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}
.game-card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s var(--ease), filter .25s var(--ease);
}
.game-card:hover .game-card-media img { transform: scale(1.06); }
.game-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,15,0) 30%, rgba(10,10,15,.85));
  display: flex; align-items: end; justify-content: space-between;
  padding: 10px 12px;
  opacity: 0; transition: opacity .2s var(--ease);
}
.game-card:hover .game-card-overlay { opacity: 1; }
.game-card-play {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}
.game-card-cat-badge {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .12em; text-transform: uppercase;
  background: rgba(0,0,0,.6); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 999px; color: var(--text-dim);
}
.game-card-meta {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px 14px;
}
.game-card-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 15px; line-height: 1.2;
  letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.game-card-cat {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-mute);
}
.game-card.is-hidden { display: none; }

.grid-cta {
  display: flex; justify-content: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ---- Explainer (homepage tail) ------------------------------------------ */
.explainer { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.explainer-grid {
  display: grid; grid-template-columns: 1fr; gap: 28px;
}
@media (min-width: 880px) { .explainer-grid { grid-template-columns: 1.5fr 1fr; gap: 56px; } }
.explainer-h {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(26px, 3vw, 36px); letter-spacing: -.02em;
  margin-bottom: 14px;
}
.explainer p { color: var(--text-dim); margin-bottom: 14px; }
.explainer-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 24px;
}
.explainer-card ul li {
  padding: 10px 0; border-bottom: 1px dashed var(--border);
  font-size: 15px;
}
.explainer-card ul li:last-child { border-bottom: 0; }
.explainer-card strong { color: var(--accent); font-weight: 600; }

/* ---- Breadcrumbs -------------------------------------------------------- */
.crumbs {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
  padding-top: 24px;
  color: var(--text-mute);
}
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li:not(:last-child)::after { content: '/'; margin-left: 6px; opacity: .5; }
.crumbs a { color: var(--text-dim); }
.crumbs a:hover { color: var(--accent); }
.crumbs li[aria-current] { color: var(--text); }

/* ---- Game detail page --------------------------------------------------- */
.game-page { padding-bottom: 24px; }
.game-hero {
  padding: 32px 0 48px;
}
.game-hero-inner {
  display: grid; gap: 28px;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .game-hero-inner { grid-template-columns: 1fr 1fr; gap: 48px; }
}
.game-hero-cover {
  border-radius: 22px; overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  aspect-ratio: 16 / 9;
}
.game-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.game-hero-meta { display: flex; flex-direction: column; gap: 14px; align-self: center; }
.game-hero-meta .kicker a { color: var(--accent); }
.game-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 6vw, 60px);
  letter-spacing: -.03em;
  line-height: .98;
  margin-bottom: 4px;
}
.rating {
  display: inline-flex; align-items: center; gap: 12px;
}
.rating-stars { color: var(--accent); letter-spacing: 4px; font-size: 14px; }
.rating-num {
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  color: var(--text);
}
.rating-num span { color: var(--text-mute); margin-left: 2px; }
.game-mini { color: var(--text-mute); font-size: 13px; }

.game-body {
  display: grid;
  gap: 28px;
  padding-bottom: 32px;
}
.game-section h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: -.015em;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.game-section p { color: var(--text-dim); }
.tips { display: grid; gap: 8px; }
.tips li {
  position: relative;
  padding: 10px 12px 10px 36px;
  background: var(--surface);
  border-left: 2px solid var(--accent);
  border-radius: 8px;
  color: var(--text-dim);
}
.tips li::before {
  content: '►';
  position: absolute; left: 14px; top: 12px;
  color: var(--accent); font-size: 10px;
}
.faq { display: grid; gap: 10px; }
.faq-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.faq dt { font-weight: 600; color: var(--text); margin-bottom: 6px; }
.faq dd { margin: 0; color: var(--text-dim); }

.play-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 22px 24px;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
}
.play-cta h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 22px; letter-spacing: -.01em;
}
.play-cta p { color: var(--text-dim); }

.related { padding-top: 24px; padding-bottom: 64px; border-top: 1px solid var(--border); }

/* ---- Category page ------------------------------------------------------ */
.cat-hero { padding: 24px 0 36px; border-bottom: 1px solid var(--border); }
.cat-h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(36px, 6vw, 64px);
  letter-spacing: -.03em;
  line-height: .98;
  margin: 8px 0 16px;
}
.cat-intro { color: var(--text-dim); max-width: 70ch; font-size: 17px; }
.cat-meta {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-mute); margin-top: 14px;
}

.cat-sibling { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border); }
.cat-sibling h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 20px; margin-bottom: 14px;
}
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-dim);
  transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
}
.chip:hover, .chip.is-active { border-color: var(--accent); color: var(--accent); background: var(--bg-2); }

/* ---- All-games filters -------------------------------------------------- */
.filters { margin-top: 26px; display: grid; gap: 14px; }
.filter-search {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 16px;
  outline: none;
  width: 100%;
  max-width: 360px;
}
.filter-search:focus { border-color: var(--accent); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.empty-state {
  padding: 40px 0;
  text-align: center;
  color: var(--text-mute);
}

/* ---- Static / prose pages ----------------------------------------------- */
.prose-page { padding: 32px 0 64px; }
.prose-wrap { max-width: 760px; }
.prose-head { margin-bottom: 36px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.prose-head h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(36px, 6vw, 60px); letter-spacing: -.03em;
  line-height: 1; margin-top: 8px;
}
.prose-sub { color: var(--text-dim); margin-top: 14px; font-size: 18px; max-width: 60ch; }
.prose { font-size: 16.5px; line-height: 1.7; color: var(--text-dim); }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose hr { margin: 0 0 18px; }
.prose h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 24px; color: var(--text); margin-top: 36px; margin-bottom: 12px;
  letter-spacing: -.01em;
}
.prose h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 18px; color: var(--text); margin-top: 24px; margin-bottom: 8px;
}
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 22px; }
.prose ul li { list-style: disc; margin-bottom: 6px; }
.prose ol li { list-style: decimal; margin-bottom: 6px; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 10px 16px; background: var(--surface);
  border-radius: 0 8px 8px 0;
  font-style: italic; color: var(--text);
}

/* ---- 404 ---------------------------------------------------------------- */
.not-found { padding: clamp(60px, 12vw, 120px) 0; text-align: center; }
.nf-inner { max-width: 600px; margin: 0 auto; }
.nf-code {
  font-family: var(--font-mono); font-size: 14px;
  color: var(--accent); letter-spacing: .2em; font-weight: 600;
}
.not-found h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(36px, 6vw, 60px); letter-spacing: -.03em;
  margin: 12px 0 16px;
}
.not-found p { color: var(--text-dim); }
.nf-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 56px 0 24px;
  margin-top: 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 600px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 880px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand .logo { margin-bottom: 16px; }
.footer-tag { color: var(--text-mute); max-width: 32ch; font-size: 14px; }
.footer-h {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text);
  margin-bottom: 12px;
}
.footer-list li { margin-bottom: 6px; }
.footer-list a { color: var(--text-dim); font-size: 14px; }
.footer-list a:hover { color: var(--accent); }
.footer-cats { columns: 2; column-gap: 16px; }
@media (min-width: 880px) { .footer-cats { columns: 1; } }

.footer-base {
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-mute); font-size: 13px;
}
.footer-base a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================================
   Play page
   ========================================================================= */
.play-body {
  background: #000;
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh; overflow: hidden;
}
.play-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: 48px;
  flex-shrink: 0;
}
.play-back, .play-fs {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px; font-weight: 500;
}
.play-back:hover, .play-fs:hover {
  border-color: var(--accent); color: var(--accent);
}
.play-fs { margin-left: auto; }
.play-title {
  flex: 1;
  display: flex; align-items: center; gap: 8px;
  color: var(--text-dim); font-size: 13px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.play-title strong { color: var(--text); font-family: var(--font-display); font-weight: 700; }
.play-title a { color: var(--accent); }
@media (max-width: 540px) {
  .play-title span, .play-title a { display: none; }
  .play-back span, .play-fs span { display: none; }
  .play-back, .play-fs { padding: 8px; }
}

.play-stage {
  position: relative;
  flex: 1;
  background: #000;
  display: flex;
}

/* CSS pseudo-fullscreen — used on iOS Safari and any browser without the Fullscreen API. */
body.is-fakefs { position: fixed; inset: 0; overflow: hidden; }
body.is-fakefs .play-bar { display: none; }
body.is-fakefs .play-stage { position: fixed; inset: 0; z-index: 9999; }

/* Native fullscreen — also hide the play-bar so the iframe owns the screen. */
:fullscreen .play-bar,
:-webkit-full-screen .play-bar { display: none; }
:fullscreen .play-stage,
:-webkit-full-screen .play-stage { position: fixed; inset: 0; z-index: 9999; }

/* Floating exit button (always reachable inside either fullscreen mode). */
.play-exit {
  position: fixed; top: 12px; right: 12px; z-index: 10000;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, .65);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .15s var(--ease);
}
.play-exit[hidden] { display: none; }
.play-exit:hover, .play-exit:focus-visible {
  background: rgba(0, 0, 0, .85);
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.05);
}

/* Branded loading overlay — bridges the white-flash gap before the iframe content shows up. */
.play-loader {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 24px;
  background: var(--bg);
  text-align: center;
  transition: opacity .35s var(--ease), visibility .35s var(--ease);
}
.play-loader.is-fading { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-art { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.loader-mark { color: var(--accent); animation: loader-pulse 1.6s ease-in-out infinite; }
.loader-bar {
  position: relative; display: block;
  width: 180px; height: 3px; border-radius: 999px;
  background: var(--surface); overflow: hidden;
}
.loader-bar i {
  position: absolute; top: 0; left: -40%;
  width: 40%; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: loader-shimmer 1.2s linear infinite;
}
.loader-title {
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  color: var(--text); letter-spacing: -.01em;
}
.loader-tip { color: var(--text-mute); font-size: 13px; max-width: 36ch; line-height: 1.5; }
.loader-refresh {
  margin-top: 6px;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border-2); background: var(--surface);
  color: var(--text-dim); font-size: 13px; cursor: pointer;
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.loader-refresh[hidden] { display: none; }
.loader-refresh:hover, .loader-refresh:focus-visible { border-color: var(--accent); color: var(--accent); }
@keyframes loader-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.95); } }
@keyframes loader-shimmer { 0% { left: -40%; } 100% { left: 100%; } }

#gameFrame {
  width: 100%; height: 100%;
  border: 0;
  display: block;
  background: #000;
}

.rotate-hint {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(0,0,0,.85);
  color: var(--text);
  text-align: center;
  z-index: 10;
}
.rotate-hint[hidden] { display: none; }
.rotate-hint svg { color: var(--accent); margin: 0 auto 12px; animation: tilt 1.4s ease-in-out infinite alternate; }
.rotate-hint p { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
@keyframes tilt {
  from { transform: rotate(-10deg); }
  to   { transform: rotate(80deg); }
}

/* ---- Cookie consent banner --------------------------------------------- */
.consent-banner {
  position: fixed;
  left: 12px; right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 100;
  background: rgba(17, 17, 26, .96);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  animation: consent-rise .35s var(--ease);
}
.consent-banner.is-leaving {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.consent-inner {
  max-width: var(--wrap-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
}
.consent-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-dim);
}
.consent-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.consent-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.consent-btn {
  appearance: none;
  font: inherit;
  cursor: pointer;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease), transform .12s var(--ease);
}
.consent-btn:hover, .consent-btn:focus-visible {
  border-color: var(--accent);
  outline: none;
}
.consent-accept {
  background: var(--accent);
  color: #0a0a0f;
  border-color: var(--accent);
}
.consent-accept:hover, .consent-accept:focus-visible {
  background: var(--accent-2);
  border-color: var(--accent-2);
  transform: translateY(-1px);
}
@media (min-width: 720px) {
  .consent-inner {
    flex-direction: row;
    align-items: center;
    gap: 24px;
  }
  .consent-text { flex: 1; }
  .consent-actions { flex-shrink: 0; }
}
@keyframes consent-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Game overview: developer quote block ------------------------------- */
.overview-source {
  margin: 0 0 14px;
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.overview-source p {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}
.overview-source footer {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-mute);
  font-style: normal;
  letter-spacing: .02em;
}
.overview-context {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.55;
}
