:root {
  --bg: #0f1216;
  --panel: #171c22;
  --panel-2: #1f262e;
  --fg: #e6edf3;
  --muted: #93a1ad;
  --accent: #5ad1c2;
  --accent-2: #f0a868;
  --border: #2a323b;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

header h1 {
  margin: 0 0 4px;
  font-size: 30px;
  letter-spacing: -0.02em;
}
header h1 .sub {
  color: var(--accent);
  font-weight: 400;
  font-size: 22px;
}
.tagline { color: var(--muted); margin: 0 0 8px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 16px 0;
}
.panel h2 {
  margin: 0 0 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.note { color: var(--muted); font-size: 13px; }

select, button, input[type=file] { font: inherit; }

select {
  background: var(--panel-2);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 280px;
}

label { color: var(--fg); }
.src-block { margin-top: 12px; }
.file {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  margin-right: 20px;
  font-size: 13px;
  color: var(--muted);
}

button {
  background: var(--accent);
  color: #06231f;
  border: 0;
  border-radius: 8px;
  padding: 10px 22px;
  font-weight: 600;
  cursor: pointer;
}
button:disabled { opacity: 0.45; cursor: default; }
button:not(:disabled):hover { filter: brightness(1.08); }

#run { font-size: 16px; }
.status { margin-left: 14px; color: var(--muted); }

.progress {
  position: relative;
  height: 22px;
  margin-top: 12px;
  background: var(--panel-2);
  border-radius: 6px;
  overflow: hidden;
}
#dl-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.15s ease;
}
#dl-label {
  position: relative;
  display: block;
  text-align: center;
  font-size: 12px;
  line-height: 22px;
  color: var(--fg);
  mix-blend-mode: difference;
}

.hidden { display: none !important; }

/* A/B player */
.ab-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.ab-toggle button {
  background: var(--panel-2);
  color: var(--muted);
  border-radius: 0;
  padding: 7px 18px;
  font-weight: 500;
}
.ab-toggle button.active { background: var(--accent); color: #06231f; font-weight: 600; }
#player { display: block; width: 100%; margin: 6px 0 10px; }
.dl-link { color: var(--accent); font-size: 13px; text-decoration: none; }
.dl-link:hover { text-decoration: underline; }

/* spectrograms */
.spectro { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 18px; }
.spectro figure { margin: 0; }
.spectro figcaption { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.spectro canvas {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #000;
}

footer { margin-top: 28px; color: var(--muted); font-size: 13px; text-align: center; }
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.fine { font-size: 12px; opacity: 0.8; }
