/* 设计变量与基础配置 */
:root {
  --bg-dark: #231334;
  --bg-paper: #E9E8EA;
  --color-text: #1C1523;
  --color-brand: #7D14EB;
  --color-accent: #EDD26E;
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 2px solid var(--color-text);
  --card-shadow: 4px 4px 0 var(--color-text);
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1280px;
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 深色面与纸面卡片取色覆盖 */
.dark-surface {
  --bg-surface: var(--bg-dark);
  --color-text-surface: var(--bg-paper);
  --color-highlight-surface: var(--color-accent);
  --card-border: 2px solid var(--bg-paper);
  --card-shadow: 4px 4px 0 var(--bg-paper);
}

.paper-card {
  --bg-surface: var(--bg-paper);
  --color-text-surface: var(--color-text);
  --color-highlight-surface: var(--color-brand);
  --card-border: 2px solid var(--color-text);
  --card-shadow: 4px 4px 0 var(--color-text);
}

/* 重置与排版 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  line-height: 1.75;
  color: var(--color-text);
  background: var(--bg-paper);
  -webkit-font-smoothing: antialiased;
}

/* 标题与眉标 */
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.25; margin-bottom: var(--gap); }
h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.4; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; max-width: 38em; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--color-brand);
}
.dark-surface .eyebrow { color: var(--color-accent); }
.hl { font-weight: 800; }
.dark-surface .hl { color: var(--color-accent); }

/* 布局容器 */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }

/* 页头与导航 */
header { position: sticky; top: 0; z-index: 100; background: var(--bg-paper); border-bottom: 1px solid rgba(0,0,0,0.08); transition: background 0.3s; }
.dark-surface header { background: var(--bg-dark); border-bottom: 1px solid rgba(255,255,255,0.1); }
nav { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.nav-links { display: flex; gap: var(--gap); list-style: none; }
.nav-links a { text-decoration: none; color: var(--color-text); font-weight: 500; transition: color 0.2s; }
.dark-surface .nav-links a { color: var(--bg-paper); }
.nav-links a:hover { color: var(--color-brand); }
.dark-surface .nav-links a:hover { color: var(--color-accent); }
.nav-links a[aria-current="page"] { color: var(--color-brand); font-weight: 700; }
.dark-surface .nav-links a[aria-current="page"] { color: var(--color-accent); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 0.75rem;
  padding: 0 1.5rem; height: 52px; border-radius: var(--radius-btn);
  font-weight: 600; text-decoration: none; cursor: pointer; border: none;
  transition: transform 0.2s, opacity 0.2s;
}
.btn-primary { background: var(--color-accent); color: var(--bg-dark); }
.btn-secondary { background: transparent; border: 2px solid var(--color-text); color: var(--color-text); }
.dark-surface .btn-secondary { border-color: var(--bg-paper); color: var(--bg-paper); }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 2px; }

/* 卡片与面板 */
.card {
  background: var(--bg-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
}
.panel-bg {
  background: var(--bg-dark);
  border-radius: var(--radius-card);
  padding: var(--gap);
  position: relative;
  overflow: hidden;
}

/* 表格 */
table { width: 100%; border-collapse: collapse; margin: var(--gap) 0; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.1); }
th { font-weight: 700; }
.dark-surface th, .dark-surface td { border-bottom-color: rgba(255,255,255,0.15); }

/* FAQ */
details { margin-bottom: 1rem; border: var(--card-border); border-radius: var(--radius-card); padding: 1rem; background: var(--bg-paper); }
summary { cursor: pointer; font-weight: 600; list-style: none; padding: 0.5rem 0; }
summary::-webkit-details-marker { display: none; }
summary::marker { content: ""; }
details p { margin-top: 0.75rem; color: var(--color-text); }

/* SVG 基础与响应式 */
.svg-panel { width: 100%; height: auto; max-width: 100%; display: block; }
svg { overflow: visible; }

/* SVG 动效关键帧 */
.anim-orbit { animation: orbit-breathe 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-bubble { animation: bubble-float 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-bubble.d1 { animation-delay: 1s; }
.anim-bubble.d2 { animation-delay: 2s; }
.anim-dots circle { animation: dot-breathe 3s ease-in-out infinite; }
.anim-dots circle:nth-child(1) { animation-delay: 0s; }
.anim-dots circle:nth-child(2) { animation-delay: 0.5s; }
.anim-dots circle:nth-child(3) { animation-delay: 1s; }
.anim-notify { animation: notify-slide 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.draw-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: line-flow 8s linear infinite; }

@keyframes orbit-breathe { 0%, 100% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.06); opacity: 0.8; } }
@keyframes bubble-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes dot-breathe { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes notify-slide { 0%, 100% { transform: translateX(0); opacity: 0; } 10%, 90% { transform: translateX(0); opacity: 1; } }
@keyframes line-flow { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }

@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; }
  .anim-orbit, .anim-bubble, .anim-dots circle, .anim-notify, .draw-line { animation: none !important; opacity: 1 !important; transform: none !important; stroke-dashoffset: 0 !important; }
}

/* 辅助类 */
.text-center { text-align: center; }
.mb-gap { margin-bottom: var(--gap); }
.flex-wrap { display: flex; flex-wrap: wrap; gap: var(--gap); }
