/* 全站共享样式：设计变量、排版、组件、SVG 动效 */
:root {
  /* 色板 */
  --color-bg-dark: #271231;
  --color-bg-paper: #F6F3F7;
  --color-text-body: #1F1523;
  --color-brand: #9E13DD;
  --color-accent: #ED6EC0;
  --color-surface-light: #FFFFFF;

  /* 结构 Token */
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(31, 21, 35, 0.3);
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 960px;

  /* 字体 */
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* 基础重置与排版 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  color: var(--color-text-body);
  background-color: var(--color-bg-paper);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: opacity 0.2s ease; }
a:hover { opacity: 0.85; }
ul, ol { list-style: none; }

/* 布局容器 */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 243, 247, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(31, 21, 35, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-body);
}
.nav-links a[aria-current="page"] { color: var(--color-brand); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 52px;
  padding: 0 28px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-bg-dark);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(237, 110, 192, 0.4); }
.btn-secondary {
  background: transparent;
  border: 2px solid var(--color-text-body);
  color: var(--color-text-body);
}
.dark-surface .btn-secondary { border-color: var(--color-bg-paper); color: var(--color-bg-paper); }
.btn-secondary:hover { background: rgba(31, 21, 35, 0.05); }
.dark-surface .btn-secondary:hover { background: rgba(246, 243, 247, 0.1); }

/* 眉标 */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--color-brand);
}
.dark-surface .eyebrow { color: var(--color-accent); }

/* 标题 */
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); margin-bottom: 24px; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 32px; }
h3 { font-size: 1.4rem; margin-bottom: 16px; }
.hl { color: var(--color-brand); }
.dark-surface .hl { color: var(--color-accent); }

/* 区块通用 */
section { padding: var(--section-y) 0; border-bottom: 1px solid rgba(31, 21, 35, 0.08); }
.dark-section { background-color: var(--color-bg-dark); color: var(--color-bg-paper); }
.dark-section section { border-bottom: none; }

/* 卡片与面板 */
.card {
  background: var(--color-surface-light);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: 32px;
  border-radius: var(--radius-card);
}
.panel {
  background: var(--color-bg-dark);
  padding: 48px;
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  position: relative;
  overflow: hidden;
}
.light-card {
  background: var(--color-surface-light);
  color: var(--color-text-body);
  border: 1px solid rgba(31, 21, 35, 0.08);
  padding: 32px;
  border-radius: var(--radius-card);
}

/* 表格 */
.data-table { width: 100%; border-collapse: collapse; margin-top: 24px; }
.data-table th, .data-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(31, 21, 35, 0.1);
  text-align: left;
  vertical-align: top;
}
.data-table th { font-weight: 700; width: 40%; }
.dark-surface .data-table th, .dark-surface .data-table td { border-bottom-color: rgba(246, 243, 247, 0.1); }

/* FAQ */
details {
  border: 1px solid rgba(31, 21, 35, 0.1);
  margin-bottom: 16px;
  padding: 20px 24px;
  border-radius: var(--radius-card);
}
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; }
details[open] summary::after { content: "-"; }
details p { margin-top: 16px; line-height: 1.7; color: var(--color-text-body); }

/* 页脚 */
.site-footer {
  padding: 64px 0;
  border-top: 1px solid rgba(31, 21, 35, 0.08);
  text-align: center;
  font-size: 0.9rem;
  color: rgba(31, 21, 35, 0.6);
}

/* SVG 动效 Keyframes */
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes spin-reverse {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}
@keyframes draw-path {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes float-up {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(-8px); opacity: 1; }
}
@keyframes pulse-opacity {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* 动效类 */
.geo-spin { animation: spin-slow 12s linear infinite; transform-box: fill-box; transform-origin: center; }
.geo-spin-rev { animation: spin-reverse 14s linear infinite; transform-box: fill-box; transform-origin: center; }
.geo-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-path 3s ease-out forwards; }
.geo-float { animation: float-up 4s ease-in-out infinite; }
.geo-pulse { animation: pulse-opacity 3s ease-in-out infinite; }

/* 减少动态效果 */
@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;
  }
  .geo-spin, .geo-spin-rev, .geo-draw, .geo-float, .geo-pulse { animation: none !important; }
}

/* 响应式微调 */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: 16px 0; gap: 16px; }
  .nav-links { gap: 16px; }
  .grid-split { grid-template-columns: 1fr !important; }
  .panel { min-height: 300px; }
}
