*{ box-sizing:border-box; }
html,body{ height:100%; margin:0; }

:root{
  --bg1:#070a12;
  --bg2:#05060c;
  --panel: rgba(255,255,255,.06);
  --panelBd: rgba(255,255,255,.12);
  --fg:#e5e7eb;
  --muted: rgba(229,231,235,.78);
  --accent:#60a5fa;
  --danger:#fb7185;

  --radius: 16px;
  --gap: 10px;

  --btnBg: rgba(255,255,255,.08);
  --btnBd: rgba(255,255,255,.16);

  --laneH: 64px;
}

body{
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background: radial-gradient(1100px 800px at 20% 0%, #121a33 0%, var(--bg1) 55%, var(--bg2) 100%);
  color:var(--fg);
  overflow:hidden;
}

#app{
  height:100%;
  display:flex;
  flex-direction:column;
}

.topbar{
  padding:12px 14px 10px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  display:flex;
  gap:16px;
  align-items:flex-start;
  justify-content:space-between;
}

.brand .title{
  font-size:18px;
  font-weight:900;
  letter-spacing:.2px;
}
.brand .subtitle{
  margin-top:4px;
  font-size:12.5px;
  opacity:.85;
  max-width: 520px;
}

.rightTop{ display:flex; flex-direction:column; gap:10px; min-width:min(880px, 100%); }

.row{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:flex-end; }

.lbl{
  font-size:12px;
  color:var(--muted);
  display:flex;
  align-items:center;
  gap:8px;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  padding:6px 10px;
  border-radius: 14px;
}

.lbl input[type="number"]{
  width:74px;
  padding:6px 8px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color:var(--fg);
}

.lbl select{
  padding:6px 8px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color:var(--fg);
}

.lbl input[type="range"]{ width:140px; }

.lbl.chk{ gap:10px; }
.lbl.chk input{ transform: translateY(1px); }

.transport{ justify-content:flex-end; }
.sep{ width:10px; height:10px; }

.btn{
  appearance:none;
  border:1px solid var(--btnBd);
  background: var(--btnBg);
  color:var(--fg);
  padding:10px 12px;
  border-radius: 14px;
  font-weight: 850;
  cursor:pointer;
  user-select:none;
}
.btn:hover{ border-color: rgba(255,255,255,.26); }
.btn:active{ transform: translateY(1px); }

.btn.primary{
  background: rgba(96,165,250,.18);
  border-color: rgba(96,165,250,.45);
}
.btn.danger{
  background: rgba(251,113,133,.18);
  border-color: rgba(251,113,133,.55);
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  color: var(--muted);
  font-size:12px;
}

.main{
  flex:1;
  overflow:auto;
  padding:12px;
}

.panel{
  background: var(--panel);
  border:1px solid var(--panelBd);
  border-radius: var(--radius);
  padding:12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.panelTitleRow{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.panelTitle{ font-weight:900; font-size:14px; }
.panelHint{ font-size:12px; color:var(--muted); }

.track{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.16);
  border-radius: 18px;
  padding:10px;
  margin-bottom:10px;
}

.trackTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.trackName{
  display:flex;
  align-items:center;
  gap:8px;
  min-width: 220px;
}
.trackName input{
  width: 180px;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color:var(--fg);
  font-weight:800;
}

.badge{
  font-size:11px;
  color: rgba(255,255,255,.85);
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  padding:4px 8px;
  border-radius:999px;
}

.trackControls{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
}

.tCtl{
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size:12px;
}
.tCtl input[type="range"]{ width:110px; }
.tCtl input[type="number"]{
  width:70px;
  padding:6px 8px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color:var(--fg);
}
.tCtl select{
  padding:6px 8px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color:var(--fg);
}

.armBtn.on{
  border-color: rgba(251,113,133,.75);
  background: rgba(251,113,133,.22);
}
.muteBtn.on{
  border-color: rgba(255,255,255,.40);
  background: rgba(255,255,255,.10);
}

.laneWrap{
  margin-top:10px;
  border-radius: 16px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
}
.laneHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:8px 10px;
  border-bottom:1px solid rgba(255,255,255,.08);
  color:var(--muted);
  font-size:12px;
}
.laneHeader .smallBtns{ display:flex; gap:8px; }
.lane{
  width:100%;
  height: var(--laneH);
  display:block;
}

.footer{
  border-top:1px solid rgba(255,255,255,.08);
  padding:10px 12px;
  background: linear-gradient(0deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
}

.statusLine{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.status{ color: rgba(255,255,255,.88); font-size:12.5px; }
.meters{ display:flex; gap:14px; color:var(--muted); font-size:12px; }
.meter strong{ color:var(--fg); }

.overlay{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  z-index: 999;
}
.overlay.hidden{ display:none; }

.overlayCard{
  width: min(520px, calc(100vw - 26px));
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(10,12,18,.85);
  box-shadow: 0 30px 120px rgba(0,0,0,.45);
  padding:14px;
}
.overlayTitle{ font-weight:900; font-size:14px; margin-bottom:6px; }
.overlayText{ font-size:12.5px; color:var(--muted); margin-bottom:10px; }
.progressWrap{ display:flex; align-items:center; gap:10px; }
.progressBar{
  flex:1;
  height:12px;
  border-radius:999px;
  overflow:hidden;
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
}
.progressFill{
  height:100%;
  width:0%;
  background: rgba(96,165,250,.60);
}
.progressPct{ width:58px; text-align:right; color:var(--muted); font-size:12px; }
.overlayFoot{ margin-top:10px; font-size:11.5px; color: rgba(229,231,235,.72); }

@media (max-width: 980px){
  .topbar{ flex-direction:column; align-items:stretch; }
  .rightTop{ min-width:unset; }
  .row{ justify-content:flex-start; }
}
