:root {
  --bg: #070510;
  --bg-card: rgba(18, 14, 34, 0.72);
  --border: rgba(167, 139, 250, 0.18);
  --border-bright: rgba(167, 139, 250, 0.5);
  --text: #f1effa;
  --muted: #a49ec4;
  --primary: #a78bfa;
  --secondary: #22d3ee;
  --warm: #f472b6;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(circle at 75% 8%, #1d1142 0%, var(--bg) 52%);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
}

.mono {
  font-family: var(--mono);
}

#neural-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

.aurora-glow {
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 28%, rgba(34, 211, 238, 0.08), transparent 36%),
    radial-gradient(circle at 82% 72%, rgba(244, 114, 182, 0.07), transparent 40%);
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(7, 5, 16, 0.78);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #090514;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 0 22px rgba(167, 139, 250, 0.4);
}

.brand-mark.small {
  width: 26px;
  height: 26px;
  font-size: 0.75rem;
}

.brand-sub {
  color: var(--secondary);
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 26px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.93rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.08);
  color: var(--secondary);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 10px var(--secondary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.82); }
}

/* Hero */
.hero {
  padding: 96px 0 64px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-bright);
  background: rgba(167, 139, 250, 0.1);
  color: var(--primary);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.1rem, 4.8vw, 3.8rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.gradient-text {
  background: linear-gradient(90deg, #a78bfa 0%, #22d3ee 52%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  max-width: 720px;
  margin: 0 auto 36px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-desc strong {
  color: var(--text);
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 54px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #090514;
  box-shadow: 0 10px 30px rgba(167, 139, 250, 0.3);
}

.btn-ghost {
  border: 1px solid var(--border-bright);
  color: var(--text);
  background: rgba(18, 14, 34, 0.6);
}

.paradigm-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.p-item {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--muted);
  font-size: 0.88rem;
}

.p-item span {
  color: var(--primary);
  margin-right: 6px;
}

.p-item.active {
  border-color: var(--secondary);
  color: var(--text);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.16);
}

.p-sep {
  color: var(--muted);
}

/* Sections */
.section {
  padding: 72px 0;
}

.section-head {
  margin-bottom: 36px;
}

.section-tag {
  display: inline-block;
  color: var(--secondary);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 10px;
}

.section-head p {
  color: var(--muted);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.glass-card {
  padding: 28px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.glass-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-4px);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.domain-id {
  color: var(--secondary);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.card-badge {
  font-size: 0.75rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.14);
  color: var(--primary);
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.glass-card h3 {
  font-size: 1.22rem;
  margin-bottom: 10px;
}

.glass-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.card-footer {
  font-size: 0.76rem;
  color: var(--warm);
  opacity: 0.92;
}

/* Methods */
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.method-card {
  padding: 24px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.method-num {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 7px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--secondary);
  font-size: 0.8rem;
  margin-bottom: 14px;
}

.method-card h4 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.method-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* Interactive Lab */
.lab-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-bright);
  background: rgba(10, 8, 22, 0.92);
}

.lab-sidebar {
  display: flex;
  flex-direction: column;
  padding: 14px;
  gap: 8px;
  border-right: 1px solid var(--border);
  background: rgba(18, 14, 34, 0.85);
}

.lab-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.lab-tab span.mono {
  color: var(--primary);
  font-size: 0.8rem;
}

.lab-tab.active {
  background: rgba(167, 139, 250, 0.16);
  border-color: var(--border-bright);
  color: var(--text);
}

.lab-viewer {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lab-viewer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--secondary);
  font-size: 0.84rem;
}

.copy-btn {
  background: rgba(34, 211, 238, 0.12);
  color: var(--secondary);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 7px;
  padding: 5px 12px;
  font-size: 0.78rem;
  cursor: pointer;
}

.lab-code {
  padding: 20px 22px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #ddd6fe;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 32px;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-right a {
  color: var(--secondary);
  text-decoration: none;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .cards-grid, .method-grid, .lab-shell { grid-template-columns: 1fr; }
  .lab-sidebar { border-right: none; border-bottom: 1px solid var(--border); }
}
