:root {
  --bg: #0c0c0e;
  --surface: #151518;
  --surface-2: #1c1c20;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ededf0;
  --text-dim: #8c8c94;
  --text-faint: #5e5e66;
  --accent: #e8b15a;
  --accent-ink: #2a1c06;
  --radius: 10px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { color-scheme: dark; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 32px 22px 96px; }

/* Header */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.brand .mark {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line-strong);
  display: grid; place-items: center; color: var(--accent);
}
.brand .mark svg { width: 15px; height: 15px; }
#user { display: flex; align-items: center; gap: 11px; font-size: 14px; color: var(--text-dim); }
#user .avatar { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); object-fit: cover; }
#user .initial {
  width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2);
  display: grid; place-items: center; color: var(--text); font-size: 13px; font-weight: 500;
}

/* Buttons */
button {
  font: inherit; cursor: pointer; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  padding: 10px 16px; font-weight: 500; transition: background 0.14s, border-color 0.14s, opacity 0.14s;
  display: inline-flex; align-items: center; gap: 7px;
}
button:hover { background: var(--surface-2); }
button:active { opacity: 0.85; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.primary:hover { background: #f0bd6e; }
button svg { width: 17px; height: 17px; }
button:disabled { opacity: 0.4; cursor: not-allowed; }

/* Icon buttons (transport) */
.iconbtn {
  width: 42px; height: 42px; padding: 0; border-radius: 50%;
  justify-content: center; color: var(--text); border: 1px solid var(--line-strong);
}
.iconbtn svg { width: 19px; height: 19px; }
.iconbtn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.iconbtn.lead { width: 50px; height: 50px; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.iconbtn.lead:hover { background: #f0bd6e; }
.iconbtn.lead svg { width: 22px; height: 22px; }

/* Add bar */
.addbar { display: flex; gap: 10px; margin-bottom: 14px; }
.field { position: relative; flex: 1; display: flex; align-items: center; }
.field svg { position: absolute; left: 14px; width: 17px; height: 17px; color: var(--text-faint); pointer-events: none; }
.addbar input {
  width: 100%; font: inherit; padding: 12px 14px 12px 40px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--text); outline: none;
  transition: border-color 0.14s;
}
.addbar input:focus { border-color: var(--line-strong); }
.addbar input::placeholder { color: var(--text-faint); }

/* Search results */
#results { display: grid; gap: 1px; margin-bottom: 22px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
#results:empty { display: none; }
.result {
  display: flex; gap: 12px; align-items: center; padding: 9px 12px;
  background: var(--surface); cursor: pointer; transition: background 0.12s;
}
.result:hover { background: var(--surface-2); }
.result img { width: 56px; height: 34px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.result .meta { flex: 1; min-width: 0; }
.result .t { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result .s { font-size: 13px; color: var(--text-dim); }
.result .add { color: var(--text-faint); display: flex; }
.result:hover .add { color: var(--accent); }
.result .add svg { width: 18px; height: 18px; }

/* Now playing */
.player {
  display: flex; gap: 18px; padding: 18px; margin-bottom: 30px; position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.player::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background-image: var(--art-url, none); background-size: cover; background-position: center;
  filter: blur(48px) saturate(1.3); opacity: 0.20; transform: scale(1.5);
  transition: opacity 0.4s;
}
.player > * { position: relative; z-index: 1; }
.player .art {
  width: 116px; height: 116px; border-radius: var(--radius); object-fit: cover;
  background: var(--surface-2); flex-shrink: 0;
}
.player .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.label { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.dot-live { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.player .title { font-size: 19px; font-weight: 500; line-height: 1.25; margin: 6px 0 3px; letter-spacing: -0.01em; }
.player .by { font-size: 13px; color: var(--text-dim); }
.progress { margin-top: auto; padding-top: 14px; }
.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; cursor: pointer; }
.bar:hover { background: rgba(255, 255, 255, 0.16); }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width 0.4s linear; }
.times { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-faint); margin-top: 7px; font-variant-numeric: tabular-nums; }
.controls { display: flex; align-items: center; gap: 9px; margin-top: 15px; }
.vol { display: flex; align-items: center; gap: 9px; margin-left: auto; color: var(--text-dim); }
.vol svg { width: 17px; height: 17px; }
.vol input[type=range] { width: 96px; accent-color: var(--accent); }

/* Section heads */
.section-h { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 12px; }
.section-h h2 { font-size: 14px; font-weight: 500; color: var(--text); }
.section-h .right { display: flex; align-items: center; gap: 10px; }
.count { font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.linkbtn { background: none; border: none; color: var(--text-dim); padding: 4px 6px; font-size: 13px; }
.linkbtn:hover { background: none; color: var(--text); }

/* Lists */
ul.list { list-style: none; display: flex; flex-direction: column; }
.row {
  display: flex; gap: 13px; align-items: center; padding: 10px 8px;
  border-bottom: 1px solid var(--line); transition: background 0.12s; border-radius: 6px;
}
.row:last-child { border-bottom: none; }
ul.list.drag .row { cursor: grab; }
.row:hover { background: var(--surface); }
.row.dragging { opacity: 0.4; }
.row.over { box-shadow: inset 0 1px 0 var(--accent); }
.row .idx { width: 20px; text-align: right; color: var(--text-faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.row img { width: 46px; height: 28px; object-fit: cover; border-radius: 5px; background: var(--surface-2); }
.row .meta { flex: 1; min-width: 0; }
.row .t { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .t.pending { color: var(--accent); }
.row .s { font-size: 13px; color: var(--text-dim); }
.row .s.pending { color: var(--accent); }
.row .dur { font-size: 13px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.rowact { display: flex; gap: 2px; opacity: 0; transition: opacity 0.12s; }
.row:hover .rowact { opacity: 1; }
.ract { background: none; border: none; padding: 5px; color: var(--text-dim); border-radius: 6px; box-shadow: none; }
.ract:hover { background: var(--surface-2); color: var(--text); }
.ract svg { width: 16px; height: 16px; }

.empty { color: var(--text-faint); padding: 22px 8px; font-size: 14px; }
.hidden { display: none !important; }

/* Login gate */
.gate { padding: 80px 20px; max-width: 380px; }
.gate h1 { font-size: 22px; font-weight: 500; margin-bottom: 8px; letter-spacing: -0.01em; }
.gate p { color: var(--text-dim); margin-bottom: 22px; font-size: 14px; }

/* Mumble login */
.mumble-login { margin-top: 24px; max-width: 380px; }
.mumble-login .or { font-size: 12px; color: var(--text-faint); margin-bottom: 10px; }
.mumble-login .addbar { margin-bottom: 8px; }
.hint { font-size: 12px; color: var(--text-faint); }

/* Room tabs */
.tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.tab {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-dim);
  font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.12s, color 0.12s;
}
.tab:hover { background: var(--surface-2); color: var(--text); }
.tab.active { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }
.tab .pdot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.tab .pdot.discord { background: #5865f2; }
.tab .pdot.mumble { background: var(--accent); }

/* Connected members (Mumble channel) */
.members { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.members .mlabel { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; }
.members .mlabel .live { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; }
.member { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 5px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.member .ini { width: 19px; height: 19px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 10px; font-weight: 500; color: var(--text); }

/* Toast */
.toast {
  position: sticky; bottom: 18px; margin: 18px auto 0; width: max-content; max-width: 90%;
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text);
  padding: 10px 16px; border-radius: var(--radius); font-size: 14px;
  opacity: 0; transform: translateY(8px); transition: opacity 0.2s, transform 0.2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err { border-color: #7a2e2e; }

@media (max-width: 560px) {
  .player { flex-direction: column; }
  .player .art { width: 100%; height: 200px; }
  .vol { margin-left: 0; }
}
