:root {
  color-scheme: dark;
  --bg: #050509;
  --panel: #101018;
  --panel-strong: #151522;
  --text: #f7f7ff;
  --muted: #b8b8c9;
  --line: rgba(255, 255, 255, 0.14);
  --purple: #a855f7;
  --yellow: #ffe45c;
  --cyan: #5ee7ff;
  --danger: #ff6b8a;
  --ok: #7cffb2;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 22% 12%, rgba(168, 85, 247, 0.18), transparent 28rem),
    radial-gradient(circle at 82% 22%, rgba(94, 231, 255, 0.14), transparent 24rem),
    linear-gradient(135deg, #050509 0%, #0c0813 48%, #050509 100%);
  color: var(--text);
}

a {
  color: inherit;
}

code {
  color: var(--cyan);
  font-size: 0.95em;
}

.site-header,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header {
  padding: 26px 0 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: conic-gradient(from 120deg, var(--purple), var(--cyan), var(--yellow), var(--purple));
  box-shadow: 0 0 22px rgba(94, 231, 255, 0.75);
}

.nav-links,
.site-footer div {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a,
.site-footer a {
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"],
.site-footer a:hover {
  color: var(--text);
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-shell {
  min-height: 66vh;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  align-items: center;
  gap: 34px;
  padding: 28px 0 36px;
}

.hero-copy h1,
.content-page h1 {
  margin: 8px 0 18px;
  max-width: 760px;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-text,
.content-page p,
.stem-card p {
  color: var(--muted);
  line-height: 1.72;
}

.eyebrow {
  margin: 0;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.separator-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 16, 24, 0.78);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(94, 231, 255, 0.05);
  backdrop-filter: blur(18px);
}

.status-banner {
  min-height: 48px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 228, 92, 0.36);
  border-radius: 8px;
  background: rgba(255, 228, 92, 0.08);
  color: #fff5aa;
  font-size: 0.92rem;
  line-height: 1.45;
}

.status-banner.is-ready {
  border-color: rgba(124, 255, 178, 0.36);
  background: rgba(124, 255, 178, 0.08);
  color: #caffdf;
}

.status-banner.is-error {
  border-color: rgba(255, 107, 138, 0.48);
  background: rgba(255, 107, 138, 0.1);
  color: #ffc4d0;
}

.drop-zone {
  position: relative;
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 28px;
  border: 1px dashed rgba(94, 231, 255, 0.58);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(168, 85, 247, 0.14), transparent 52%),
    rgba(255, 255, 255, 0.03);
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging,
.drop-zone:focus-visible {
  border-color: var(--yellow);
  transform: translateY(-2px);
  outline: none;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  opacity: 0;
  white-space: nowrap;
}

.drop-symbol {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(94, 231, 255, 0.1);
  color: var(--cyan);
  font-size: 2.7rem;
  box-shadow: 0 0 34px rgba(94, 231, 255, 0.36);
}

.drop-zone h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  letter-spacing: 0;
}

.drop-zone p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
}

.primary-button,
.ghost-button,
.download-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-button {
  color: #06060a;
  background: linear-gradient(135deg, var(--yellow), var(--cyan));
  box-shadow: 0 0 26px rgba(94, 231, 255, 0.24);
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.controls-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.file-summary {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 8px;
  background: rgba(168, 85, 247, 0.08);
  color: #ead8ff;
}

.progress-wrap {
  margin-top: 18px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--cyan), var(--yellow));
  box-shadow: 0 0 24px rgba(94, 231, 255, 0.38);
  transition: width 180ms ease;
}

.model-help {
  margin-top: 16px;
  border: 1px solid rgba(94, 231, 255, 0.24);
  border-radius: 8px;
  background: rgba(94, 231, 255, 0.055);
  color: var(--muted);
}

.model-help summary {
  padding: 12px 14px;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.model-help ol {
  margin: 0;
  padding: 0 18px 14px 36px;
  line-height: 1.65;
}

.result-section {
  padding: 42px 0 24px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2,
.content-page h2 {
  margin: 6px 0 0;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  letter-spacing: 0;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.stem-card {
  min-height: 230px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.stem-card h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.stem-card audio {
  width: 100%;
  margin: 18px 0 14px;
}

.stem-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  color: #050509;
  text-decoration: none;
  background: var(--cyan);
}

.is-empty {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.035);
}

.ad-slot {
  min-height: 96px;
  display: grid;
  place-items: center;
  margin: 32px 0 48px;
  border: 1px dashed rgba(255, 228, 92, 0.34);
  border-radius: 8px;
  color: rgba(255, 228, 92, 0.74);
  background: rgba(255, 228, 92, 0.05);
}

.site-footer {
  padding: 28px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  max-width: 680px;
  margin: 0;
}

.content-page {
  max-width: 860px;
  padding: 56px 0 72px;
}

.content-page section {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 860px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-shell,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .hero-shell {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .separator-panel {
    padding: 14px;
  }

  .drop-zone {
    min-height: 260px;
    padding: 20px 14px;
  }

  .controls-row {
    flex-direction: column;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }
}
