:root {
  --bg: #05070d;
  --panel: #0b0f1a;
  --border: rgba(0, 255, 170, 0.18);
  --primary: #00ffa3;
  --primary-dim: #00cc82;
  --red: #ff2d55;
  --yellow: #ffd166;
  --text: #d7ffe9;
  --muted: #5b8a74;
  --glow: 0 0 18px rgba(0, 255, 163, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'JetBrains Mono', monospace, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ---------- 背景 ---------- */
.bg { position: fixed; inset: 0; z-index: -1; }
#matrix { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.16; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,255,163,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,163,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
}
.scanline {
  position: absolute; left: 0; right: 0; height: 120px; top: -120px;
  background: linear-gradient(180deg, transparent, rgba(0,255,163,0.06), transparent);
  animation: scan 6s linear infinite;
}
@keyframes scan { to { transform: translateY(calc(100vh + 120px)); } }
.vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.7) 100%); }

/* ---------- 导航 ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(5,7,13,0.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1120px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 28px; }
.brand { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; }
.brand-mark { color: var(--primary); }
.brand-ver { color: var(--primary); font-size: 12px; margin-left: 6px; border: 1px solid var(--border); padding: 1px 6px; border-radius: 4px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); }
.nav-cta { color: var(--primary); border: 1px solid var(--primary); padding: 6px 16px; border-radius: 6px; font-size: 13px; text-decoration: none; transition: all 0.2s; }
.nav-cta:hover { background: rgba(0,255,163,0.1); box-shadow: var(--glow); }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 110px 24px 40px; }
.hero-badge { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 3px; color: var(--primary); border: 1px solid var(--border); padding: 6px 16px; border-radius: 999px; margin-bottom: 24px; }
.hero .glitch {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(48px, 10vw, 110px);
  font-weight: 700;
  color: #e8fff4;
  letter-spacing: 4px;
  position: relative;
  text-shadow: 0 0 30px rgba(0,255,163,0.4);
}
.hero-sub { margin-top: 22px; font-size: clamp(16px, 2.5vw, 20px); color: var(--muted); }
.hero-actions { margin-top: 36px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 14px; padding: 12px 26px; border-radius: 8px; text-decoration: none; transition: all 0.2s; }
.btn-primary { background: var(--primary); color: #00261a; font-weight: 600; box-shadow: var(--glow); }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.hero-stats { margin-top: 56px; display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat .num { display: block; font-family: 'JetBrains Mono', monospace; font-size: 30px; font-weight: 700; color: var(--primary); }
.stat .label { font-size: 13px; color: var(--muted); }

/* ---------- 终端 ---------- */
.terminal-section { max-width: 860px; margin: 40px auto 0; padding: 0 24px; }
.terminal { background: #0a0f16; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(0,255,163,0.06); overflow: hidden; }
.terminal-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: #10151f; border-bottom: 1px solid var(--border); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f56; } .dot.yellow { background: #ffbd2e; } .dot.green { background: #27c93f; }
.terminal-title { margin-left: 10px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); }
.terminal-body { padding: 20px 24px; font-family: 'JetBrains Mono', monospace; font-size: 14px; line-height: 1.9; overflow-x: auto; }
.terminal-body code { display: block; white-space: pre; color: var(--text); }
.c-prompt { color: var(--primary); font-weight: 600; }
.c-green { color: #3ddc84; } .c-red { color: #ff4d5e; } .c-yellow { color: var(--yellow); }
.c-dim { color: var(--muted); }
.c-caret { display: inline-block; width: 9px; height: 16px; background: var(--primary); vertical-align: text-bottom; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- 通用区块 ---------- */
.section { max-width: 1120px; margin: 0 auto; padding: 90px 24px; }
.section.alt { background: rgba(11,15,26,0.6); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); max-width: none; }
.section.alt .section-head, .section.alt .feature-grid, .section.alt .stack-grid { max-width: 1120px; margin-left: auto; margin-right: auto; }
.section-head { text-align: center; margin-bottom: 52px; }
.section-head h2 { font-family: 'JetBrains Mono', monospace; font-size: 34px; font-weight: 700; letter-spacing: 1px; }
.section-head p { margin-top: 10px; color: var(--muted); }

/* ---------- 核心能力 ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.feature-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 28px; transition: all 0.25s; }
.feature-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--glow); }
.feature-card .icon { font-size: 28px; }
.feature-card h3 { margin: 14px 0 8px; font-size: 18px; }
.feature-card p { color: var(--muted); font-size: 14px; }

/* ---------- 功能模块墙 ---------- */
.module-wall { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; max-width: 1120px; margin: 0 auto; }
.module-item { font-family: 'JetBrains Mono', monospace; font-size: 14px; padding: 18px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; text-align: center; transition: all 0.2s; }
.module-item:hover { color: var(--primary); border-color: var(--primary); }

/* ---------- 架构 ---------- */
.arch-diagram { max-width: 780px; margin: 0 auto; text-align: center; }
.arch-layer { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin: 6px 0; }
.arch-node { font-family: 'JetBrains Mono', monospace; font-size: 13px; padding: 12px 20px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }
.arch-node:hover { border-color: var(--primary); }
.arch-layer.wide .arch-node { flex: 0 1 auto; }
.arch-arrow { color: var(--primary); font-size: 22px; margin: 4px 0; }
.arch-arrow.center { display: block; }

/* ---------- 技术栈 ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; max-width: 1120px; margin: 0 auto; }
.stack-item { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 20px; text-align: center; }
.stack-item b { display: block; font-family: 'JetBrains Mono', monospace; font-size: 16px; color: var(--primary); }
.stack-item span { font-size: 13px; color: var(--muted); }

/* ---------- 部署 ---------- */
.deploy-box { max-width: 720px; margin: 0 auto; background: #0a0f16; border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.deploy-box pre { font-family: 'JetBrains Mono', monospace; font-size: 14px; line-height: 2; color: var(--text); overflow-x: auto; }
.deploy-actions { margin-top: 20px; text-align: center; }

/* ---------- 页脚 ---------- */
.footer { text-align: center; padding: 40px 24px; border-top: 1px solid var(--border); }
.footer p { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--text); }
.foot-dim { color: var(--muted); font-size: 12px; margin-top: 6px; }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-inner { gap: 12px; }
  .nav-cta { margin-left: auto; }
  .hero { padding-top: 70px; }
  .hero-stats { gap: 28px; }
}
