/* 字体与基础变量 */
:root {
  --bg: #0b0e1a;
  --bg-alt: #0f1426;
  --text: #e6e9ef;
  --muted: #adb3c1;
  --primary: #3ec9f7;
  --secondary: #7c5cff;
  --accent: #24d6b7;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.18);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(1000px 600px at 20% -10%, #1b1f36 0%, #0b0e1a 45%, #0b0e1a 100%);
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--secondary); }

/* 容器与栅格 */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.grid-2, .grid-3 { display: grid; gap: 32px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 992px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* 玻璃卡片效果 */
.glass {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
@supports (backdrop-filter: blur(10px)) {
  .glass { backdrop-filter: blur(10px); }
}

.card { overflow: hidden; }
.card-body { padding: 20px 20px 20px 26px; }
.card-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; color: var(--muted);
}
.card-row i { color: var(--primary); }

/* Header */
.header {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, rgba(12, 14, 25, 0.85), rgba(12, 14, 25, 0.65));
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: saturate(140%) blur(6px);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.brand-logo i { color: var(--secondary); font-size: 22px; }
.brand-title { color: var(--text); font-size: 16px; }

.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a { color: var(--text); font-weight: 500; padding: 8px 10px; border-radius: 8px; }
.nav-links a:hover { background: rgba(255,255,255,0.06); }

.nav-toggle {
  display: none; border: 0; background: transparent; color: var(--text);
  font-size: 20px; padding: 6px; border-radius: 10px; cursor: pointer;
}
.nav-toggle:hover { background: rgba(255,255,255,0.08); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav-links {
    position: absolute; top: 64px; right: 16px; left: 16px;
    flex-direction: column; gap: 10px; padding: 14px;
    background: var(--card); border: 1px solid var(--card-border); border-radius: 14px;
    display: none;
  }
  .nav-links.open { display: flex; }
}

/* Hero */
.hero { position: relative; padding: 84px 0 56px; }
.hero-content { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.hero-text h1 {
  margin: 0 0 14px; font-size: 42px; line-height: 1.15; font-weight: 700;
  background: linear-gradient(90deg, #fff 0%, #b6c0ff 50%, #8ddaff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-text p { margin: 0 0 24px; color: var(--muted); }
.hero-actions { display: flex; gap: 12px; }

.btn {
  display: inline-block; padding: 12px 18px; border-radius: 12px;
  font-weight: 600; letter-spacing: .2px; border: 1px solid transparent;
}
.btn.primary {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: #08121e; border-color: rgba(255,255,255,0.15);
}
.btn.ghost { color: var(--text); border-color: rgba(255,255,255,0.18); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(62, 201, 247, 0.18); }

.hero-visual { position: relative; min-height: 240px; }
.neon-orb {
  position: absolute; right: -60px; top: -40px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(62, 201, 247, 0.85), rgba(124, 92, 255, 0.65), transparent);
  filter: blur(12px); opacity: .6; pointer-events: none;
}
.hero .card.glass { position: relative; z-index: 1; }

@media (max-width: 992px) {
  .hero-content { grid-template-columns: 1fr; }
  .neon-orb { right: auto; left: 10px; top: -20px; width: 180px; height: 180px; }
}

/* Section */
.section { padding: 64px 0; }
.section.alt { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)); }
.section-header { margin-bottom: 22px; }
.section-header h2 { margin: 0 0 8px; font-size: 28px; }
.section-header p { margin: 0; color: var(--muted); }

/* 特性卡片 */
.feature { padding: 18px 20px 18px 26px; }
.feature-icon { font-size: 24px; color: var(--accent); margin-bottom: 8px; }
.feature h3 { margin: 0 0 10px; font-size: 18px; }
.feature p { margin: 0 0 12px; color: var(--muted); }
.bullets { list-style: none; margin: 0; padding: 0; }
.bullets li { position: relative; padding-left: 20px; margin: 8px 0; color: #cfd5e3; }
.bullets li::before { content: ""; position: absolute; left: 0; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(90deg, var(--primary), var(--secondary)); }

/* Diagram */
.diagram { padding: 20px; margin-bottom: 32px; }
.diagram .svg-diagram { width: 100%; height: auto; display: block; }
.diagram { overflow-x: auto; }

.diagram-caption { color: var(--muted); font-size: 14px; line-height: 1.5; }

.svg-title { fill: #eaf0ff; font-size: 18px; font-weight: 700; }
.svg-label { fill: #cfd5e3; font-size: 14px; }
.svg-box, .svg-sub { fill: rgba(255, 255, 255, 0.06); stroke: rgba(124, 92, 255, 0.55); stroke-width: 2; }
.svg-sub.hoverable { cursor: pointer; transition: stroke .2s ease, fill .2s ease, filter .2s ease; }
.svg-sub.hoverable:hover { stroke: #a895ff; fill: rgba(255,255,255,0.10); filter: url(#glow); }
.svg-arrow { stroke: url(#gradStroke); stroke-width: 2.5; }

.group { cursor: pointer; }
.group:hover .svg-box, .group:hover .svg-sub { stroke: #9a84ff; filter: url(#glow); }
.group:hover .svg-title, .group:hover .svg-label { fill: #fff; }

.group * { opacity: 0; transform: translateY(6px); }
.svg-diagram.in-view .group * { animation: fadeInUp .6s ease forwards; animation-delay: calc(var(--i, 0) * 120ms); }

.svg-arrow { will-change: stroke-dashoffset; }
.svg-arrow.animate-dash { animation: dash 1.4s ease forwards; animation-delay: var(--d, 0s); }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes dash {
  from { stroke-dashoffset: var(--len, 1000); }
  to { stroke-dashoffset: 0; }
}

/* 数据流动脉冲 */
.svg-arrow.pulse { stroke: #fff; filter: url(#glow); animation: pulse 2s infinite; }
@keyframes pulse {
  0%, 100% { stroke-opacity: 1; }
  50% { stroke-opacity: .45; }
}

/* 分组聚焦放大 */
.group.active .svg-box, .group.active .svg-sub { transform: scale(1.03); transition: transform .25s ease; }
.group.active .svg-title, .group.active .svg-label { fill: #fff; }

/* 节点脉冲 */
.node-pulse {
  animation: nodePulse 1.8s infinite ease-in-out;
  transform-origin: center;
}
@keyframes nodePulse {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(1.05); opacity: 1; }
}

/* 整体呼吸光效 */
.svg-diagram {
  animation: breathe 6s infinite ease-in-out;
}
@keyframes breathe {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}

/* Footer */
.footer { padding: 30px 0; border-top: 1px solid var(--card-border); background: rgba(12, 14, 25, 0.6); }
.footer p { margin: 0; color: var(--muted); text-align: center; }

/* 可访问性 */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 10px;
}

/* 屏幕阅读器专用 */
.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;
}
.sr-only:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 999;
  width: auto;
  height: auto;
  padding: 8px 12px;
  margin: 0;
  clip: auto;
  white-space: normal;
  background: var(--primary);
  color: #0b0e1a;
  border-radius: 8px;
  font-weight: 600;
}

/* 修复 Font Awesome 深色背景下图标可见性 */
.fa-solid, .fa-brands, .fa-regular { color: #eaf0ff; }
.feature-icon .fa-solid, .feature-icon .fa-brands { color: var(--accent); }
.card-row i { color: var(--primary); }

/* 小屏优化间距 */
@media (max-width: 420px) {
  .hero-text h1 { font-size: 32px; }
  .btn { padding: 10px 14px; }
}
