/* =========================================
   全局设计变量与基础重置
   ========================================= */
:root {
  --color-bg: #f4f2fa;
  --color-surface: rgba(255, 255, 255, 0.72);
  --color-surface-hover: rgba(255, 255, 255, 0.92);
  --color-primary-start: #8b5cf6;
  --color-primary-end: #d946ef;
  --color-accent: #a78bfa;
  --color-text-main: #1e1b2e;
  --color-text-secondary: #5b5670;
  --color-border-subtle: rgba(139, 92, 246, 0.18);
  --color-glass-shadow: 0 8px 32px rgba(120, 80, 200, 0.10);
  --radius-xl: 1.75rem;
  --radius-lg: 1.25rem;
  --radius-md: 0.875rem;
  --font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --line-height-relaxed: 1.75;
  --space-container: min(92vw, 1280px);
  --transition-soft: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-family);
  color: var(--color-text-main);
  background-color: var(--color-bg);
  line-height: var(--line-height-relaxed);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--transition-soft); }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* =========================================
   排版系统（流体字号）
   ========================================= */
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.02em; font-weight: 600; }
h1 { font-size: clamp(1.8rem, 4vw + 0.5rem, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw + 0.4rem, 2.4rem); margin-bottom: 1.25rem; }
h3 { font-size: clamp(1.15rem, 2vw + 0.2rem, 1.5rem); margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; color: var(--color-text-secondary); }
.container { width: var(--space-container); margin-inline: auto; }
.section { padding: clamp(3rem, 8vw, 6rem) 0; }
.section-alt { background: linear-gradient(180deg, rgba(139, 92, 246, 0.04) 0%, transparent 100%); }

/* =========================================
   页头与导航
   ========================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-subtle);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 600; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.main-nav { display: flex; gap: 2rem; }
.main-nav a {
  position: relative; padding: 0.5rem 0; font-size: 0.95rem; color: var(--color-text-secondary);
  transition: color var(--transition-soft);
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--color-primary-start); }
.main-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--color-primary-start), var(--color-primary-end));
  border-radius: 2px;
}
.mobile-menu-btn { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; }
.mobile-menu-btn svg { width: 24px; height: 24px; stroke: currentColor; }

@media (max-width: 840px) {
  .main-nav { display: none; }
  .mobile-menu-btn { display: flex; }
}

/* =========================================
   通用组件
   ========================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem; border-radius: var(--radius-md); font-weight: 500;
  transition: transform var(--transition-soft), box-shadow var(--transition-soft), filter var(--transition-soft);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}
.btn:focus-visible { outline: 2px solid var(--color-primary-start); outline-offset: 2px; }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary-start), var(--color-primary-end));
  color: #fff;
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(217, 70, 239, 0.35); filter: brightness(1.05); }
.btn-outline {
  border: 1.5px solid var(--color-border-subtle); background: var(--color-surface); color: var(--color-text-main);
}
.btn-outline:hover { background: var(--color-surface-hover); border-color: var(--color-primary-start); }

.card {
  background: var(--color-surface); border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--color-glass-shadow); transition: transform var(--transition-soft), box-shadow var(--transition-soft);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(120, 80, 200, 0.14); }
.grid-2 { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); }
.grid-3 { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

/* 表格样式 */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--color-border-subtle); }
table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
th, td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--color-border-subtle); }
th { background: rgba(139, 92, 246, 0.08); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td { color: var(--color-text-secondary); }

/* FAQ 样式 */
.faq-list details {
  background: var(--color-surface); border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md); margin-bottom: 0.75rem; overflow: hidden;
}
.faq-list summary {
  padding: 1rem 1.25rem; cursor: pointer; font-weight: 500; list-style: none;
  position: relative; padding-right: 2.5rem; transition: background var(--transition-soft);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: 1.25rem; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--color-primary-start); border-bottom: 2px solid var(--color-primary-start);
  transform: translateY(-70%) rotate(45deg); transition: transform var(--transition-soft);
}
.faq-list details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq-list summary:hover { background: rgba(139, 92, 246, 0.04); }
.faq-list .answer { padding: 0 1.25rem 1.25rem; color: var(--color-text-secondary); line-height: 1.7; }

/* 链接列表 */
.related-links li { margin-bottom: 0.75rem; display: flex; justify-content: space-between; align-items: center; }
.related-links a { color: var(--color-text-main); font-weight: 500; }
.related-links span { font-size: 0.9rem; color: var(--color-text-secondary); }
.related-links a:hover { color: var(--color-primary-start); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* =========================================
   SVG 动效与工具类
   ========================================= */
.svg-icon { width: 20px; height: 20px; stroke-width: 1.8; stroke: currentColor; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.svg-icon-lg { width: 28px; height: 28px; stroke-width: 1.6; }
.progress-ring circle { transition: stroke-dashoffset 0.3s; }
.draw-anim { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.anim-draw { animation: drawLine 8s linear infinite alternate; }
.anim-pulse { animation: pulseScale 6s ease-in-out infinite; }
.anim-float { animation: floatSoft 5s ease-in-out infinite; }

@keyframes drawLine { 0% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 1; } }
@keyframes pulseScale { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes floatSoft { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .draw-anim, .anim-draw, .anim-pulse, .anim-float { animation: none !important; transform: none !important; opacity: 1 !important; }
}

/* =========================================
   页脚
   ========================================= */
.site-footer {
  background: linear-gradient(180deg, var(--color-bg) 0%, rgba(139, 92, 246, 0.06) 100%);
  border-top: 1px solid var(--color-border-subtle); padding: 3rem 0 2rem;
}
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-col h4 { font-size: 1rem; margin-bottom: 1rem; color: var(--color-text-main); }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col a { color: var(--color-text-secondary); font-size: 0.95rem; }
.footer-col a:hover { color: var(--color-primary-start); }
.copyright { margin-top: 2.5rem; text-align: center; font-size: 0.85rem; color: var(--color-text-secondary); opacity: 0.8; }
