:root {
  --bg-dark: #080c14;
  --bg-card: rgba(18, 24, 38, 0.7);
  --bg-card-hover: rgba(26, 34, 52, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(99, 102, 241, 0.5);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-indigo: #6366f1;
  --accent-violet: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --glow-indigo: rgba(99, 102, 241, 0.25);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Backdrops */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.glow-1 {
  width: 500px;
  height: 500px;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.1) 70%, transparent 100%);
}

.glow-2 {
  width: 450px;
  height: 450px;
  top: 900px;
  right: -100px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, rgba(99, 102, 241, 0.05) 70%, transparent 100%);
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(8, 12, 20, 0.75);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
}

.nav-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.brand-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

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

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text-main);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-violet));
  color: #ffffff;
  box-shadow: 0 4px 18px var(--glow-indigo);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
  background: rgba(245, 158, 11, 0.25);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

/* Hero Section */
.hero-section {
  position: relative;
  z-index: 1;
  padding: 80px 24px 60px;
  text-align: center;
}

.hero-container {
  max-width: 840px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #a5b4fc;
  margin-bottom: 24px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 8px #6366f1;
}

.hero-title {
  font-size: 48px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -1.2px;
  margin-bottom: 20px;
  color: #ffffff;
}

.gradient-text {
  background: linear-gradient(135deg, #a5b4fc 0%, #818cf8 40%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 36px;
}

.hero-cta-group {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

/* Stats */
.hero-stats {
  display: inline-flex;
  align-items: center;
  background: rgba(18, 24, 38, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 28px;
  gap: 28px;
  backdrop-filter: blur(10px);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

/* Sections Common */
section {
  position: relative;
  z-index: 1;
  padding: 80px 24px;
}

.section-container {
  max-width: 1040px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: #ffffff;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto;
}

/* Interactive Demo Card */
.demo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.visualizer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #0b101b;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

#audioVisualizer {
  flex: 1;
  height: 90px;
  border-radius: 6px;
}

.channel-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 80px;
}

.channel-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.meter-bar {
  width: 10px;
  height: 60px;
  background: #1e293b;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.meter-fill {
  width: 100%;
  height: 0%;
  position: absolute;
  bottom: 0;
  background: linear-gradient(to top, var(--accent-emerald), var(--accent-indigo));
  transition: height 0.08s ease;
  border-radius: 5px;
}

/* Demo Controls */
.demo-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.demo-step {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.step-num {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.step-title {
  font-size: 14px;
  font-weight: 600;
}

.button-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preset-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.preset-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.preset-pill.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-indigo);
  color: #ffffff;
  box-shadow: 0 0 12px var(--glow-indigo);
}

/* Demo Sliders */
.demo-sliders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: rgba(255, 255, 255, 0.02);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.slider-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
}

.badge {
  background: #1e293b;
  color: var(--accent-cyan);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #1e293b;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-indigo);
  cursor: pointer;
  box-shadow: 0 0 10px var(--glow-indigo);
}

.demo-status {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(18, 24, 38, 0.8);
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.25s;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateY(-3px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.icon-indigo { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.icon-pink { background: rgba(236, 72, 153, 0.15); color: #f472b6; }
.icon-cyan { background: rgba(6, 182, 212, 0.15); color: #38bdf8; }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.icon-emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.icon-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

.feature-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffffff;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Install Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
}

.step-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-violet));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 16px;
  box-shadow: 0 0 14px var(--glow-indigo);
}

.step-heading {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffffff;
}

.step-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.code-box {
  background: #090e17;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.code-box code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #a5b4fc;
  overflow-x: auto;
  white-space: nowrap;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  font-weight: 600;
}

.copy-btn:hover {
  background: var(--accent-indigo);
}

.browser-links {
  list-style: none;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.browser-links code {
  color: var(--accent-cyan);
  font-family: 'JetBrains Mono', monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

/* FAQ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-main);
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: inherit;
}

.faq-icon {
  font-size: 20px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.faq-item.open .faq-answer {
  padding-bottom: 18px;
  max-height: 200px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 32px 24px;
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(8, 12, 20, 0.9);
}

.footer-container {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

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

.footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.footer-right a:hover {
  color: #ffffff;
}

@media (max-width: 768px) {
  .hero-title { font-size: 34px; }
  .demo-sliders { grid-template-columns: 1fr; }
  .nav-links .nav-link { display: none; }
  .visualizer-container { flex-direction: column; }
  #audioVisualizer { width: 100%; }
}
