:root {
  --color-primary: #7c3aed;
  --color-primary-dark: #6d28d9;
  --color-secondary: #db2777;
  --color-bg: #f4f1fa;
  --color-surface: rgba(255, 255, 255, 0.65);
  --color-surface-hover: rgba(255, 255, 255, 0.85);
  --color-border: rgba(124, 58, 237, 0.15);
  --color-text: #1e1b4b;
  --color-text-muted: #4b5563;
  --color-accent: #a78bfa;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-soft: 0 8px 24px rgba(124, 58, 237, 0.08);
  --shadow-glow: 0 0 0 3px rgba(124, 58, 237, 0.25);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --container-max: 1120px;
  --font-main: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
  background: linear-gradient(135deg, #ede9fe 0%, #fce7f3 50%, #f4f1fa 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 { line-height: 1.2; text-wrap: balance; margin-top: 0; }
h1 { font-size: clamp(2rem, 5vw + 0.5rem, 3.25rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw + 0.5rem, 2.125rem); font-weight: 700; margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.125rem, 2vw + 0.5rem, 1.375rem); font-weight: 600; margin-bottom: 0.75rem; }
p { margin: 0 0 1rem; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition-base); }
a:hover { color: var(--color-secondary); }
a:focus-visible, button:focus-visible { outline: none; box-shadow: var(--shadow-glow); border-radius: var(--radius-sm); }

/* Layout */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 1.5rem; }
section { padding: clamp(3rem, 6vw, 5rem) 0; position: relative; }
.section-header { text-align: center; max-width: 800px; margin: 0 auto 2.5rem; }

/* Glass Components */
.glass-card {
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}
.glass-card:hover { background: var(--color-surface-hover); transform: translateY(-4px); box-shadow: 0 12px 28px rgba(124, 58, 237, 0.12); }

/* Header & Footer */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 0.75rem; }
.logo img { height: 32px; width: auto; object-fit: contain; }
.logo span { font-weight: 700; font-size: 1.125rem; color: var(--color-text); }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; }
nav a { font-weight: 500; color: var(--color-text-muted); padding: 0.5rem 0; border-bottom: 2px solid transparent; }
nav a:hover, nav [aria-current="page"] { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.footer { background: var(--color-text); color: #e2e8f0; padding: 3rem 0 1.5rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer h4 { color: #fff; margin-bottom: 1rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 0.5rem; }
.footer a { color: #cbd5e1; }
.footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; text-align: center; font-size: 0.875rem; color: #94a3b8; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.875rem 1.75rem; border-radius: 999px; font-weight: 600; cursor: pointer;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff; border: none; box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  transition: transform var(--transition-base), filter var(--transition-base);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn:active { transform: translateY(0); }
.btn-outline { background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary); box-shadow: none; }
.btn-outline:hover { background: var(--color-primary); color: #fff; }

/* Cards & Grids */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-card h3 { margin-bottom: 0.5rem; }
.news-meta { font-size: 0.875rem; color: var(--color-text-muted); margin-bottom: 0.75rem; }
.news-excerpt { flex-grow: 1; color: var(--color-text-muted); font-size: 0.95rem; line-height: 1.6; }
.related-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.related-list li { padding: 0.75rem; background: var(--color-surface); border-radius: var(--radius-md); border: 1px solid var(--color-border); }
.related-list a { display: block; font-weight: 500; margin-bottom: 0.25rem; }
.related-list p { margin: 0; font-size: 0.875rem; color: var(--color-text-muted); }

/* Table */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: var(--color-surface); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 1rem; border-bottom: 1px solid var(--color-border); }
th { background: rgba(124, 58, 237, 0.08); font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* FAQ */
.faq-item { margin-bottom: 1rem; }
details { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1rem 1.25rem; }
summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 300; font-size: 1.25rem; color: var(--color-primary); transition: transform var(--transition-base); }
details[open] summary::after { transform: rotate(45deg); }
details p { margin-top: 0.75rem; color: var(--color-text-muted); line-height: 1.7; }

/* Steps */
.step-list { counter-reset: step; list-style: none; padding: 0; }
.step-list li { position: relative; padding-left: 3rem; margin-bottom: 1.25rem; }
.step-list li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; border-radius: 50%; background: var(--color-primary); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 0.875rem; }
.step-list p { margin: 0; }

/* SVG Animations */
.svg-anim-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.svg-draw { animation: drawStroke 6s ease-in-out infinite alternate; }
.svg-pulse { animation: pulseOpacity 4s ease-in-out infinite; }
.svg-progress { animation: fillProgress 8s ease-in-out infinite alternate; }
.svg-float { animation: gentleFloat 6s ease-in-out infinite; }
.svg-spin-slow { transform-box: fill-box; transform-origin: center; animation: spinSlow 20s linear infinite; }

@keyframes drawStroke {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
@keyframes fillProgress {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes pulseOpacity {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}
@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .svg-draw, .svg-pulse, .svg-progress, .svg-float, .svg-spin-slow {
    animation: none !important;
  }
}
