/* 设计变量与基础重置 */
:root {
  --bg-primary: #0B1120;
  --bg-secondary: #111827;
  --bg-surface: #1F2937;
  --border-color: #374151;
  --text-primary: #F9FAFB;
  --text-secondary: #D1D5DB;
  --text-muted: #9CA3AF;
  --accent: #F97316;
  --accent-hover: #EA580C;
  --focus-ring: rgba(249, 115, 22, 0.45);
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --shadow-card: 0 4px 12px rgba(0,0,0,0.35), 0 1px 3px rgba(0,0,0,0.2);
  --font-sans: 'PingFang SC', 'Noto Sans SC', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
  --container-max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  line-height: 1.65;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s ease, background-color 0.2s ease; }
a:hover { color: var(--accent-hover); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
ul, ol { padding-left: 1.2rem; }
li { margin-bottom: var(--spacing-sm); }

/* 排版 */
h1, h2, h3, h4 { color: var(--text-primary); font-weight: 700; line-height: 1.25; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 1.8rem + 3vw, 3.5rem); margin-bottom: var(--spacing-md); }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.5vw, 2.2rem); margin-bottom: var(--spacing-lg); }
h3 { font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.5rem); margin-bottom: var(--spacing-sm); }
p { margin-top: 0; margin-bottom: var(--spacing-md); }
code, .mono { font-family: var(--font-mono); font-size: 0.9em; background: rgba(255,255,255,0.06); padding: 0.15em 0.4em; border-radius: var(--radius-sm); }

/* 布局容器 */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--spacing-lg); }
.section { padding: var(--spacing-xl) 0; position: relative; }
.section-alt { background-color: var(--bg-secondary); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: var(--spacing-lg); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--spacing-lg); }
.flex-center { display: flex; justify-content: center; align-items: center; }

/* 导航与页头 */
.header { position: sticky; top: 0; z-index: 100; background: rgba(11, 17, 32, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border-color); }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.brand { display: flex; align-items: center; gap: var(--spacing-sm); }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand-text { font-weight: 700; font-size: 1.1rem; color: var(--text-primary); letter-spacing: 0.02em; }
.nav-list { display: flex; gap: var(--spacing-lg); list-style: none; margin: 0; padding: 0; }
.nav-link { color: var(--text-secondary); font-weight: 500; padding: var(--spacing-xs) 0; position: relative; }
.nav-link[aria-current="page"], .nav-link:hover { color: var(--accent); }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 2px; background: var(--accent); border-radius: 1px; }
.mobile-toggle { display: none; background: none; border: none; color: var(--text-primary); cursor: pointer; padding: var(--spacing-sm); }
.menu-icon { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; fill: none; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--spacing-sm);
  padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 600; border-radius: var(--radius-md);
  border: none; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(249,115,22,0.35); }
.btn-secondary { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-secondary:hover { background: rgba(249,115,22,0.1); }
.btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

/* 卡片与组件 */
.card { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: var(--spacing-lg); box-shadow: var(--shadow-card); transition: transform 0.2s ease, border-color 0.2s ease; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card-title { margin-top: 0; margin-bottom: var(--spacing-sm); color: var(--text-primary); }
.card-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: var(--spacing-sm); display: block; }
.card p { margin-bottom: 0; color: var(--text-secondary); }

/* 表格 */
.table-wrapper { overflow-x: auto; border: 1px solid var(--border-color); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; background: var(--bg-surface); }
th, td { padding: var(--spacing-md); text-align: left; border-bottom: 1px solid var(--border-color); }
th { background: rgba(255,255,255,0.04); color: var(--text-primary); font-weight: 600; }
tr:last-child td { border-bottom: none; }
td { color: var(--text-secondary); }

/* FAQ / Details */
details { margin-bottom: var(--spacing-md); border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-surface); overflow: hidden; }
summary { padding: var(--spacing-md); font-weight: 600; color: var(--text-primary); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; user-select: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; color: var(--accent); transition: transform 0.2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details[open] summary { border-bottom: 1px solid var(--border-color); background: rgba(255,255,255,0.02); }
.details-content { padding: var(--spacing-md); color: var(--text-secondary); line-height: 1.7; }

/* SVG 动效核心 */
.svg-anim-container { width: 100%; max-width: 400px; margin: 0 auto; }
.float-card { animation: floatY 6s ease-in-out infinite; }
.float-card:nth-child(2) { animation-delay: -2s; }
.float-card:nth-child(3) { animation-delay: -4s; }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawLine 3.5s ease-in-out forwards;
}
@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
.pulse-dot { animation: pulseDot 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulseDot {
  0%, 100% { opacity: 0.4; r: 4; }
  50% { opacity: 1; r: 6; }
}

/* 响应式适配 */
@media (max-width: 768px) {
  .nav-list { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; background: var(--bg-primary); padding: var(--spacing-lg); border-bottom: 1px solid var(--border-color); }
  .nav-list.is-open { display: flex; }
  .mobile-toggle { display: block; }
  .section { padding: var(--spacing-lg) 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .float-card, .draw-path, .pulse-dot { animation: none !important; }
}
