:root {
  --color-primary: #7c3aed;
  --color-primary-dark: #6d28d9;
  --color-secondary: #ec4899;
  --color-secondary-light: #fbcfe8;
  --color-bg-base: #f5f3ff;
  --color-surface: rgba(255, 255, 255, 0.68);
  --color-surface-hover: rgba(255, 255, 255, 0.85);
  --color-border: rgba(124, 58, 237, 0.15);
  --color-border-strong: rgba(124, 58, 237, 0.3);
  --color-text-main: #0f172a;
  --color-text-sub: #475569;
  --color-text-muted: #64748b;
  --color-accent-glow: rgba(236, 72, 153, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-card: 0 6px 24px rgba(109, 40, 217, 0.08);
  --shadow-focus: 0 0 0 3px rgba(124, 58, 237, 0.25);
  --font-stack: "PingFang SC", "Noto Sans SC", "SF Pro Display", system-ui, -apple-system, sans-serif;
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1.25rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3.5rem;
  --spacing-2xl: 5rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-stack);
  color: var(--color-text-main);
  background: linear-gradient(160deg, #f5f3ff 0%, #fdf2f8 50%, #ede9fe 100%);
  background-attachment: fixed;
  line-height: 1.75;
  font-size: 1rem;
  overflow-x: hidden;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--spacing-md); }
.section { padding: var(--spacing-xl) 0; }
.section-header { text-align: center; margin-bottom: var(--spacing-lg); }
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin-bottom: var(--spacing-sm);
  background: linear-gradient(90deg, var(--color-primary-dark), var(--color-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-desc {
  color: var(--color-text-sub);
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.05rem;
  text-wrap: balance;
}

/* Typography */
h1, h2, h3, h4 { line-height: 1.3; color: var(--color-text-main); }
h1 { font-size: clamp(2rem, 5.5vw, 3.25rem); font-weight: 800; margin-bottom: var(--spacing-md); text-wrap: balance; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 700; margin-bottom: var(--spacing-md); }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: var(--spacing-xs); }
p { margin-bottom: var(--spacing-sm); color: var(--color-text-sub); }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover, a:focus-visible { color: var(--color-primary-dark); text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-sm); }

/* Layout Utilities */
.grid-auto { display: grid; gap: var(--spacing-md); }
.g-3col { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.mb-2 { margin-bottom: var(--spacing-lg); }

/* Buttons */
.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: 600;
  cursor: pointer; border: none; transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  font-size: 1rem; text-wrap: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff; box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}
.btn-primary:hover, .btn-primary:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4); text-decoration: none; }
.btn-secondary { background: var(--color-surface); color: var(--color-primary-dark); border: 1px solid var(--color-border); backdrop-filter: blur(8px); }
.btn-secondary:hover, .btn-secondary:focus-visible { background: var(--color-surface-hover); text-decoration: none; }

/* Glass Card */
.card-glass {
  background: var(--color-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.card-glass:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(109, 40, 217, 0.12); border-color: var(--color-border-strong); }

/* Table */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: var(--color-surface); backdrop-filter: blur(10px); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 0.9rem 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-dark); }
tr:last-child td { border-bottom: none; }
td { color: var(--color-text-sub); }

/* FAQ Details/Summary */
.faq-item { margin-bottom: var(--spacing-sm); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); overflow: hidden; }
.summary-custom {
  padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; color: var(--color-text-main);
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  transition: background 0.2s;
}
.summary-custom::-webkit-details-marker { display: none; }
.summary-custom::after { content: "+"; font-size: 1.2rem; color: var(--color-secondary); transition: transform 0.2s; }
details[open] .summary-custom::after { transform: rotate(45deg); }
details[open] .summary-custom { color: var(--color-primary-dark); background: rgba(124, 58, 237, 0.04); }
.faq-answer { padding: 0 1.25rem 1rem; color: var(--color-text-sub); line-height: 1.7; }

/* Blog Cards */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--spacing-md); }
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-date { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0.4rem; }
.news-body { flex: 1; display: flex; flex-direction: column; }
.news-btn { margin-top: var(--spacing-sm); align-self: flex-start; font-size: 0.9rem; font-weight: 500; }

/* Related Links */
.related-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--spacing-sm); }
.related-item a { display: block; padding: 0.6rem 0.8rem; border-radius: var(--radius-sm); background: var(--color-surface); border: 1px solid transparent; transition: border-color 0.2s, background 0.2s; color: var(--color-text-sub); }
.related-item a:hover, .related-item a:focus-visible { border-color: var(--color-border-strong); background: var(--color-surface-hover); color: var(--color-primary-dark); text-decoration: none; }
.related-meta { font-size: 0.85rem; display: block; margin-top: 0.2rem; opacity: 0.8; }

/* Header & Footer */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.1rem; color: var(--color-text-main); }
.brand img { height: 32px; width: auto; }
.nav { display: flex; gap: var(--spacing-md); }
.nav a { font-weight: 500; color: var(--color-text-sub); padding: 0.4rem 0; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; }
.nav a:hover, .nav a:focus-visible, .nav a[aria-current="page"] { color: var(--color-primary); border-color: var(--color-primary); text-decoration: none; }
.footer { background: rgba(15, 23, 42, 0.03); border-top: 1px solid var(--color-border); padding: var(--spacing-lg) 0; margin-top: var(--spacing-xl); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--spacing-lg); }
.footer h4 { font-size: 0.95rem; margin-bottom: var(--spacing-sm); color: var(--color-primary-dark); }
.footer ul { list-style: none; }
.footer li { margin-bottom: 0.5rem; }
.footer a { color: var(--color-text-sub); font-size: 0.95rem; }
.footer a:hover { color: var(--color-primary); text-decoration: underline; }
.copyright { text-align: center; margin-top: var(--spacing-lg); font-size: 0.85rem; color: var(--color-text-muted); border-top: 1px solid var(--color-border); padding-top: var(--spacing-md); }

/* SVG & Animation Base */
.svg-icon { width: 24px; height: 24px; stroke: var(--color-primary); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.svg-icon-lg { width: 48px; height: 48px; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawProgress 6s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate; }
.anim-pulse { animation: pulseGlow 4s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes drawProgress {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes pulseGlow {
  0% { filter: drop-shadow(0 0 2px rgba(124, 58, 237, 0.2)); }
  100% { filter: drop-shadow(0 0 8px rgba(236, 72, 153, 0.4)); }
}
@media (prefers-reduced-motion: reduce) {
  .anim-draw, .anim-pulse { animation: none !important; }
  html { scroll-behavior: auto; }
}
@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: 0.8rem 0; }
  .nav { flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-top: 0.5rem; }
  .section { padding: var(--spacing-lg) 0; }
}
