:root {
  --bg: #0c0d10;
  --panel: #15171c;
  --panel-2: #1b1e25;
  --line: #262a33;
  --text: #e8eaed;
  --muted: #8a909b;
  --accent: #5ad1c0;
  --accent-2: #f0a35e;
  --curve: #5ad1c0;
  --spectrum: rgba(240, 163, 94, 0.55);
  --radius: 14px;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 70% -10%, #16202a 0%, var(--bg) 55%);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
  background: rgba(12, 13, 16, 0.7);
  z-index: 5;
}

.brand { display: flex; align-items: baseline; gap: 12px; }
.brand h1 { font-size: 20px; margin: 0; letter-spacing: -0.02em; font-weight: 650; }
.logo {
  width: 14px; height: 14px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent));
  align-self: center;
  box-shadow: 0 0 12px rgba(90, 209, 192, 0.5);
}
.tag { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }

.topbar-actions { display: flex; gap: 10px; }

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 28px 60px;
  display: grid;
  gap: 18px;
}

.card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

/* Buttons */
button, .filebtn {
  font: inherit;
  cursor: pointer;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #20242c;
  color: var(--text);
  padding: 9px 14px;
  transition: border-color .15s, background .15s, transform .05s;
}
button:hover, .filebtn:hover { border-color: #39414e; }
button:active { transform: translateY(1px); }
.primary { background: var(--accent); color: #04201c; border-color: transparent; font-weight: 600; }
.primary:hover { filter: brightness(1.07); }
.ghost { background: transparent; }
a.ghost { text-decoration: none; display: inline-flex; align-items: center; }
.filebtn { display: inline-flex; align-items: center; background: #20242c; }
.filebtn.small { padding: 7px 11px; font-size: 13px; }

/* Visualizer */
.visualizer { padding: 12px 14px 8px; }
#scope { width: 100%; height: auto; display: block; border-radius: 8px; background: #0a0b0e; }
.scope-legend { display: flex; gap: 18px; align-items: center; color: var(--muted); font-size: 12px; padding: 8px 4px 2px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.dot.curve { background: var(--curve); }
.dot.spectrum { background: var(--spectrum); }

/* Transport */
.transport { display: grid; gap: 12px; }
.source-group { display: flex; gap: 10px; flex-wrap: wrap; }
.playback { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.playback #seek { flex: 1; min-width: 180px; }
.time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.vol { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.vol input { width: 90px; }
.hint { color: var(--muted); margin: 0; font-size: 13px; }

/* EQ head */
.eq-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.preamp { display: grid; gap: 6px; min-width: 280px; flex: 1; }
.preamp label { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; }
.preamp output { color: var(--text); font-variant-numeric: tabular-nums; }
.limiter { display: flex; align-items: center; gap: 10px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.muted { color: var(--muted); font-size: 12px; }

/* Bands */
.bands {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  align-items: end;
}
.band {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 10px 4px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
}
.band.active { border-color: var(--accent); background: rgba(90, 209, 192, 0.06); }
.band .gain-val { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text); }
.band .freq-lbl { font-size: 11px; color: var(--muted); }
.band input[type="range"] {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 8px;
  height: 160px;
  accent-color: var(--accent);
}

/* Band editor */
.bandeditor .be-title { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.bandeditor .be-title span { color: var(--text); }
.be-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.be-grid label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.be-grid output { color: var(--text); font-variant-numeric: tabular-nums; }
.be-grid select, .be-grid input { width: 100%; }
select {
  background: #20242c; color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px; font: inherit;
}

/* Presets */
.presets-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.presets-row label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }

input[type="range"] { accent-color: var(--accent); }

footer { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; border-top: 1px solid var(--line); }
footer a { color: var(--accent); }

@media (max-width: 760px) {
  .bands { grid-template-columns: repeat(5, 1fr); }
  .be-grid { grid-template-columns: repeat(2, 1fr); }
  .band input[type="range"] { height: 120px; }
}
