:root {
  --color-dark: #240F29;
  --color-paper: #F6F3F7;
  --color-text: #201523;
  --color-brand: #A711CF;
  --color-accent: #ED6E73;
  --color-dark-text: #F6F3F7;
  --color-dark-accent: #ED6E73;
  --color-card-bg: #EBE7EC;
  --color-card-dark-bg: #2C1433;
  --color-border-subtle: rgba(32, 21, 35, 0.08);
  --color-border-dark-subtle: rgba(246, 243, 247, 0.12);
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 960px;
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--color-paper);
  color: var(--color-text);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* 颜色与表面层控制 */
.surface-dark {
  background: var(--color-dark);
  color: var(--color-dark-text);
}
.surface-dark .hl { color: var(--color-dark-accent); }
.surface-dark a:not(.btn) { color: var(--color-dark-accent); }
.surface-dark .subtitle { color: rgba(246, 243, 247, 0.85); }

.surface-paper {
  background: var(--color-paper);
  color: var(--color-text);
}
.surface-paper .hl { color: var(--color-brand); }
.surface-paper a:not(.btn) { color: var(--color-brand); }
.surface-paper .subtitle { color: var(--color-text); opacity: 0.85; }

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* 排版 */
h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); margin-bottom: var(--gap); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin-bottom: calc(var(--gap) * 1.5); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); margin-bottom: var(--gap); }
p { max-width: 38em; margin-bottom: var(--gap); }
.subtitle { font-size: clamp(1rem, 1.2vw, 1.15rem); margin-bottom: calc(var(--gap) * 2); }

.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: calc(var(--gap) * 0.5);
}
.surface-dark .badge { color: var(--color-dark-accent); }
.surface-paper .badge { color: var(--color-brand); }

/* 布局组件 */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
}
.flex-col { display: flex; flex-direction: column; }
.flex-row { display: flex; flex-direction: row; align-items: center; gap: var(--gap); }
.text-center { text-align: center; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  border: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 2px; }

.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
}
.surface-dark .btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
}
.surface-dark .btn-secondary {
  border-color: var(--color-dark-text);
  color: var(--color-dark-text);
}

/* 卡片与面板 */
.card {
  background: var(--color-card-bg);
  padding: calc(var(--gap) * 2);
  border-radius: var(--radius-card);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
}
.surface-dark .card {
  background: var(--color-card-dark-bg);
}

.panel {
  background: var(--color-dark);
  padding: calc(var(--gap) * 2);
  border-radius: var(--radius-card);
  position: relative;
  overflow: hidden;
}
.surface-paper .panel {
  background: var(--color-dark);
}

/* 表格 */
.table-wrapper {
  overflow-x: auto;
  margin-top: var(--gap);
  margin-bottom: var(--gap);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border-subtle);
}
.surface-dark th, .surface-dark td {
  border-bottom-color: var(--color-border-dark-subtle);
}
th { font-weight: 600; }
td:first-child { font-weight: 600; }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--color-border-subtle);
  margin-bottom: var(--gap);
}
.surface-dark .faq-item { border-bottom-color: var(--color-border-dark-subtle); }
summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background: currentColor;
  mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9 18l6-6-6-6"/></svg>') no-repeat center / contain;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9 18l6-6-6-6"/></svg>') no-repeat center / contain;
}
details[open] summary::before { transform: rotate(90deg); }
.faq-answer { padding-bottom: 12px; color: inherit; opacity: 0.9; }

/* 步骤徽标 */
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
}

/* SVG 基础与动画类 */
.svg-container {
  width: 100%;
  height: auto;
  max-width: 100%;
}
svg {
  width: 100%;
  height: auto;
  display: block;
}
svg path, svg circle, svg rect, svg line, svg polyline, svg polygon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 网格节点点亮动画 */
.node {
  fill: var(--color-brand);
  opacity: 0.2;
  animation: node-pulse 6s ease-in-out infinite;
}
.node:nth-child(1) { animation-delay: 0s; }
.node:nth-child(2) { animation-delay: 0.8s; }
.node:nth-child(3) { animation-delay: 1.6s; }
.node:nth-child(4) { animation-delay: 2.4s; }
.node:nth-child(5) { animation-delay: 3.2s; }
.node:nth-child(6) { animation-delay: 4.0s; }
.node:nth-child(7) { animation-delay: 4.8s; }
.node:nth-child(8) { animation-delay: 5.6s; }

@keyframes node-pulse {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* 气泡浮动 */
.bubble {
  animation: float-bubble 5s ease-in-out infinite alternate;
}
.bubble-delay-1 { animation-delay: 0.5s; }
.bubble-delay-2 { animation-delay: 1.2s; }

@keyframes float-bubble {
  0% { transform: translateY(0); opacity: 0.7; }
  100% { transform: translateY(-8px); opacity: 1; }
}

/* 输入框呼吸点 */
.input-dot {
  animation: breathe 2.5s ease-in-out infinite;
}
.input-dot:nth-child(2) { animation-delay: 0.3s; }
.input-dot:nth-child(3) { animation-delay: 0.6s; }

@keyframes breathe {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* 通知滑入 */
.notification {
  animation: slide-in 4s ease-in-out infinite alternate;
}
@keyframes slide-in {
  0% { transform: translateX(-10px); opacity: 0.5; }
  100% { transform: translateX(0); opacity: 1; }
}

/* 描边绘制 */
.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-stroke 6s linear infinite;
}
@keyframes draw-stroke {
  0% { stroke-dashoffset: 1; }
  50%, 100% { stroke-dashoffset: 0; }
}

/* 旋转缩放修正 */
svg [class*="anim-rotate"] {
  transform-box: fill-box;
  transform-origin: center;
}

/* 响应式与无障碍 */
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  h1 { font-size: clamp(2rem, 8vw, 3.2rem); }
  h2 { font-size: clamp(1.5rem, 5vw, 2.2rem); }
}

@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;
  }
  .node, .bubble, .input-dot, .notification, .draw-path {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
}

/* 页头页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: 12px 0;
}
.surface-dark .site-header {
  background: var(--color-dark);
  border-bottom-color: var(--color-border-dark-subtle);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: inherit;
}
.logo img { height: 28px; width: auto; }
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  padding: 8px 0;
  position: relative;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--color-brand);
}
.surface-dark .nav-links a:hover, .surface-dark .nav-links a[aria-current="page"] {
  color: var(--color-dark-accent);
}
.site-footer {
  padding: 48px 0;
  border-top: 1px solid var(--color-border-subtle);
  margin-top: var(--section-y);
}
.surface-dark .site-footer {
  border-top-color: var(--color-border-dark-subtle);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}
.footer-col h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 12px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { text-decoration: none; color: inherit; opacity: 0.8; }
.footer-col a:hover { opacity: 1; text-decoration: underline; }
.copyright {
  margin-top: 32px;
  font-size: 0.85rem;
  opacity: 0.7;
  text-align: center;
}

/* 特性导航锚点 */
.feature-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: calc(var(--gap) * 2);
  border-bottom: 1px solid var(--color-border-subtle);
  padding-bottom: 8px;
}
.feature-nav a {
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-btn);
  transition: background 0.2s;
}
.feature-nav a:hover { background: rgba(0,0,0,0.05); }
.surface-dark .feature-nav a:hover { background: rgba(255,255,255,0.05); }

.news-card {
  background: var(--color-card-bg);
  padding: 24px;
  height: 100%;
}
.surface-dark .news-card { background: var(--color-card-dark-bg); }
.news-date { font-size: 0.8rem; opacity: 0.7; margin-bottom: 8px; display: block; }
.news-title { font-weight: 600; margin-bottom: 8px; line-height: 1.3; }
.news-excerpt { font-size: 0.95rem; opacity: 0.85; line-height: 1.6; }
