:root {
  --bg: #0b0d12;
  --bg-soft: #10131a;
  --surface: #151924;
  --surface-2: #1b2030;
  --border: #262d3d;
  --border-soft: #1e2433;
  --text: #e8ebf2;
  --muted: #9aa4b8;
  --muted-2: #6f7a90;
  --accent: #7c5cff;
  --accent-soft: #2a2350;
  --cyan: #22d3ee;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 13, 18, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 20px;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.brand .mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #0b0d12;
}
.brand .name { font-size: 16px; }
.nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  padding: 7px 12px; border-radius: 8px;
  font-size: 13.5px; color: var(--muted);
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface); color: var(--text); }

/* ---------- hero ---------- */
.hero { padding: 54px 0 30px; border-bottom: 1px solid var(--border-soft); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--cyan); background: rgba(34, 211, 238, .09);
  border: 1px solid rgba(34, 211, 238, .22);
  padding: 5px 11px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 46px); line-height: 1.1; letter-spacing: -0.025em;
  margin: 0 0 14px; font-weight: 800; max-width: 18ch;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lede { font-size: 17px; color: var(--muted); max-width: 62ch; margin: 0 0 22px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 26px; }
.stat b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.stat span { font-size: 12.5px; color: var(--muted-2); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 600; border: 1px solid transparent;
  transition: transform .12s, background .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #6b4ae8; transform: translateY(-1px); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--muted-2); transform: translateY(-1px); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- notice ---------- */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(251, 191, 36, .07);
  border: 1px solid rgba(251, 191, 36, .25);
  border-radius: var(--radius-sm);
  padding: 13px 16px; margin: 26px 0 0; font-size: 13.5px; color: #f3d99b;
}
.notice svg { flex: 0 0 auto; margin-top: 2px; }

/* ---------- toolbar ---------- */
.toolbar { padding: 30px 0 6px; }
.search-box { position: relative; margin-bottom: 16px; }
.search-box input {
  width: 100%; padding: 13px 16px 13px 42px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 11px; color: var(--text); font-size: 14.5px; font-family: var(--font);
}
.search-box input:focus { outline: none; border-color: var(--accent); background: var(--surface-2); }
.search-box svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; align-items: center; }
.filters .label { font-size: 12px; color: var(--muted-2); margin-right: 2px; text-transform: uppercase; letter-spacing: .05em; }
.chip {
  padding: 6px 13px; border-radius: 999px; font-size: 13px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  transition: all .15s;
}
.chip:hover { color: var(--text); border-color: var(--muted-2); }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: #cbc0ff; }
.result-count { font-size: 13px; color: var(--muted-2); margin: 14px 0 4px; }

/* ---------- grid ---------- */
.grid {
  display: grid; gap: 18px; padding: 18px 0 10px;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .18s, transform .18s, background .18s;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); background: var(--surface-2); }
.thumb { display: block; position: relative; aspect-ratio: 16 / 9; background: #0e1118; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.card:hover .thumb img { transform: scale(1.03); }
.thumb .pin {
  position: absolute; top: 10px; left: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(11, 13, 18, .78); border: 1px solid rgba(124, 92, 255, .5);
  color: #cbc0ff; backdrop-filter: blur(6px);
}
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card h3 { margin: 0; font-size: 16.5px; font-weight: 650; letter-spacing: -0.01em; }
.card p { margin: 0; font-size: 13.5px; color: var(--muted); flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.card-foot .go { font-size: 13px; font-weight: 600; color: var(--cyan); }

/* ---------- figure / screenshot ---------- */
.shot { margin: 26px 0 0; padding: 0; }
.shot img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #0e1118; aspect-ratio: 16 / 9; object-fit: cover;
}
.shot figcaption { font-size: 12.5px; color: var(--muted-2); margin-top: 10px; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid transparent; white-space: nowrap;
}
.badge.cat { background: var(--surface-2); border-color: var(--border); color: var(--muted); }
.badge.dev { background: transparent; border-color: var(--border); color: var(--muted-2); }
.badge.req-ready { background: rgba(52, 211, 153, .12); border-color: rgba(52, 211, 153, .35); color: var(--green); }
.badge.req-files { background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .35); color: var(--amber); }
.badge.req-setup { background: rgba(124, 92, 255, .12); border-color: rgba(124, 92, 255, .35); color: #b3a4ff; }
.badge.req-archive { background: rgba(154, 164, 184, .1); border-color: rgba(154, 164, 184, .3); color: var(--muted); }
.badge.req-unavailable { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .35); color: var(--red); }

/* ---------- sections ---------- */
section { padding: 46px 0; }
section + section { border-top: 1px solid var(--border-soft); }
h2.sec { font-size: 25px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 10px; }
p.sec-lede { color: var(--muted); max-width: 70ch; margin: 0 0 22px; }

.entry-types { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.etype { background: var(--bg-soft); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 16px; }
.etype h4 { margin: 0 0 6px; font-size: 14.5px; font-weight: 650; }
.etype p { margin: 0; font-size: 13px; color: var(--muted); }

.link-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.link-card {
  display: block; background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 18px; transition: border-color .18s, transform .18s;
}
.link-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.link-card .k { font-size: 12px; color: var(--cyan); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.link-card h4 { margin: 7px 0 6px; font-size: 16px; }
.link-card p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* ---------- article (guide / game page) ---------- */
.crumbs { font-size: 13px; color: var(--muted-2); padding: 20px 0 0; }
.crumbs a:hover { color: var(--cyan); }
.crumbs span { margin: 0 7px; opacity: .5; }

.article-head { padding: 22px 0 26px; border-bottom: 1px solid var(--border-soft); }
.article-head h1 { font-size: clamp(27px, 4.2vw, 38px); line-height: 1.15; letter-spacing: -0.025em; margin: 12px 0 12px; font-weight: 800; }
.article-head .lede { font-size: 16.5px; color: var(--muted); max-width: 68ch; margin: 0; }
.meta-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.article-body { padding: 34px 0 10px; max-width: 760px; }
.article-body h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.015em; margin: 34px 0 12px; }
.article-body h3 { font-size: 16.5px; font-weight: 650; margin: 26px 0 8px; }
.article-body p { margin: 0 0 14px; }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 22px; }
.article-body li { margin-bottom: 8px; color: #d3d9e6; }
.article-body li::marker { color: var(--accent); }
.article-body strong { color: #fff; font-weight: 650; }
.article-body a.inline { color: var(--cyan); border-bottom: 1px solid rgba(34, 211, 238, .35); }
.article-body a.inline:hover { border-bottom-color: var(--cyan); }

.callout {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 16px 18px; margin: 22px 0; font-size: 14px; color: #cfd6e4;
}
.callout.warn { border-left-color: var(--amber); }
.callout.cta { border-left-color: var(--cyan); background: rgba(34, 211, 238, .05); }
.callout h4 { margin: 0 0 7px; font-size: 14.5px; color: #fff; }

/* ---------- table ---------- */
.table-scroll { overflow-x: auto; margin: 18px 0 22px; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; min-width: 520px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border-soft); }
th { background: var(--bg-soft); color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--bg-soft); }

/* ---------- faq ---------- */
.faq { margin: 18px 0 6px; border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.faq details { border-bottom: 1px solid var(--border-soft); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  cursor: pointer; list-style: none; padding: 15px 18px;
  font-size: 15px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 19px; font-weight: 500; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { background: var(--surface); }
.faq details p { margin: 0; padding: 0 18px 17px; font-size: 14px; color: var(--muted); max-width: 78ch; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 0 50px; margin-top: 20px;
  color: var(--muted-2); font-size: 13px;
}
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1.6fr 1fr 1fr; margin-bottom: 28px; }
.site-footer h5 { color: var(--text); font-size: 13px; margin: 0 0 10px; font-weight: 650; }
.site-footer a { display: block; padding: 3px 0; color: var(--muted); }
.site-footer a:hover { color: var(--cyan); }
.footer-bottom { border-top: 1px solid var(--border-soft); padding-top: 18px; line-height: 1.7; }
.disclaimer { font-size: 12.5px; color: var(--muted-2); max-width: 90ch; }

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .nav { display: none; }
  .hero { padding: 38px 0 24px; }
  section { padding: 36px 0; }
}
