/* 基础变量与设计 Token */
:root {
  --color-dark: #140E25;
  --color-paper: #F5F0E5;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #C8ED6E;

  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 1px solid rgba(25, 21, 35, 0.16);
  --card-shadow: none;

  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1280px;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", Helvetica, Arial, sans-serif;
  --line-height-base: 1.75;
  --line-height-tight: 1.1;
  --letter-spacing-head: -0.02em;
}

/* 面色控制类 */
.face-dark {
  background-color: var(--color-dark);
  color: var(--color-paper);
}
.face-dark .brand-color { color: var(--color-accent); }
.face-dark .text-color { color: #f5f0e5; }
.face-dark .link-color { color: var(--color-accent); }
.face-dark input, .face-dark textarea, .face-dark select {
  background: rgba(245, 240, 229, 0.08);
  border: 1px solid rgba(245, 240, 229, 0.2);
  color: var(--color-paper);
}

.face-paper {
  background-color: var(--color-paper);
  color: var(--color-text);
}
.face-paper .brand-color { color: var(--color-brand); }
.face-paper .text-color { color: var(--color-text); }
.face-paper .link-color { color: var(--color-brand); }

/* 全局重置与排版 */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0 0 0.6em; font-weight: 800; line-height: var(--line-height-tight); letter-spacing: var(--letter-spacing-head); }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
p { margin: 0 0 1em; }

/* 布局容器 */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gap);
  padding-right: var(--gap);
}
.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

/* 页头与页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(20, 14, 37, 0.9);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo-group { display: flex; align-items: center; gap: 12px; }
.logo-img { width: 32px; height: 32px; object-fit: contain; }
.nav-list { display: flex; gap: 24px; align-items: center; }
.nav-link { font-size: 0.95rem; opacity: 0.85; transition: opacity 0.2s; }
.nav-link:hover, .nav-link[aria-current="page"] { opacity: 1; }
.nav-link[aria-current="page"] { font-weight: 600; }

.site-footer {
  border-top: 1px solid rgba(245, 240, 229, 0.1);
  padding: 48px 0;
  font-size: 0.9rem;
  opacity: 0.8;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; opacity: 0.7; }
.footer-col ul li { margin-bottom: 8px; }

/* 按钮系统 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  height: 48px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
  border: none;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(0.95); }
.btn-secondary {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
}
.btn-secondary:hover { background: rgba(128,128,128,0.1); }

/* 卡片与面板 */
.card {
  background: var(--color-paper);
  border: var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: 24px;
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-2px); }
.panel {
  background: var(--color-dark);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

/* 表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(128,128,128,0.2);
}
.data-table th { font-weight: 600; opacity: 0.8; }
.data-table tr:last-child td { border-bottom: none; }

/* 眉标与高亮 */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.hl { color: inherit; }
.face-paper .hl { color: var(--color-brand); }
.face-dark .hl { color: var(--color-accent); }

/* 列表与提示框 */
.feature-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}
.tip-box {
  border-left: 4px solid currentColor;
  padding: 16px;
  background: rgba(128,128,128,0.05);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  margin: 16px 0;
}

/* FAQ */
details {
  border: var(--card-border);
  border-radius: var(--radius-card);
  margin-bottom: 12px;
  padding: 16px;
  background: rgba(128,128,128,0.03);
}
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 400; opacity: 0.5; }
details[open] summary::after { content: "−"; }
details p { margin: 12px 0 0; opacity: 0.9; }

/* SVG 动效基础 */
.svg-anim { width: 100%; height: auto; }
.draw-line {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.6s ease;
}
.anim-draw { animation: drawLine 3s ease-in-out infinite alternate; }
.anim-float { animation: floatUp 4s ease-in-out infinite alternate; }
.anim-breathe { animation: breathe 2.5s ease-in-out infinite alternate; }
.anim-slide-in { animation: slideIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.anim-flow { animation: flowDash 2s linear infinite; }
.transform-box-fill { transform-box: fill-box; transform-origin: center; }

@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes floatUp {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}
@keyframes breathe {
  0% { opacity: 0.6; transform: scale(0.98); }
  100% { opacity: 1; transform: scale(1.02); }
}
@keyframes slideIn {
  0% { transform: translateX(-20px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes flowDash {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

/* 响应式与无障碍 */
@media (max-width: 768px) {
  .nav-list { display: none; }
  .two-col { grid-template-columns: 1fr !important; }
  .grid-3 { grid-template-columns: 1fr !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
