/* === 设计变量 === */
:root {
  --color-dark: #1B1231;
  --color-paper: #F4F3F7;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #9977EE;
  --color-light-paper: #EAE9F0;
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 2px solid var(--color-text);
  --card-shadow: 4px 4px 0 var(--color-text);
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1280px;
  --font-main: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

/* === 基础重置与排版 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-main);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* === 布局容器 === */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding-block: var(--section-y); }
.bg-dark { background: var(--color-dark); color: var(--color-paper); }
.bg-paper { background: var(--color-paper); color: var(--color-text); }
.bg-light-paper { background: var(--color-light-paper); color: var(--color-text); }

/* === 标题与眉标 === */
.subtitle {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.bg-paper .subtitle { color: var(--color-brand); }
.bg-dark .subtitle { color: var(--color-accent); }

h1, h2, h3 { font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
p { max-width: 38em; margin-bottom: 1rem; }
strong { font-weight: 600; }

.hl { color: var(--color-brand); }
.bg-dark .hl { color: var(--color-accent); }

/* === 按钮 === */
.btn-group { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0 1.5rem; height: 52px; border-radius: var(--radius-btn);
  font-weight: 600; font-size: 1rem; cursor: pointer; border: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(153, 119, 238, 0.35); }
.btn-secondary { background: transparent; border: 2px solid var(--color-text); color: var(--color-text); }
.bg-dark .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.btn-secondary:hover { background: rgba(0,0,0,0.05); }
.bg-dark .btn-secondary:hover { background: rgba(255,255,255,0.08); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

/* === 卡片与面板 === */
.card {
  background: var(--color-paper);
  border: var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-4px); }
.bg-dark .card {
  background: #2A2045;
  border-color: var(--color-paper);
  box-shadow: 4px 4px 0 var(--color-paper);
}
.card-inner { color: inherit; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.flex-col { display: flex; flex-direction: column; gap: var(--gap); }
.text-center { text-align: center; }

/* === 表格 === */
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid currentColor; }
th { font-weight: 600; white-space: nowrap; }
td { max-width: 0; overflow-wrap: anywhere; }

/* === 步骤编号 === */
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--color-accent); color: var(--color-dark);
  font-weight: 700; font-size: 0.85rem; margin-right: 0.5rem;
}

/* === FAQ === */
details {
  margin-bottom: 1rem; border: var(--card-border);
  border-radius: var(--radius-card); padding: 1rem; background: var(--color-paper);
}
.bg-dark details { background: #2A2045; border-color: var(--color-paper); }
summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-left: 1.25rem; }
summary::-webkit-details-marker { display: none; }
summary::marker { display: none; }
summary::before {
  content: ""; position: absolute; left: 0; top: 0.55rem;
  width: 0.5rem; height: 0.5rem; border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: rotate(45deg);
}
details[open] summary::before { transform: rotate(-135deg); }
details p { margin-top: 0.75rem; margin-bottom: 0; }

/* === 页头页脚 === */
header { position: sticky; top: 0; z-index: 100; background: rgba(244, 243, 247, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(0,0,0,0.06); }
.bg-dark header { background: rgba(27, 18, 49, 0.92); border-bottom-color: rgba(255,255,255,0.1); }
nav { display: flex; justify-content: space-between; align-items: center; padding: 1rem var(--gap); max-width: var(--content-max); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { font-weight: 500; transition: color 0.2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-brand); }
.bg-dark .nav-links a:hover, .bg-dark .nav-links a[aria-current="page"] { color: var(--color-accent); }
footer { padding: 2rem var(--gap); text-align: center; border-top: 1px solid currentColor; margin-top: auto; font-size: 0.9rem; opacity: 0.85; }

/* === SVG 动效系统 === */
svg.hero-svg { width: 100%; height: auto; display: block; }
.svg-star { animation: twinkle 4s ease-in-out infinite; }
.svg-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: connectLine 6s ease-in-out infinite; }
.svg-bubble { animation: floatBubble 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.svg-card { animation: slideIn 0.8s ease-out forwards; opacity: 0; }
.svg-dot { animation: breathe 3s ease-in-out infinite; }

@keyframes twinkle { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }
@keyframes connectLine { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes floatBubble { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes slideIn { 0% { transform: translateX(20px); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
@keyframes breathe { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .svg-star, .svg-line, .svg-bubble, .svg-card, .svg-dot { animation: none !important; opacity: 1 !important; transform: none !important; }
}
