/* 设计变量与基础配置 */
:root {
  --bg-dark: #271231;
  --bg-paper: #F6F3F7;
  --text-body: #1F1523;
  --color-brand: #9E13DD;
  --color-accent: #ED6EC0;
  --color-text-on-dark: var(--bg-paper);
  --color-accent-on-dark: var(--color-accent);
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 1px solid rgba(31, 21, 35, 0.16);
  --card-shadow: none;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 960px;
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 重置与全局排版 */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-main);
  line-height: 1.65;
  color: var(--text-body);
  background: var(--bg-paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { padding-left: 0; list-style: none; }

/* 布局容器 */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
.section-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; }
@media (max-width: 768px) { .section-split { grid-template-columns: 1fr; } }

/* 主题面切换 */
.dark-surface { background: var(--bg-dark); color: var(--color-text-on-dark); }
.dark-surface .eyebrow, .dark-surface .hl, .dark-surface a:not(.btn) { color: var(--color-accent-on-dark); }
.light-card { background: var(--bg-paper); color: var(--text-body); border: var(--card-border); padding: var(--gap); }

/* 标题与文本 */
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin-top: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: var(--gap); }
h3 { font-size: 1.25rem; margin-bottom: 0.5em; }
p { max-width: 38em; margin-bottom: 1em; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 0.5em; color: var(--color-brand); }
.dark-surface .eyebrow { color: var(--color-accent); }
.hl { color: var(--color-brand); }
.dark-surface .hl { color: var(--color-accent); }

/* 按钮组件 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  height: 52px; padding: 0 24px; font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: transform 0.2s ease, filter 0.2s ease;
  border-radius: var(--radius-btn);
}
.btn-primary { background: var(--color-accent); color: var(--bg-dark); border: none; }
.btn-secondary { background: transparent; color: var(--text-body); border: 1px solid var(--text-body); }
.dark-surface .btn-secondary { color: var(--bg-paper); border-color: var(--bg-paper); }
.btn:hover { transform: translateY(-2px); filter: brightness(0.95); }
.btn:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }

/* 卡片与网格 */
.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)); }
.card { border: var(--card-border); background: var(--bg-paper); padding: var(--gap); }

/* 表格 */
table { width: 100%; border-collapse: collapse; margin: 1em 0; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table thead { display: table; width: 100%; table-layout: fixed; }
table tbody { display: block; width: 100%; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid rgba(31, 21, 35, 0.1); white-space: nowrap; }
th { font-weight: 700; }
@media (min-width: 640px) {
  table { display: table; overflow-x: visible; }
  table thead, table tbody { display: table; }
  th, td { white-space: normal; }
}

/* 定义列表（功能项） */
.dl-item { margin-bottom: 1.5em; border-bottom: 1px solid rgba(31, 21, 35, 0.08); padding-bottom: 1em; }
.dl-item dt { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.25em; }
.dl-item dd { margin-left: 0; color: var(--text-body); }

/* 步骤编号徽标 */
.step-list { counter-reset: step; }
.step-list li { position: relative; padding-left: 3.5em; margin-bottom: 1.5em; }
.step-list li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0; width: 2em; height: 2em;
  background: var(--color-accent); color: var(--bg-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; border-radius: var(--radius-btn);
}

/* 页头与页脚 */
header { position: sticky; top: 0; z-index: 100; background: var(--bg-paper); border-bottom: 1px solid rgba(31, 21, 35, 0.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.1rem; }
nav { display: flex; gap: 24px; }
nav a { font-weight: 500; transition: color 0.2s; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-brand); font-weight: 700; }
footer { padding: var(--section-y) 0; border-top: 1px solid rgba(31, 21, 35, 0.1); margin-top: var(--section-y); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.footer-links a { display: block; margin-bottom: 8px; font-size: 0.9rem; }
.footer-links a:hover { color: var(--color-brand); }

/* FAQ 折叠面板 */
details { border: var(--card-border); margin-bottom: 8px; background: var(--bg-paper); }
summary { padding: 16px; cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 40px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.2em; }
details[open] summary::after { content: '-'; }
details p { padding: 0 16px 16px; margin: 0; color: var(--text-body); }

/* SVG 动效系统 */
.svg-container { width: 100%; height: auto; max-width: 100%; overflow: hidden; }
.anim-float { animation: floatAnim 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-breathe { animation: breatheAnim 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-slide { animation: slideAnim 8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawAnim 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

@keyframes floatAnim { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes breatheAnim { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes slideAnim { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
@keyframes drawAnim { 0%, 100% { stroke-dashoffset: 1; } 50% { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .anim-float, .anim-breathe, .anim-slide, .anim-draw { animation: none !important; }
  html { scroll-behavior: auto; }
}
