/* ==================== 设计变量 ==================== */
:root {
  --color-bg: #0B1120;
  --color-surface: #111A2E;
  --color-surface-hover: #162035;
  --color-border: #25304A;
  --color-text-primary: #E6EDF3;
  --color-text-secondary: #8B949E;
  --color-text-muted: #5C6370;
  --color-accent: #FF7A3E;
  --color-accent-hover: #FF9F6E;
  --color-accent-glow: rgba(255, 122, 62, 0.18);
  --color-success: #3FB950;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, "Courier New", monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 6px 28px rgba(0, 0, 0, 0.35);
  --shadow-elevated: 0 12px 40px rgba(0, 0, 0, 0.5);
  --container-max: 1200px;
  --section-gap: clamp(3rem, 8vw, 5.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-sans);
  background: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }

/* ==================== 排版系统 ==================== */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
  text-wrap: balance;
}
.section-desc {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--color-text-secondary);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 65ch;
  text-wrap: pretty;
}
h1, h2, h3 { line-height: 1.2; font-weight: 600; }
h1 { font-size: clamp(2.2rem, 6vw, 3.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); }
.mono { font-family: var(--font-mono); font-size: 0.9em; letter-spacing: 0.05em; }

/* ==================== 布局组件 ==================== */
.grid-auto { display: grid; gap: clamp(1rem, 3vw, 1.5rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-gradient {
  background: linear-gradient(135deg, var(--color-text-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.bg-glass {
  background: rgba(17, 26, 46, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

/* ==================== 导航与页头页脚 ==================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-logo { width: 36px; height: 36px; object-fit: contain; }
.brand-name { font-weight: 700; font-size: 1.1rem; }
.nav-desktop { display: flex; gap: 1.5rem; }
.nav-link {
  font-size: 0.95rem; font-weight: 500;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-link:hover, .nav-link[aria-current="page"] {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-mobile { display: none; padding: 1rem 0; border-top: 1px solid var(--color-border); }
.nav-mobile.active { display: block; }
.nav-mobile .nav-link { display: block; padding: 0.75rem 0; }

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .mobile-toggle { display: block; }
}

.site-footer {
  margin-top: var(--section-gap);
  padding: clamp(2rem, 5vw, 3rem) 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-col h4 { margin-bottom: 0.75rem; font-size: 1rem; }
.footer-col a { display: block; padding: 0.3rem 0; color: var(--color-text-secondary); font-size: 0.9rem; }
.footer-col a:hover { color: var(--color-accent); }
.copyright { text-align: center; margin-top: 2rem; color: var(--color-text-muted); font-size: 0.85rem; }

/* ==================== 按钮与表单 ==================== */
.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;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
}
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn-primary {
  background: var(--color-accent); color: #0B1120; border-color: var(--color-accent);
  box-shadow: 0 4px 12px var(--color-accent-glow);
}
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); box-shadow: 0 6px 16px var(--color-accent-glow); }
.btn-secondary {
  background: transparent; color: var(--color-text-primary); border-color: var(--color-border);
}
.btn-secondary:hover { border-color: var(--color-text-secondary); background: rgba(255,255,255,0.03); }

/* ==================== 卡片与表格 ==================== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); border-color: var(--color-accent); box-shadow: var(--shadow-card); }
.card-icon { width: 40px; height: 40px; margin-bottom: 1rem; color: var(--color-accent); }
.card-body h3 { margin-bottom: 0.5rem; }
.card-body p { color: var(--color-text-secondary); font-size: 0.95rem; }

.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; background: var(--color-surface); }
th, td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: rgba(0,0,0,0.25); font-weight: 600; font-size: 0.9rem; color: var(--color-accent); }
td { font-size: 0.95rem; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ==================== FAQ 原生组件 ==================== */
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }
details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
}
details[open] { border-color: var(--color-accent); }
summary {
  padding: 1rem 1.25rem;
  font-weight: 600; cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  user-select: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  width: 10px; height: 10px;
  border-right: 2px solid var(--color-text-secondary);
  border-bottom: 2px solid var(--color-text-secondary);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s;
}
details[open] summary::after { transform: rotate(-135deg) translateY(-2px); border-color: var(--color-accent); }
.details-content { padding: 0 1.25rem 1rem; color: var(--color-text-secondary); font-size: 0.95rem; line-height: 1.6; }

/* ==================== SVG 动效系统 ==================== */
.svg-icon { width: 24px; height: 24px; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.draw-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.animate-draw { animation: dash-reveal 3s ease-in-out infinite alternate; }
@keyframes dash-reveal {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: 1; }
}
.float-layer { transform-box: fill-box; transform-origin: center; animation: float-lift 6s ease-in-out infinite; }
.float-layer:nth-child(2) { animation-delay: -2s; }
.float-layer:nth-child(3) { animation-delay: -4s; }
@keyframes float-lift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.pulse-ring { transform-box: fill-box; transform-origin: center; animation: pulse-grow 4s linear infinite; }
@keyframes pulse-grow {
  0% { transform: scale(0.95); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.7; }
  100% { transform: scale(0.95); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation-delay: 0s !important;
  }
  .draw-path, .float-layer, .pulse-ring { animation: none !important; }
}

/* ==================== 辅助类 ==================== */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-accent { color: var(--color-accent); }
.divider { height: 1px; background: var(--color-border); margin: clamp(2rem, 5vw, 3rem) 0; }
.grid-check { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.check-item { display: flex; gap: 0.75rem; align-items: flex-start; }
.check-mark { width: 20px; height: 20px; flex-shrink: 0; color: var(--color-success); }
.link-arrow { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 500; color: var(--color-accent); }
.link-arrow:hover { text-decoration: underline; }
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-meta { font-size: 0.8rem; color: var(--color-text-muted); margin-top: auto; padding-top: 1rem; display: flex; justify-content: space-between; align-items: center; }
.related-list { display: grid; gap: 0.75rem; }
.related-item { display: flex; gap: 0.75rem; align-items: baseline; }
.related-link { font-weight: 500; color: var(--color-text-primary); }
.related-link:hover { color: var(--color-accent); }
.related-desc { font-size: 0.9rem; color: var(--color-text-secondary); margin-top: 0.2rem; }
