/* ==========================================================================
   Clash 官网 · 全站样式
   ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #070b14;
  --bg-soft: #0c1220;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #e8edf7;
  --text-dim: #97a3ba;
  --text-faint: #6b7789;

  --primary: #38bdf8;
  --primary-deep: #0ea5e9;
  --violet: #8b5cf6;
  --accent: #22d3ee;

  --gradient: linear-gradient(120deg, #38bdf8 0%, #6366f1 50%, #a855f7 100%);
  --gradient-soft: linear-gradient(120deg, rgba(56, 189, 248, 0.16), rgba(168, 85, 247, 0.16));

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 0 0 1px rgba(56, 189, 248, 0.25), 0 20px 60px -18px rgba(56, 189, 248, 0.45);

  --nav-h: 68px;
  --max: 1180px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 页面背景光晕 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(720px 420px at 12% -8%, rgba(56, 189, 248, 0.16), transparent 60%),
    radial-gradient(680px 420px at 88% 4%, rgba(168, 85, 247, 0.14), transparent 62%),
    radial-gradient(900px 600px at 50% 110%, rgba(14, 165, 233, 0.08), transparent 65%);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

::selection {
  background: rgba(56, 189, 248, 0.35);
}

/* 行内代码 */
code {
  font-family: "SFMono-Regular", ui-monospace, "JetBrains Mono", Consolas, monospace;
  font-size: 0.9em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid var(--border);
  color: #a5e4ff;
}

pre.code code {
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font-size: inherit;
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #070b14;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 999px;
  border: 2px solid #070b14;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* ---------- 通用布局 ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.section {
  padding: 96px 0;
  position: relative;
}

.section--tight {
  padding: 64px 0;
}

.section__head {
  max-width: 680px;
  margin: 0 auto 56px;
  text-align: center;
}

.section__eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}

.section__title {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 16px;
}

.section__subtitle {
  color: var(--text-dim);
  font-size: 17px;
}

.grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- 按钮 ---------- */
.btn {
  --btn-py: 10px;
  --btn-px: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--btn-py) var(--btn-px);
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s,
    box-shadow 0.25s, color 0.25s;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn--primary {
  background: var(--gradient);
  color: #05070d;
  box-shadow: 0 12px 34px -12px rgba(56, 189, 248, 0.8);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px -12px rgba(99, 102, 241, 0.85);
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  background: var(--surface-strong);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.btn--lg {
  --btn-py: 14px;
  --btn-px: 28px;
  font-size: 16px;
}

.btn--block {
  width: 100%;
}

/* ---------- 导航栏 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}

.nav.is-scrolled {
  background: rgba(7, 11, 20, 0.78);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand__mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--gradient);
  box-shadow: 0 8px 22px -10px rgba(56, 189, 248, 0.9);
}

.brand__mark svg {
  width: 18px;
  height: 18px;
  color: #05070d;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.nav__links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--text-dim);
  transition: color 0.2s, background 0.2s;
}

.nav__links a:hover,
.nav__links a.is-active {
  color: var(--text);
  background: var(--surface);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.nav__toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  align-items: center;
  justify-content: center;
}

.nav__toggle span {
  position: relative;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: background 0.2s;
}

.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease);
}

.nav__toggle span::before {
  top: -6px;
}
.nav__toggle span::after {
  top: 6px;
}

.nav.is-open .nav__toggle span {
  background: transparent;
}
.nav.is-open .nav__toggle span::before {
  transform: translateY(6px) rotate(45deg);
}
.nav.is-open .nav__toggle span::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative;
  padding: 84px 0 96px;
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 56px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--gradient-soft);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 24px;
}

.pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.hero h1 {
  font-size: clamp(34px, 5.2vw, 58px);
  margin-bottom: 22px;
}

.hero__lead {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 560px;
  margin-bottom: 34px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  font-size: 14px;
  color: var(--text-faint);
}

.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero__meta svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

/* 终端可视化 */
.terminal {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(8, 12, 22, 0.96));
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-7deg) rotateX(3deg);
  transition: transform 0.6s var(--ease);
}

.terminal:hover {
  transform: perspective(1400px) rotateY(-2deg) rotateX(1deg) translateY(-6px);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.terminal__dots {
  display: flex;
  gap: 7px;
}
.terminal__dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: block;
}
.terminal__dots i:nth-child(1) {
  background: #ff5f57;
}
.terminal__dots i:nth-child(2) {
  background: #febc2e;
}
.terminal__dots i:nth-child(3) {
  background: #28c840;
}

.terminal__title {
  font-size: 12.5px;
  color: var(--text-faint);
  font-family: "SFMono-Regular", ui-monospace, "JetBrains Mono", Consolas, monospace;
  margin-left: 6px;
}

.terminal__body {
  padding: 20px;
  font-family: "SFMono-Regular", ui-monospace, "JetBrains Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.85;
  color: #cbd5e1;
}

.terminal__body .c-key {
  color: #7dd3fc;
}
.terminal__body .c-str {
  color: #86efac;
}
.terminal__body .c-num {
  color: #fca5a5;
}
.terminal__body .c-cmt {
  color: #556074;
}
.terminal__body .c-ok {
  color: #4ade80;
}
.terminal__body .c-dim {
  color: #64748b;
}

.terminal__line {
  white-space: pre;
  overflow-x: auto;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--primary);
  vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ---------- 特性网格 ---------- */
.grid {
  display: grid;
  gap: 22px;
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  position: relative;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px 220px at var(--mx, 50%) var(--my, 0%), rgba(56, 189, 248, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.card:hover::after {
  opacity: 1;
}

.card__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  color: var(--primary);
  margin-bottom: 20px;
}

.card__icon svg {
  width: 22px;
  height: 22px;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-dim);
  font-size: 15px;
}

/* ---------- 平台支持 ---------- */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 28px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}

.platform:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.platform svg {
  width: 36px;
  height: 36px;
  color: var(--text);
}

.platform span {
  font-size: 14.5px;
  font-weight: 600;
}

.platform small {
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ---------- 数据统计 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
}

.stat {
  text-align: center;
}

.stat__num {
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat__label {
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ---------- 下载区块（首页 CTA） ---------- */
.cta {
  position: relative;
  padding: 64px 48px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(600px 300px at 50% -20%, rgba(56, 189, 248, 0.2), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  text-align: center;
  overflow: hidden;
}

.cta h2 {
  font-size: clamp(26px, 3.6vw, 38px);
  margin-bottom: 16px;
}

.cta p {
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 30px;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* ---------- 页面头部（内页） ---------- */
.page-head {
  padding: 72px 0 24px;
  text-align: center;
}

.page-head h1 {
  font-size: clamp(32px, 4.6vw, 48px);
  margin-bottom: 16px;
}

.page-head p {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 620px;
  margin: 0 auto;
}

.crumbs {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-faint);
  margin-bottom: 18px;
}

.crumbs a:hover {
  color: var(--primary);
}

/* ---------- 下载页 ---------- */
.download-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.dl-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}

.dl-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.dl-card__top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dl-card__icon {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  color: var(--primary);
}

.dl-card__icon svg {
  width: 28px;
  height: 28px;
}

.dl-card__name {
  font-size: 19px;
  font-weight: 700;
}

.dl-card__req {
  font-size: 13.5px;
  color: var(--text-faint);
}

.dl-card__desc {
  color: var(--text-dim);
  font-size: 15px;
  flex-grow: 1;
}

.dl-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dl-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 12.5px;
  color: var(--text-faint);
  font-family: "SFMono-Regular", ui-monospace, Consolas, monospace;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
}

.tag--rec {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
  color: var(--primary);
}

/* 安装步骤 */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 26px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 14px;
}

.step h3 {
  font-size: 16.5px;
  margin-bottom: 8px;
}

.step p {
  font-size: 14.5px;
  color: var(--text-dim);
}

/* 代码块 */
.code {
  position: relative;
  margin: 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #080c16;
  font-family: "SFMono-Regular", ui-monospace, "JetBrains Mono", Consolas, monospace;
  font-size: 13.5px;
  color: #cbd5e1;
  overflow-x: auto;
}

.code__copy {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: var(--text-dim);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.code__copy:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
}

.code__copy.is-done {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.5);
}

/* ---------- 版本日志 ---------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.release {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 28px;
  padding: 26px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.release__ver {
  font-size: 18px;
  font-weight: 700;
}

.release__date {
  font-size: 13.5px;
  color: var(--text-faint);
  margin-top: 2px;
}

.release__list li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.release__list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* ---------- FAQ 折叠面板 ---------- */
.faq {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq details {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.25s, background 0.25s;
}

.faq details[open] {
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--primary);
  transition: transform 0.3s var(--ease);
  line-height: 1;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq__body {
  padding: 0 24px 22px;
  color: var(--text-dim);
  font-size: 15px;
}

/* ---------- 404 页面 ---------- */
.error-page {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
}

.error-code {
  font-size: clamp(96px, 22vw, 200px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: glitch 4.5s infinite;
}

@keyframes glitch {
  0%,
  92%,
  100% {
    transform: translate(0);
    filter: none;
  }
  93% {
    transform: translate(-3px, 1px);
    filter: hue-rotate(25deg);
  }
  94% {
    transform: translate(3px, -1px);
  }
  95% {
    transform: translate(-2px, 1px);
  }
  96% {
    transform: translate(2px, -1px);
    filter: hue-rotate(-25deg);
  }
}

.error-page h1 {
  font-size: clamp(24px, 3.6vw, 34px);
  margin: 20px 0 14px;
}

.error-page p {
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto 30px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 44px;
}

.error-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 720px;
  margin: 0 auto;
}

.error-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}

.error-link:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.error-link strong {
  font-size: 15px;
}

.error-link span {
  font-size: 13px;
  color: var(--text-faint);
}

/* ---------- 页脚 ---------- */
.footer {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
  padding: 56px 0 32px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer__brand p {
  color: var(--text-dim);
  font-size: 14.5px;
  margin-top: 16px;
  max-width: 300px;
}

.footer h4 {
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__links a {
  font-size: 14.5px;
  color: var(--text-dim);
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--primary);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-faint);
}

.footer__disclaimer {
  font-size: 12.5px;
  color: var(--text-faint);
  max-width: 720px;
  margin-top: 10px;
  line-height: 1.7;
}

/* ---------- 滚动入场动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .terminal {
    transform: none;
  }
  .terminal:hover {
    transform: translateY(-6px);
  }

  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .platform-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 760px) {
  .section {
    padding: 68px 0;
  }

  .nav__links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px 20px 20px;
    background: rgba(7, 11, 20, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    margin-left: 0;
    display: none;
  }

  .nav.is-open .nav__links {
    display: flex;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__actions .btn--ghost {
    display: none;
  }

  .hero {
    padding: 52px 0 68px;
  }

  .grid--3,
  .grid--2,
  .download-list,
  .platform-grid,
  .steps,
  .error-links {
    grid-template-columns: 1fr;
  }

  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    padding: 28px 20px;
  }

  .cta {
    padding: 44px 24px;
  }

  .release {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   内容页（教程 / 博客）
   ========================================================================== */

/* ---------- 文章列表 ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
}

.filter {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  color: var(--text-dim);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.filter:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.filter.is-active {
  color: var(--primary);
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.12);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.post-card.is-hidden {
  display: none;
}

.post-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-faint);
}

.post-card h3 {
  font-size: 17px;
}

.post-card h3 a:hover {
  color: var(--primary);
}

.post-card p {
  color: var(--text-dim);
  font-size: 14.5px;
  flex-grow: 1;
}

.post-card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.empty-tip {
  display: none;
  padding: 40px;
  text-align: center;
  color: var(--text-faint);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ---------- 文章详情 ---------- */
.article-head {
  padding: 56px 0 8px;
}

.article-head .crumbs {
  justify-content: flex-start;
  margin-bottom: 18px;
}

.article-head h1 {
  font-size: clamp(27px, 3.8vw, 40px);
  margin: 16px 0 18px;
  max-width: 860px;
}

.article-head__lead {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 780px;
}

.article-head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-faint);
}

.article-body {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 52px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 72px;
}

.article-toc {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.article-toc h4 {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.article-toc ol {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.article-toc a {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-dim);
  transition: color 0.2s;
}

.article-toc a:hover {
  color: var(--primary);
}

.prose {
  max-width: 780px;
  font-size: 16.5px;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h2 {
  font-size: 25px;
  margin: 44px 0 18px;
  padding-left: 14px;
  border-left: 3px solid var(--primary);
}

.prose h3 {
  font-size: 19px;
  margin: 30px 0 12px;
}

.prose h4 {
  font-size: 16.5px;
  margin: 22px 0 10px;
}

.prose p {
  margin-bottom: 16px;
  color: var(--text-dim);
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose a {
  color: var(--primary);
  border-bottom: 1px solid rgba(56, 189, 248, 0.35);
  transition: border-color 0.2s;
}

.prose a:hover {
  border-bottom-color: var(--primary);
}

.prose ul,
.prose ol {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 20px;
}

.prose ul li {
  position: relative;
  padding-left: 22px;
  color: var(--text-dim);
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.prose ol {
  counter-reset: ol;
}

.prose ol li {
  position: relative;
  padding-left: 26px;
  color: var(--text-dim);
  counter-increment: ol;
}

.prose ol li::before {
  content: counter(ol);
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.prose blockquote {
  margin: 22px 0;
  padding: 16px 22px;
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--gradient-soft);
  color: var(--text);
  font-size: 15.5px;
}

.prose blockquote p {
  color: inherit;
  margin-bottom: 0;
}

.prose .note {
  margin: 24px 0;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 15px;
  color: var(--text-dim);
}

.prose .note strong {
  color: var(--primary);
}

.prose .note p:last-child {
  margin-bottom: 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14.5px;
}

.prose th,
.prose td {
  padding: 11px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.prose th {
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 600;
}

.prose td {
  color: var(--text-dim);
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.article-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.article-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.article-nav a {
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}

.article-nav a:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.article-nav span {
  display: block;
  font-size: 12.5px;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.article-nav strong {
  font-size: 15.5px;
  line-height: 1.4;
}

.article-nav a.is-next {
  text-align: right;
}

@media (max-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-body {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .article-toc {
    position: static;
    margin-bottom: 34px;
  }
}

@media (max-width: 760px) {
  .posts-grid,
  .article-nav {
    grid-template-columns: 1fr;
  }

  .prose {
    font-size: 16px;
  }

  .prose h2 {
    font-size: 21px;
  }

  .article-nav a.is-next {
    text-align: left;
  }
}
