@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bg:         #ffffff;
  --bg-alt:     #f2f6fd;
  --bg-card:    #f6f9ff;
  --border:     rgba(13,42,89,0.09);
  --border-h:   rgba(13,42,89,0.18);
  --text:       #0b1f3a;
  --sub:        rgba(11,31,58,0.56);
  --muted:      rgba(11,31,58,0.36);
  --accent:     #2563eb;
  --accent-2:   #0ea5e9;
  --accent-dim: rgba(37,99,235,0.10);
  --accent-bdr: rgba(37,99,235,0.32);
  --red:        #ef4444;
  --gospel:     #2563eb;
  --insp:       #0ea5e9;
  --on-accent:  #ffffff;
  --font:       'DM Sans','Helvetica Neue',sans-serif;
  --mono:       'DM Mono',monospace;
  --sidebar:    226px;
  --playbar:    76px;
  --topbar:     56px;
  --shadow-card: 0 6px 20px rgba(13,42,89,0.07);
  --toast-bg: #0b1f3a; /* fixed regardless of theme — toasts stay dark-on-white-text in both */
}

html[data-theme="dark"] {
  --bg:         #0b1220;
  --bg-alt:     #0f1a2e;
  --bg-card:    #121f36;
  --border:     rgba(255,255,255,0.08);
  --border-h:   rgba(255,255,255,0.16);
  --text:       #e9eefb;
  --sub:        rgba(233,238,251,0.62);
  --muted:      rgba(233,238,251,0.4);
  --accent:     #3b82f6;
  --accent-2:   #22d3ee;
  --accent-dim: rgba(59,130,246,0.16);
  --accent-bdr: rgba(59,130,246,0.4);
  --shadow-card: 0 6px 20px rgba(0,0,0,0.35);
}
html[data-theme="dark"] body { color-scheme: dark; }

*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html,body { height:100%; overflow:hidden; }
body { font-family:var(--font); background:var(--bg); color:var(--text); -webkit-font-smoothing:antialiased; }
button { cursor:pointer; font-family:var(--font); }
input,textarea { font-family:var(--font); }
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:rgba(13,42,89,0.14); border-radius:3px; }

/* App shell */
#app { display:grid; grid-template-columns:var(--sidebar) 1fr; grid-template-rows:1fr var(--playbar); height:100vh; }

/* Mobile top bar (hidden on desktop) */
#topbar {
  display:none; align-items:center; gap:12px;
  height:var(--topbar); padding:0 14px; background:var(--bg);
  border-bottom:1px solid var(--border); flex-shrink:0;
}
.hamburger-btn {
  display:flex; align-items:center; justify-content:center;
  width:36px; height:36px; border-radius:9px; background:var(--accent-dim);
  border:none; color:var(--accent); flex-shrink:0;
}
.hamburger-btn:active { transform:scale(.94); }
#topbar .logo { font-size:16px; padding:0; }
#sidebar-overlay {
  display:none; position:fixed; inset:0; background:rgba(11,31,58,0.42);
  z-index:150; backdrop-filter:blur(1px);
}
#sidebar-overlay.open { display:block; }

/* Sidebar */
#sidebar {
  grid-row:1/2; background:var(--bg-alt);
  border-right:1px solid var(--border);
  display:flex; flex-direction:column;
  padding:22px 12px 16px; overflow-y:auto; gap:2px;
}
.logo { font-size:19px; font-weight:700; letter-spacing:-.02em; padding:0 8px 20px; color:var(--text); }
.logo span { color:var(--accent); }
.nav-label { font-size:10px; color:var(--muted); letter-spacing:.08em; text-transform:uppercase; font-weight:700; padding:14px 8px 4px; display:flex; align-items:center; justify-content:space-between; }
.nav-label-btn { background:none; border:none; color:var(--accent); font-size:14px; line-height:1; padding:2px 6px; border-radius:6px; }
.nav-label-btn:hover { background:var(--accent-dim); }
.nav-btn {
  display:flex; align-items:center; gap:10px; padding:9px 12px;
  border-radius:9px; font-size:13.5px; color:var(--sub);
  background:none; border:1px solid transparent;
  width:100%; text-align:left; transition:all .15s;
}
.nav-btn:hover { background:rgba(37,99,235,0.06); color:var(--text); }
.nav-btn.active { background:var(--accent); border-color:var(--accent); color:#fff; font-weight:600; box-shadow:0 4px 14px rgba(37,99,235,.28); }
.nav-btn svg { flex-shrink:0; opacity:.75; }
.nav-btn.active svg { opacity:1; }
.nav-btn.upload-cta { background:var(--text); color:#fff; font-weight:600; margin:6px 0 4px; }
.nav-btn.upload-cta:hover { background:#122a4d; color:#fff; }
.nav-btn.upload-cta svg { opacity:1; }
.sidebar-spacer { flex:1; }
#user-area { padding:8px 0 0; }
.playlist-empty-hint { font-size:11.5px; color:var(--muted); padding:6px 10px 4px; line-height:1.5; }

/* Main */
#main { grid-row:1/2; overflow-y:auto; position:relative; }
.page { padding:28px 32px; display:none; min-height:100%; }
.page.active { display:block; }

/* Playbar */
#playbar {
  grid-column:1/3; background:var(--bg-alt);
  border-top:1px solid var(--border);
  display:flex; align-items:center; padding:0 24px; gap:20px;
}
.pb-track { display:flex; align-items:center; gap:12px; width:220px; flex-shrink:0; min-width:0; }
.pb-thumb { width:42px; height:42px; border-radius:9px; display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; background:var(--bg-card); overflow:hidden; }
.pb-thumb img { width:100%; height:100%; object-fit:cover; }
.pb-info { min-width:0; }
.pb-name { font-size:13px; font-weight:600; color:var(--accent); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pb-artist-name { font-size:11px; color:var(--sub); }
.pb-controls { flex:1; display:flex; flex-direction:column; align-items:center; gap:8px; }
.pb-btns { display:flex; align-items:center; gap:16px; }
.pb-btn { background:none; border:none; color:var(--sub); padding:4px; display:flex; align-items:center; transition:color .15s; }
.pb-btn:hover { color:var(--text); }
.pb-btn.on { color:var(--accent); }
.pb-play { width:36px; height:36px; border-radius:50%; background:var(--accent); border:none; color:#fff; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:transform .15s; }
.pb-play:hover { transform:scale(1.08); }
.pb-progress { display:flex; align-items:center; gap:8px; width:100%; max-width:480px; }
.pb-time { font-size:11px; color:var(--muted); font-family:var(--mono); width:28px; }
.pb-time.r { text-align:right; }
.progress-bar { flex:1; height:4px; background:var(--border); border-radius:2px; cursor:pointer; }
.progress-fill { height:100%; background:linear-gradient(90deg,var(--accent),var(--accent-2)); border-radius:2px; width:0%; transition:width 1s linear; }
.pb-right { display:flex; align-items:center; gap:8px; width:160px; justify-content:flex-end; }
.vol-bar { width:72px; height:4px; background:var(--border); border-radius:2px; cursor:pointer; }
.vol-fill { height:100%; background:var(--sub); border-radius:2px; width:70%; pointer-events:none; }
.pb-empty { font-size:13px; color:var(--muted); flex:1; text-align:center; }

/* Page heading */
.page-title { font-size:22px; font-weight:700; margin-bottom:4px; letter-spacing:-.01em; }
.page-sub { font-size:14px; color:var(--sub); margin-bottom:28px; }

/* Home: type tabs */
.home-tabs { display:flex; gap:8px; margin-bottom:28px; flex-wrap:wrap; }
.home-tab {
  display:flex; align-items:center; gap:7px; padding:9px 18px; border-radius:99px;
  font-size:13px; font-weight:600; background:var(--bg-card); color:var(--sub);
  border:1px solid var(--border); transition:all .15s;
}
.home-tab:hover { border-color:var(--accent-bdr); color:var(--text); }
.home-tab.active { background:var(--text); color:#fff; border-color:var(--text); }
.home-tab .dot { width:7px; height:7px; border-radius:50%; }

/* Section */
.section { margin-bottom:36px; }
.section-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.section-title { font-size:15px; font-weight:700; }
.section-title .em { margin-right:6px; }
.see-all { background:none; border:none; color:var(--accent); font-size:12px; font-weight:600; }

/* Playlist cards */
.pl-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; }
.pl-card {
  border-radius:14px; padding:16px; cursor:pointer; text-align:left;
  border:1px solid transparent; width:100%; background:none;
  transition:transform .18s,box-shadow .18s; position:relative; overflow:hidden;
  box-shadow:var(--shadow-card);
}
.pl-card:hover { transform:translateY(-3px); }
.pl-card-emoji { font-size:32px; margin-bottom:10px; }
.pl-card-title { font-size:13px; font-weight:700; color:#fff; margin-bottom:3px; }
.pl-card-sub { font-size:11px; color:rgba(255,255,255,0.65); }
.pl-card-bg { position:absolute; bottom:-10px; right:-6px; font-size:52px; opacity:.14; pointer-events:none; }

/* Shelves (Audiomack-style horizontal scroll rows) */
.shelf-scroll { display:flex; gap:14px; overflow-x:auto; padding-bottom:6px; scroll-snap-type:x proximity; }
.shelf-scroll::-webkit-scrollbar { height:0; }
.shelf-card {
  flex:0 0 156px; scroll-snap-align:start; cursor:pointer; text-align:left;
  background:var(--bg-card); border:1px solid var(--border); border-radius:14px;
  padding:10px; transition:transform .15s,box-shadow .15s;
}
.shelf-card:hover { transform:translateY(-3px); box-shadow:var(--shadow-card); }
.shelf-cover {
  width:100%; aspect-ratio:1/1; border-radius:10px; margin-bottom:9px;
  display:flex; align-items:center; justify-content:center; font-size:34px;
  position:relative; overflow:hidden;
}
.shelf-cover img { width:100%; height:100%; object-fit:cover; position:absolute; inset:0; }
.shelf-tag {
  position:absolute; top:6px; left:6px; font-size:9px; font-weight:700; letter-spacing:.03em;
  text-transform:uppercase; padding:2px 7px; border-radius:99px; background:rgba(255,255,255,.92); color:var(--text);
}
.shelf-title { font-size:12.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.shelf-sub { font-size:11px; color:var(--sub); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.shelf-empty { font-size:12.5px; color:var(--muted); padding:18px 4px; }

/* Track rows */
.track-list { display:flex; flex-direction:column; gap:2px; }
.track-row {
  display:flex; align-items:center; gap:12px; padding:9px 10px;
  border-radius:9px; cursor:pointer; border:1px solid transparent; transition:all .15s;
}
.track-row:hover { background:rgba(37,99,235,0.05); }
.track-row.playing { background:var(--accent-dim); border-color:var(--accent-bdr); }
.track-num { width:20px; text-align:center; font-size:12px; color:var(--muted); font-family:var(--mono); flex-shrink:0; }
.track-row.playing .track-num { color:var(--accent); }
.track-thumb { width:38px; height:38px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:18px; flex-shrink:0; overflow:hidden; position:relative; }
.track-thumb img { width:100%; height:100%; object-fit:cover; position:absolute; inset:0; }
.track-info { flex:1; min-width:0; }
.track-title { font-size:14px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.track-row.playing .track-title { color:var(--accent); }
.track-artist { font-size:12px; color:var(--sub); }
.track-badge {
  font-size:9.5px; font-weight:700; text-transform:uppercase; letter-spacing:.03em;
  padding:2px 7px; border-radius:99px; flex-shrink:0; margin-right:2px;
}
.track-plays { font-size:12px; color:var(--muted); width:40px; text-align:right; flex-shrink:0; }
.like-btn,.plus-btn,.cm-btn { background:none; border:none; font-size:15px; color:var(--muted); padding:4px; line-height:1; flex-shrink:0; transition:color .15s; }
.cm-btn { font-size:13px; }
.cm-btn:hover { color:var(--accent); }
.like-btn.on { color:var(--red); }
.plus-btn { font-size:17px; font-weight:600; }
.plus-btn:hover,.like-btn:hover { color:var(--accent); }
.track-dur { font-size:12px; color:var(--muted); font-family:var(--mono); width:32px; text-align:right; flex-shrink:0; }

/* Animated bars */
.bars { display:inline-flex; align-items:flex-end; gap:1.5px; height:14px; }
.bars span { width:2.5px; background:currentColor; border-radius:1px; animation:bar .8s ease-in-out infinite alternate; }
.bars span:nth-child(2) { animation-delay:.2s; }
.bars span:nth-child(3) { animation-delay:.1s; }
@keyframes bar { from{height:3px} to{height:13px} }

/* Artist grid */
.artist-grid { display:flex; gap:20px; flex-wrap:wrap; }
.artist-card { background:none; border:none; text-align:center; cursor:pointer; }
.artist-avatar {
  width:88px; height:88px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:36px; margin:0 auto 8px;
  border:2px solid transparent; transition:transform .2s,box-shadow .2s;
}
.artist-card:hover .artist-avatar { transform:scale(1.07); }
.artist-name { font-size:12px; font-weight:600; color:var(--text); }
.artist-genre { font-size:11px; color:var(--muted); }

/* Search */
.search-wrap { position:relative; margin-bottom:20px; }
.search-icon { position:absolute; left:16px; top:50%; transform:translateY(-50%); color:var(--muted); pointer-events:none; }
.search-input {
  width:100%; padding:14px 44px 14px 46px;
  background:var(--bg-card);
  border:1px solid var(--border); border-radius:12px;
  color:var(--text); font-size:15px; outline:none; transition:all .2s;
}
.search-input:focus { border-color:var(--accent-bdr); box-shadow:0 0 0 3px var(--accent-dim); }
.search-clear { position:absolute; right:12px; top:50%; transform:translateY(-50%); background:var(--border); border:none; border-radius:50%; width:22px; height:22px; color:var(--sub); font-size:11px; display:none; }
.filter-pills { display:flex; gap:8px; margin-bottom:20px; flex-wrap:wrap; }
.pill { padding:5px 14px; border-radius:99px; font-size:12px; font-weight:600; background:var(--bg-card); color:var(--sub); border:1px solid var(--border); transition:all .15s; }
.pill.active,.pill:hover { background:var(--accent); color:#fff; border-color:var(--accent); }
.genre-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:10px; }
.genre-card {
  border-radius:14px; padding:16px 14px; cursor:pointer; text-align:left;
  border:1px solid transparent; position:relative; overflow:hidden;
  background:none; width:100%; transition:transform .15s,box-shadow .15s;
}
.genre-card:hover { transform:translateY(-2px); }
.genre-emoji { font-size:26px; margin-bottom:7px; }
.genre-label { font-size:12px; font-weight:700; color:#fff; }
.genre-bg { position:absolute; bottom:-10px; right:-6px; font-size:44px; opacity:.16; pointer-events:none; }
.result-row { display:flex; align-items:center; gap:12px; padding:9px 12px; border-radius:9px; cursor:pointer; transition:background .12s; }
.result-row:hover { background:rgba(37,99,235,0.05); }
.result-thumb { width:42px; height:42px; border-radius:9px; display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; }
.result-thumb.circle { border-radius:50%; }
.result-name { font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.result-sub { font-size:12px; color:var(--sub); }
.type-badge { font-size:10px; padding:2px 8px; border-radius:99px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; flex-shrink:0; }
.no-results { text-align:center; padding:60px 0; color:var(--muted); }
.no-results .big { font-size:40px; margin-bottom:12px; }

/* Hero (artist / playlist) */
.hero { padding:36px 32px 28px; border-bottom:1px solid var(--border); position:relative; overflow:hidden; }
.hero-bg-emoji { position:absolute; top:-40px; right:-30px; font-size:190px; opacity:.08; line-height:1; pointer-events:none; user-select:none; }
.hero-body { display:flex; align-items:flex-end; gap:24px; position:relative; flex-wrap:wrap; }
.hero-cover { display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:48px; overflow:hidden; position:relative; }
.hero-cover img { width:100%; height:100%; object-fit:cover; position:absolute; inset:0; }
.hero-cover.circle { border-radius:50%; }
.hero-cover.rounded { border-radius:16px; }
.back-btn { background:none; border:none; color:var(--sub); font-size:13px; display:flex; align-items:center; gap:6px; margin-bottom:22px; transition:color .15s; }
.back-btn:hover { color:var(--text); }
.hero-label { font-size:10px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; margin-bottom:6px; }
.hero-title { font-size:26px; font-weight:800; letter-spacing:-.02em; margin-bottom:5px; color:var(--text); }
.hero-sub { font-size:13px; color:var(--sub); margin-bottom:12px; }
.hero-meta { font-size:12px; color:var(--muted); margin-bottom:14px; }
.btn-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.btn-primary { padding:10px 26px; border-radius:99px; border:none; font-size:13px; font-weight:700; transition:transform .15s; }
.btn-primary:hover { transform:scale(1.04); }
.btn-ghost { padding:9px 18px; border-radius:99px; border:1px solid var(--border); background:var(--bg-card); color:var(--sub); font-size:13px; font-weight:600; transition:all .15s; display:flex; align-items:center; gap:6px; }
.btn-ghost:hover { border-color:var(--border-h); color:var(--text); }
.inner { padding:28px 32px; }

/* Discography */
.album-cards { display:flex; gap:12px; flex-wrap:wrap; }
.album-card { border-radius:12px; padding:14px; min-width:120px; background:var(--bg-card); border:1px solid var(--border); }
.album-emoji { font-size:28px; margin-bottom:8px; }
.album-title { font-size:12px; font-weight:600; color:var(--text); margin-bottom:3px; }
.album-year { font-size:11px; color:var(--muted); }

/* Settings */
.settings-wrap { max-width:580px; }
.s-section { margin-bottom:32px; }
.s-label { font-size:10px; color:var(--muted); letter-spacing:.08em; text-transform:uppercase; font-weight:700; margin-bottom:6px; }
.s-card { background:var(--bg-card); border-radius:14px; padding:0 16px; border:1px solid var(--border); }
.s-row { display:flex; align-items:center; justify-content:space-between; padding:14px 0; border-bottom:1px solid var(--border); gap:12px; flex-wrap:wrap; }
.s-row:last-child { border-bottom:none; }
.s-row-title { font-size:14px; font-weight:600; }
.s-row-sub { font-size:12px; color:var(--muted); margin-top:2px; }
.toggle { position:relative; width:42px; height:24px; flex-shrink:0; }
.toggle input { opacity:0; width:0; height:0; }
.toggle-track { position:absolute; inset:0; border-radius:12px; background:rgba(13,42,89,0.14); transition:background .2s; cursor:pointer; }
.toggle-track::after { content:''; position:absolute; width:18px; height:18px; border-radius:50%; background:#fff; top:3px; left:3px; transition:left .2s; box-shadow:0 1px 4px rgba(0,0,0,.25); }
.toggle input:checked + .toggle-track { background:var(--accent); }
.toggle input:checked + .toggle-track::after { left:21px; }
.swatches { display:flex; gap:6px; }
.swatch { width:22px; height:22px; border-radius:50%; border:2px solid transparent; cursor:pointer; transition:transform .15s; }
.swatch:hover,.swatch.on { border-color:var(--text); transform:scale(1.2); }
.pref-pills { display:flex; gap:8px; flex-wrap:wrap; }
.pref-pill { padding:7px 14px; border-radius:99px; font-size:12px; font-weight:600; background:var(--bg); color:var(--sub); border:1px solid var(--border); }
.pref-pill.active { background:var(--accent); color:#fff; border-color:var(--accent); }

/* Overlay / modal (shared: auth, playlist, upload) */
.overlay { position:fixed; inset:0; background:rgba(11,31,58,.45); display:none; align-items:center; justify-content:center; z-index:200; padding:16px; }
.overlay.open { display:flex; }
.modal { background:var(--bg); border:1px solid var(--border); border-radius:18px; padding:32px; width:400px; max-width:100%; max-height:88vh; overflow-y:auto; position:relative; box-shadow:0 24px 60px rgba(13,42,89,0.18); }
.modal h2 { font-size:20px; font-weight:700; margin-bottom:4px; }
.modal-sub { font-size:13px; color:var(--sub); margin-bottom:24px; }
.modal-close { position:absolute; top:16px; right:16px; background:var(--bg-card); border:none; border-radius:50%; width:28px; height:28px; color:var(--sub); font-size:14px; }
.field { margin-bottom:14px; }
.field label { font-size:12px; color:var(--sub); font-weight:600; display:block; margin-bottom:5px; }
.field input,.field textarea { width:100%; padding:11px 14px; background:var(--bg-card); border:1px solid var(--border); border-radius:9px; color:var(--text); font-size:14px; outline:none; transition:border-color .2s; font-family:var(--font); }
.field textarea { resize:vertical; min-height:64px; }
.field input:focus,.field textarea:focus { border-color:var(--accent-bdr); }
.form-global-err { font-size:13px; color:var(--red); margin-bottom:12px; display:none; }
.btn-submit { width:100%; padding:12px; border-radius:10px; background:var(--accent); border:none; color:#fff; font-size:14px; font-weight:700; margin-top:4px; }
.btn-submit:disabled { opacity:.55; cursor:default; }
.btn-submit.secondary { background:var(--bg-card); color:var(--text); border:1px solid var(--border); margin-top:8px; }
.auth-switch { font-size:12px; color:var(--sub); text-align:center; margin-top:14px; }
.auth-switch button { background:none; border:none; color:var(--accent); font-size:12px; font-weight:600; }

/* Upload modal specifics */
.upload-steps { display:flex; gap:5px; margin-bottom:20px; }
.upload-steps .dot { flex:1; height:3px; border-radius:2px; background:var(--border); }
.upload-steps .dot.done { background:var(--accent); }
.type-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:6px; }
.type-card {
  border:1.5px solid var(--border); border-radius:14px; padding:20px 14px; text-align:center;
  background:var(--bg-card); transition:all .15s;
}
.type-card:hover { border-color:var(--accent-bdr); transform:translateY(-2px); }
.type-card .emoji { font-size:30px; margin-bottom:8px; }
.type-card .label { font-size:14px; font-weight:700; }
.type-card .desc { font-size:11px; color:var(--muted); margin-top:3px; }
.release-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:6px; }
.release-card {
  border:1.5px solid var(--border); border-radius:12px; padding:16px 10px; text-align:center;
  background:var(--bg-card); font-size:13px; font-weight:600; transition:all .15s;
}
.release-card:hover { border-color:var(--accent-bdr); transform:translateY(-2px); }
.upload-back { background:none; border:none; color:var(--sub); font-size:12.5px; font-weight:600; margin-bottom:14px; display:flex; align-items:center; gap:5px; }
.upload-back:hover { color:var(--text); }
.upload-summary { background:var(--accent-dim); border:1px solid var(--accent-bdr); border-radius:10px; padding:10px 14px; margin-bottom:16px; font-size:12.5px; color:var(--text); }
.upload-summary b { color:var(--accent); }
.file-drop {
  border:1.5px dashed var(--border-h); border-radius:12px; padding:18px 14px; text-align:center;
  background:var(--bg-card); font-size:12.5px; color:var(--sub); cursor:pointer; transition:border-color .15s;
}
.file-drop:hover { border-color:var(--accent-bdr); }
.file-drop.filled { border-style:solid; border-color:var(--accent-bdr); color:var(--text); font-weight:600; }
.upload-progress { height:6px; border-radius:3px; background:var(--border); overflow:hidden; margin-top:12px; display:none; }
.upload-progress .fill { height:100%; width:0%; background:var(--accent); transition:width .2s; }

/* Add-to-playlist popover */
.atp-menu { position:fixed; z-index:250; background:var(--bg); border:1px solid var(--border); border-radius:12px; box-shadow:0 16px 40px rgba(13,42,89,0.18); width:230px; padding:8px; display:none; max-height:320px; overflow-y:auto; }
.atp-menu.open { display:block; }
.atp-item { display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:8px; font-size:13px; font-weight:500; background:none; border:none; width:100%; text-align:left; color:var(--text); }
.atp-item:hover { background:var(--accent-dim); }
.atp-new { color:var(--accent); font-weight:700; border-top:1px solid var(--border); margin-top:4px; padding-top:10px; }

/* Support / tip jar */
.amount-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:14px; }
.amount-btn { padding:12px 4px; border-radius:10px; border:1.5px solid var(--border); background:var(--bg-card); font-size:14px; font-weight:700; transition:all .15s; }
.amount-btn:hover { border-color:var(--accent-bdr); }
.amount-btn.active { background:var(--accent); border-color:var(--accent); color:#fff; }
.demo-disclaimer { font-size:11px; color:var(--muted); text-align:center; margin-top:12px; line-height:1.5; }
.support-stat { display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--sub); }
.supporter-row { display:flex; align-items:center; gap:10px; padding:9px 4px; border-bottom:1px solid var(--border); }
.supporter-row:last-child { border-bottom:none; }
.supporter-avatar { width:30px; height:30px; border-radius:50%; background:var(--accent-dim); display:flex; align-items:center; justify-content:center; font-size:14px; flex-shrink:0; }
.supporter-name { font-size:12.5px; font-weight:600; }
.supporter-msg { font-size:11.5px; color:var(--sub); }
.supporter-amt { margin-left:auto; font-size:12.5px; font-weight:700; color:var(--accent); flex-shrink:0; }

/* Download (offline) */
.dl-btn { background:none; border:none; font-size:14px; color:var(--muted); padding:4px; line-height:1; flex-shrink:0; transition:color .15s; }
.dl-btn:hover { color:var(--accent); }
.dl-btn.done { color:var(--accent); }
.dl-btn.busy { color:var(--muted); animation:spin 1s linear infinite; }
@keyframes spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
.offline-banner { display:flex; align-items:center; gap:8px; background:var(--accent-dim); border:1px solid var(--accent-bdr); border-radius:10px; padding:10px 14px; margin-bottom:20px; font-size:12.5px; color:var(--text); }
.install-btn { margin-top:10px; }
.hidden-install { display:none; }

/* For You reason tag */
.reason-tag { font-size:11px; color:var(--muted); font-weight:500; margin-left:8px; }

/* Sidebar bell / notifications */
.sidebar-top { display:flex; align-items:center; justify-content:space-between; padding:0 8px 20px; }
.sidebar-top .logo { padding:0; }
.topbar-spacer { flex:1; }
.bell-btn { position:relative; background:none; border:none; color:var(--sub); padding:6px; border-radius:8px; display:flex; align-items:center; justify-content:center; }
.bell-btn:hover { background:var(--accent-dim); color:var(--accent); }
.bell-badge { position:absolute; top:2px; right:2px; min-width:15px; height:15px; border-radius:99px; background:var(--red); color:#fff; font-size:9px; font-weight:700; display:flex; align-items:center; justify-content:center; padding:0 3px; }
.bell-badge:empty { display:none; }
.notif-row { display:flex; gap:10px; padding:10px 4px; border-bottom:1px solid var(--border); cursor:pointer; }
.notif-row:last-child { border-bottom:none; }
.notif-row.unread { background:var(--accent-dim); border-radius:8px; }
.notif-emoji { font-size:18px; flex-shrink:0; }
.notif-title { font-size:13px; font-weight:600; }
.notif-body { font-size:12px; color:var(--sub); }
.notif-time { font-size:10.5px; color:var(--muted); margin-top:2px; }

/* Comments */
.comment-row { display:flex; gap:10px; padding:10px 4px; border-bottom:1px solid var(--border); }
.comment-row:last-child { border-bottom:none; }
.comment-avatar { width:28px; height:28px; border-radius:50%; background:var(--accent-dim); display:flex; align-items:center; justify-content:center; font-size:13px; flex-shrink:0; }
.comment-name { font-size:12.5px; font-weight:600; }
.comment-body { font-size:13px; color:var(--text); line-height:1.5; }
.comment-time { font-size:10.5px; color:var(--muted); }
.comment-del { background:none; border:none; color:var(--muted); font-size:11px; margin-left:auto; flex-shrink:0; }
.comment-del:hover { color:var(--red); }

/* Messages */
.convo-row { display:flex; align-items:center; gap:12px; padding:12px 4px; border-bottom:1px solid var(--border); cursor:pointer; }
.convo-row:hover { background:rgba(37,99,235,0.05); }
.convo-avatar { width:40px; height:40px; border-radius:50%; background:var(--accent-dim); display:flex; align-items:center; justify-content:center; font-size:18px; flex-shrink:0; }
.convo-name { font-size:13.5px; font-weight:700; }
.convo-preview { font-size:12px; color:var(--sub); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:220px; }
.convo-unread { margin-left:auto; background:var(--accent); color:#fff; font-size:10px; font-weight:700; border-radius:99px; min-width:18px; height:18px; display:flex; align-items:center; justify-content:center; padding:0 5px; flex-shrink:0; }
.thread-wrap { display:flex; flex-direction:column; height:calc(100vh - 220px); max-height:560px; }
.thread-msgs { flex:1; overflow-y:auto; display:flex; flex-direction:column; gap:8px; padding:8px 2px; }
.msg-bubble { max-width:75%; padding:9px 13px; border-radius:14px; font-size:13.5px; line-height:1.45; }
.msg-bubble.mine { align-self:flex-end; background:var(--accent); color:#fff; border-bottom-right-radius:4px; }
.msg-bubble.theirs { align-self:flex-start; background:var(--bg-card); border:1px solid var(--border); border-bottom-left-radius:4px; }
.thread-input-row { display:flex; gap:8px; padding-top:10px; border-top:1px solid var(--border); }
.thread-input-row textarea { flex:1; min-height:40px; max-height:100px; }

/* Queue panel */
.queue-modes { display:flex; gap:8px; margin-bottom:16px; }
.queue-modes .pill.active { background:var(--accent); color:#fff; border-color:var(--accent); }
.queue-item { display:flex; align-items:center; gap:10px; padding:8px 4px; border-bottom:1px solid var(--border); }
.queue-item.current { background:var(--accent-dim); border-radius:8px; }
.queue-item-title { font-size:13px; font-weight:600; }
.queue-item-artist { font-size:11.5px; color:var(--sub); }
.queue-move-btn, .queue-remove-btn { background:none; border:none; color:var(--muted); font-size:13px; padding:4px; }
.queue-move-btn:hover, .queue-remove-btn:hover { color:var(--accent); }

/* Dashboard (artist analytics) */
.stat-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:12px; margin-bottom:28px; }
.stat-card { background:var(--bg-card); border:1px solid var(--border); border-radius:14px; padding:16px; }
.stat-value { font-size:22px; font-weight:800; }
.stat-label { font-size:11.5px; color:var(--sub); margin-top:2px; }
.pill-group { display:flex; gap:6px; }
.pill-group .pill { padding:4px 10px; font-size:11px; }
.spark-wrap { background:var(--bg-card); border:1px solid var(--border); border-radius:14px; padding:18px 16px 10px; }
.spark-chart { display:flex; align-items:flex-end; gap:3px; height:110px; }
.spark-bar { flex:1; background:linear-gradient(180deg,var(--accent),var(--accent-2)); border-radius:3px 3px 1px 1px; min-height:3px; transition:opacity .15s; }
.spark-bar:hover { opacity:.75; }
.spark-bar.zero { background:var(--border); }
.spark-axis { display:flex; gap:3px; margin-top:8px; font-size:10px; color:var(--muted); }
.spark-axis span { flex:1; text-align:center; white-space:nowrap; overflow:visible; }
.bar-row { display:flex; align-items:center; gap:10px; padding:7px 0; }
.bar-label { font-size:12.5px; width:150px; flex-shrink:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bar-track { flex:1; height:8px; background:var(--border); border-radius:4px; overflow:hidden; }
.bar-fill { height:100%; background:linear-gradient(90deg,var(--accent),var(--accent-2)); border-radius:4px; }
.bar-value { font-size:11.5px; color:var(--muted); width:44px; text-align:right; flex-shrink:0; }

/* Multi-track upload */
.track-chip { display:flex; align-items:center; gap:8px; padding:8px 10px; background:var(--bg-card); border:1px solid var(--border); border-radius:9px; margin-bottom:6px; }
.track-chip input { flex:1; border:none; background:none; font-size:13px; padding:0; }
.track-chip input:focus { outline:none; }
.track-chip-remove { background:none; border:none; color:var(--muted); font-size:13px; }
.track-chip-remove:hover { color:var(--red); }
.track-chip-status { font-size:11px; color:var(--muted); flex-shrink:0; }
.track-chip-status.done { color:var(--accent); }

/* Dark mode toggle lives in Settings via the existing .toggle component */

/* Toast */
#toast { position:fixed; bottom:88px; left:50%; transform:translateX(-50%) translateY(12px); background:var(--toast-bg); color:#fff; border-radius:9px; padding:10px 18px; font-size:13px; opacity:0; transition:all .25s; z-index:300; pointer-events:none; white-space:nowrap; }
#toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* Utility */
.row { display:flex; align-items:center; }
.gap-8 { gap:8px; }
.gap-12 { gap:12px; }
.muted { color:var(--muted); font-size:12px; }
.loading { padding:40px; text-align:center; color:var(--muted); font-size:13px; }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 860px) {
  #app { grid-template-columns:1fr; grid-template-rows:var(--topbar) 1fr var(--playbar); height:100vh; }
  #topbar { display:flex; grid-row:1/2; }
  #sidebar {
    position:fixed; top:0; left:0; bottom:0; width:78vw; max-width:280px; z-index:200;
    transform:translateX(-100%); transition:transform .22s ease; padding-top:16px;
    box-shadow:0 0 40px rgba(13,42,89,0.2);
  }
  #sidebar.open { transform:translateX(0); }
  #main { grid-row:2/3; }
  #playbar { grid-column:1/2; grid-row:3/4; padding:0 12px; gap:10px; }
  .pb-track { width:auto; flex:1; }
  .pb-controls { flex:0 0 auto; }
  .pb-progress { display:none; }
  .pb-right { display:none; }
  .page { padding:18px 16px; }
  .inner { padding:20px 16px; }
  .hero { padding:24px 16px 20px; }
  .hero-title { font-size:21px; }
  .type-grid,.release-grid { grid-template-columns:1fr; }
  .modal { padding:24px 20px; }
  .home-tabs { gap:6px; }
  .shelf-card { flex-basis:132px; }
}
