/* === 设计变量与基础重置 === */
:root {
  --color-bg: #f5f3ff;
  --color-surface: rgba(255, 255, 255, 0.78);
  --color-surface-solid: #ffffff;
  --color-primary: #8b5cf6;
  --color-primary-deep: #6d28d9;
  --color-secondary: #ec4899;
  --color-accent: #d946ef;
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-text-light: #64748b;
  --color-border: rgba(139, 92, 246, 0.12);
  --color-glass-border: rgba(255, 255, 255, 0.5);
  
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
  --radius-sm: 0.5rem;
  --shadow-soft: 0 8px 24px rgba(109, 40, 217, 0.06);
  --shadow-hover: 0 12px 32px rgba(109, 40, 217, 0.12);
  
  --font-main: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --container-width: 1160px;
  --header-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
button, input, select, textarea { font: inherit; color: inherit; }

/* === 排版系统 === */
.container { width: 100%; max-width: var(--container-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; position: relative; }
.section--alt { background: linear-gradient(180deg, rgba(139,92,246,0.04) 0%, rgba(236,72,153,0.03) 100%); }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; text-wrap: balance; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 5vw + 1rem, 4rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.8rem, 3vw + 0.5rem, 2.5rem); margin-bottom: 1.2rem; }
h3 { font-size: clamp(1.2rem, 2vw + 0.5rem, 1.5rem); margin-bottom: 0.8rem; }
p { margin-bottom: 1rem; color: var(--color-text); }
.text-muted { color: var(--color-text-light); font-size: 0.95rem; }
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* === 通用组件 === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: 999px; font-weight: 500; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  border: 1.5px solid transparent;
}
.btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 4px; }
.btn--primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #fff; box-shadow: 0 4px 14px rgba(139, 92, 246, 0.25);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(139, 92, 246, 0.35); }
.btn--secondary {
  background: var(--color-surface-solid); color: var(--color-primary-deep);
  border-color: var(--color-border);
}
.btn--secondary:hover { background: #fefeff; border-color: var(--color-primary); }

.card {
  background: var(--color-surface-solid);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.table-wrapper { overflow-x: auto; margin: 24px 0; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: var(--color-surface-solid); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: linear-gradient(90deg, rgba(139,92,246,0.08), rgba(236,72,153,0.06)); font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* === 导航与页脚 === */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245, 243, 255, 0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border); height: var(--header-height);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.15rem; }
.logo img { height: 32px; width: auto; }
.nav { display: flex; gap: 24px; }
.nav a { padding: 8px 0; border-bottom: 2px solid transparent; transition: border-color 0.2s; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--color-primary); color: var(--color-primary-deep); }
.footer {
  background: #0f172a; color: #cbd5e1; padding: 60px 0 30px;
  margin-top: 80px;
}
.footer__inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.footer h4 { color: #fff; margin-bottom: 16px; font-size: 1rem; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; }
.footer a:hover { color: var(--color-secondary); }
.copyright { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.85rem; color: #94a3b8; }

/* === FAQ === */
details { margin-bottom: 16px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-solid); overflow: hidden; }
summary {
  padding: 16px 20px; cursor: pointer; font-weight: 500; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details[open] summary { border-bottom: 1px solid var(--color-border); background: rgba(139,92,246,0.04); }
.details-content { padding: 16px 20px; color: var(--color-text); }

/* === SVG 动效 === */
.svg-animate-line {
  stroke-dasharray: 1; stroke-dashoffset: 0;
  animation: draw-walk 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.svg-animate-breathe {
  transform-box: fill-box; transform-origin: center;
  animation: breathe 5s ease-in-out infinite;
}
@keyframes draw-walk {
  0%, 100% { stroke-dashoffset: 1; opacity: 0.7; }
  50% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.65; }
  50% { transform: scale(1.03); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .svg-animate-line, .svg-animate-breathe { animation: none !important; }
}
/* 焦点样式增强 */
*:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* 响应式微调 */
@media (max-width: 768px) {
  .nav { display: none; } /* 移动端简化，实际项目可加汉堡菜单，此处保持结构完整 */
  .section { padding: 60px 0; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.6rem; }
}
