:root {
  --bg: #090a10;
  --card-bg: rgba(18, 20, 32, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #f0f2f8;
  --text-muted: #8b92a5;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --green: #10b981;
  --blue: #38bdf8;
  --purple: #c084fc;
  --gold: #fbbf24;
  --red: #f43f5e;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.glow-bg {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(192, 132, 252, 0.05) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 4rem 1.5rem 2.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 40%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 2rem;
}

.cta-bar {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.3rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid var(--card-border);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--card-border);
}
.btn-outline:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  position: relative;
  z-index: 1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 0.35rem;
}

.glow-green { color: var(--green); }
.glow-blue { color: var(--blue); }
.glow-purple { color: var(--purple); }
.glow-gold { color: var(--gold); }

.stat-label {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

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

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  padding: 2rem;
  border-radius: 16px;
  margin-bottom: 2rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
}

.pill {
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  color: var(--text-muted);
  font-weight: 500;
}

.pill-green {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.description {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.track-select-box {
  margin-bottom: 1.25rem;
}

.track-select-box label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text);
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
}
select:focus {
  border-color: var(--primary);
}

.audio-controls {
  margin-bottom: 1.25rem;
}

#visualizerCanvas {
  width: 100%;
  height: 100px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  margin-top: 0.75rem;
  display: block;
}

.track-meta {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--card-border);
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.meta-item {
  display: inline-block;
  margin-right: 1.5rem;
  margin-bottom: 0.3rem;
}

.meta-desc {
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.benchmark-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.benchmark-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.highlight {
  background: rgba(99, 102, 241, 0.08);
}

.badge-win {
  display: inline-block;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 0.4rem;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

.compare-col {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1.25rem;
}

.control-col {
  border-top: 3px solid var(--red);
}

.audio-col {
  border-top: 3px solid var(--green);
}

.compare-header {
  margin-bottom: 0.85rem;
}

.compare-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.score-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.score-tag.bad {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
}
.score-tag.good {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.code-snippet {
  font-size: 0.85rem;
  color: #d1d5db;
}

.code-snippet hr {
  border: none;
  border-top: 1px solid var(--card-border);
  margin: 0.75rem 0;
}

blockquote {
  border-left: 3px solid var(--card-border);
  padding-left: 0.75rem;
  margin-top: 0.5rem;
  font-style: italic;
  color: var(--text-muted);
}

.install-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.install-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.25rem;
}

.install-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--blue);
}

pre {
  background: #000;
  padding: 0.85rem;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mechanical Ear Video Section */
.video-section {
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-yt {
  background: #dc2626;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-yt:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
}

.video-track-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.video-track-bar label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.video-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.video-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--card-border);
}
.vincent-head {
  background: rgba(99, 102, 241, 0.08);
}
.robach-head {
  background: rgba(245, 158, 11, 0.08);
}

.critic-badge {
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}
.vincent-badge {
  color: var(--primary);
}
.robach-badge {
  color: var(--amber);
}
.critic-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.iframe-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-caption {
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text);
  background: rgba(15, 17, 26, 0.6);
  flex-grow: 1;
}

.video-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

footer {
  text-align: center;
  padding: 2.5rem;
  border-top: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

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