:root {
  --bg: #061014;
  --bg-2: #0c1a22;
  --ink: #e8f4ef;
  --muted: #9bb3ad;
  --line: rgba(125, 255, 195, 0.16);
  --mint: #7dffc3;
  --blue: #6aa8ff;
  --warn: #ffd27a;
  --card: rgba(10, 28, 36, 0.72);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(106, 168, 255, 0.16), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(125, 255, 195, 0.12), transparent 50%),
    var(--bg);
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 75%);
  z-index: 0;
}
a { color: var(--mint); text-decoration: none; }
a:hover { color: #c8ffe8; }
.wrap { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; position: relative; z-index: 1; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(6, 16, 20, 0.78);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; letter-spacing: 0.04em; line-height: 1.15; }
.brand img { width: 28px; height: 28px; }
.brand small { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mint); }
nav { display: flex; flex-wrap: wrap; gap: 14px; }
nav a { color: var(--muted); font-size: 14px; }
nav a[aria-current="page"], nav a:hover { color: var(--ink); }
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--mint), #b8ffe0);
  color: #062018; font-weight: 700; border-radius: 999px;
  padding: 10px 16px; box-shadow: 0 0 0 0 rgba(125,255,195,0.4);
  animation: pulse 3.2s ease-in-out infinite;
}
.cta:hover { color: #03140e; transform: translateY(-1px); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(125,255,195,0.35); }
  50% { box-shadow: 0 0 0 10px rgba(125,255,195,0); }
}
.hero { padding: 72px 0 36px; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 36px; align-items: center; }
.kicker { color: var(--blue); text-transform: uppercase; letter-spacing: 0.18em; font-size: 12px; }
h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.05; margin: 10px 0 16px; }
.lede { font-size: 18px; color: var(--muted); max-width: 62ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.ghost {
  display: inline-flex; align-items: center; border: 1px solid var(--line);
  color: var(--ink); padding: 10px 16px; border-radius: 999px;
}
.orbit {
  position: relative; height: 320px;
}
.orbit span {
  position: absolute; inset: 20px; border: 1px solid var(--line); border-radius: 50%;
  animation: spin 18s linear infinite;
}
.orbit span:nth-child(2) { inset: 55px; animation-duration: 12s; animation-direction: reverse; border-color: rgba(106,168,255,0.35); }
.orbit span:nth-child(3) { inset: 95px; animation-duration: 8s; }
.orbit b {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 88px; height: 88px; border-radius: 24px;
  background: linear-gradient(160deg, #123, #071018);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  box-shadow: var(--shadow);
  font-size: 12px; letter-spacing: 0.08em;
}
@keyframes spin { to { transform: rotate(360deg); } }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
  transform: translateY(16px); opacity: 0;
  animation: rise 0.7s ease forwards;
}
.card:nth-child(2) { animation-delay: 0.08s; }
.card:nth-child(3) { animation-delay: 0.16s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.chip-row, .keys { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.chip, .key {
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px;
  font-size: 12px; color: #d7fff0; background: rgba(125,255,195,0.06);
  cursor: pointer;
}
.section { padding: 28px 0 8px; }
h2 { font-size: 28px; margin: 0 0 12px; }
p, li { line-height: 1.7; color: #d5e7e0; }
.prose { max-width: 78ch; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); }
th { color: var(--mint); font-weight: 600; }
.note {
  border-left: 3px solid var(--warn); padding: 12px 16px; background: rgba(255,210,122,0.08);
  border-radius: 0 12px 12px 0; color: #f7e7c2;
}
blockquote {
  margin: 16px 0; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: 16px; background: var(--card); color: #d7fff0;
}
blockquote cite { display: block; color: var(--muted); margin-top: 8px; font-size: 13px; }
footer { margin-top: 48px; padding: 28px 0 48px; border-top: 1px solid var(--line); color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px; }
.crumbs { color: var(--muted); font-size: 13px; padding-top: 22px; }
.progress {
  position: fixed; left: 0; top: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--blue), var(--mint));
  z-index: 40;
}
.faq details {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin: 10px 0;
  background: var(--card);
}
summary { cursor: pointer; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 28px 0; }
.stat { padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(8,24,32,0.8); }
.stat strong { display: block; font-size: 28px; color: var(--mint); }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0);
}
.picker { margin: 18px 0 28px; }
#game-search {
  width: 100%; max-width: 520px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(8,24,32,0.9); color: var(--ink);
  font-size: 16px;
}
.engine-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.engine-pill {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 8px 12px; cursor: pointer; font: inherit;
}
.engine-pill.on, .engine-pill:hover { color: #062018; background: var(--mint); border-color: transparent; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.game-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--card);
  color: var(--ink); min-height: 132px;
  transform: translateY(8px); opacity: 0; animation: rise 0.5s ease forwards;
}
.game-card span { color: var(--muted); font-size: 13px; }
.game-card em { margin-top: auto; color: var(--mint); font-style: normal; font-size: 13px; }
.game-card:hover { border-color: var(--mint); }
.game-card.is-hidden { display: none; }
.head-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  border-radius: 999px; padding: 8px 12px; cursor: pointer; font: inherit;
}
.nav-toggle { display: none; }
kbd {
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px;
  font-size: 12px; color: var(--mint);
}
.tool-card {
  margin: 18px 0; padding: 22px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--card);
}
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { margin: 8px 0; }
.check-list label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.search-modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(4, 10, 14, 0.72); display: grid; place-items: start center;
  padding: 12vh 16px 16px;
}
.search-modal[hidden] { display: none; }
.search-box {
  width: min(640px, 100%); background: #0c1a22; border: 1px solid var(--line);
  border-radius: 18px; padding: 14px; box-shadow: var(--shadow);
}
.search-box input {
  width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--line);
  background: #071018; color: var(--ink); font-size: 16px;
}
.search-hit {
  display: block; padding: 10px 8px; color: var(--ink); border-bottom: 1px solid var(--line);
}
.search-hit small { display: block; color: var(--muted); }
.search-hint { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.choice {
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  border-radius: 12px; padding: 10px 14px; cursor: pointer; font: inherit; text-align: left;
}
.choice:hover { border-color: var(--mint); }
.gate-body { background: #05080a; }
.gate-body .topbar, .gate-body footer, .gate-body .progress, .gate-body .search-modal { display: none !important; }
.gate { min-height: 86vh; display: grid; place-items: center; padding: 32px 0 48px; }
.gate-card {
  width: min(420px, 100%); padding: 36px 28px 28px;
  border: 1px solid var(--line); border-radius: 8px; background: #080d10;
  text-align: center;
}
.gate-wide { width: min(860px, 100%); text-align: left; }
.gate-mark { letter-spacing: 0.42em; font-size: 22px; margin: 0 0 12px; }
.gate-mark span { color: var(--mint); }
.gate-sub { color: var(--muted); margin: 0 0 28px; }
.field-label {
  display: block; text-align: left; font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.field-label span { letter-spacing: 0; text-transform: none; }
.gate-card input {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid #2a3d38;
  color: var(--ink); font-size: 18px; padding: 8px 0 10px; margin-bottom: 18px;
  outline: none;
}
.gate-btn { width: 100%; border: 0; cursor: pointer; margin: 8px 0 18px; }
.gate-foot { color: var(--muted); font-size: 13px; }
.gate-err { color: #ffb4b4; font-size: 13px; }
.key-show {
  font-family: Consolas, monospace; font-size: 20px; letter-spacing: 0.08em;
  border: 1px dashed var(--line); padding: 12px; border-radius: 12px;
}
@media (max-width: 900px) {
  .hero, .grid, .stats, .foot-grid { grid-template-columns: 1fr; }
  .orbit { height: 220px; }
  .nav-toggle { display: inline-flex; }
  .topbar-inner { position: relative; flex-wrap: wrap; }
  nav {
    display: none; width: 100%; flex-direction: column; padding: 8px 0 12px;
  }
  nav.open { display: flex; }
}
