/* =========================================
   设计变量与基础重置
   ========================================= */
:root {
  --bg-root: #080e1a;
  --bg-surface: #0f172a;
  --bg-card: #162032;
  --border-subtle: #1e293b;
  --border-hover: #3b82f6;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --neon-glow: rgba(6, 182, 212, 0.35);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-button: 0 4px 12px rgba(6, 182, 212, 0.25);
  --font-main: 'PingFang SC', 'Noto Sans SC', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --spacing-unit: 1rem;
  --container-max: 1120px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-main);
  background-color: var(--bg-root);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 16px;
  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; }

/* =========================================
 排版与容器
   ========================================= */
.container {
  width: min(92%, var(--container-max));
  margin-inline: auto;
  padding-block: clamp(2rem, 5vh, 4rem);
}
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); margin-bottom: 0.5em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: 1.2em; position: relative; padding-bottom: 0.6em; }
h2::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), transparent);
  border-radius: 2px;
}
h3 { font-size: clamp(1.15rem, 2.5vw, 1.4rem); margin-bottom: 0.8em; }
p { margin-bottom: 1em; color: var(--text-secondary); text-wrap: pretty; }
.section-desc { max-width: 720px; margin-bottom: 2.5rem; font-size: 1.05rem; }

/* =========================================
 页头与导航
   ========================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 14, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding-block: 0.8rem;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.1rem; }
.brand img { width: 48px; height: 48px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px; }
.nav-list { display: flex; gap: 1.5rem; align-items: center; }
.nav-list a {
  font-size: 0.95rem; color: var(--text-secondary); padding: 0.4rem 0; position: relative;
}
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--accent-cyan); }
.nav-list a[aria-current="page"]::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--accent-cyan);
}
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; }
.mobile-toggle svg { width: 24px; height: 24px; stroke: var(--text-primary); }

@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .nav-list {
    position: fixed; top: 60px; right: 0; width: min(85%, 300px);
    background: var(--bg-surface); border: 1px solid var(--border-subtle);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    flex-direction: column; padding: 1.5rem; gap: 1rem;
    transform: translateY(-120%); opacity: 0; transition: var(--transition-base);
    pointer-events: none;
  }
  .nav-list.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
}

/* =========================================
 通用组件
   ========================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.6rem; border-radius: var(--radius-md); font-weight: 500;
  cursor: pointer; transition: all var(--transition-fast); border: 1px solid transparent;
  font-size: 1rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: #fff; box-shadow: var(--shadow-button);
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(6, 182, 212, 0.4); }
.btn-outline {
  background: transparent; border-color: var(--border-hover); color: var(--accent-cyan);
}
.btn-outline:hover { background: rgba(59, 130, 246, 0.1); border-color: var(--accent-cyan); }

.card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 1.5rem;
  transition: transform var(--transition-base), border-color var(--transition-fast);
}
.card:hover { transform: translateY(-4px); border-color: var(--accent-blue); }
.card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(6, 182, 212, 0.12); display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem; color: var(--accent-cyan);
}
.card-icon svg { width: 20px; height: 20px; stroke-width: 2; }

.grid-3 { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* 表格 */
.table-wrapper { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); margin-top: 1rem; }
.table-wrapper table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table-wrapper th, .table-wrapper td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--border-subtle); }
.table-wrapper th { background: rgba(255, 255, 255, 0.04); font-weight: 600; color: var(--accent-cyan); }
.table-wrapper tr:last-child td { border-bottom: none; }
.table-wrapper tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* 步骤与列表 */
.step-list { counter-reset: step; padding-left: 0; }
.step-list li {
  position: relative; padding-left: 3rem; margin-bottom: 1.2rem;
}
.step-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; background: var(--accent-blue); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 600;
}
.link-list { display: flex; flex-direction: column; gap: 0.8rem; }
.link-item { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.6rem; border-radius: var(--radius-sm); transition: background var(--transition-fast); }
.link-item:hover { background: rgba(255, 255, 255, 0.04); }
.link-item a { color: var(--accent-cyan); font-weight: 500; }
.link-item span { color: var(--text-secondary); font-size: 0.95rem; }

/* FAQ */
.faq details {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); margin-bottom: 1rem; overflow: hidden;
  transition: border-color var(--transition-fast);
}
.faq details[open] { border-color: var(--accent-blue); }
.faq summary {
  padding: 1rem 1.2rem; cursor: pointer; font-weight: 500; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; font-size: 1.2rem; color: var(--accent-cyan); transition: transform var(--transition-base);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 1.2rem 1.2rem; color: var(--text-secondary); line-height: 1.7; }

/* 焦点与可访问性 */
:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* =========================================
 SVG 动效与工具类
   ========================================= */
.icon { width: 24px; height: 24px; stroke-width: 2; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.star-dot { animation: twinkle 4s infinite ease-in-out; }
.star-dot:nth-child(odd) { animation-delay: 1.2s; animation-duration: 3.5s; }
.connection-line {
  stroke-dasharray: 1; stroke-dashoffset: 0;
  animation: draw-line 6s infinite linear;
}
.news-card { position: relative; overflow: hidden; }
.news-card time { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.4rem; display: block; }
.news-card .card-body { display: flex; flex-direction: column; height: 100%; }
.news-card p { flex: 1; }
.neon-divider {
  height: 1px; width: 100%; margin: 3rem 0;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0.4;
}

/* 关键帧定义 */
@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes draw-line {
  0% { stroke-dashoffset: 1; opacity: 0.3; }
  50% { stroke-dashoffset: 0.3; opacity: 0.8; }
  100% { stroke-dashoffset: 1; opacity: 0.3; }
}

/* 减少动态效果 */
@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;
  }
  .connection-line, .star-dot { animation: none !important; opacity: 0.6; }
}

/* =========================================
 页脚
   ========================================= */
.site-footer {
  background: var(--bg-surface); border-top: 1px solid var(--border-subtle);
  padding-block: 2.5rem 1.5rem; margin-top: 2rem;
}
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 1.5rem; font-size: 0.9rem; color: var(--text-muted);
}
.footer-links { display: flex; gap: 1.2rem; }
.footer-links a:hover { color: var(--text-primary); }
.footer-note { font-size: 0.85rem; opacity: 0.8; }

/* =========================================
 响应式与布局修复
   ========================================= */
@media (max-width: 900px) { 
  .hero-section { flex-direction: column; text-align: center; padding-top: 2rem; } 
  .hero-svg-container { position: static; width: 90%; max-width: 320px; margin-top: 2rem; } 
}

/* 强制 Hero 区域内部 Flex 行换行，解决小屏横向溢出 */
.hero-section > .container > div[style*="display:flex"] {
  flex-wrap: wrap !important;
}

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
