/* ==================== 设计变量 ==================== */
:root {
  --color-bg: #080c14;
  --color-surface: #111827;
  --color-surface-hover: #1e293b;
  --color-primary: #2563eb;
  --color-accent: #00e5ff;
  --color-text: #f1f5f9;
  --color-text-secondary: #94a3b8;
  --color-border: #1e293b;
  --color-success: #10b981;
  --color-warning: #f59e0b;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --font-rounded: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Hiragino Sans GB", sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 16px rgba(37, 99, 235, 0.4);

  --space-section: clamp(3rem, 6vw, 6rem);
  --space-component: 1.5rem;
  --container-max: 1200px;

  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== 基础重置与排版 ==================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-rounded);
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
  background-color: var(--color-bg);
  -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-base); }
button, input, select, textarea { font: inherit; color: inherit; }

/* 流体字号 */
h1 { font-size: clamp(2.25rem, 5vw + 1rem, 3.5rem); line-height: 1.2; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3vw + 0.5rem, 2.5rem); line-height: 1.3; }
h3 { font-size: clamp(1.25rem, 2vw + 0.5rem, 1.5rem); line-height: 1.4; }
p, li { color: var(--color-text-secondary); }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.section {
  padding-block: var(--space-section);
  position: relative;
}
.section-title {
  margin-bottom: 2.5rem;
  text-align: center;
}
.section-title h2 { margin-bottom: 0.5rem; }
.section-title p { max-width: 640px; margin-inline: auto; }

/* ==================== 页头与导航 ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo-link { display: flex; align-items: center; gap: 0.75rem; }
.logo-img { width: 120px; height: auto; object-fit: contain; }
.brand-name { font-weight: 600; font-size: 1.1rem; letter-spacing: 0.05em; }
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}
.nav-link {
  position: relative;
  font-weight: 500;
  padding: 0.5rem 0;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--color-accent); }
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

/* ==================== 按钮组件 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: none;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37, 99, 235, 0.5); }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.btn-secondary:hover { border-color: var(--color-text-secondary); background: var(--color-surface-hover); }
.btn-icon { width: 20px; height: 20px; }

/* ==================== 卡片与网格 ==================== */
.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: 2rem;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--color-primary); }
.card-icon { margin-bottom: 1rem; color: var(--color-accent); }
.card h3 { margin-bottom: 0.5rem; color: var(--color-text); }
.card p { margin: 0; font-size: 0.95rem; }

.news-card { display: flex; flex-direction: column; gap: 1rem; }
.news-meta { font-size: 0.85rem; color: var(--color-text-secondary); display: flex; align-items: center; gap: 0.5rem; }
.news-body { flex: 1; }
.news-actions { margin-top: auto; padding-top: 1rem; }

/* ==================== 表格组件 ==================== */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--color-border); }
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
}
.data-table th, .data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.data-table th { background: rgba(37, 99, 235, 0.1); font-weight: 600; color: var(--color-accent); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--color-surface-hover); }

/* ==================== FAQ 组件 ==================== */
.faq-list { display: flex; flex-direction: column; gap: 1rem; max-width: 800px; margin-inline: auto; }
.faq-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.faq-summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::after { content: "+"; font-size: 1.25rem; color: var(--color-accent); transition: transform var(--transition-base); }
.faq-item[open] .faq-summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 1.5rem 1.25rem; line-height: 1.7; color: var(--color-text-secondary); }
.faq-item[open] .faq-answer { animation: fadeIn 0.3s ease; }

/* ==================== SVG 图标与动效 ==================== */
.icon-svg { width: 24px; height: 24px; stroke-width: 1.5; stroke: currentColor; fill: none; flex-shrink: 0; }
.svg-canvas { width: 100%; height: auto; overflow: visible; }

@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; filter: drop-shadow(0 0 2px var(--color-accent)); }
  50% { opacity: 0.9; filter: drop-shadow(0 0 6px var(--color-accent)); }
}
@keyframes drawLine {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.star-node { animation: twinkle 4.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.star-node:nth-child(odd) { animation-duration: 5.5s; animation-delay: 1s; }
.sync-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawLine 6s linear infinite alternate; }
.neon-pulse { animation: pulseGlow 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.float-element { animation: floatY 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .star-node, .sync-path, .neon-pulse, .float-element { animation: none !important; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* ==================== 响应式适配 ==================== */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 1rem 0; }
  .main-nav { width: 100%; overflow-x: auto; white-space: nowrap; padding-bottom: 0.5rem; }
  .main-nav ul { gap: 1.25rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .alternating-layout .visual-side { order: -1; }
}
