:root {
  --bg-main: #f8fafc;
  --bg-alt: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border-subtle: rgba(15, 23, 42, 0.09);
  --border-accent: rgba(37, 99, 235, 0.4);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent-cyan: #2563eb;
  --accent-indigo: #0ea5e9;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  --shadow-card: 0 4px 20px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 12px 36px rgba(37, 99, 235, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Ambient Background */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
}

.glow-1 {
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, #38bdf8, transparent 70%);
  top: -180px;
  left: -120px;
}

.glow-2 {
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, #60a5fa, transparent 70%);
  bottom: -220px;
  right: -140px;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at top, black 40%, transparent 80%);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.925rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-lg {
  padding: 13px 26px;
  font-size: 1rem;
  border-radius: 12px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.32);
}

.btn-outline {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.14);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--accent-cyan);
  background: rgba(37, 99, 235, 0.05);
  color: var(--accent-cyan);
}

.btn-ghost {
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(248, 250, 252, 0.85);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-text small {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  margin-left: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  cursor: pointer;
  padding: 0 8px;
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  padding: 76px 0 92px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.22);
  color: var(--accent-cyan);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(5, 150, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

.hero-title {
  font-size: clamp(2.25rem, 4.4vw, 3.55rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 32px;
}

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

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 42px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.stat-value {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 34px;
  background: var(--border-subtle);
}

/* Telemetry Card */
.telemetry-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow), 0 20px 50px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.telemetry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-subtle);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.35);
}

.window-dots span:nth-child(1) { background: #ef4444; }
.window-dots span:nth-child(2) { background: #f59e0b; }
.window-dots span:nth-child(3) { background: #10b981; }

.telemetry-domain {
  font-size: 0.82rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-secondary);
}

.status-pill.online {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent-emerald);
  background: rgba(5, 150, 105, 0.1);
  padding: 3px 10px;
  border-radius: 999px;
}

.telemetry-body {
  padding: 20px;
}

.speed-gauge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.07), rgba(14, 165, 233, 0.06));
  border: 1px solid rgba(37, 99, 235, 0.18);
  margin-bottom: 16px;
}

.gauge-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 2px;
}

.gauge-route {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
}

.gauge-proto {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.gauge-metric {
  text-align: right;
}

.metric-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-emerald);
  line-height: 1;
}

.metric-unit {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-left: 2px;
}

.node-preview-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.preview-row {
  display: grid;
  grid-template-columns: 26px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 0.88rem;
}

.preview-row .name {
  font-weight: 500;
}

.preview-row .tag {
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: rgba(15, 23, 42, 0.06);
  padding: 2px 8px;
  border-radius: 6px;
}

.preview-row .ping {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  font-weight: 600;
}

.ping.good { color: var(--accent-emerald); }
.ping.mid { color: var(--accent-amber); }

.telemetry-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.ping-test-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-cyan);
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.ping-test-btn:hover {
  background: rgba(37, 99, 235, 0.16);
}

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

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 18px;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* Nodes */
.node-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

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

.node-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
}

.node-card.hidden {
  display: none;
}

.node-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
}

.node-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.node-name {
  font-weight: 700;
  font-size: 0.98rem;
}

.node-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-cyan);
}

.node-meta {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.node-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.node-tags span {
  font-size: 0.74rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--text-secondary);
}

.load-bar {
  height: 5px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.load-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--gradient-primary);
}

/* Pricing */
.billing-toggle {
  display: flex;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  padding: 6px;
  border-radius: 14px;
  width: fit-content;
  margin: 0 auto 40px;
}

.cycle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.cycle-btn.active {
  background: var(--gradient-primary);
  color: #ffffff;
}

.save-badge {
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(5, 150, 105, 0.12);
  color: var(--accent-emerald);
}

.cycle-btn.active .save-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
}

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

.plan-card.featured {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.05) 0%, #ffffff 100%);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow);
}

.popular-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.plan-head h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.plan-head p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  min-height: 42px;
}

.plan-price {
  margin: 22px 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.plan-price .currency {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.plan-price .amount {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.plan-price .period {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.plan-features strong {
  color: var(--text-primary);
}

/* Steps & Platforms */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 36px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.step-num {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}

.step-card h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.step-card a {
  color: var(--accent-cyan);
  text-decoration: underline;
}

.platforms-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.platform-pill {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* FAQ */
.faq-container {
  max-width: 820px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}

.faq-icon {
  font-size: 1.25rem;
  color: var(--accent-cyan);
  transition: transform var(--transition);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer p {
  padding: 0 24px 20px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.faq-answer a {
  color: var(--accent-cyan);
  text-decoration: underline;
}

/* CTA Banner */
.cta-banner {
  padding: 40px 0 88px;
}

.cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 42px 48px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.1));
  border: 1px solid rgba(37, 99, 235, 0.22);
  box-shadow: var(--shadow-glow);
}

.cta-text h2 {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.cta-text p {
  color: var(--text-secondary);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 56px 0 32px;
  background: var(--bg-alt);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-brand p {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-brand a {
  color: var(--accent-cyan);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .features-grid,
  .nodes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-actions .btn-ghost {
    display: none;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border-subtle);
    padding: 20px 24px;
    gap: 16px;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .features-grid,
  .nodes-grid,
  .pricing-grid,
  .steps-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .cta-box {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }
  .hero-stats {
    gap: 18px;
  }
}
