/* =========================================
   全局设计变量与基础重置
   ========================================= */
:root {
  --bg-base: #0A0E14;
  --bg-surface: #111820;
  --bg-card: #161D27;
  --bg-card-hover: #1C2430;
  --text-primary: #E6EDF3;
  --text-secondary: #8B949E;
  --text-muted: #6E7681;
  --accent: #00E676;
  --accent-hover: #00C853;
  --accent-glow: rgba(0, 230, 118, 0.25);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(0, 230, 118, 0.4);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-focus: 0 0 0 3px var(--accent-glow);
  --font-condensed: 'Inter', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --container-max: 1200px;
  --space-section: clamp(4rem, 8vw, 7rem);
  --space-component: 1.5rem;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-base);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

ul, ol {
  list-style: none;
}

/* =========================================
   排版系统
   ========================================= */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-title {
  font-family: var(--font-condensed);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-component);
  text-wrap: balance;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 65ch;
  margin-bottom: 2.5rem;
}

h2 {
  font-family: var(--font-condensed);
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* =========================================
   通用组件
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.btn-primary {
  background-color: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.03);
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--border-active);
  background-color: var(--bg-card-hover);
  transform: translateY(-2px);
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

@media (max-width: 480px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* 表格样式 */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background-color: rgba(255, 255, 255, 0.04);
  font-weight: 600;
  color: var(--text-primary);
}

td {
  color: var(--text-secondary);
}

tr:last-child td { border-bottom: none; }

/* FAQ / Details */
.faq-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  list-style: none;
  position: relative;
  padding-right: 1.5rem;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-item p {
  margin-top: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* 链接列表 */
.link-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.link-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.link-list a:hover { color: var(--accent); }

.link-list span {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  display: block;
}

/* =========================================
   页头与页脚
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-name {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  position: relative;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text-primary);
}

.nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
}

.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--text-secondary); font-size: 0.9rem; }
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* =========================================
   SVG 动效系统
   ========================================= */
.svg-anim-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  max-width: 600px;
  margin: 0 auto;
}

.draw-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawPath 3s ease-in-out infinite alternate;
}

.draw-line-delay {
  animation-delay: 0.4s;
}

.node {
  fill: var(--accent);
  opacity: 0.8;
  animation: floatNode 4s ease-in-out infinite alternate;
}

.node-delay {
  animation-delay: 1s;
}

.shield-path {
  fill: none;
  stroke: var(--text-secondary);
  stroke-width: 1.5;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawShield 2.5s ease-out forwards;
}

.check-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawCheck 1.5s ease-out 1s forwards;
}

@keyframes drawPath {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes floatNode {
  from { transform: translateY(0); }
  to { transform: translateY(-4px); }
}

@keyframes drawShield {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes drawCheck {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .node { animation: none; }
  .draw-line, .shield-path, .check-path { animation: none; stroke-dashoffset: 0; }
}

/* =========================================
   响应式适配
   ========================================= */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .grid { grid-template-columns: 1fr; }
  .header-inner { height: 48px; }
}

@media (min-width: 769px) {
  .mobile-menu {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background-color: var(--bg-surface);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
  }
  .mobile-menu.active { display: block; }
  .mobile-menu a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
  }
}

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
