/* ==================== 设计变量与基础重置 ==================== */
:root {
  --color-primary: #7c3aed;
  --color-primary-light: #a78bfa;
  --color-secondary: #ec4899;
  --color-secondary-light: #f472b6;
  --color-bg-base: #f8fafc;
  --color-bg-deep: #f1f5f9;
  --color-surface: #ffffff;
  --color-text-main: #0f172a;
  --color-text-sub: #475569;
  --color-text-muted: #94a3b8;
  --border-subtle: rgba(148, 163, 184, 0.25);
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.6);
  --shadow-card: 0 6px 20px rgba(124, 58, 237, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 10px 30px rgba(124, 58, 237, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-main: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-xxl: 4rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-main);
  color: var(--color-text-main);
  background: var(--color-bg-base);
  line-height: 1.75;
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==================== 排版与通用组件 ==================== */
.container { max-width: 1140px; margin: 0 auto; padding: 0 var(--space-lg); }
section { padding: var(--space-xxl) 0; }
h1, h2, h3, h4 { line-height: 1.35; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 1.5rem + 2vw, 2.6rem); margin-bottom: var(--space-md); }
h2 { font-size: clamp(1.5rem, 1.3rem + 1.5vw, 2rem); margin-bottom: var(--space-lg); position: relative; display: inline-block; }
h2::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 48px; height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary)); border-radius: 2px;
}
h3 { font-size: 1.2rem; margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-md); color: var(--color-text-sub); }
a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
ul, ol { padding-left: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.6rem; border-radius: var(--radius-md); font-weight: 500; cursor: pointer;
  border: none; transition: all 0.25s ease; font-size: 1rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff; box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35); }
.btn-outline {
  background: transparent; border: 1.5px solid var(--color-primary); color: var(--color-primary);
}
.btn-outline:hover { background: rgba(124, 58, 237, 0.06); }
.btn:focus-visible { outline: 2px solid var(--color-primary-light); outline-offset: 2px; }

/* 卡片与玻璃层 */
.card {
  background: var(--glass-bg); backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border); border-radius: var(--radius-md);
  padding: var(--space-lg); box-shadow: var(--shadow-card); transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

/* 网格布局 */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-lg); }

/* 表格 */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-card); background: var(--glass-bg); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border-subtle); }
th { background: rgba(124, 58, 237, 0.04); font-weight: 600; color: var(--color-primary); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.6); }

/* FAQ */
.faq-item { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-md); margin-bottom: var(--space-sm); overflow: hidden; }
.faq-item summary {
  padding: 1rem 1.25rem; cursor: pointer; font-weight: 500; user-select: none; 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-weight: 400; font-size: 1.2rem; color: var(--color-secondary); transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 1.25rem 1rem; margin-bottom: 0; color: var(--color-text-sub); }

/* 页头页脚 */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(248, 250, 252, 0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle); padding: 0.8rem 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 0.6rem; }
.logo img { width: 32px; height: 32px; object-fit: contain; }
.nav-list { display: flex; gap: var(--space-md); }
.nav-list a { font-weight: 500; padding: 0.4rem 0.6rem; border-radius: var(--radius-sm); }
.nav-list a:hover, .nav-list a[aria-current="page"] { background: rgba(124, 58, 237, 0.08); color: var(--color-primary); }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; }
.mobile-toggle svg { width: 24px; height: 24px; stroke: var(--color-text-main); }

.site-footer { background: var(--color-surface); border-top: 1px solid var(--border-subtle); padding: var(--space-xl) 0 var(--space-lg); margin-top: var(--space-xxl); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-xl); margin-bottom: var(--space-xl); }
.footer-col h4 { margin-bottom: var(--space-md); font-size: 1rem; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--color-text-sub); font-size: 0.95rem; }
.footer-col a:hover { color: var(--color-primary); }
.copyright { text-align: center; color: var(--color-text-muted); font-size: 0.9rem; border-top: 1px solid var(--border-subtle); padding-top: var(--space-lg); }

/* SVG 动效基类 */
.svg-icon { width: 28px; height: 28px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.progress-ring path { transition: stroke-dashoffset 0.3s ease; }

/* 关键帧与动画 */
@keyframes draw-progress {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes float-subtle {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.02); }
}
@keyframes pulse-opacity {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.animate-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-progress 5s ease-in-out infinite alternate;
}
.animate-float {
  animation: float-subtle 6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.animate-pulse {
  animation: pulse-opacity 4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .animate-draw, .animate-float, .animate-pulse { animation: none; }
}
