/* 设计变量 */
:root {
  --color-bg: #0f1115;
  --color-surface: #161920;
  --color-surface-hover: #1c2028;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-text: #e6e8eb;
  --color-text-muted: #8b92a0;
  --color-accent-start: #ff9a8b;
  --color-accent-end: #fbc2eb;
  --color-brand: #25d366;
  --color-brand-dark: #128c7e;
  --font-display: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-med: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础重置 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: clamp(0.95rem, 0.85rem + 0.5vw, 1.1rem);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--transition-fast); }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* 排版系统 */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.05; letter-spacing: -0.02em; color: var(--color-text); }
h1 { font-size: clamp(2.8rem, 1.8rem + 4vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.5rem); margin-bottom: var(--space-sm); }
h3 { font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem); margin-bottom: var(--space-xs); }
p { margin-bottom: var(--space-sm); max-width: 65ch; }
.text-muted { color: var(--color-text-muted); }
.display-text { text-wrap: balance; }

/* 布局容器 */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-md); }
.section { padding: var(--space-xl) 0; position: relative; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* 页头与页脚 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 17, 21, 0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: var(--space-xs); font-weight: 700; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.nav-desktop { display: none; gap: var(--space-md); }
@media (min-width: 768px) { .nav-desktop { display: flex; } }
.nav-link { font-size: 0.95rem; font-weight: 500; padding: 0.5rem 0; position: relative; }
.nav-link[aria-current="page"] { color: var(--color-brand); }
.nav-link[aria-current="page"]::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--color-brand); }
.mobile-toggle { display: block; background: none; border: none; cursor: pointer; padding: 0.5rem; }
@media (min-width: 768px) { .mobile-toggle { display: none; } }
.nav-mobile { display: none; flex-direction: column; gap: var(--space-sm); padding: var(--space-md) 0; border-top: 1px solid var(--color-border); }
@media (max-width: 767px) { .nav-mobile.open { display: flex; } }
.site-footer { border-top: 1px solid var(--color-border); padding: var(--space-lg) 0; background: var(--color-surface); margin-top: var(--space-lg); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-col h4 { font-size: 1rem; margin-bottom: var(--space-sm); color: var(--color-text-muted); }
.footer-col ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col a:hover { color: var(--color-brand); }
.copyright { text-align: center; margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: 0.9rem; }

/* 组件：按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.8rem; border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem;
  cursor: pointer; transition: all var(--transition-fast); border: none; outline: none;
  text-decoration: none; position: relative; overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-brand), var(--color-brand-dark));
  color: #fff; box-shadow: 0 4px 16px rgba(37, 211, 102, 0.25);
}
.btn-primary:hover, .btn-primary:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35); }
.btn-outline {
  background: transparent; border: 1.5px solid var(--color-text-muted); color: var(--color-text);
}
.btn-outline:hover, .btn-outline:focus-visible { border-color: var(--color-brand); color: var(--color-brand); }
.btn:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }

/* 组件：卡片 */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: var(--space-md); transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.card:hover, .card:focus-within { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.15); }
.card-icon { width: 40px; height: 40px; margin-bottom: var(--space-sm); color: var(--color-brand); }

/* 组件：表格 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); border: 1px solid var(--color-border); }
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: rgba(255, 255, 255, 0.03); font-weight: 600; color: var(--color-text); }
td { color: var(--color-text-muted); }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }

/* 组件：FAQ */
details { border: 1px solid var(--color-border); border-radius: var(--radius-sm); margin-bottom: 0.75rem; background: var(--color-surface); }
summary { padding: 1rem 1.25rem; cursor: pointer; font-weight: 500; list-style: none; position: relative; padding-left: 2.5rem; }
summary::-webkit-details-marker { display: none; }
summary::before {
  content: ''; position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; border: 2px solid var(--color-text-muted); border-radius: 50%;
  transition: border-color var(--transition-fast);
}
details[open] summary::before { border-color: var(--color-brand); }
details p { padding: 0 1.25rem 1rem 2.5rem; color: var(--color-text-muted); line-height: 1.7; }
details[open] { border-color: rgba(37, 211, 102, 0.3); }

/* SVG 动效核心类 */
svg.anim-canvas { width: 100%; height: auto; overflow: visible; }
.star-dot { fill: var(--color-accent-start); }
.star-dot.bright { fill: var(--color-accent-end); }
.conn-line { stroke: rgba(255, 255, 255, 0.15); stroke-width: 1.5; stroke-linecap: round; }
@keyframes twinkle { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }
@keyframes pulse-glow { 0%, 100% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(1.15); opacity: 1; } }
.star-dot { animation: twinkle 5s ease-in-out infinite; }
.star-dot.delay-1 { animation-delay: -1.5s; }
.star-dot.delay-2 { animation-delay: -3s; }
.conn-line { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.conn-line.draw { animation: drawLine 7s ease forwards; }
@keyframes drawLine { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
.transform-center { transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: reduce) {
  .star-dot, .conn-line { animation: none; opacity: 0.8; }
  .card { transform: none; }
  html { scroll-behavior: auto; }
}
