/* ================= 设计变量 ================= */
:root {
  --color-bg: #0b1110;
  --color-surface: #131c18;
  --color-surface-hover: #1a2621;
  --color-border: #23332d;
  --color-primary-start: #0d6e37;
  --color-primary-end: #7df953;
  --color-accent: #5ef58c;
  --color-text: #e4efe9;
  --color-text-muted: #8fa89a;
  --color-link: #6ee788;
  --color-danger: #ff5c6e;
  --color-faq-bg: #17221d;
  
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
  
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --space-2xl: 5rem;
  
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;
  
  --shadow-card: 0 6px 24px rgba(0, 0, 0, 0.35);
  --shadow-focus: 0 0 0 3px rgba(125, 249, 83, 0.4);
  --max-w: 1280px;
  --nav-h: 72px;
}

/* ================= 基础重置 ================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s ease, opacity 0.2s ease; }
ul, ol { list-style: none; }

/* ================= 排版系统 ================= */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--space-md); }
.section { padding: var(--space-2xl) 0; position: relative; }
.section + .section { border-top: 1px solid var(--color-border); }

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; color: #fff; }
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); text-wrap: balance; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); text-wrap: balance; margin-bottom: var(--space-lg); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); text-wrap: balance; margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-md); max-width: 65ch; }
.mono-label { font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.05em; color: var(--color-accent); text-transform: uppercase; display: block; margin-bottom: var(--space-sm); }

/* ================= 布局组件 ================= */
.split-layout { display: grid; gap: var(--space-xl); align-items: center; }
@media (min-width: 900px) { .split-layout { grid-template-columns: 1fr 1fr; } }
.hero-grid { min-height: calc(100vh - var(--nav-h)); display: flex; align-items: center; padding: var(--space-xl) 0; }
.text-block { opacity: 1; }
.visual-block { position: relative; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.9rem 1.8rem; border-radius: var(--radius-full);
  font-weight: 500; font-size: 1rem; cursor: pointer; border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary-start), var(--color-primary-end));
  color: #04120a; font-weight: 600;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(125, 249, 83, 0.3); }
.btn-secondary { background: transparent; border: 1px solid var(--color-border); color: var(--color-text); }
.btn-secondary:hover { border-color: var(--color-accent); background: rgba(125, 249, 83, 0.05); }

/* 卡片 */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-lg);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--color-accent); box-shadow: var(--shadow-card); }
.card-grid { display: grid; gap: var(--space-lg); }
@media (min-width: 700px) { .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

/* 表格 */
.table-wrapper { overflow-x: auto; margin: var(--space-lg) 0; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-surface); font-weight: 500; color: var(--color-accent); font-size: 0.95rem; }
td { color: var(--color-text-muted); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* FAQ */
.faq-list { display: grid; gap: var(--space-md); max-width: 900px; }
details { background: var(--color-faq-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1.2rem; transition: border-color 0.2s ease; }
details[open] { border-color: var(--color-accent); }
summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.2rem; color: var(--color-accent); transition: transform 0.2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details > p { margin-top: var(--space-md); padding-left: var(--space-sm); color: var(--color-text-muted); }

/* 页头与页脚 */
.header { position: sticky; top: 0; z-index: 100; background: rgba(11, 17, 16, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-border); height: var(--nav-h); display: flex; align-items: center; }
.header-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { display: flex; align-items: center; gap: var(--space-sm); font-weight: 600; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.nav { display: flex; gap: var(--space-lg); }
.nav a { font-size: 0.95rem; color: var(--color-text-muted); position: relative; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--color-text); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; bottom: -6px; left: 0; right: 0; height: 2px; background: var(--color-primary-end); border-radius: 2px; }
.footer { background: var(--color-surface); padding: var(--space-xl) 0; border-top: 1px solid var(--color-border); margin-top: var(--space-xl); }
.footer-grid { display: grid; gap: var(--space-xl); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-col h4 { margin-bottom: var(--space-md); font-size: 1rem; color: var(--color-text); }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { color: var(--color-text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--color-accent); }
.copyright { text-align: center; margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: 0.85rem; }

/* 界面示意画廊 */
.gallery-track { display: flex; gap: var(--space-lg); overflow-x: auto; padding-bottom: var(--space-md); scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--color-accent) var(--color-surface); }
.gallery-item { flex: 0 0 300px; scroll-snap-align: start; aspect-ratio: 4/3; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); position: relative; overflow: hidden; }

/* 链接区块 */
.related-list { display: grid; gap: var(--space-md); }
.related-link { display: flex; align-items: baseline; gap: var(--space-sm); padding: 0.8rem 0; border-bottom: 1px dashed var(--color-border); transition: color 0.2s; }
.related-link:hover { color: var(--color-accent); }
.related-link span { color: var(--color-text-muted); font-size: 0.9rem; flex: 1; }

/* ================= SVG 动效系统 ================= */
svg.flow-svg { width: 100%; height: auto; overflow: visible; }
.path-flow {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  stroke: var(--color-accent);
  fill: none;
  opacity: 0.6;
  animation: drawPath 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.dot-flow {
  r: 3;
  fill: #fff;
  animation: pulseDot 4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.line-flow {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  stroke: var(--color-primary-end);
  stroke-width: 2;
  fill: none;
  animation: dashLine 8s linear infinite;
}

@keyframes drawPath {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1; }
}
@keyframes pulseDot {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}
@keyframes dashLine {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
}
