/* ==================== 设计变量 ==================== */
:root {
  --bg-primary: #080c14;
  --bg-secondary: #0f1522;
  --bg-card: #161d2c;
  --bg-card-hover: #1c2436;
  --border: #232d40;
  --accent: #2be05d;
  --accent-hover: #22c553;
  --accent-glow: rgba(43, 224, 93, 0.25);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.5);
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-title: "Inter", var(--font-body);
}

/* ==================== 基础重置与排版 ==================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 80px 0; }
.section-alt { background: var(--bg-secondary); }

h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 16px; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 32px; position: relative; padding-left: 16px; }
h2::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 4px; background: var(--accent); border-radius: 2px; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); margin-bottom: 12px; }
p { color: var(--text-secondary); margin: 0 0 16px; }
strong { color: var(--text-primary); font-weight: 600; }

/* ==================== 页头与导航 ==================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 12, 20, 0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand-name { font-size: 1.1rem; font-weight: 600; }

.nav { display: flex; gap: 24px; }
.nav a { font-size: 0.95rem; color: var(--text-secondary); padding: 6px 0; position: relative; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text-primary); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 2px; background: var(--accent); }

.mobile-toggle { display: none; background: none; border: none; color: var(--text-primary); cursor: pointer; }

/* ==================== 组件：按钮 ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; font-size: 1rem; font-weight: 600; border-radius: var(--radius-sm);
  background: var(--accent); color: #000; border: none; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 16px var(--accent-glow); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: transparent; box-shadow: none; }

/* ==================== 组件：卡片 ==================== */
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 24px; transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.card:hover { transform: translateY(-2px); background: var(--bg-card-hover); box-shadow: var(--shadow-card); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }

/* ==================== 组件：表格 ==================== */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg-secondary); font-weight: 600; color: var(--text-primary); }
td { color: var(--text-secondary); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ==================== 组件：FAQ (Details) ==================== */
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 12px; overflow: hidden; }
.summary { padding: 18px 20px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.summary::-webkit-details-marker { display: none; }
.summary::after { content: "+"; font-size: 1.2rem; color: var(--accent); transition: transform 0.2s; }
details[open] .summary::after { content: "−"; }
details[open] .summary { background: var(--bg-secondary); border-bottom: 1px solid var(--border); }
.faq-answer { padding: 18px 20px; color: var(--text-secondary); line-height: 1.8; }

/* ==================== 组件：链接列表 ==================== */
.link-list li { padding: 12px 0; border-bottom: 1px dashed var(--border); display: flex; justify-content: space-between; align-items: baseline; }
.link-list li:last-child { border-bottom: none; }
.link-title { font-weight: 500; color: var(--text-primary); transition: color 0.2s; }
.link-desc { font-size: 0.9rem; color: var(--text-muted); margin-top: 4px; }
.link-list a:hover .link-title { color: var(--accent); }

/* ==================== SVG 动效系统 ==================== */
.svg-canvas { width: 100%; max-width: 100%; overflow: visible; }
.line-path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.node-dot { fill: var(--accent); opacity: 0.9; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawLine 4s ease-in-out infinite; }
.anim-float { animation: floatNode 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-fade { opacity: 0.8; animation: pulseOpacity 6s ease-in-out infinite; }

@keyframes drawLine {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: 1; }
}
@keyframes floatNode {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pulseOpacity {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .anim-draw, .anim-float, .anim-fade { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  section { padding: 48px 0; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-secondary); flex-direction: column; padding: 16px; border-bottom: 1px solid var(--border); }
  .nav.active { display: flex; }
  .mobile-toggle { display: block; }
  h1 { font-size: clamp(1.8rem, 6vw, 2.4rem); }
}

/* ==================== 页脚 ==================== */
.site-footer { background: var(--bg-secondary); border-top: 1px solid var(--border); padding: 40px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer-col h4 { margin-bottom: 12px; font-size: 1rem; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { color: var(--text-muted); font-size: 0.95rem; }
.footer-col a:hover { color: var(--accent); }
.copyright { text-align: center; color: var(--text-muted); font-size: 0.85rem; padding-top: 24px; border-top: 1px solid var(--border); }
