:root {
  --color-bg: #060C13;
  --color-surface: #0F1724;
  --color-surface-elevated: #16202E;
  --color-border: rgba(148, 163, 184, 0.15);
  --color-text: #E2E8F0;
  --color-text-secondary: #94A3B8;
  --color-text-muted: #64748B;
  --color-primary: #047857;
  --color-primary-hover: #059669;
  --color-accent: #34D399;
  --gradient-brand: linear-gradient(135deg, #065F46 0%, #10B981 60%, #6EE7B7 100%);
  --gradient-subtle: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, transparent 100%);
  
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;
  
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-button: 0 2px 8px rgba(4, 120, 87, 0.35);
  
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-4xl: 6rem;
  
  --max-width: 1120px;
  --header-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 { letter-spacing: -0.02em; line-height: 1.15; font-weight: 700; }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); text-wrap: balance; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); text-wrap: balance; }
p { max-width: 65ch; }
small { font-size: 0.875rem; color: var(--color-text-secondary); }

/* Layout */
.container { width: 100%; max-width: var(--max-width); margin-left: auto; margin-right: auto; padding-left: var(--space-lg); padding-right: var(--space-lg); }
.grid { display: grid; gap: var(--space-xl); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.section { padding-top: var(--space-4xl); padding-bottom: var(--space-4xl); position: relative; }
.section-alt { background: var(--color-surface); }
.text-center { text-align: center; }
.mt-auto { margin-top: auto; }

/* Header & Nav */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 12, 19, 0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo-link { display: flex; align-items: center; gap: var(--space-sm); text-decoration: none; color: inherit; }
.logo-img { width: 32px; height: 32px; object-fit: contain; }
.brand-name { font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; }
.nav-desktop a { color: var(--color-text-secondary); text-decoration: none; font-size: 0.9375rem; font-weight: 500; padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-sm); transition: color 0.2s, background 0.2s; }
.nav-desktop a:hover, .nav-desktop a[aria-current="page"] { color: var(--color-accent); background: rgba(52, 211, 153, 0.08); }
.mobile-menu-btn { background: none; border: none; color: var(--color-text); cursor: pointer; padding: var(--space-xs); display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  padding: 0.75rem 1.5rem; border-radius: var(--radius-md);
  font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  cursor: pointer; border: 1px solid transparent;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--gradient-brand); color: #fff;
  box-shadow: var(--shadow-button); border: none;
}
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4); }
.btn-secondary { background: var(--color-surface-elevated); color: var(--color-text); border: 1px solid var(--color-border); }
.btn-secondary:hover { background: var(--color-surface-hover); border-color: var(--color-accent); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }

/* Cards & Components */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-xl);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); border-color: rgba(52, 211, 153, 0.3); }
.card-icon { width: 40px; height: 40px; border-radius: var(--radius-md); background: rgba(16, 185, 129, 0.1); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-md); }
.card-icon svg { width: 24px; height: 24px; stroke: var(--color-accent); }

/* Table */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--color-border); }
table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
th, td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-surface-elevated); font-weight: 600; color: var(--color-accent); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; }
td { color: var(--color-text-secondary); font-size: 0.9375rem; }
tr:last-child td { border-bottom: none; }

/* FAQ */
.faq-list { list-style: none; }
details { border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: var(--space-sm); background: var(--color-surface); overflow: hidden; }
details summary {
  padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; user-select: none;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-size: 1.25rem; color: var(--color-text-muted); transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 1.25rem 1rem; color: var(--color-text-secondary); line-height: 1.7; }

/* Links */
a { color: var(--color-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 0.2s; }
a:hover { color: #6EE7B7; }
.link-list { list-style: none; display: grid; gap: var(--space-md); }
.link-list li { display: flex; align-items: baseline; gap: var(--space-sm); }
.link-list span { color: var(--color-text-muted); font-size: 0.875rem; min-width: fit-content; }

/* Focus */
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 2px; }

/* Footer */
.site-footer { border-top: 1px solid var(--color-border); padding: var(--space-4xl) 0 var(--space-2xl); background: var(--color-surface); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-2xl); margin-bottom: var(--space-2xl); }
.footer-col h4 { margin-bottom: var(--space-md); color: var(--color-text); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: var(--space-xs); }
.footer-col a { color: var(--color-text-secondary); text-decoration: none; font-size: 0.9375rem; }
.footer-col a:hover { color: var(--color-accent); }
.footer-bottom { text-align: center; color: var(--color-text-muted); font-size: 0.875rem; padding-top: var(--space-xl); border-top: 1px solid var(--color-border); }

/* SVG Motion Base */
.svg-anim path, .svg-anim circle, .svg-anim rect { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.progress-ring { animation: dash-cycle 12s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.arc-line { animation: arc-flow 15s ease-in-out infinite alternate; }
.pulse-dot { animation: pulse-opacity 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.draw-path { animation: draw-dash 6s steps(1) infinite alternate; }

@keyframes dash-cycle {
  0% { stroke-dashoffset: 1; }
  20% { stroke-dashoffset: 0.6; }
  40% { stroke-dashoffset: 0.8; }
  60% { stroke-dashoffset: 0.2; }
  80% { stroke-dashoffset: 0.7; }
  100% { stroke-dashoffset: 0.1; }
}
@keyframes arc-flow {
  0% { stroke-dashoffset: 1; opacity: 0.4; }
  50% { stroke-dashoffset: 0.3; opacity: 1; }
  100% { stroke-dashoffset: 0.8; opacity: 0.6; }
}
@keyframes pulse-opacity {
  0%, 100% { opacity: 0.3; r: 3; }
  50% { opacity: 1; r: 5; }
}
@keyframes draw-dash {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .progress-ring, .arc-line, .pulse-dot, .draw-path, details summary::after { animation: none !important; }
  .card:hover { transform: none; }
}

/* Responsive */
@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .mobile-menu-btn { display: block; }
  .grid-cols-2, .grid-cols-3 { grid-template-columns: 1fr; }
  .section { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
}
