*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #0f0f0f;
  color: #e8e8e8;
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Navbar ──────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: #111;
  border-bottom: 1px solid #222;
  padding: 0 2rem;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  font-weight: 700; font-size: 1rem;
  color: #e8e8e8; text-decoration: none;
  display: flex; align-items: center; gap: .5rem;
}
.nav-brand .ver {
  font-size: .7rem; font-weight: 600;
  background: #1e3a5f; color: #4f9cf9;
  padding: 1px 7px; border-radius: 4px;
}
.btn-nav-dl {
  background: #4f9cf9; color: #0f0f0f;
  padding: .4rem 1rem; border-radius: 6px;
  text-decoration: none; font-weight: 700; font-size: .85rem;
  transition: background .2s;
}
.btn-nav-dl:hover { background: #3b8de0; }

/* ── Hero ────────────────────────────────────────── */
.hero {
  padding: 5rem 2rem 4rem;
  text-align: center;
  border-bottom: 1px solid #1a1a1a;
}
.hero h1 {
  font-size: 3rem; font-weight: 800; letter-spacing: -.04em;
  margin-bottom: .4rem;
}
.hero h1 span { color: #4f9cf9; }
.hero .sub {
  color: #999; font-size: 1.05rem; max-width: 500px;
  margin: 0 auto 1.8rem;
}
.hero .sub code {
  background: #1a1a1a; color: #4f9cf9;
  padding: 1px 5px; border-radius: 4px; font-size: .95em;
}
.badges {
  display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap;
  margin-bottom: 2rem;
}
.badge {
  font-size: .78rem; background: #1a1a1a; color: #aaa;
  border: 1px solid #2a2a2a; padding: .25rem .75rem; border-radius: 20px;
}
.btn-dl {
  display: inline-flex; align-items: center; gap: .6rem;
  background: #4f9cf9; color: #0f0f0f;
  padding: .85rem 2rem; border-radius: 8px;
  text-decoration: none; font-weight: 700; font-size: 1rem;
  transition: background .2s, transform .15s;
}
.btn-dl:hover { background: #3b8de0; transform: translateY(-2px); }
.dl-note { color: #555; font-size: .82rem; margin-top: .65rem; }

.run-box {
  display: inline-block;
  background: #1a1a1a; border: 1px solid #2a2a2a;
  border-radius: 8px; padding: .9rem 1.4rem;
  font-family: 'Cascadia Code', 'Fira Code', monospace; font-size: .84rem;
  text-align: left; margin-top: 2rem; color: #ccc;
}
.run-box .cmt { color: #555; }
.run-box .cmd { color: #6ee7b7; }

/* ── Main ────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 3rem 1.5rem; }

/* ── Section heading ─────────────────────────────── */
.section-h {
  font-size: 1.2rem; font-weight: 700; color: #e8e8e8;
  margin-bottom: 1.2rem; padding-bottom: .5rem;
  border-bottom: 1px solid #222;
}

/* ── Features ────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem; margin-bottom: 3rem;
}
.feat-card {
  background: #1a1a1a; border: 1px solid #2a2a2a;
  border-radius: 10px; padding: 1.1rem;
  transition: border-color .2s;
}
.feat-card:hover { border-color: #4f9cf9; }
.feat-icon { font-size: 1.4rem; display: block; margin-bottom: .4rem; }
.feat-card strong { display: block; font-size: .9rem; margin-bottom: .2rem; color: #e8e8e8; }
.feat-card p { font-size: .82rem; color: #777; }

/* ── Shortcuts ───────────────────────────────────── */
.shortcuts-wrap {
  background: #1a1a1a; border: 1px solid #2a2a2a;
  border-radius: 10px; padding: 1.25rem 1.4rem;
  margin-bottom: 3rem; overflow-x: auto;
}
.shortcuts-wrap table { border-collapse: collapse; width: 100%; }
.shortcuts-wrap tr { border-bottom: 1px solid #222; }
.shortcuts-wrap tr:last-child { border-bottom: none; }
.shortcuts-wrap td { padding: .45rem .75rem; font-size: .88rem; color: #ccc; }
.shortcuts-wrap td:first-child {
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  color: #4f9cf9; font-weight: 600; white-space: nowrap;
  background: #111; border-radius: 4px;
}

/* ── Project structure ───────────────────────────── */
.struct-box {
  background: #1a1a1a; border: 1px solid #2a2a2a;
  border-radius: 10px; padding: 1.25rem 1.5rem;
  font-family: 'Cascadia Code', 'Fira Code', monospace; font-size: .83rem;
  line-height: 1.9; margin-bottom: 3rem; overflow-x: auto;
  color: #aaa;
}
.struct-box .hl  { color: #4f9cf9; font-weight: 700; }
.struct-box .dim { color: #555; }

/* ── Source code tabs ────────────────────────────── */
.source-section { margin-bottom: 3rem; }
.tab-nav {
  display: flex; flex-wrap: wrap; gap: 0;
  border-bottom: 1px solid #2a2a2a;
}
.tab-btn {
  background: none; border: none; cursor: pointer;
  padding: .55rem .85rem; font-family: inherit; font-size: .82rem;
  color: #666; display: flex; flex-direction: column;
  align-items: flex-start; gap: .05rem;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.tab-btn:hover { color: #ccc; }
.tab-btn.active { color: #4f9cf9; border-bottom-color: #4f9cf9; }
.tab-label { font-weight: 600; }
.tab-fname { font-family: 'Cascadia Code', monospace; font-size: .72rem; opacity: .7; }
.tab-panel {
  display: none; background: #0d1117;
  border-radius: 0 0 10px 10px; border: 1px solid #2a2a2a; border-top: none;
  overflow: auto; max-height: 70vh;
}
.tab-panel.active { display: block; }
.tab-panel pre { margin: 0; }
.tab-panel code {
  font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace !important;
  font-size: .8rem !important; line-height: 1.65 !important;
}

/* ── Footer ──────────────────────────────────────── */
footer {
  text-align: center; padding: 2rem;
  color: #444; font-size: .83rem;
  border-top: 1px solid #1a1a1a;
}
footer a { color: #4f9cf9; text-decoration: none; }
footer a:hover { text-decoration: underline; }
