:root {
  --bg: #0b0a12;
  --bg2: #14121f;
  --card: #1a1728;
  --line: #2a2640;
  --text: #f4f2ff;
  --muted: #a39fbd;
  --cyan: #19e3f5;
  --violet: #8b5cf6;
  --pink: #ff2e9a;
  --yellow: #ffd23f;
  --grad: linear-gradient(100deg, var(--cyan), var(--violet) 50%, var(--pink));
  --r: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 Onest, system-ui, -apple-system, Segoe UI, sans-serif;
  background-image: radial-gradient(900px 500px at 100% -10%, rgba(255, 46, 154, .14), transparent 60%),
    radial-gradient(800px 500px at -10% 0%, rgba(25, 227, 245, .12), transparent 60%);
  background-repeat: no-repeat;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.01em; }
button { font: inherit; color: inherit; }

/* header */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px max(16px, calc((100vw - 1240px) / 2)); background: rgba(11, 10, 18, .82);
  backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.brand span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand.small { font-size: 18px; }
.topnav { display: flex; gap: 22px; font-weight: 500; color: var(--muted); }
.topnav a:hover { color: var(--text); }

main { max-width: 1240px; margin: 0 auto; padding: 0 16px 56px; }

/* hero */
.hero { display: grid; grid-template-columns: 1fr 1.35fr; gap: 36px; align-items: center; padding: 40px 0 28px; }
.hero h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 800; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 18px; margin: 14px 0 0; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card { display: block; border-radius: var(--r); background: var(--card); overflow: hidden; border: 1px solid var(--line);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.card:hover, .card:focus-visible { transform: translateY(-4px); border-color: rgba(139, 92, 246, .7);
  box-shadow: 0 14px 40px rgba(139, 92, 246, .25); outline: none; }
.thumb { position: relative; aspect-ratio: 16 / 9; background: #000; }
.thumb img, .thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb video { opacity: 0; transition: opacity .25s; }
.card.playing .thumb video { opacity: 1; }
.badge { position: absolute; left: 10px; top: 10px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px;
  background: rgba(11, 10, 18, .78); border: 1px solid rgba(25, 227, 245, .55); color: var(--cyan); }
.meta { padding: 12px 14px 14px; }
.meta h3 { font-size: 17px; font-weight: 700; }
.meta p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.card.big { border-width: 2px; border-color: rgba(255, 46, 154, .45); }
.card.big .meta { padding: 16px 18px 18px; }
.card.big .meta h3 { font-size: 24px; }
.card.big .meta p { font-size: 16px; }

/* list */
.list { padding-top: 24px; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.list-head h2 { font-size: 26px; font-weight: 800; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { cursor: pointer; border: 1px solid var(--line); background: var(--bg2); padding: 6px 14px; border-radius: 99px;
  font-size: 14px; font-weight: 500; color: var(--muted); }
.chip:hover { color: var(--text); }
.chip.on { background: var(--grad); color: #fff; border-color: transparent; }
.card.hide { display: none; }

.about { max-width: 760px; padding-top: 48px; }
.about h1, .about h2 { font-size: 26px; font-weight: 800; margin-bottom: 10px; }
.about p { color: var(--muted); }
.about .grid { margin-top: 24px; }

/* game page */
.crumbs { padding: 18px 0 12px; color: var(--muted); font-size: 14px; }
.crumbs a:hover { color: var(--text); }
.crumbs span { margin: 0 6px; opacity: .5; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: #000;
  border: 1px solid var(--line); max-height: calc(100vh - 170px); width: 100%; }
.player .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.72); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; opacity: 0; transition: opacity .35s; }
.player iframe.ready { opacity: 1; }
.loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 12px;
  padding: 12px 22px; border-radius: 99px; background: rgba(11, 10, 18, .82); font-weight: 700; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--pink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 14px;
  cursor: pointer; border: 0; padding: 16px 30px 16px 22px; border-radius: 99px; background: var(--grad); color: #fff;
  font-size: 22px; font-weight: 800; box-shadow: 0 10px 40px rgba(255, 46, 154, .45); transition: transform .15s; }
.play:hover { transform: translate(-50%, -50%) scale(1.05); }
.tri { width: 0; height: 0; border-left: 18px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.close { display: none; position: absolute; right: 10px; top: 10px; z-index: 3; width: 40px; height: 40px; border-radius: 50%;
  border: 0; cursor: pointer; background: rgba(11, 10, 18, .8); font-size: 26px; line-height: 1; }
.player.full { position: fixed; inset: 0; z-index: 100; border-radius: 0; border: 0; max-height: none; aspect-ratio: auto; height: 100%; height: 100dvh; }
.player.full .close { display: block; }
body.lock { overflow: hidden; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 2px; flex-wrap: wrap; }
.bar h1 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; }
.tags { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.bar-btns { display: flex; gap: 10px; align-items: center; }
.btn { cursor: pointer; padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; }
.btn.ghost { background: var(--bg2); border: 1px solid var(--line); }
.btn.ghost:hover:not(:disabled) { border-color: var(--violet); }
.btn:disabled { opacity: .45; cursor: default; }
.note { color: var(--muted); font-size: 14px; }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; padding-top: 8px; }
.info { max-width: 760px; }
.info .lead { font-size: 19px; color: var(--text); font-weight: 500; }
.info p { color: #cfcbe6; }
.info h2 { font-size: 22px; font-weight: 800; margin: 32px 0 12px; }
.info ol { padding-left: 22px; color: #cfcbe6; }
.info li { margin: 6px 0; }
.keys { width: 100%; border-collapse: collapse; font-size: 15px; }
.keys th, .keys td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.keys th { width: 42%; font-weight: 700; color: var(--cyan); white-space: nowrap; }
.keys td { color: #cfcbe6; }
.faq details { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 0; }
.side h2 { font-size: 20px; font-weight: 800; margin: 28px 0 14px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; padding: 16px 18px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.side-grid { grid-template-columns: 1fr; }

/* footer */
.foot { border-top: 1px solid rgba(255, 255, 255, .06); margin-top: 24px; }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 28px 16px 40px; color: var(--muted); font-size: 14px; }
.foot-in p { margin: 10px 0 0; }
.foot-in a:hover { color: var(--text); }
.muted { opacity: .75; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 22px; padding-top: 26px; }
  .cols { grid-template-columns: 1fr; gap: 8px; }
  .side-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 560px) {
  .topnav { gap: 14px; font-size: 15px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .meta { padding: 9px 10px 11px; }
  .meta h3 { font-size: 15px; }
  .card.big .meta h3 { font-size: 20px; }
  .play { font-size: 18px; padding: 13px 24px 13px 18px; }
  .keys th { white-space: normal; }
  .grid .badge { font-size: 10px; padding: 1px 7px; left: 6px; top: 6px; }
}
