:root {
  --primary: #0078d4;
  --primary-dark: #005fb8;
  --primary-light: #2e8cea;
  --ink: #101828;
  --muted: #5a6472;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --border: #e4e8ef;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Noto Sans SC", "Microsoft YaHei UI", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: baseline; gap: 10px; color: var(--ink); }

.logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--primary);
}

.brand-sub { font-size: 12px; color: var(--muted); }

.nav nav { display: flex; gap: 26px; }
.nav nav a { color: var(--ink); font-size: 14px; font-weight: 500; transition: color 0.18s ease; }
.nav nav a:hover { color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 32px 88px;
  background:
    radial-gradient(1200px 500px at 12% -10%, rgba(46, 140, 234, 0.35), transparent 60%),
    radial-gradient(900px 420px at 88% 10%, rgba(0, 95, 184, 0.45), transparent 62%),
    linear-gradient(160deg, #0b1220 0%, #132a4a 55%, #0d1a2e 100%);
  color: #fff;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--bg) 92%);
}

.hero-inner { position: relative; max-width: 900px; margin: 0 auto; text-align: center; }

.badge {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.4px;
  background: rgba(255, 255, 255, 0.08);
}

.hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.hero .lead {
  margin: 0 auto 32px;
  max-width: 660px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.82);
}

.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 22px rgba(0, 120, 212, 0.35);
}
.btn.primary:hover { background: var(--primary-light); }

.btn.ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.18); }

.btn.block { display: block; text-align: center; margin-top: 16px; }

.hero .hint, .card .hint { font-size: 12.5px; color: rgba(255, 255, 255, 0.65); margin-top: 18px; }
.card .hint { color: var(--muted); margin-top: 12px; }

/* ---------- 区块 ---------- */
.section { padding: 72px 32px; max-width: 1100px; margin: 0 auto; }
.section.alt { background: var(--bg-soft); max-width: none; }
.section.alt > * { max-width: 1100px; margin-inline: auto; }

.section h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 28px;
  letter-spacing: -0.3px;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  position: relative;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.08);
  border-color: rgba(0, 120, 212, 0.35);
}

.card h3 { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }

.tag {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
}
.tag.alt-tag { background: #475467; }

/* ---------- 使用 ---------- */
.usage { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.usage h3 { font-size: 16px; margin: 0 0 12px; }
.usage ol { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.usage li { margin-bottom: 6px; }

pre {
  margin: 0;
  padding: 16px 18px;
  background: #0d1a2e;
  color: #d7e3f4;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
}

code { font-family: "Cascadia Mono", Consolas, monospace; }
.usage code { color: var(--primary); }

/* ---------- 页脚 ---------- */
.footer {
  padding: 40px 32px 56px;
  background: #0b1220;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  font-size: 13px;
}
.footer p { margin: 6px 0; }
.footer strong { color: #fff; }
.footer .muted { color: rgba(255, 255, 255, 0.45); }

@media (max-width: 640px) {
  .nav { padding: 12px 18px; }
  .nav nav { gap: 16px; }
  .hero { padding: 64px 20px 60px; }
  .section { padding: 52px 20px; }
}
