:root {
  --paper: #121418; --sheet: #1a1d22; --sheet2: #22262d; --ink: #eef0f3; --muted: #9aa2ae; --line: #2a2f37;
  --key: #f0aa42; --key-ink: #241603;
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font: 500 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }

/* header */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 10px 24px;
  background: rgba(18,20,24,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 20px var(--display); white-space: nowrap; }
.brand b { color: var(--key); font-weight: 800; }
.mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--key); color: var(--key-ink); font: 800 20px var(--display); }
.search { margin-left: auto; width: min(340px, 45vw); }
.search input { width: 100%; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--sheet); color: var(--ink); font: inherit; outline: none; }
.search input:focus { border-color: var(--key); }

main { max-width: 1280px; margin: 0 auto; padding: 24px; }

/* home */
.hero { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 16/6.2; background: var(--sheet); }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,11,14,.88) 0%, rgba(10,11,14,.55) 38%, rgba(10,11,14,0) 70%); }
.hero-text { position: absolute; z-index: 1; left: 0; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 44px; max-width: 520px; }
.kicker { color: var(--key); font: 600 13px var(--body); letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { font-size: clamp(32px, 5vw, 60px); margin: 6px 0 8px; }
.hero p { margin: 0 0 20px; color: #d6dae0; font-size: 17px; }
.btn { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 12px 26px; border-radius: 999px; background: var(--key); color: var(--key-ink);
  font: 700 16px var(--body); text-decoration: none; border: 0; cursor: pointer; transition: transform .15s, filter .15s; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

.shelf { margin-top: 32px; }
.shelf-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.shelf-head h2 { margin: 0; font-size: 24px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--sheet); color: var(--muted); font: 600 13px var(--body); cursor: pointer; }
.chip:hover { color: var(--ink); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.empty { color: var(--muted); }

/* game card */
.card { display: block; text-decoration: none; border-radius: 14px; }
.thumb { position: relative; display: block; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: var(--sheet); transition: transform .18s, box-shadow .18s; }
.thumb img, .thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb video { opacity: 0; transition: opacity .25s; }
.card:hover .thumb, .card:focus-visible .thumb { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.45), 0 0 0 2px var(--key); }
.card.playing video { opacity: 1; }
.badge { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 6px; background: var(--key); color: var(--key-ink); font: 700 11px var(--body); letter-spacing: .06em; }
.meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 8px 2px 0; }
.meta b { font: 600 15px var(--body); }
.meta small { color: var(--muted); font-size: 13px; }
.card[hidden] { display: none; }

/* game page */
.play { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.player-wrap { border-radius: 16px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.player { position: relative; aspect-ratio: 16/9; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.start { position: absolute; inset: 0; padding: 0; border: 0; cursor: pointer; background: #000; color: var(--ink); }
.start img { width: 100%; height: 100%; object-fit: cover; filter: blur(3px) brightness(.55); transform: scale(1.04); }
.start-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.start-inner b { font: 800 clamp(26px, 4vw, 44px) var(--display); text-shadow: 0 4px 20px rgba(0,0,0,.6); }
.start-inner .btn { align-self: center; font-size: 18px; padding: 13px 34px; }
.start:hover .btn { filter: brightness(1.08); transform: scale(1.04); }
.bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--sheet); }
.bar-title { display: flex; align-items: center; gap: 10px; }
.bar-title img { border-radius: 6px; }
.icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--sheet2); color: var(--ink); cursor: pointer; }
.icon:hover { border-color: var(--key); color: var(--key); }
.player-wrap:fullscreen { border-radius: 0; border: 0; display: flex; flex-direction: column; }
.player-wrap:fullscreen .player { flex: 1; aspect-ratio: auto; }
.side h2, .about h2 { font-size: 18px; margin: 0 0 12px; }
.side-list { display: grid; gap: 14px; }
.about { grid-column: 1; max-width: 760px; }
.about h1 { font-size: 34px; margin: 4px 0 10px; }
.about h2 { margin-top: 24px; }
.about p, .about li { color: #cfd4db; }
.about ul { padding-left: 20px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tag { padding: 3px 10px; border-radius: 999px; background: var(--sheet2); color: var(--muted); font-size: 12.5px; font-weight: 600; }
.tag:first-child { background: var(--key); color: var(--key-ink); }

.text { max-width: 720px; }
.text h1 { font-size: 36px; }
.text p { color: #cfd4db; }
.text a { color: var(--key); }

.foot { max-width: 1280px; margin: 40px auto 0; padding: 22px 24px 30px; border-top: 1px solid var(--line); display: flex; gap: 22px; color: var(--muted); font-size: 13.5px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .play { grid-template-columns: 1fr; }
  .side-list { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .about { grid-column: auto; order: 2; }
  .side { order: 3; }
  .hero { aspect-ratio: 16/9; }
  .hero::after { background: linear-gradient(0deg, rgba(10,11,14,.92) 0%, rgba(10,11,14,.5) 50%, rgba(10,11,14,.1) 100%); }
  .hero-text { justify-content: flex-end; padding: 0 20px 22px; }
  .hero p { font-size: 15px; margin-bottom: 14px; }
}
@media (max-width: 560px) {
  .top { padding: 10px 16px; gap: 10px; }
  .brand span:last-child { display: none; }
  .search { width: auto; flex: 1; }
  main { padding: 16px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .meta small { display: none; }
  .hero h1 { font-size: 30px; }
  .hero p { display: none; }
  .foot { padding: 20px 16px 26px; flex-wrap: wrap; }
}

/* phones: the game takes the whole screen once it starts */
.player-wrap.full { position: fixed; inset: 0; z-index: 100; border-radius: 0; border: 0; display: flex; flex-direction: column; }
.player-wrap.full .player { flex: 1; aspect-ratio: auto; }
.player-wrap.full .bar { padding: 6px 12px; }
.close { display: none; }
.player-wrap.full .close { display: grid; }
.bar-btns { display: flex; gap: 8px; }
