:root {
  --color-bg: #080c14;
  --color-surface: #111623;
  --color-surface-hover: #1a2136;
  --color-border: #232d45;
  --color-text: #e5eaf2;
  --color-text-muted: #8b95ad;
  --color-accent: #00d26a;
  --color-accent-hover: #00b85c;
  --font-heading: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --max-width: 1120px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding-top: var(--header-h);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); margin-bottom: var(--space-xs); }
p { margin-bottom: 1rem; color: var(--color-text); }
p.text-muted { color: var(--color-text-muted); }
a { color: var(--color-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-accent-hover); }
ul, ol { padding-left: 1.25rem; margin-bottom: 1rem; }
li { margin-bottom: 0.5rem; }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-sm); }
.section { padding: var(--space-xl) 0; }
.section-grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mb-md { margin-bottom: var(--space-md); }

/* Header & Nav */
.header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  background: rgba(8, 12, 20, 0.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border); z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
}
.header-inner { display: flex; align-items: center; gap: var(--space-md); }
.logo-img { height: 32px; width: auto; display: block; }
.nav { display: flex; gap: var(--space-md); list-style: none; padding: 0; margin: 0; }
.nav-link { color: var(--color-text-muted); font-size: 0.95rem; padding: 0.5rem 0; transition: color 0.2s; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--color-accent); }
.mobile-toggle { display: none; background: none; border: none; color: var(--color-text); cursor: pointer; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: var(--radius-md); font-weight: 600;
  font-size: 1rem; cursor: pointer; transition: all 0.2s ease; text-decoration: none;
}
.btn-primary { background: var(--color-accent); color: #0a0f18; border: 1px solid transparent; }
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 210, 106, 0.25); }
.btn-outline { background: transparent; color: var(--color-accent); border: 1px solid var(--color-accent); }
.btn-outline:hover { background: rgba(0, 210, 106, 0.1); }

/* Cards */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-md); transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); border-color: var(--color-accent); }
.card-icon { width: 48px; height: 48px; margin-bottom: var(--space-sm); color: var(--color-accent); }
.card-icon svg { width: 100%; height: 100%; }

/* Table */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-surface); font-weight: 600; color: var(--color-text); }
td { color: var(--color-text-muted); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--color-surface-hover); }

/* Details/FAQ */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 1rem 0; font-weight: 500; color: var(--color-text);
  display: flex; align-items: center; justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { display: none; content: ""; }
.faq-item summary::after { content: "+"; font-size: 1.2rem; color: var(--color-accent); transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0.5rem 0 1rem; color: var(--color-text-muted); }

/* Footer */
.footer { background: var(--color-surface); border-top: 1px solid var(--color-border); padding: var(--space-lg) 0; margin-top: var(--space-xl); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-md); }
.footer-brand { display: flex; flex-direction: column; gap: var(--space-xs); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-sm); list-style: none; padding: 0; margin: 0; }
.footer-copy { width: 100%; margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--color-border); text-align: center; color: var(--color-text-muted); font-size: 0.9rem; }

/* SVG Animations */
.draw-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.float-node { transform-box: fill-box; transform-origin: center; }
.animate-draw { animation: draw-line 4s ease forwards; }
.animate-float { animation: node-float 3.5s ease-in-out infinite; }
.delay-1 { animation-delay: 0.5s; }
.delay-2 { animation-delay: 1s; }
.delay-3 { animation-delay: 1.5s; }

@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes node-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.95); }
}
.pulse-dot { animation: pulse-glow 2.5s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .animate-draw, .animate-float, .pulse-dot { animation: none !important; }
  .hero-section { animation: none !important; }
}

/* Focus Styles */
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* Responsive */
@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--color-surface); flex-direction: column; padding: var(--space-sm); border-bottom: 1px solid var(--color-border); }
  .nav.open { display: flex; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .section { padding: var(--space-lg) 0; }
}
