:root {
  --bg: #0a0e14;
  --bg-elev: #121a24;
  --panel: #151e2b;
  --line: #2a3a50;
  --line-soft: #1e2b3d;
  --text: #e9eef6;
  --muted: #8b9bb0;
  --accent: #e8a035;
  --accent-dim: rgba(232, 160, 53, 0.14);
  --accent-text: #1a1206;
  --ok: #3fb950;
  --cyan: #4ecdc4;
  --radius: 12px;
  --font: "Sora", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
}
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(232, 160, 53, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(78, 205, 196, 0.08), transparent 50%),
    linear-gradient(180deg, #0c121b 0%, var(--bg) 40%, #080b10 100%);
  background-attachment: fixed;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, kbd {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--accent-dim);
  color: #f3c57a;
  padding: 0.12em 0.4em;
  border-radius: 5px;
}
kbd { border: 1px solid var(--line); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 20px 20px 72px; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0 16px;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(10, 14, 20, 0.82);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { border-bottom-color: var(--line-soft); }
.logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: url("favicon.svg") center / cover no-repeat;
  flex-shrink: 0;
}
.brand {
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.nav {
  margin-left: auto;
  display: flex;
  gap: 6px 14px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}
.nav a:hover { color: var(--text); text-decoration: none; }
.products {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  margin-left: 4px;
}
.products a {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 8px;
  text-decoration: none;
}
.products a:hover { color: var(--text); text-decoration: none; }
.products a.is-on {
  color: var(--text);
  background: var(--accent-dim);
}
.lang {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}
.lang:hover { border-color: var(--accent); }

/* Hero */
.hero {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
h1 {
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  line-height: 1.18;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.lead {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
  max-width: 540px;
  margin: 0;
}
.cta { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.18s ease, filter 0.18s ease, background 0.18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { filter: brightness(1.06); color: var(--accent-text); }
.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(21, 30, 43, 0.6);
}
.btn-ghost:hover { border-color: var(--muted); color: var(--text); }
.hero-meta {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.88rem;
}
.hero-meta a { font-weight: 500; }

/* Terminal mock */
.window {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  animation: float-in 0.7s ease both;
}
@keyframes float-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.titlebar {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12px;
  font-family: var(--mono);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.term {
  padding: 16px 18px 20px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
  color: #c9d7e8;
  min-height: 240px;
}
.prompt { color: var(--ok); }
.dim { color: #6f7f96; }
.hl { color: var(--accent); }
.blink {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Sections */
section { scroll-margin-top: 72px; }
h2 {
  margin: 80px 0 12px;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}
.section-lead {
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 640px;
  font-size: 1rem;
}

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--line); transform: translateY(-2px); }
.card h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 0.92rem; }
.card .icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

/* Advantages */
.advantage {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
}
.advantage .num {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--mono);
  font-size: 0.95rem;
}
.compare {
  margin-top: 20px;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
}
.compare table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 640px;
}
.compare th, .compare td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}
.compare th {
  background: var(--bg-elev);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.compare tr:last-child td { border-bottom: none; }
.compare td:first-child { color: var(--text); font-weight: 500; }
.yes { color: var(--ok); }
.no { color: #6f7f96; }
.partial { color: var(--accent); }

/* Download */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.dl-card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dl-card h3 { margin: 0; font-size: 1.1rem; }
.dl-card p { margin: 0; color: var(--muted); font-size: 0.88rem; flex: 1; }
.dl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--bg-elev);
}
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.chip.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}
.chip.primary:hover { filter: brightness(1.06); color: var(--accent-text); }
.note-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: rgba(232, 160, 53, 0.06);
  color: var(--muted);
  font-size: 0.9rem;
}

/* Manual page */
.manual-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  margin-top: 28px;
  align-items: start;
}
.toc {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 88px);
  overflow: auto;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  font-size: 0.88rem;
}
.toc h2 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.toc ol { margin: 0; padding-left: 1.15rem; color: var(--muted); }
.toc li { margin: 0.35rem 0; }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--accent); }

.manual-body h2 {
  margin: 48px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 1.4rem;
}
.manual-body h2:first-child { margin-top: 0; }
.manual-body h3 {
  margin: 28px 0 10px;
  font-size: 1.08rem;
  color: #d5deeb;
}
.manual-body p, .manual-body li {
  color: var(--muted);
  font-size: 0.95rem;
}
.manual-body ul, .manual-body ol { padding-left: 1.25rem; }
.manual-body li { margin: 0.35rem 0; }
.manual-body strong { color: var(--text); font-weight: 600; }
.manual-body .callout {
  margin: 16px 0;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: var(--accent-dim);
  border-radius: 0 10px 10px 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.manual-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 14px 0 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.manual-body th, .manual-body td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.manual-body th {
  background: var(--bg-elev);
  color: var(--text);
  font-weight: 600;
}
.manual-body tr:last-child td { border-bottom: none; }
.manual-body td { color: var(--muted); }
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 12px 0 20px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 12px 12px 12px 52px;
  margin: 8px 0;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 12px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
}

.page-hero {
  margin-top: 36px;
  max-width: 720px;
}
.page-hero h1 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); }

footer {
  margin-top: 72px;
  color: #6f7f96;
  font-size: 0.85rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }

.hub-hero { grid-template-columns: 1fr; max-width: 720px; }
.hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 8px;
}
.hub-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px 28px;
}
.hub-card .cta { margin-top: 18px; }

[data-lang="zh"] .en,
[data-lang="en"] .zh { display: none; }

@media (max-width: 900px) {
  .hero, .manual-layout, .dl-grid, .grid, .grid-2, .hub-grid {
    grid-template-columns: 1fr;
  }
  .toc { position: static; max-height: none; }
  h1 { font-size: 2rem; }
  .site-header { position: static; }
}
