:root { --bg:#14161b; --panel:#1c1f26; --line:#2a2e38; --text:#e8e6e1; --muted:#9097a3; --accent:#f2a541; --bar:96px; }
* { box-sizing:border-box; }
html, body { margin:0; height:100%; background:var(--bg); color:var(--text); font:15px/1.4 system-ui, "Segoe UI", sans-serif; }
a { color:inherit; text-decoration:none; }
button { font:inherit; color:inherit; background:var(--panel); border:1px solid var(--line); border-radius:8px; padding:6px 12px; cursor:pointer; }
button:hover { border-color:var(--accent); }
button.link { background:none; border:none; padding:0; color:var(--muted); text-decoration:underline; }
button.primary { background:var(--accent); color:#181a20; border-color:var(--accent); font-weight:600; }
input, select { font:inherit; color:inherit; background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:7px 10px; }
.muted { color:var(--muted); }
.layout { display:flex; height:calc(100% - var(--bar)); }
.side { width:230px; flex:none; background:var(--panel); border-right:1px solid var(--line); padding:16px; display:flex; flex-direction:column; gap:4px; overflow:auto; }
.brand { font-size:24px; font-weight:700; color:var(--accent); margin-bottom:10px; letter-spacing:.5px; }
.side input[type=search] { width:100%; margin-bottom:10px; }
.side a { padding:8px 10px; border-radius:8px; }
.side a.active, .side a:hover { background:var(--line); }
.side-foot { margin-top:auto; display:flex; flex-direction:column; gap:8px; font-size:13px; }
.side-foot select { width:100%; margin-top:4px; }
main { flex:1; overflow:auto; padding:22px 28px; }
h1 { margin:0 0 4px; font-size:28px; }
h2 { margin:26px 0 10px; font-size:18px; }
.sub { color:var(--muted); margin-bottom:16px; }
.actions { display:flex; gap:8px; margin:12px 0 18px; flex-wrap:wrap; }
.grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(160px, 1fr)); gap:18px; }
.card { cursor:pointer; }
.card .art { aspect-ratio:1; border-radius:10px; background:var(--panel) center/cover no-repeat; border:1px solid var(--line); display:flex; align-items:center; justify-content:center; font-size:40px; color:var(--line); overflow:hidden; }
.card .art img { width:100%; height:100%; object-fit:cover; }
.card .t { margin-top:8px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.card .s { color:var(--muted); font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hero { display:flex; gap:24px; align-items:flex-end; margin-bottom:12px; }
.hero img { width:200px; height:200px; object-fit:cover; border-radius:12px; border:1px solid var(--line); background:var(--panel); }
table.tracks { width:100%; border-collapse:collapse; }
table.tracks td { padding:7px 8px; border-bottom:1px solid var(--line); }
table.tracks tr:hover td { background:var(--panel); }
table.tracks tr.current td { color:var(--accent); }
table.tracks td.n, table.tracks td.d { color:var(--muted); width:1%; white-space:nowrap; text-align:right; }
table.tracks td.x { width:1%; white-space:nowrap; }
table.tracks td.x button { padding:2px 8px; font-size:12px; opacity:.6; }
table.tracks tr:hover td.x button { opacity:1; }
.pill-list { display:flex; flex-wrap:wrap; gap:8px; }
.pill { padding:8px 14px; border-radius:999px; background:var(--panel); border:1px solid var(--line); cursor:pointer; }
.pill:hover { border-color:var(--accent); }
.bar { position:fixed; left:0; right:0; bottom:0; height:var(--bar); background:var(--panel); border-top:1px solid var(--line); display:flex; align-items:center; gap:18px; padding:0 18px; }
.bar img { width:64px; height:64px; border-radius:8px; object-fit:cover; background:var(--bg); flex:none; }
.bar img[src=""] { visibility:hidden; }
.np-text { width:220px; min-width:0; }
.np-text div { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#np-title { font-weight:600; }
.controls { display:flex; gap:8px; }
.controls button { width:40px; height:40px; border-radius:50%; padding:0; }
.controls button.big { width:48px; height:48px; background:var(--accent); color:#181a20; border:none; font-size:18px; }
.progress { flex:1; display:flex; align-items:center; gap:10px; color:var(--muted); font-size:13px; }
.progress input { flex:1; }
.vol { display:flex; align-items:center; gap:6px; }
.vol input { width:100px; }
input[type=range] { accent-color:var(--accent); padding:0; border:none; background:none; }
.where { width:120px; font-size:12px; text-align:right; }
#toast { position:fixed; bottom:calc(var(--bar) + 16px); left:50%; transform:translateX(-50%); background:#000c; padding:10px 18px; border-radius:8px; opacity:0; transition:opacity .2s; pointer-events:none; }
#toast.show { opacity:1; }
@media (max-width: 800px) {
  .layout { flex-direction:column; }
  .side { width:auto; flex-direction:row; flex-wrap:wrap; align-items:center; padding:10px; border-right:none; border-bottom:1px solid var(--line); }
  .brand { margin:0 8px 0 0; font-size:20px; }
  .side input[type=search] { order:10; margin:6px 0 0; }
  .side-foot { margin:6px 0 0; width:100%; flex-direction:row; align-items:center; }
  .side-foot label { flex:1; }
  #lib-stats { display:none; }
  main { padding:14px; }
  .grid { grid-template-columns:repeat(auto-fill, minmax(120px, 1fr)); gap:12px; }
  .hero { flex-direction:column; align-items:flex-start; }
  .hero img { width:140px; height:140px; }
  .bar { gap:10px; padding:0 10px; }
  .np-text { width:auto; flex:1; }
  .progress, .vol, .where { display:none; }
  table.tracks td.x button:not(:first-child) { display:none; }
}
