:root {
  --clr-primary: #7c3aed;
  --clr-primary-dark: #6d28d9;
  --clr-secondary: #db2777;
  --clr-accent: #8b5cf6;
  --clr-gradient: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
  --clr-bg: #f8fafc;
  --clr-surface: #ffffff;
  --clr-glass: rgba(255, 255, 255, 0.75);
  --clr-glass-strong: rgba(255, 255, 255, 0.92);
  --clr-text: #0f172a;
  --clr-text-muted: #475569;
  --clr-border: rgba(148, 163, 184, 0.25);
  --clr-border-light: rgba(148, 163, 184, 0.15);
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px -4px rgba(124, 58, 237, 0.12);
  --shadow-glow: 0 0 0 3px rgba(124, 58, 237, 0.15);
  --font-main: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --container-max: 1200px;
  --nav-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.75;
  letter-spacing: 0.015em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--clr-primary); text-decoration: none; transition: color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease; }
a:hover { color: var(--clr-secondary); }
a:focus-visible { outline: none; box-shadow: var(--shadow-glow); border-radius: 4px; }
ul, ol { list-style: none; }
hr { border: 0; border-top: 1px solid var(--clr-border-light); margin: var(--space-2xl) 0; }

.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-lg); overflow-x: hidden; }
.section { padding: clamp(3rem, 5vw, 5rem) 0; }
.section-header { margin-bottom: var(--space-xl); text-align: center; }
.section-header p { max-width: 640px; margin: var(--space-sm) auto 0; color: var(--clr-text-muted); }

/* Typography */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; color: #0f172a; margin-bottom: 0.6em; }
h1 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); text-wrap: balance; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); text-wrap: balance; }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); text-wrap: balance; }
p, li { font-size: clamp(0.95rem, 1.1vw, 1.05rem); margin-bottom: var(--space-md); color: var(--clr-text-muted); }
strong { color: var(--clr-text); font-weight: 600; }

/* Navigation */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--clr-glass-strong); backdrop-filter: blur(12px); border-bottom: 1px solid var(--clr-border); height: var(--nav-height); display: flex; align-items: center; }
.header-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.brand { display: flex; align-items: center; gap: var(--space-sm); }
.brand img { height: 36px; width: auto; object-fit: contain; }
.brand span { font-weight: 700; font-size: 1.1rem; color: var(--clr-text); }
.nav ul { display: flex; gap: var(--space-xl); }
.nav a { font-size: 0.95rem; font-weight: 500; color: var(--clr-text-muted); padding: 0.5rem 0; position: relative; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--clr-primary); }
.nav a::after { content: ""; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--clr-gradient); transition: width 0.2s ease; border-radius: 2px; }
.nav a:hover::after, .nav a[aria-current="page"]::after { width: 100%; }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.mobile-toggle svg { width: 24px; height: 24px; stroke: var(--clr-text); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); padding: 0.75rem 1.5rem; font-size: 0.95rem; font-weight: 600; border-radius: var(--radius-full); border: 1px solid transparent; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease; }
.btn-primary { background: var(--clr-gradient); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); background: linear-gradient(135deg, var(--clr-primary-dark), var(--clr-secondary)); color: #fff; }
.btn-outline { background: transparent; border-color: var(--clr-border); color: var(--clr-text); }
.btn-outline:hover { border-color: var(--clr-primary); color: var(--clr-primary); background: rgba(124, 58, 237, 0.04); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

/* Cards & Glass Panels */
.card { background: var(--clr-surface); border: 1px solid var(--clr-border); border-radius: var(--radius-lg); padding: var(--space-xl); box-shadow: var(--shadow-sm); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.glass-panel { background: var(--clr-glass); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.6); border-radius: var(--radius-xl); }

/* Hero Split Screen */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2xl); align-items: center; min-height: calc(100vh - var(--nav-height)); padding-top: var(--space-xl); }
.hero-content { max-width: 580px; }
.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; }
.hero-tag { display: inline-block; background: rgba(124, 58, 237, 0.08); color: var(--clr-primary); font-size: 0.8rem; font-weight: 600; padding: 0.3rem 0.75rem; border-radius: var(--radius-full); margin-bottom: var(--space-md); letter-spacing: 0.05em; }

/* Feature Grid */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-lg); }
.feature-item { display: flex; flex-direction: column; gap: var(--space-sm); }
.icon-box { width: 48px; height: 48px; border-radius: var(--radius-md); background: rgba(124, 58, 237, 0.06); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-xs); }
.icon-box svg { width: 24px; height: 24px; stroke: var(--clr-primary); stroke-width: 1.8; fill: none; }

/* Interface Gallery */
.gallery-track { display: flex; gap: var(--space-lg); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--space-md); scrollbar-width: thin; scrollbar-color: var(--clr-primary) transparent; }
.gallery-track::-webkit-scrollbar { height: 6px; }
.gallery-track::-webkit-scrollbar-thumb { background: var(--clr-primary); border-radius: 3px; }
.gallery-item { flex: 0 0 320px; scroll-snap-align: center; aspect-ratio: 16/10; background: var(--clr-surface); border: 1px solid var(--clr-border); border-radius: var(--radius-lg); padding: var(--space-md); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; min-width: 0; }
.gallery-label { position: absolute; top: var(--space-sm); right: var(--space-sm); font-size: 0.75rem; background: rgba(0,0,0,0.05); padding: 0.2rem 0.5rem; border-radius: 4px; color: var(--clr-text-muted); }

/* Scenarios & Steps */
.scenario-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-lg); }
.scenario-card { background: var(--clr-surface); border-left: 4px solid var(--clr-primary); padding: var(--space-lg); border-radius: var(--radius-md) var(--radius-lg) var(--radius-lg) var(--radius-md); box-shadow: var(--shadow-sm); min-width: 0; }
.step-list { counter-reset: step; margin: var(--space-lg) 0; }
.step-list li { position: relative; padding-left: 2.5rem; margin-bottom: var(--space-md); }
.step-list li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; background: var(--clr-gradient); color: #fff; font-weight: 700; font-size: 0.9rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* Table */
.platform-table { table-layout: fixed; width: 100%; border-collapse: collapse; margin: var(--space-lg) 0; background: var(--clr-surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.platform-table th, .platform-table td { padding: var(--space-md) var(--space-lg); text-align: left; border-bottom: 1px solid var(--clr-border-light); }
.platform-table th { background: rgba(124, 58, 237, 0.04); font-weight: 600; color: var(--clr-text); }
.platform-table tr:last-child td { border-bottom: none; }
.platform-table a { font-weight: 500; }

/* Downloads & Install */
.download-zone { background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(219, 39, 119, 0.05)); border-radius: var(--radius-xl); padding: clamp(2rem, 4vw, 3rem); text-align: center; }
.download-zone h2 { margin-bottom: var(--space-md); }
.download-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-md); margin-top: var(--space-lg); }

/* Updates & Related */
.update-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-lg); }
.update-card { background: var(--clr-surface); border: 1px solid var(--clr-border); border-radius: var(--radius-lg); padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-sm); }
.update-meta { font-size: 0.8rem; color: var(--clr-text-muted); display: flex; align-items: center; gap: var(--space-xs); }
.related-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-md); }
.related-links li { padding: var(--space-sm) var(--space-md); background: var(--clr-surface); border: 1px solid var(--clr-border-light); border-radius: var(--radius-md); transition: border-color 0.2s ease, transform 0.2s ease; }
.related-links li:hover { border-color: var(--clr-primary); transform: translateX(4px); }
.related-links a { font-weight: 500; display: block; margin-bottom: 0.25rem; }
.related-links small { font-size: 0.8rem; color: var(--clr-text-muted); }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--clr-surface); border: 1px solid var(--clr-border-light); border-radius: var(--radius-md); margin-bottom: var(--space-md); overflow: hidden; }
.faq-item summary { padding: var(--space-md) var(--space-lg); cursor: pointer; font-weight: 600; 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-size: 1.25rem; color: var(--clr-primary); transition: transform 0.2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .answer { padding: 0 var(--space-lg) var(--space-lg); color: var(--clr-text-muted); line-height: 1.7; }

/* Footer */
.site-footer { background: #0f172a; color: #94a3b8; padding: var(--space-2xl) 0 var(--space-lg); margin-top: var(--space-2xl); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-xl); margin-bottom: var(--space-xl); }
.footer-col h4 { color: #f8fafc; margin-bottom: var(--space-md); font-size: 0.95rem; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a { color: #94a3b8; font-size: 0.9rem; }
.footer-col a:hover { color: #f8fafc; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: var(--space-lg); text-align: center; font-size: 0.85rem; }

/* SVG Animations */
.svg-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.anim-draw { animation: drawStroke 6s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate; }
.anim-breathe { animation: breathe 8s ease-in-out infinite; }
.anim-float { animation: float 10s ease-in-out infinite; }
.anim-slide { animation: slideIn 5s ease-out infinite alternate; }
@keyframes drawStroke { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.02); opacity: 0.95; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes slideIn { 0% { transform: translateX(0); opacity: 0.8; } 100% { transform: translateX(4px); opacity: 1; } }

@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; }
  .anim-draw, .anim-breathe, .anim-float, .anim-slide { animation: none !important; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-content { max-width: 100%; margin: 0 auto; }
  .hero-visual { order: -1; }
  .mobile-toggle { display: block; }
  .nav ul { display: none; position: absolute; top: var(--nav-height); left: 0; width: 100%; background: var(--clr-glass-strong); flex-direction: column; padding: var(--space-lg); border-bottom: 1px solid var(--clr-border); }
  .nav.open ul { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .gallery-item { flex: 0 0 260px; }
}
