:root {
  /* 色板 */
  --color-dark: #1B1231;
  --color-paper: #DBD4ED;
  --color-body: #191523;
  --color-brand: #5214EB;
  --color-accent: #9977EE;

  /* 设计 Token */
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1120px;

  /* 字体与行高 */
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lh-body: 1.75;
  --lh-title: 1.15;

  /* 主题变量映射 */
  --bg: var(--color-paper);
  --text: var(--color-body);
  --accent-text: var(--color-brand);
  --card-bg: color-mix(in srgb, var(--color-paper) 92%, var(--color-body));
  --border-subtle: color-mix(in srgb, var(--text) 12%, transparent);
}

.theme-dark {
  --bg: var(--color-dark);
  --text: var(--color-paper);
  --accent-text: var(--color-accent);
  --card-bg: color-mix(in srgb, var(--color-dark) 85%, var(--color-paper));
  --border-subtle: color-mix(in srgb, var(--text) 15%, transparent);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  line-height: var(--lh-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 布局容器 */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* 排版 */
h1, h2, h3, h4 { font-weight: 500; line-height: var(--lh-title); letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); margin-bottom: 0.6em; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 0.5em; text-wrap: balance; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-top: 1.5em; margin-bottom: 0.4em; }
p { margin-bottom: 1em; max-width: 38em; }
ul, ol { padding-left: 1.2em; margin-bottom: 1em; }
li { margin-bottom: 0.4em; }
a { color: inherit; text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.85; }

/* 眉标 */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 0.8em;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}
.btn-secondary:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--text) 8%, transparent); }

/* 卡片 */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-3px); }

/* 网格与分栏 */
.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-row { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: center; }

/* 表格 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1em 0; }
table { width: 100%; border-collapse: collapse; min-width: 300px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-subtle); }
th { font-weight: 600; }
td:first-child { font-weight: 600; }

/* FAQ */
details {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  border: var(--card-border);
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: background 0.2s;
}
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 24px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 400;
  transition: transform 0.2s;
}
details[open] summary::after { content: "−"; }
details p { margin-top: 12px; margin-bottom: 0; }

/* 页头页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
}
.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 { width: 32px; height: 32px; object-fit: contain; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.95rem; }
.nav-links a[aria-current="page"], .nav-links a:hover { color: var(--accent-text); }
.mobile-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

.site-footer {
  padding: 48px 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--section-y);
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.footer-col h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 12px; opacity: 0.8; }
.footer-col a { display: block; margin-bottom: 8px; font-size: 0.9rem; }
.footer-copy { margin-top: 32px; font-size: 0.85rem; opacity: 0.7; text-align: center; }

/* SVG 基础与响应式 */
.svg-icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero-visual { width: 100%; height: auto; display: block; }
@media (min-width: 768px) {
  .hero-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--gap); align-items: center; }
  .feature-nav { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
  .feature-nav label {
    padding: 8px 16px;
    border-radius: var(--radius-btn);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
  }
  .feature-nav input[type="radio"] { display: none; }
  .feature-nav input:checked + label { background: var(--accent-text); color: var(--color-dark); border-color: var(--accent-text); }
  .feature-section { display: none; }
  .feature-section.active { display: block; }
}
@media (max-width: 767px) {
  .mobile-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    padding: 24px;
    border-bottom: 1px solid var(--border-subtle);
    gap: 16px;
  }
  .nav-links.open { display: flex; }
  .hero-layout { grid-template-columns: 1fr; }
  .feature-nav { display: block; }
  .feature-nav label { display: inline-block; margin-bottom: 8px; }
  .feature-section { display: block !important; }
}

/* SVG 动效关键帧 */
@keyframes twinkle {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}
@keyframes dashMove {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes slideIn {
  0% { transform: translateX(20px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* 动效类应用 */
.star { animation: twinkle 5s ease-in-out infinite; }
.line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: dashMove 7s ease-in-out infinite alternate; }
.bubble { animation: floatSoft 4.5s ease-in-out infinite; }
.dot-breathe { animation: breathe 3s ease-in-out infinite; }
.notify-slide { animation: slideIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: 0.2s; }

/* 减少动态效果 */
@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;
  }
  .star, .line, .bubble, .dot-breathe, .notify-slide { animation: none !important; }
}
