/* === 设计变量与基础重置 === */
:root {
  --color-dark: #21163C;
  --color-paper: #E9E8EA;
  --color-body: #191523;
  --color-brand: #5214EB;
  --color-accent: #ED926E;
  --color-white: #FFFFFF;

  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(25, 21, 35, 0.3);

  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1280px;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --line-height-base: 1.65;
  --line-height-tight: 1.15;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: var(--line-height-base);
  color: var(--color-body);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* === 容器与排版 === */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}
.section {
  padding-block: var(--section-y);
  border-bottom: 1px solid rgba(25, 21, 35, 0.08);
}
.section:last-child { border-bottom: none; }
.section--dark {
  background-color: var(--color-dark);
  color: var(--color-paper);
  border-bottom: none;
}
.section__label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}
.bg-paper .section__label { color: var(--color-brand); }
.section--dark .section__label { color: var(--color-accent); }

h1, h2, h3 { line-height: var(--line-height-tight); font-weight: 500; }
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 { margin-bottom: 1rem; max-width: 38em; }
.text-hl { font-weight: 700; }
.bg-paper .text-hl { color: var(--color-brand); }
.section--dark .text-hl { color: var(--color-accent); }

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

/* === 页头与页脚 === */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(233, 232, 234, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(25, 21, 35, 0.06);
  padding: 0.75rem 0;
}
.section--dark ~ .site-header, .site-header--dark {
  background: rgba(33, 22, 60, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.1rem; }
.logo img { height: 28px; width: auto; }
.nav { display: flex; gap: 1.25rem; align-items: center; }
.nav a { font-size: 0.95rem; font-weight: 500; transition: opacity 0.2s; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 0.85; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }

/* === 按钮 === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-btn);
  font-weight: 600; font-size: 1rem;
  cursor: pointer; border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn--primary {
  background: var(--color-accent); color: var(--color-dark);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(237, 146, 110, 0.35); }
.btn--secondary {
  background: transparent; border: 1.5px solid currentColor;
}
.bg-paper .btn--secondary { color: var(--color-body); }
.section--dark .btn--secondary { color: var(--color-paper); }
.btn--secondary:hover { background: rgba(25, 21, 35, 0.06); }
.section--dark .btn--secondary:hover { background: rgba(255, 255, 255, 0.08); }

/* === 卡片与面板 === */
.card {
  background: var(--color-white);
  border-radius: var(--radius-card);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px -12px rgba(25, 21, 35, 0.35); }
.panel {
  background: var(--color-dark);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
}
.bg-paper .panel { background: var(--color-dark); color: var(--color-paper); }

/* === 表格 === */
.data-table {
  width: 100%; border-collapse: collapse; margin-top: 1rem;
  font-size: 0.95rem;
  table-layout: fixed;
}
.data-table th, .data-table td {
  padding: 0.75rem 1rem; border-bottom: 1px solid rgba(25, 21, 35, 0.1);
  text-align: left; vertical-align: top;
  overflow-wrap: break-word;
  word-break: break-word;
}
.data-table th { font-weight: 600; width: 40%; }
.section--dark .data-table th, .section--dark .data-table td { border-bottom-color: rgba(255, 255, 255, 0.1); }

/* === FAQ (Details/Summary) === */
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem; }
.faq-item summary {
  font-weight: 600; cursor: pointer; padding: 1rem 1.25rem;
  background: rgba(25, 21, 35, 0.04); border-radius: var(--radius-btn);
  list-style: none; display: flex; align-items: center; gap: 0.75rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { display: none; content: ""; }
.faq-item summary::after {
  content: "+"; font-weight: 700; margin-left: auto; transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 1rem 1.25rem; margin: 0; font-size: 0.95rem; line-height: 1.6; }

/* === SVG 动效基类 === */
.svg-visual { width: 100%; height: auto; max-width: 100%; overflow: visible; }
.star-point { fill: var(--color-accent); opacity: 0.6; }
.line-path { fill: none; stroke: var(--color-accent); stroke-width: 1.5; stroke-linecap: round; }
.ui-block { fill: var(--color-paper); opacity: 0.95; }
.ui-line { stroke: var(--color-body); stroke-width: 1; opacity: 0.15; }
.section--dark .ui-line { stroke: var(--color-paper); opacity: 0.15; }

/* 连线流动 */
@keyframes dash-flow {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
.animate-line {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: dash-flow 3.5s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

/* 星点明灭 */
@keyframes pulse-star {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}
.animate-star {
  animation: pulse-star 4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.animate-star:nth-child(odd) { animation-delay: -1.5s; }
.animate-star:nth-child(even) { animation-delay: -2.8s; }

/* 界面元素微浮 */
@keyframes float-ui {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.animate-float { animation: float-ui 6s ease-in-out infinite; }
.animate-float-delay { animation-delay: -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;
  }
  .animate-line, .animate-star, .animate-float, .animate-float-delay {
    animation: none !important;
  }
}

/* === 响应式微调 === */
@media (max-width: 768px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .nav { gap: 0.75rem; }
  .nav a { font-size: 0.85rem; }
  h1 { font-size: clamp(2rem, 8vw, 3.5rem); }
}
