:root{
  --bg: #07080d;
  --glass: rgba(14,16,26,0.74);
  --glass2: rgba(14,16,26,0.55);
  --text: #f4f6ff;
  --muted: rgba(244,246,255,0.72);
  --muted2: rgba(244,246,255,0.55);
  --border: rgba(244,246,255,0.10);
  --shadow: 0 12px 40px rgba(0,0,0,0.45);
  --radius: 18px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; margin:0; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial; background: var(--bg); color: var(--text); }

#map{ position:fixed; inset:0; }

.topbar{
  position:fixed;
  top:16px;
  left:16px;
  right:16px;
  z-index:20;
  display:grid;
  grid-template-columns: 1fr 1.6fr;
  gap:12px;
  pointer-events:none;
}
.topbar > *{ pointer-events:auto; }

.brand, .player, .panel, .toast{
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.brand{ padding:14px 16px; }
.brandRow{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.brandName{ font-weight: 900; font-size: 18px; letter-spacing: 0.2px; }
.brandTag{ margin-top:6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.badge{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.08);
  color: var(--muted);
  font-weight: 900;
}

.player{ padding:12px 14px; }
.playerRow{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.playerRow2{ display:flex; align-items:center; gap:10px; margin-top:10px; }

.trackMeta{ min-width:0; }
.trackTitle{ font-weight: 900; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.trackArtist{ margin-top:2px; font-size:13px; color: var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.playerBtns{ display:flex; gap:8px; align-items:center; }

.btn{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  cursor:pointer;
  font-weight: 900;
}
.btn:hover{ background: rgba(255,255,255,0.12); }
.btn:disabled{ opacity:0.55; cursor:not-allowed; }

.btnPrimary{ background: rgba(255,255,255,0.16); }
.btnGhost{ background: rgba(255,255,255,0.07); }
.big{ width:100%; padding:12px; border-radius: 16px; }

.select{
  width: 42%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.07);
  color: var(--text);
  padding: 10px 10px;
  outline:none;
}

.timeline{ flex:1; display:flex; gap:10px; align-items:center; }
.time{ width:44px; font-size:12px; color: var(--muted2); font-variant-numeric: tabular-nums; }
#seek{ width:100%; }

.miniHint{
  margin-top:10px;
  font-size: 12px;
  color: var(--muted);
  background: var(--glass2);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 14px;
}

.panel{
  position:fixed;
  left:16px;
  bottom:16px;
  z-index:20;
  width: min(380px, calc(100vw - 32px));
  padding: 14px;
}
.panelTitle{ font-weight: 900; margin-bottom: 10px; }

.routeList{ display:flex; flex-direction:column; gap:8px; margin-bottom:12px; }
.routeBtn{
  width:100%;
  text-align:left;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.07);
  padding: 12px;
  color: var(--text);
  cursor:pointer;
}
.routeBtn.active{
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.20);
}
.routeName{ font-weight: 900; }
.routeSub{ margin-top:3px; font-size: 12px; color: var(--muted); }

.status{ margin-top:10px; font-size:12px; color: var(--muted); }

.toast{
  position:fixed;
  right:16px;
  bottom:16px;
  z-index:20;
  width: min(420px, calc(100vw - 32px));
  padding: 14px;
}
.toastLabel{ font-size: 12px; color: var(--muted); }
.toastText{ margin-top:6px; font-weight: 900; line-height: 1.15; }

@media (max-width: 980px){
  .topbar{ grid-template-columns: 1fr; }
  .select{ width:100%; }
  .playerRow2{ flex-direction: column; align-items: stretch; }
}
