:root {
  --bg-dark: #271334;
  --bg-paper: #E9E8EA;
  --text-main: #1D1523;
  --brand: #8A13DD;
  --accent: #9EED6E;
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 2px solid var(--text-main);
  --card-shadow: 4px 4px 0 var(--text-main);
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 960px;
  --line-h: 1.65;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-paper);
  color: var(--text-main);
  line-height: var(--line-h);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}

/* 区块通用 */
.section {
  padding-block: var(--section-y);
  position: relative;
}
.section + .section {
  border-top: 1px solid rgba(29, 21, 35, 0.12);
}
.section.dark {
  background: var(--bg-dark);
  color: var(--bg-paper);
}
.section.dark .hl { color: var(--accent); }
.section.dark .badge { color: var(--accent); }
.section.dark a.btn-primary { background: var(--accent); color: var(--bg-dark); }
.section.dark a.btn-secondary { color: var(--bg-paper); border-color: var(--bg-paper); }
.section.dark a.btn-secondary:hover { background: rgba(158, 237, 110, 0.15); }

.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.5em;
  color: var(--brand);
}
.section.dark .badge { color: var(--accent); }

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
  color: var(--text-main);
}
.section.dark h1, .section.dark h2, .section.dark h3, .section.dark h4 { color: var(--bg-paper); }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 0.8em; }
h3 { font-size: 1.25rem; margin-bottom: 0.5em; }
p { margin-bottom: 1em; max-width: 38em; }
.hl { color: var(--brand); font-weight: 600; }
.section.dark .hl { color: var(--accent); }

/* 按钮 */
.btn-group { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 1.5em; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.btn-primary {
  background: var(--accent);
  color: var(--bg-dark);
  border: none;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 2px solid var(--text-main);
}
.btn-secondary:hover { transform: translateY(-2px); background: rgba(29, 21, 35, 0.05); }
.section.dark .btn-secondary { color: var(--bg-paper); border-color: var(--bg-paper); }

/* 卡片 */
.card {
  background: var(--bg-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
}
.section.dark .card {
  background: var(--bg-paper);
  color: var(--text-main);
  border-color: var(--text-main);
}

/* 网格 */
.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)); }

/* 表格 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(29, 21, 35, 0.15);
}
th { font-weight: 700; white-space: nowrap; }
td { min-width: 0; }
.table-wrap::-webkit-scrollbar { height: 6px; }
.table-wrap::-webkit-scrollbar-thumb { background: rgba(29, 21, 35, 0.2); border-radius: 3px; }

/* FAQ */
details {
  background: var(--bg-paper);
  border: var(--card-border);
  border-radius: var(--radius-card);
  margin-bottom: 12px;
  overflow: hidden;
}
.summary {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.summary::-webkit-details-marker { display: none; }
.summary::after { content: "+"; font-size: 1.2rem; transition: transform 0.2s; }
details[open] .summary::after { transform: rotate(45deg); }
.detail-content { padding: 0 20px 16px; color: var(--text-main); }
.section.dark details { background: rgba(233, 232, 234, 0.15); border-color: rgba(233, 232, 234, 0.3); }
.section.dark .detail-content { color: var(--bg-paper); }

/* 页头页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(233, 232, 234, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(29, 21, 35, 0.1);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.logo img { height: 32px; width: auto; }
.nav-list { display: flex; gap: 24px; }
.nav-link { font-weight: 500; position: relative; }
.nav-link[aria-current="page"] { color: var(--brand); font-weight: 700; }
.nav-link::after {
  content: ""; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--brand); transition: width 0.2s;
}
.nav-link:hover::after { width: 100%; }
@media (max-width: 768px) {
  .nav-list { display: none; }
  .header-inner .btn { height: 40px; padding: 0 16px; font-size: 0.9rem; }
}
.site-footer {
  background: var(--bg-dark);
  color: var(--bg-paper);
  padding: 48px 0 32px;
}
.footer-inner { display: flex; flex-direction: column; gap: 24px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-copy { font-size: 0.85rem; opacity: 0.8; margin-top: 16px; }

/* 步骤条 */
.steps { display: flex; gap: 24px; flex-wrap: wrap; }
.step-item { flex: 1; min-width: 200px; }
.step-num {
  width: 32px; height: 32px;
  background: var(--accent);
  color: var(--bg-dark);
  font-weight: 700;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.step-item p { margin-bottom: 0; }

/* SVG 动效 */
.anim-float { animation: safeFloat 4s ease-in-out infinite; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: safeDraw 3s ease forwards; }
.anim-spin { animation: safeSpin 14s linear infinite; transform-box: fill-box; transform-origin: center; }
.anim-breathe { animation: safeBreathe 3s ease-in-out infinite; }
.anim-slide { animation: safeSlide 5s ease-in-out infinite alternate; }

@keyframes safeFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes safeDraw { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes safeSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes safeBreathe { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes safeSlide { 0% { transform: translateX(-10px); opacity: 0.6; } 100% { transform: translateX(10px); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 响应式微调 */
@media (max-width: 640px) {
  .hero-layout { flex-direction: column-reverse; }
  .hero-svg-wrap { max-width: 100%; margin-bottom: 24px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
}
