:root {
  --color-primary: #7c3aed;
  --color-secondary: #db2777;
  --color-accent: #a855f7;
  --color-bg: #f8fafc;
  --color-surface: rgba(255, 255, 255, 0.65);
  --color-surface-solid: #ffffff;
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-border: rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(124, 58, 237, 0.15);
  --radius-sm: 0.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --font-base: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --space-container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.75;
  margin: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; color: var(--color-text); }
h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); font-weight: 800; margin: 0 0 1.25rem; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; margin: 0 0 1rem; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; margin: 0 0 0.75rem; }
p { margin: 0 0 1rem; color: var(--color-text-muted); }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-secondary); }

/* Layout */
.container { max-width: var(--space-container); margin: 0 auto; padding: 0 1.5rem; }
section { padding: 4.5rem 0; }
.grid { display: grid; gap: 1.5rem; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* Header & Nav */
header { position: sticky; top: 0; z-index: 100; background: rgba(248, 250, 252, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-border); }
nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; color: var(--color-text); }
.nav-brand img { height: 32px; width: auto; }
.nav-links { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--color-text-muted); font-weight: 500; font-size: 0.95rem; padding: 0.5rem 0; position: relative; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-primary); }
.nav-links a[aria-current="page"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--color-primary); border-radius: 1px; }
.nav-actions { display: flex; gap: 0.75rem; align-items: center; }

/* Footer */
footer { background: #0f172a; color: #cbd5e1; padding: 3.5rem 0 2rem; margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2.5rem; }
.footer-col h4 { color: #f8fafc; margin: 0 0 1rem; font-size: 1rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { color: #94a3b8; font-size: 0.9rem; }
.footer-col a:hover { color: #f8fafc; }
.footer-bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; font-size: 0.85rem; color: #64748b; }

/* Components */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.85rem 1.75rem; border-radius: 9999px; font-weight: 600; font-size: 0.95rem; border: none; cursor: pointer; transition: all 0.2s ease; text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)); color: #fff; box-shadow: var(--shadow-lg); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4); }
.btn-secondary { background: rgba(124, 58, 237, 0.1); color: var(--color-primary); }
.btn-secondary:hover { background: rgba(124, 58, 237, 0.15); }
.card { background: var(--color-surface); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.5); border-radius: var(--radius-md); padding: 1.75rem; transition: transform 0.2s, box-shadow 0.2s; min-width: 0; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.icon-box { width: 48px; height: 48px; border-radius: 0.75rem; background: rgba(124, 58, 237, 0.1); display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; color: var(--color-primary); }
.icon-box svg { width: 24px; height: 24px; stroke-width: 1.8; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; background: var(--color-surface-solid); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-border); }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: rgba(124, 58, 237, 0.06); font-weight: 600; color: var(--color-primary); }
tr:last-child td { border-bottom: none; }

/* FAQ */
details { background: var(--color-surface); border-radius: var(--radius-sm); margin-bottom: 0.75rem; border: 1px solid var(--color-border); }
summary { padding: 1.1rem 1.25rem; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; user-select: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.3rem; color: var(--color-primary); font-weight: 400; transition: transform 0.2s; }
details[open] summary::after { content: '−'; }
details > div { padding: 0 1.25rem 1.1rem; color: var(--color-text-muted); line-height: 1.7; }

/* News & Related */
.news-card { display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.news-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; font-size: 0.85rem; color: var(--color-text-muted); }
.related-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.related-list li { display: flex; align-items: baseline; gap: 0.75rem; padding: 0.75rem; border-radius: var(--radius-sm); background: var(--color-surface); transition: background 0.2s; }
.related-list li:hover { background: rgba(124, 58, 237, 0.06); }
.related-list span { color: var(--color-text-muted); font-size: 0.9rem; }

/* SVG Animations */
@keyframes drawStroke {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.02); opacity: 1; }
}
.svg-draw { animation: drawStroke 3.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.svg-breathe { animation: breathe 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: reduce) {
  .svg-draw, .svg-breathe { animation: none !important; }
}

/* Accessibility & Focus */
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Responsive */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 3rem 0; }
}
