/* 设计变量与基础重置 */
:root {
  --color-dark: #1B1231;
  --color-paper: #F4F3F7;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #9977EE;
  --color-border: var(--color-text);
  --color-bg-overlay: rgba(255,255,255,0.06);

  --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: 960px;
  --header-h: 64px;

  --font-body: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --line-height-body: 1.65;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: var(--line-height-body);
  color: var(--color-text);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* 布局容器 */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-paper);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  backdrop-filter: blur(8px);
  height: var(--header-h);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.brand img { width: 32px; height: 32px; object-fit: contain; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 12px;
  transition: background 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  background: rgba(0,0,0,0.04);
  color: var(--color-brand);
}

/* 主区域网格（桌面侧边索引+正文） */
.main-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--gap);
  align-items: start;
  padding-top: var(--section-y);
}
.sidebar-nav {
  position: sticky;
  top: calc(var(--header-h) + var(--gap));
  padding: 16px;
  background: var(--color-paper);
  border: var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
}
.sidebar-nav h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-brand);
  margin-bottom: 12px;
  font-weight: 700;
}
.sidebar-nav ul { display: flex; flex-direction: column; gap: 8px; }
.sidebar-nav li a {
  display: block;
  padding: 8px 12px;
  font-size: 0.9rem;
  border-radius: 12px;
  transition: background 0.2s, color 0.2s;
}
.sidebar-nav li a:hover, .sidebar-nav li a.active {
  background: rgba(0,0,0,0.04);
  color: var(--color-brand);
  font-weight: 600;
}

/* 区块通用 */
.section {
  padding-block: var(--section-y);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.section--dark {
  background: var(--color-dark);
  color: var(--color-paper);
}
.section__heading {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.section__label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.paper .section__label { color: var(--color-brand); }
.dark .section__label { color: var(--color-accent); }
.section__desc {
  max-width: 38em;
  margin-bottom: 24px;
  font-size: 1rem;
  line-height: 1.7;
}
.hl { color: var(--color-brand); font-weight: 600; }
.dark .hl { color: var(--color-accent); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  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: 3px; }
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: var(--color-accent);
  color: var(--color-dark);
}
.btn--primary:hover { background: #8b68e0; }
.btn--secondary {
  background: transparent;
  border: 2px solid var(--color-text);
  color: var(--color-text);
}
.dark .btn--secondary {
  border-color: var(--color-paper);
  color: var(--color-paper);
}
.btn--secondary:hover { background: rgba(0,0,0,0.05); }
.dark .btn--secondary:hover { background: rgba(255,255,255,0.08); }
.btn-icon { width: 20px; height: 20px; stroke-width: 2; }

/* 卡片与面板 */
.card {
  background: var(--color-paper);
  border: var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
}
.panel-dark {
  background: var(--color-dark);
  color: var(--color-paper);
  border-radius: var(--radius-card);
  padding: var(--gap);
  position: relative;
  overflow: hidden;
}
.panel-dark .card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.15);
  box-shadow: none;
}

/* 表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-top: 16px;
}
.data-table th, .data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  text-align: left;
}
.dark .data-table th, .dark .data-table td {
  border-bottom-color: rgba(255,255,255,0.1);
}
.data-table th { font-weight: 700; width: 40%; }
.data-table tr:last-child td { border-bottom: none; }

/* 列表与步骤 */
.step-list { counter-reset: step; }
.step-item {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}
.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 800;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
}
.step-content strong { display: block; margin-bottom: 4px; font-weight: 700; }

/* 新闻网格 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}
.news-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.news-card time {
  font-size: 0.8rem;
  color: var(--color-brand);
  font-weight: 600;
}
.dark .news-card time { color: var(--color-accent); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--color-paper);
}
.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  padding: 0 20px 16px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text);
}
.dark .faq-item { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); }
.dark .faq-item p { color: var(--color-paper); }

/* 响应式调整 */
@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .sidebar-nav {
    position: static;
    overflow-x: auto;
    white-space: nowrap;
    padding: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .sidebar-nav h3 { display: none; }
  .sidebar-nav ul {
    flex-direction: row;
    width: max-content;
  }
  .sidebar-nav li a {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 20px;
    background: rgba(0,0,0,0.04);
  }
}

/* SVG 动效关键帧 */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes floatFast {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes drawPath {
  to { stroke-dashoffset: 0; }
}
@keyframes breatheDots {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}
@keyframes slideInRight {
  from { transform: translateX(30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.anim-float-slow { animation: floatSlow 7s ease-in-out infinite; }
.anim-float-fast { animation: floatFast 5s ease-in-out infinite; }
.anim-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: drawPath 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.anim-breathe { animation: breatheDots 2.4s ease-in-out infinite; }
.anim-slide-in { animation: slideInRight 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .anim-float-slow, .anim-float-fast, .anim-draw, .anim-breathe, .anim-slide-in {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
