:root {
  --bg: #060911;
  --bg-alt: #0a0f1d;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e9eefb;
  --muted: #97a3bb;
  --muted-2: #6f7d95;
  --brand: #4f7cff;
  --brand-2: #21d4c2;
  --brand-3: #a855f7;
  --radius: 16px;
  --wrap: 1200px;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, "Courier New", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code { font-family: var(--mono); font-size: 0.9em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 860px; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(6, 9, 17, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(6, 9, 17, 0.92); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.03em; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  color: #fff; font-size: 17px; box-shadow: 0 6px 20px rgba(79, 124, 255, .38);
}
.logo-text { background: linear-gradient(92deg, #fff, #b9c8e8); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-links { display: flex; gap: 26px; margin-right: auto; font-size: 14.5px; color: var(--muted); }
.nav-links a { position: relative; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.nav-actions { display: flex; align-items: center; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 9px 18px; border-radius: 10px; font-size: 14.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s, border-color .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), #6d5cff); color: #fff; box-shadow: 0 10px 26px rgba(79, 124, 255, .32); }
.btn-primary:hover { box-shadow: 0 14px 34px rgba(79, 124, 255, .45); }
.btn-outline { border-color: var(--border-strong); color: var(--text); background: rgba(255, 255, 255, .03); }
.btn-outline:hover { border-color: var(--brand); background: rgba(79, 124, 255, .1); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: #fff; }
.btn-lg { padding: 13px 26px; font-size: 15.5px; border-radius: 12px; }

.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 78px 0 40px; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -20% -10% auto -10%; height: 720px; pointer-events: none;
  background:
    radial-gradient(48% 44% at 22% 12%, rgba(79, 124, 255, .30), transparent 70%),
    radial-gradient(42% 40% at 78% 8%, rgba(33, 212, 194, .18), transparent 70%),
    radial-gradient(38% 36% at 60% 46%, rgba(168, 85, 247, .16), transparent 72%);
  filter: blur(6px);
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 60% at 50% 20%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 20%, #000 40%, transparent 100%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }

.pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .04);
  font-size: 13px; color: var(--muted);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 4px rgba(33, 212, 194, .18); }

.hero h1 { margin: 22px 0 18px; font-size: clamp(34px, 4.4vw, 54px); font-weight: 800; }
.grad {
  background: linear-gradient(96deg, #6f9bff 0%, #21d4c2 46%, #b478ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 17.5px; color: var(--muted); max-width: 620px; }
.lead strong { color: #dbe4f8; font-weight: 600; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 34px; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 34px; padding-top: 26px; border-top: 1px solid var(--border); }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats b { font-size: 27px; font-weight: 800; letter-spacing: -0.03em; }
.hero-stats span { font-size: 13px; color: var(--muted-2); }

/* 终端卡片 */
.term {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, rgba(15, 21, 38, .96), rgba(9, 13, 25, .96));
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .02) inset;
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, .03); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #33405c; }
.term-bar i:nth-child(1) { background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; font-size: 12.5px; color: var(--muted-2); font-family: var(--mono); }
.term-body { margin: 0; padding: 20px 20px 22px; overflow-x: auto; font-size: 13px; line-height: 1.85; }
.hero-card-tip { margin-top: 14px; font-size: 13.5px; color: var(--muted-2); }
.hero-card-tip code { color: var(--brand-2); }

/* 代码配色 */
.c-key { color: #7fb0ff; }
.c-str { color: #7ee0b8; }
.c-com { color: #5c6b85; font-style: italic; }
.c-num { color: #ffb86c; }
.c-kw { color: #c792ea; }
.c-type { color: #ffd479; }
.c-fn { color: #82aaff; }

/* 技术栈条 */
.stack { position: relative; margin-top: 56px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.stack-label { font-size: 12.5px; color: var(--muted-2); letter-spacing: .12em; text-transform: uppercase; }
.stack-list { display: flex; flex-wrap: wrap; gap: 9px; }
.stack-list span {
  padding: 5px 12px; border-radius: 999px; font-size: 12.5px; color: var(--muted);
  border: 1px solid var(--border); background: rgba(255, 255, 255, .03);
  transition: color .2s, border-color .2s;
}
.stack-list span:hover { color: #fff; border-color: var(--border-strong); }

/* ---------- 区块通用 ---------- */
.sec { padding: 96px 0; position: relative; }
.sec-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sec-head { max-width: 760px; margin-bottom: 48px; }
.eyebrow {
  display: inline-block; margin-bottom: 14px; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand-2);
}
.sec-head h2 { font-size: clamp(26px, 3vw, 38px); }
.sec-head p { margin-top: 14px; color: var(--muted); font-size: 16.5px; }

/* ---------- 卡片 ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  padding: 28px; border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  transition: transform .22s, border-color .22s, box-shadow .22s;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: 0 22px 46px rgba(0, 0, 0, .38); }
.card h3 { font-size: 18.5px; margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 15px; }
.card code { color: var(--brand-2); background: rgba(33, 212, 194, .08); padding: 1px 6px; border-radius: 5px; }
.card-icon { font-size: 26px; margin-bottom: 14px; }

.ticks { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.ticks li {
  font-size: 12.5px; color: var(--muted); padding: 4px 10px; border-radius: 7px;
  background: rgba(79, 124, 255, .1); border: 1px solid rgba(79, 124, 255, .2);
  font-family: var(--mono);
}

/* ---------- 架构 ---------- */
.arch { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.arch-stack { display: flex; flex-direction: column; gap: 10px; }
.layer {
  display: grid; grid-template-columns: 44px 90px 1fr; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: 12px; border: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(79, 124, 255, .12), rgba(255, 255, 255, .015));
  transition: border-color .2s, transform .2s;
}
.layer:hover { border-color: rgba(79, 124, 255, .5); transform: translateX(4px); }
.lv { font-family: var(--mono); font-weight: 700; color: var(--brand); font-size: 14px; }
.layer b { font-size: 15.5px; }
.lv-desc { font-size: 13.5px; color: var(--muted); }
.lv-desc code { color: var(--brand-2); }

.flow { padding: 26px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); }
.flow h3 { font-size: 16px; margin-bottom: 14px; }
.code {
  margin: 0; padding: 18px; border-radius: 12px; overflow-x: auto;
  background: rgba(3, 6, 14, .8); border: 1px solid var(--border);
  font-family: var(--mono); font-size: 13px; line-height: 1.9; color: #c8d4ee;
}
.flow-notes { margin-top: 18px; display: grid; gap: 10px; }
.flow-notes div { font-size: 13.5px; color: var(--muted); }
.flow-notes b { color: var(--brand-2); margin-right: 8px; font-family: var(--mono); }
.flow-notes code { color: #c8d4ee; }

/* ---------- 表格 ---------- */
.table-wrap {
  border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden;
  background: var(--panel);
}
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th {
  text-align: left; padding: 14px 20px; font-size: 13px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted-2); background: rgba(255, 255, 255, .03); border-bottom: 1px solid var(--border);
}
.tbl td { padding: 14px 20px; border-bottom: 1px solid rgba(255, 255, 255, .05); color: var(--muted); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .18s; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, .03); }
.tbl td:first-child { color: var(--text); font-family: var(--mono); font-size: 13.5px; white-space: nowrap; }
.tbl td code { color: var(--brand-2); }
.tbl-note { padding: 14px 20px; font-size: 13.5px; color: var(--muted-2); border-top: 1px solid var(--border); background: rgba(255, 255, 255, .02); }

.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag-core { background: rgba(33, 212, 194, .12); color: #5fe3cb; border: 1px solid rgba(33, 212, 194, .28); }
.tag-paid { background: rgba(255, 176, 92, .12); color: #ffc178; border: 1px solid rgba(255, 176, 92, .28); }
.tag-a { background: rgba(79, 124, 255, .14); color: #8fb0ff; }
.tag-b { background: rgba(168, 85, 247, .14); color: #c89bff; }
.tag-c { background: rgba(33, 212, 194, .14); color: #5fe3cb; }

/* ---------- 代码 tab ---------- */
.code-block { margin-top: 26px; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; background: rgba(3, 6, 14, .72); }
.code-tabs { display: flex; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, .02); }
.code-tabs button {
  padding: 7px 15px; border-radius: 8px; border: 0; cursor: pointer; font-size: 13.5px;
  background: transparent; color: var(--muted); font-family: var(--sans); transition: .2s;
}
.code-tabs button:hover { color: #fff; }
.code-tabs button.active { background: rgba(79, 124, 255, .18); color: #a9c4ff; }
.code-pane { display: none; padding: 20px; }
.code-pane.active { display: block; }
.code-pane .code { border: 0; background: transparent; padding: 0; font-size: 13.5px; line-height: 2; }

/* ---------- 步骤 ---------- */
.steps { display: grid; gap: 18px; counter-reset: s; }
.steps li {
  position: relative; padding: 22px 24px 22px 76px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--panel);
}
.step-n {
  position: absolute; left: 24px; top: 22px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
}
.steps h3 { font-size: 16.5px; margin-bottom: 10px; }
.step-desc { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.cmd {
  display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 11px 14px;
  border-radius: 10px; background: rgba(3, 6, 14, .8); border: 1px solid var(--border);
}
.cmd code { flex: 1; overflow-x: auto; white-space: nowrap; font-size: 13px; color: #d6e2fb; }
.copy {
  flex: none; padding: 5px 12px; border-radius: 7px; font-size: 12.5px; cursor: pointer;
  border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .04); color: var(--muted);
  transition: .2s;
}
.copy:hover { color: #fff; border-color: var(--brand); }
.copy.done { color: var(--brand-2); border-color: var(--brand-2); }

.note {
  margin-top: 24px; padding: 16px 20px; border-radius: 12px; font-size: 14px; color: var(--muted);
  border: 1px solid rgba(255, 176, 92, .25); background: rgba(255, 176, 92, .07);
}
.note b { color: #ffc178; }
.note code { color: #ffd9a8; }

/* ---------- 路线图 ---------- */
.road { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.road-item {
  position: relative; padding: 20px 22px 20px 44px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--panel);
}
.road-dot {
  position: absolute; left: 20px; top: 26px; width: 10px; height: 10px; border-radius: 50%;
  background: #33405c; box-shadow: 0 0 0 4px rgba(255, 255, 255, .04);
}
.road-item.done .road-dot { background: var(--brand-2); box-shadow: 0 0 0 4px rgba(33, 212, 194, .16); }
.road-item.now .road-dot { background: var(--brand); box-shadow: 0 0 0 4px rgba(79, 124, 255, .2); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.road-item b { font-size: 15px; display: block; margin-bottom: 6px; }
.road-item p { font-size: 13.5px; color: var(--muted); }
.road-item.now { border-color: rgba(79, 124, 255, .38); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
details {
  padding: 18px 22px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--panel); transition: border-color .2s;
}
details[open] { border-color: rgba(79, 124, 255, .35); }
summary { cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1.2; }
details[open] summary::after { content: "−"; }
details p { margin-top: 12px; font-size: 14.5px; color: var(--muted); }
details code { color: var(--brand-2); }

/* ---------- CTA / Footer ---------- */
.cta { padding: 90px 0; text-align: center; position: relative; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(46% 70% at 50% 0%, rgba(79, 124, 255, .18), transparent 70%);
}
.cta-inner { position: relative; }
.cta h2 { font-size: clamp(26px, 3.2vw, 40px); }
.cta p { margin: 16px auto 0; max-width: 620px; color: var(--muted); }
.cta code { color: var(--brand-2); }
.cta .hero-cta { justify-content: center; }

.foot { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 56px 0 28px; }
.foot-inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 40px; }
.foot-brand p { margin-top: 12px; font-size: 14px; color: var(--muted-2); }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.foot-cols h4 { font-size: 14px; margin-bottom: 12px; }
.foot-cols a { display: block; font-size: 14px; color: var(--muted); padding: 4px 0; transition: color .2s; }
.foot-cols a:hover { color: #fff; }
.foot-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted-2);
}

.to-top {
  position: fixed; right: 24px; bottom: 28px; z-index: 50; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: rgba(12, 18, 34, .9); color: var(--text);
  cursor: pointer; font-size: 18px; opacity: 0; pointer-events: none; transition: .25s;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 动效 ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .arch { grid-template-columns: 1fr; }
  .grid-3, .road { grid-template-columns: repeat(2, 1fr); }
  .foot-inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(8, 12, 22, .98); border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); font-size: 15px; }
  .nav-toggle { display: flex; }
  .nav-actions .btn-ghost { display: none; }
  .grid-3, .road { grid-template-columns: 1fr; }
  .sec { padding: 68px 0; }
  .hero { padding: 48px 0 28px; }
  .hero-stats { gap: 22px; }
  .layer { grid-template-columns: 40px 1fr; }
  .layer b { grid-column: 2; }
  .lv-desc { grid-column: 2; }
  .tbl { font-size: 13px; }
  .tbl td, .tbl th { padding: 12px 14px; }
  .table-wrap { overflow-x: auto; }
  .steps li { padding: 20px 18px 20px 18px; }
  .step-n { position: static; margin-bottom: 12px; }
}
