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

:root {
  --bg: #0c0c10;
  --surface: #14141a;
  --surface2: #1c1c24;
  --border: rgba(255,255,255,0.07);
  --accent: #7dd4f8;
  --accent-dim: rgba(125,212,248,0.12);
  --text: #f0f0ee;
  --text-muted: rgba(240,240,238,0.45);
  --text-dim: rgba(240,240,238,0.22);
  --player-h: 88px;
  --sidebar-w: 220px;
  --radius: 0px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 55% 40% at 15% 0%,  rgba(125,212,248,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 45% 35% at 88% 80%, rgba(125,212,248,0.05) 0%, transparent 65%),
    radial-gradient(ellipse 35% 25% at 50% 45%, rgba(125,212,248,0.03) 0%, transparent 60%);
}

body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1; opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ══ LAYOUT ══ */
.app {
  display: flex;
  flex: 1;
  height: calc(100vh - var(--player-h));
  position: relative;
  z-index: 2;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: rgba(12,12,16,0.7);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 0 24px;
  position: sticky;
  top: 0;
  height: calc(100vh - var(--player-h));
  overflow-y: auto;
}

.logo {
  font-family: 'Unbounded', sans-serif;
  font-size: 20px; font-weight: 600; letter-spacing: -0.5px;
  padding: 0 24px 32px;
}
.logo span { color: var(--accent); }

.nav-section { margin-bottom: 32px; }

.nav-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-dim);
  padding: 0 24px 10px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 24px;
  font-size: 14px; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
  position: relative;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-item.active { color: var(--text); }
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--accent);
  border-radius: 0;
}
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.nav-item.active .nav-icon { opacity: 1; }

.sidebar-playlists { padding: 0 16px; display: flex; flex-direction: column; gap: 2px; }

.playlist-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 0;
  cursor: pointer; transition: background 0.15s;
}
.playlist-item:hover { background: var(--surface2); }
.playlist-thumb {
  width: 36px; height: 36px; border-radius: 0;
  background: var(--surface2); border: 1px solid var(--border);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.playlist-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playlist-count { font-size: 11px; color: var(--text-muted); }
.playlist-info { min-width: 0; }

/* ── Main ── */
.main {
  flex: 1; overflow-y: auto; padding-bottom: 40px;
  scrollbar-width: thin; scrollbar-color: var(--surface2) transparent;
}

/* ── Topbar ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 36px 20px;
  position: sticky; top: 0; z-index: 10;
  background: rgba(12,12,16,0.82);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.topbar-greeting {
  font-size: 20px; font-weight: 600;
  font-family: 'Unbounded', sans-serif; letter-spacing: -0.5px;
}
.search-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 0; padding: 8px 16px; width: 220px;
  transition: border-color 0.2s;
}
.search-wrap:focus-within { border-color: rgba(125,212,248,0.35); }
.search-wrap svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }
.search-wrap input {
  background: none; border: none; outline: none;
  color: var(--text); font-family: 'Manrope', sans-serif; font-size: 13px; width: 100%;
}
.search-wrap input::placeholder { color: var(--text-dim); }

/* ── Featured banner ── */
.featured {
  margin: 28px 36px 0;
  border-radius: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 32px 36px;
  display: flex; align-items: center; gap: 32px;
  position: relative; overflow: hidden; cursor: pointer;
  transition: border-color 0.2s;
}
.featured:hover { border-color: rgba(125,212,248,0.2); }
.featured::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(125,212,248,0.06) 0%, transparent 55%);
  pointer-events: none;
}
.featured-cover {
  width: 120px; height: 120px; border-radius: 0;
  background: var(--surface2); border: 1px solid var(--border);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.featured-info { flex: 1; }
.featured-badge {
  display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--bg); background: var(--accent);
  padding: 3px 10px; border-radius: 0; margin-bottom: 12px;
}
.featured-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 28px; font-weight: 300; letter-spacing: -0.8px;
  line-height: 1.1; margin-bottom: 8px;
}
.featured-meta { font-size: 13px; color: var(--text-muted); }
.featured-actions { display: flex; gap: 10px; margin-top: 20px; align-items: center; }

.btn-play-big {
  display: flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--bg);
  border: none; border-radius: 0;
  padding: 10px 22px;
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: transform 0.15s;
}
.btn-play-big:hover { transform: scale(1.03); }
.btn-play-big svg { width: 14px; height: 14px; }

.btn-outline {
  display: flex; align-items: center; gap: 8px;
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 0;
  padding: 10px 18px;
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: color 0.15s, border-color 0.15s;
}
.btn-outline:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.btn-outline svg { width: 14px; height: 14px; }

/* ── Section headers ── */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 36px 36px 16px;
}
.section-head-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 15px; font-weight: 400; letter-spacing: 0.5px;
}
.section-head-link {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  letter-spacing: 1px; text-transform: uppercase;
  cursor: pointer; transition: color 0.15s; text-decoration: none;
}
.section-head-link:hover { color: var(--accent); }

/* ── Horizontal scroll ── */
.h-scroll {
  display: flex; gap: 16px;
  padding: 0 36px 8px;
  overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.h-scroll::-webkit-scrollbar { display: none; }

/* ── Album card ── */
.album-card {
  flex-shrink: 0; width: 160px; cursor: pointer;
  scroll-snap-align: start; transition: transform 0.2s;
}
.album-card:hover { transform: translateY(-3px); }
.album-card:hover .card-play-btn { opacity: 1; transform: scale(1) translateY(0); }

.album-cover {
  width: 160px; height: 160px; border-radius: 0;
  background: var(--surface2); border: 1px solid var(--border);
  margin-bottom: 12px; position: relative;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.album-cover::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(125,212,248,0.05) 0%, transparent 60%);
}
.card-play-btn {
  position: absolute; bottom: 10px; right: 10px;
  width: 40px; height: 40px; border-radius: 0;
  background: var(--accent); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 2; opacity: 0;
  transform: scale(0.8) translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
  border: none; cursor: pointer;
}
.card-play-btn svg { width: 15px; height: 15px; }

.album-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.album-sub  { font-size: 12px; color: var(--text-muted); }

/* ── Artist card ── */
.artist-card {
  flex-shrink: 0; width: 140px; cursor: pointer;
  text-align: center; scroll-snap-align: start; transition: transform 0.2s;
}
.artist-card:hover { transform: translateY(-3px); }

.artist-avatar {
  width: 140px; height: 140px; border-radius: 0;
  background: var(--surface2); border: 1px solid var(--border);
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative;
}
.artist-avatar::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 35% 35%, rgba(125,212,248,0.07), transparent 60%);
}
.artist-name { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.artist-sub  { font-size: 12px; color: var(--text-muted); }

/* ══ TRACK LIST ══ */
.track-list { display: flex; flex-direction: column; gap: 2px; padding: 0 28px; }

.track {
  display: grid;
  grid-template-columns: 36px 52px 1fr auto auto;
  align-items: center; gap: 14px;
  padding: 10px 8px; border-radius: 0;
  cursor: pointer; transition: background 0.15s;
}
.track:hover { background: var(--surface2); }
.track.active { background: var(--accent-dim); }

.track .track-num { display: flex; align-items: center; justify-content: center; }
.track:hover .track-num-digit,
.track.active .track-num-digit { display: none; }
.track-hover-play { display: none; color: var(--text-muted); }
.track:hover .track-hover-play { display: flex; }

.track.active .track-hover-play { display: none !important; }
.track.active .track-play-icon { display: flex; }
.track.active.playing .track-play-icon { display: none; }
.track.active.playing .eq-bars { display: flex; }

.track-num-digit { font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.track-play-icon { display: none; color: var(--accent); }
.track-hover-play, .track-play-icon { align-items: center; justify-content: center; }

.eq-bars {
  display: none; align-items: flex-end; justify-content: center;
  gap: 2px; height: 16px; width: 20px;
}
.eq-bar {
  width: 3px; border-radius: 0; background: var(--accent);
  transform-origin: bottom;
  animation: eq-bounce var(--spd) ease-in-out infinite alternate;
}
.eq-bar:nth-child(1) { --spd:0.5s; height:60%; animation-delay:0s; }
.eq-bar:nth-child(2) { --spd:0.7s; height:100%; animation-delay:0.15s; }
.eq-bar:nth-child(3) { --spd:0.4s; height:40%; animation-delay:0.05s; }
.eq-bar:nth-child(4) { --spd:0.6s; height:80%; animation-delay:0.2s; }
@keyframes eq-bounce { from { transform:scaleY(0.3); } to { transform:scaleY(1); } }

.track-thumb {
  width: 52px; height: 52px; border-radius: 0;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.track-info { min-width: 0; }
.track-name {
  font-size: 14px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px;
}
.track.active .track-name { color: var(--accent); }
.track-artist { font-size: 12px; color: var(--text-muted); }

.track-duration { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.btn-download {
  width: 34px; height: 34px; border-radius: 0;
  border: 1px solid var(--border); background: transparent; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s; opacity: 0;
}
.track:hover .btn-download { opacity: 1; }
.btn-download:hover { background: var(--accent-dim); color: var(--accent); border-color: rgba(125,212,248,0.3); }
.btn-download svg { width: 14px; height: 14px; }

/* ── Quick picks grid ── */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 36px;
}

.quick-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 0; padding: 10px 14px;
  cursor: pointer; transition: background 0.15s;
  overflow: hidden; position: relative;
}
.quick-item:hover { background: var(--surface2); }
.quick-item:hover .quick-play { opacity: 1; }

.quick-thumb {
  width: 44px; height: 44px; border-radius: 0;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.quick-info { min-width: 0; flex: 1; }
.quick-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-sub  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.quick-play {
  width: 30px; height: 30px; border-radius: 0;
  background: var(--accent); color: var(--bg);
  border: none; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}
.quick-play svg { width: 12px; height: 12px; }

/* ══ PLAYER ══ */
.player {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--player-h);
  background: rgba(14,14,20,0.95); backdrop-filter: blur(28px);
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; padding: 0 32px; gap: 24px; z-index: 100;
}
.player-track { display: flex; align-items: center; gap: 14px; }
.player-thumb {
  width: 48px; height: 48px; border-radius: 0;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.player-track-info .name   { font-size: 14px; font-weight: 500; }
.player-track-info .artist { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.player-controls { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.player-btns { display: flex; align-items: center; gap: 8px; }

.ctrl-btn {
  width: 36px; height: 36px; border-radius: 0;
  border: none; background: transparent; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, background 0.15s;
}
.ctrl-btn:hover { color: var(--text); background: var(--surface2); }
.ctrl-btn svg { width: 18px; height: 18px; }

.play-btn {
  width: 44px; height: 44px; border-radius: 0;
  border: none; background: var(--accent); color: var(--bg);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s;
}
.play-btn:hover { transform: scale(1.06); }
.play-btn svg { width: 20px; height: 20px; }

.progress-row { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 380px; }
.progress-time { font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums; min-width: 30px; }
.progress-time.right { text-align: right; }

.progress-bar { flex: 1; height: 20px; position: relative; cursor: pointer; display: flex; align-items: center; }
.progress-wave { position: absolute; left: 0; right: 0; height: 20px; overflow: hidden; }
.progress-wave svg { width: 100%; height: 20px; display: block; }
.wave-track { stroke: rgba(255,255,255,0.1); fill: none; }
.wave-fill  { stroke: var(--accent); fill: none; stroke-width: 1.5; stroke-linecap: round; }

.player-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.volume-wrap  { display: flex; align-items: center; gap: 8px; }
.volume-icon svg { width: 18px; height: 18px; color: var(--text-muted); }

input[type=range].volume {
  -webkit-appearance: none; width: 80px; height: 3px;
  background: var(--surface2); border-radius: 0; outline: none; cursor: pointer;
}
input[type=range].volume::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px;
  border-radius: 0; background: var(--text); cursor: pointer;
}

/* ══ PAGES ══ */
.page { display: none; }
.page.active { display: block; }

.topbar-page-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 20px; font-weight: 600; letter-spacing: -0.5px;
}

/* ── Toolbar (tracks page) ── */
.page-toolbar {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 16px; padding: 24px 36px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.filter-pill {
  font-size: 12px; font-weight: 600;
  padding: 5px 14px; border-radius: 0;
  border: 1px solid var(--border);
  background: transparent; color: var(--text-muted);
  cursor: pointer; transition: all 0.15s; font-family: 'Manrope', sans-serif;
}
.filter-pill:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.filter-pill.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }

.sort-btns { display: flex; align-items: center; gap: 6px; }
.sort-label { font-size: 11px; color: var(--text-dim); margin-right: 2px; }
.sort-btn {
  font-size: 12px; font-weight: 500;
  padding: 5px 12px; border-radius: 0;
  border: 1px solid transparent;
  background: transparent; color: var(--text-muted);
  cursor: pointer; transition: all 0.15s; font-family: 'Manrope', sans-serif;
}
.sort-btn:hover { color: var(--text); }
.sort-btn.active { color: var(--accent); border-color: rgba(125,212,248,0.25); }

.page-count {
  font-size: 12px; color: var(--text-dim);
  padding: 10px 36px 4px; letter-spacing: 0.5px;
}

/* ── Albums page grid ── */
.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px; padding: 28px 36px 40px;
}
.page-album-card { cursor: pointer; transition: transform 0.2s; }
.page-album-card:hover { transform: translateY(-3px); }
.page-album-card:hover .card-play-btn { opacity: 1; transform: scale(1) translateY(0); }
.page-album-cover {
  width: 100%; aspect-ratio: 1; background: var(--surface2);
  border: 1px solid var(--border); margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.page-album-cover::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(125,212,248,0.05) 0%, transparent 60%);
}
.page-album-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-album-sub  { font-size: 12px; color: var(--text-muted); }

/* ── Artists page grid ── */
.artists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 24px; padding: 28px 36px 40px;
}
.artist-page-card { cursor: pointer; text-align: center; transition: transform 0.2s; }
.artist-page-card:hover { transform: translateY(-3px); }
.artist-page-avatar {
  width: 100%; aspect-ratio: 1; background: var(--surface2);
  border: 1px solid var(--border); margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.artist-page-avatar::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 35% 35%, rgba(125,212,248,0.07), transparent 60%);
}
.artist-page-name { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.artist-page-sub  { font-size: 12px; color: var(--text-muted); }

/* ── Detail view (album/artist) ── */
.detail-header { padding: 24px 36px 0; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  background: none; border: none; cursor: pointer;
  padding: 6px 0; margin-bottom: 24px;
  transition: color 0.15s; font-family: 'Manrope', sans-serif;
}
.back-btn:hover { color: var(--text); }
.back-btn svg { width: 16px; height: 16px; }

.detail-hero { display: flex; align-items: flex-end; gap: 28px; }
.detail-cover {
  width: 140px; height: 140px; flex-shrink: 0;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.detail-cover::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(125,212,248,0.06) 0%, transparent 60%);
}
.artist-detail-avatar {
  width: 140px; height: 140px; flex-shrink: 0;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.artist-detail-avatar::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 35% 35%, rgba(125,212,248,0.07), transparent 60%);
}
.detail-info { padding-bottom: 4px; }
.detail-label {
  font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.detail-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 32px; font-weight: 300; letter-spacing: -0.8px;
  line-height: 1.1; margin-bottom: 8px;
}
.detail-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.detail-desc { font-size: 13px; color: var(--text-dim); }

/* ── Search page ── */
.search-page-wrap { padding: 28px 36px 40px; }
.search-page-bar {
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px; margin-bottom: 8px;
}
.search-page-bar svg { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; }
.search-page-bar input {
  background: none; border: none; outline: none;
  color: var(--text); font-family: 'Unbounded', sans-serif;
  font-size: 22px; font-weight: 300; width: 100%; letter-spacing: -0.5px;
}
.search-page-bar input::placeholder { color: var(--text-dim); }

.search-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 60px 0; color: var(--text-dim);
}
.search-empty p { font-size: 14px; }

/* ══════════════════════════════════════
   RESPONSIVE / MOBILE
══════════════════════════════════════ */

/* ── Tablet (≤ 900px) ── */
@media (max-width: 900px) {
  :root { --sidebar-w: 180px; }

  .featured { flex-direction: column; gap: 20px; padding: 24px; }
  .featured-cover { width: 100px; height: 100px; }
  .featured-title { font-size: 22px; }

  .quick-grid { grid-template-columns: repeat(2, 1fr); }

  .page-grid   { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; padding: 20px 24px 32px; }
  .artists-grid{ grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 16px; padding: 20px 24px 32px; }

  .track-list { padding: 0 16px; }
  .page-toolbar { padding: 16px 20px 8px; }
  .section-head { padding: 28px 24px 14px; }
  .h-scroll { padding: 0 24px 8px; }
  .quick-grid { padding: 0 24px; }
  .search-page-wrap { padding: 20px 24px 32px; }
  .detail-header { padding: 20px 24px 0; }
}

/* ── Mobile (≤ 640px) ── */
@media (max-width: 640px) {
  :root { --player-h: 72px; }

  /* Sidebar → bottom nav */
  .sidebar {
    position: fixed;
    bottom: var(--player-h);
    left: 0; right: 0;
    top: auto;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    padding: 0;
    border-right: none;
    border-top: 1px solid var(--border);
    background: rgba(12,12,16,0.96);
    backdrop-filter: blur(24px);
    z-index: 50;
    overflow: visible;
  }

  /* Hide labels, logo and playlist section on mobile */
  .nav-label,
  .nav-section:last-child,
  .sidebar-playlists,
  .logo { display: none; }

  .nav-section { margin: 0; display: contents; }

  .nav-item {
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px;
    font-size: 9px;
    flex: 1;
    justify-content: center;
    letter-spacing: 0;
    min-width: 0;
  }
  .nav-item.active::before { display: none; }
  .nav-item.active { color: var(--accent); }
  .nav-icon { width: 20px; height: 20px; opacity: 1; flex-shrink: 0; }

  /* App layout: no sidebar column */
  .app {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .main {
    /* account for bottom nav + player */
    padding-bottom: calc(var(--player-h) + 56px);
  }

  /* Topbar */
  .topbar {
    padding: 16px 16px 12px;
    gap: 12px;
  }
  .topbar-greeting,
  .topbar-page-title { font-size: 16px; }
  .search-wrap { width: 160px; padding: 7px 12px; }

  /* Featured */
  .featured {
    margin: 16px 16px 0;
    padding: 20px;
    flex-direction: row;
    gap: 16px;
    align-items: center;
  }
  .featured-cover { width: 80px; height: 80px; flex-shrink: 0; }
  .featured-title { font-size: 18px; }
  .featured-meta  { font-size: 11px; }
  .featured-actions { margin-top: 12px; gap: 8px; }
  .btn-play-big { padding: 8px 16px; font-size: 12px; }
  .btn-outline  { padding: 8px 12px; font-size: 12px; }

  /* Sections */
  .section-head { padding: 20px 16px 10px; }
  .section-head-title { font-size: 13px; }
  .h-scroll { padding: 0 16px 8px; gap: 12px; }
  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 16px;
    gap: 8px;
  }
  .quick-item { padding: 8px 10px; gap: 8px; }
  .quick-thumb { width: 36px; height: 36px; }
  .quick-name { font-size: 12px; }

  /* Album cards in h-scroll */
  .album-card { width: 130px; }
  .album-cover { width: 130px; height: 130px; }
  .artist-card { width: 110px; }
  .artist-avatar { width: 110px; height: 110px; }

  /* Track list */
  .track-list { padding: 0 8px; }
  .track {
    grid-template-columns: 28px 44px 1fr auto;
    gap: 10px; padding: 8px 6px;
  }
  /* Hide download btn on mobile — long-press pattern instead */
  .btn-download { display: none; }
  .track-thumb { width: 44px; height: 44px; }
  .track-name  { font-size: 13px; }
  .track-artist { font-size: 11px; }
  .track-duration { font-size: 11px; }

  /* Page grids */
  .page-grid    { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px 16px 80px; }
  .artists-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px 16px 80px; }
  .page-album-name { font-size: 13px; }

  /* Toolbar */
  .page-toolbar {
    flex-direction: column; align-items: flex-start;
    padding: 12px 16px 8px; gap: 10px;
  }
  .sort-btns { flex-wrap: wrap; gap: 4px; }
  .sort-btn, .filter-pill { font-size: 11px; padding: 4px 10px; }
  .page-count { padding: 6px 16px 2px; }
  .tracksPageList { padding: 0 8px 80px !important; }

  /* Detail pages */
  .detail-header { padding: 16px 16px 0; }
  .detail-hero { flex-direction: column; gap: 16px; align-items: flex-start; }
  .detail-cover, .artist-detail-avatar { width: 100px; height: 100px; }
  .detail-title { font-size: 24px; }

  /* Search */
  .search-page-wrap { padding: 16px 16px 80px; }
  .search-page-bar input { font-size: 18px; }

  /* Player slim */
  .player {
    grid-template-columns: 1fr auto;
    padding: 0 16px;
    gap: 12px;
  }
  .player-right { display: none; } /* volume hidden on mobile */
  .player-controls { max-width: 200px; }
  .progress-row { max-width: 200px; }
  .play-btn { width: 38px; height: 38px; }
  .ctrl-btn { width: 30px; height: 30px; }
  .ctrl-btn svg { width: 15px; height: 15px; }
  .player-thumb { width: 40px; height: 40px; }
  .player-track-info .name   { font-size: 13px; }
  .player-track-info .artist { font-size: 11px; }
}

/* ── Very small (≤ 380px) ── */
@media (max-width: 380px) {
  .featured { flex-direction: column; }
  .featured-cover { width: 100%; height: 140px; }
  .quick-grid { grid-template-columns: 1fr; }
  .page-grid, .artists-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ══ PAGE TRANSITIONS ══ */
.page.active {
  animation: page-in 0.22s ease both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ══ UPLOAD MODAL ══ */
.upload-btn {
  position: fixed;
  bottom: calc(var(--player-h) + 20px);
  right: 24px;
  width: 48px; height: 48px;
  background: var(--accent); color: var(--bg);
  border: none; cursor: pointer; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 24px rgba(125,212,248,0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.upload-btn:hover { transform: scale(1.08); box-shadow: 0 6px 32px rgba(125,212,248,0.35); }
.upload-btn svg { width: 22px; height: 22px; }

.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 480px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 80px);
  padding: 32px;
  overflow-y: auto;
  transform: translateY(12px);
  transition: transform 0.2s;
  scrollbar-width: thin;
  scrollbar-color: var(--surface2) transparent;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 16px; font-weight: 400;
  margin-bottom: 24px; letter-spacing: -0.3px;
}

.form-row { margin-bottom: 16px; }
.form-row label {
  display: block; font-size: 11px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 6px;
}
.form-row input[type=text] {
  width: 100%; background: var(--surface2);
  border: 1px solid var(--border); color: var(--text);
  font-family: 'Manrope', sans-serif; font-size: 14px;
  padding: 10px 14px; outline: none;
  transition: border-color 0.2s;
}
.form-row input[type=text]:focus { border-color: rgba(125,212,248,0.4); }
.form-row input[type=text]::placeholder { color: var(--text-dim); }

.file-drop {
  border: 1px dashed var(--border);
  padding: 20px; text-align: center;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.file-drop:hover, .file-drop.has-file {
  border-color: rgba(125,212,248,0.4);
  background: rgba(125,212,248,0.03);
}
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-drop-icon { color: var(--text-dim); margin-bottom: 6px; }
.file-drop-icon svg { width: 24px; height: 24px; }
.file-drop-text { font-size: 13px; color: var(--text-muted); }
.file-drop-name { font-size: 12px; color: var(--accent); margin-top: 4px; }

.modal-actions { display: flex; gap: 10px; margin-top: 24px; }
.btn-submit {
  flex: 1; background: var(--accent); color: var(--bg);
  border: none; padding: 12px;
  font-family: 'Manrope', sans-serif; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: opacity 0.15s;
}
.btn-submit:hover { opacity: 0.9; }
.btn-submit:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-cancel {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border); padding: 12px 20px;
  font-family: 'Manrope', sans-serif; font-size: 14px;
  cursor: pointer; transition: color 0.15s;
}
.btn-cancel:hover { color: var(--text); }

.upload-progress {
  margin-top: 16px; display: none;
  font-size: 13px; color: var(--text-muted); text-align: center;
}
.upload-progress.visible { display: block; }

@media (max-width: 640px) {
  .upload-btn { bottom: calc(var(--player-h) + 64px); right: 16px; }
  .modal { padding: 24px; }
}

/* ══ PLAYLISTS ══ */
.nav-label-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px 10px;
}
.nav-label-row .nav-label { padding: 0; }

.new-playlist-btn {
  width: 22px; height: 22px;
  background: none; border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}
.new-playlist-btn:hover { color: var(--accent); border-color: rgba(125,212,248,0.3); }
.new-playlist-btn svg { width: 12px; height: 12px; }

.playlists-empty {
  font-size: 12px; color: var(--text-dim);
  padding: 8px 24px;
}

/* Playlist page grid */
.playlists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px; padding: 28px 36px 40px;
}

.playlist-card {
  background: var(--surface); border: 1px solid var(--border);
  padding: 16px; cursor: pointer; transition: background 0.15s, transform 0.2s;
  position: relative;
}
.playlist-card:hover { background: var(--surface2); transform: translateY(-2px); }
.playlist-card:hover .playlist-card-play { opacity: 1; transform: scale(1) translateY(0); }
.playlist-card:hover .playlist-card-delete { opacity: 1; }

.playlist-card-cover {
  width: 100%; aspect-ratio: 1;
  background: var(--surface2); border: 1px solid var(--border);
  margin-bottom: 12px; position: relative;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.playlist-card-cover::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(125,212,248,0.05) 0%, transparent 60%);
}
.playlist-card-play {
  position: absolute; bottom: 10px; right: 10px;
  width: 40px; height: 40px;
  background: var(--accent); color: var(--bg);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.8) translateY(4px);
  transition: opacity 0.2s, transform 0.2s; z-index: 2;
}
.playlist-card-play svg { width: 15px; height: 15px; }

.playlist-card-delete {
  position: absolute; top: 24px; right: 24px;
  width: 26px; height: 26px;
  background: rgba(0,0,0,0.5); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s, color 0.15s; z-index: 3;
}
.playlist-card-delete:hover { color: #ff6b6b; border-color: rgba(255,107,107,0.3); }
.playlist-card-delete svg { width: 12px; height: 12px; }

.playlist-card-name { font-size: 14px; font-weight: 600; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playlist-card-count { font-size: 12px; color: var(--text-muted); }

.playlists-new-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; background: transparent;
  border: 1px dashed var(--border); cursor: pointer;
  color: var(--text-muted); transition: border-color 0.2s, color 0.2s;
  padding: 16px; aspect-ratio: unset; min-height: 180px;
}
.playlists-new-btn:hover { border-color: rgba(125,212,248,0.4); color: var(--accent); }
.playlists-new-btn svg { width: 28px; height: 28px; }
.playlists-new-btn span { font-size: 13px; font-weight: 500; }

/* Add to playlist button on track hover */
.btn-add-playlist {
  width: 34px; height: 34px; border-radius: 0;
  border: 1px solid var(--border); background: transparent; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s; opacity: 0;
}
.track:hover .btn-add-playlist { opacity: 1; }
.btn-add-playlist:hover { background: var(--accent-dim); color: var(--accent); border-color: rgba(125,212,248,0.3); }
.btn-add-playlist svg { width: 14px; height: 14px; }

/* Playlist picker dropdown */
.playlist-picker {
  position: fixed; z-index: 300;
  background: var(--surface); border: 1px solid var(--border);
  min-width: 200px; box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.playlist-picker-item {
  padding: 10px 16px; font-size: 13px; cursor: pointer;
  transition: background 0.15s; white-space: nowrap;
}
.playlist-picker-item:hover { background: var(--surface2); }
.playlist-picker-empty { padding: 10px 16px; font-size: 12px; color: var(--text-dim); }

@media (max-width: 640px) {
  .playlists-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px 16px 80px; }
}

/* ══ TOPBAR AUTH BUTTONS ══ */
.topbar-right {
  display: flex; align-items: center; gap: 10px;
}

.topbar-admin-btn {
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); padding: 7px 14px;
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: color 0.15s, border-color 0.15s;
}
.topbar-admin-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.topbar-admin-btn svg { width: 14px; height: 14px; }

.topbar-logout-btn {
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid rgba(125,212,248,0.2);
  color: var(--accent); padding: 7px 14px;
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: opacity 0.15s;
}
.topbar-logout-btn:hover { opacity: 0.7; }
.topbar-logout-btn svg { width: 14px; height: 14px; }

@media (max-width: 640px) {
  .topbar-admin-btn span,
  .topbar-logout-btn span { display: none; }
  .topbar-admin-btn,
  .topbar-logout-btn { padding: 7px; }
}

/* ══ TOAST NOTIFICATIONS ══ */
.toast {
  position: fixed;
  bottom: calc(var(--player-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  z-index: 500;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
  pointer-events: none;
}
.toast.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.toast-success { border-color: rgba(125,212,248,0.4); color: var(--accent); }
.toast.toast-error   { border-color: rgba(255,107,107,0.4); color: #ff6b6b; }

@media (max-width: 640px) {
  .toast { bottom: calc(var(--player-h) + 64px); font-size: 12px; }
}

/* ══ SHUFFLE / REPEAT ACTIVE STATE ══ */
.ctrl-btn.ctrl-active {
  color: var(--accent);
}
.ctrl-btn.ctrl-active svg {
  filter: drop-shadow(0 0 4px rgba(125,212,248,0.5));
}

/* ══ PLAYS COUNT ══ */
.track-duration {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.track-plays {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}

/* ══ AUTH MODAL ══ */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.auth-tab {
  flex: 1; padding: 10px;
  background: none; border: none;
  color: var(--text-muted); font-family: 'Manrope', sans-serif;
  font-size: 13px; font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.auth-tab.active { color: var(--text); border-bottom-color: var(--accent); }

.role-picker { display: flex; gap: 10px; }
.role-option { flex: 1; cursor: pointer; }
.role-option input { display: none; }
.role-option span {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 10px;
  border: 1px solid var(--border); background: var(--surface2);
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  transition: all 0.15s;
}
.role-option span svg { width: 22px; height: 22px; }
.role-option input:checked + span {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ══ PROFILE PAGE ══ */
.profile-header {
  padding: 36px 36px 0;
  display: flex; align-items: flex-end; gap: 28px;
}
.profile-avatar {
  width: 100px; height: 100px;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0; position: relative; cursor: pointer;
}
.profile-avatar:hover .avatar-overlay { opacity: 1; }
.avatar-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
  font-size: 11px; color: var(--text); font-weight: 600;
}
.profile-info { padding-bottom: 4px; }
.profile-role {
  font-size: 10px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}
.profile-name {
  font-family: 'Unbounded', sans-serif;
  font-size: 28px; font-weight: 300; letter-spacing: -0.8px; margin-bottom: 4px;
}
.profile-login { font-size: 13px; color: var(--text-muted); }

.profile-stats {
  display: flex; gap: 32px;
  padding: 24px 36px;
  border-bottom: 1px solid var(--border);
}
.stat-item { display: flex; flex-direction: column; gap: 4px; }
.stat-value { font-family: 'Unbounded', sans-serif; font-size: 22px; font-weight: 300; }
.stat-label { font-size: 11px; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }

/* Admin users table */
.users-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px; margin: 0 36px; width: calc(100% - 72px);
}
.users-table th {
  text-align: left; padding: 10px 12px;
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.users-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.users-table tr:hover td { background: var(--surface2); }
.role-badge {
  display: inline-block; padding: 2px 8px;
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  border: 1px solid var(--border);
}
.role-badge.admin  { color: var(--accent); border-color: rgba(125,212,248,0.3); }
.role-badge.artist { color: #c084fc; border-color: rgba(192,132,252,0.3); }
.role-badge.listener { color: var(--text-dim); }

@media (max-width: 640px) {
  .profile-header { padding: 20px 16px 0; flex-direction: column; align-items: flex-start; }
  .profile-stats { padding: 16px; gap: 20px; flex-wrap: wrap; }
  .profile-name { font-size: 22px; }
  .users-table { margin: 0 16px; width: calc(100% - 32px); }
}

/* ══ GENRE PICKER ══ */
.genre-picker {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 8px;
}

.genre-chip {
  font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
  padding: 4px 10px; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted);
  cursor: pointer; transition: all 0.15s;
  font-family: 'Manrope', sans-serif;
  user-select: none;
}
.genre-chip:hover { border-color: rgba(125,212,248,0.3); color: var(--text); }
.genre-chip.selected {
  background: var(--accent-dim);
  border-color: rgba(125,212,248,0.4);
  color: var(--accent);
}
.genre-chip.more-btn {
  border-style: dashed;
}

.genre-custom-wrap {
  margin-bottom: 8px;
}
.genre-custom-wrap input {
  width: 100%; background: var(--surface2);
  border: 1px solid var(--border); color: var(--text);
  font-family: 'Manrope', sans-serif; font-size: 13px;
  padding: 7px 12px; outline: none;
  transition: border-color 0.2s;
}
.genre-custom-wrap input:focus { border-color: rgba(125,212,248,0.4); }
.genre-custom-wrap input::placeholder { color: var(--text-dim); }

.genre-selected {
  display: flex; flex-wrap: wrap; gap: 6px; min-height: 0;
}
.genre-selected-chip {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  padding: 3px 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(125,212,248,0.3);
  color: var(--accent);
}
.genre-selected-chip button {
  background: none; border: none; color: var(--accent);
  cursor: pointer; font-size: 13px; line-height: 1;
  padding: 0; opacity: 0.6;
}
.genre-selected-chip button:hover { opacity: 1; }

/* Genre filter pills on tracks page */
.genre-filter-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 0 36px 16px;
}

@media (max-width: 640px) {
  .genre-filter-row { padding: 0 16px 12px; }
}

/* ══ PUBLIC PROFILE ══ */
.pub-profile-banner {
  width: 100%; height: 200px;
  background: linear-gradient(135deg, rgba(125,212,248,0.15) 0%, rgba(125,212,248,0.03) 50%, transparent 100%);
  position: relative;
  border-bottom: 1px solid var(--border);
}

.pub-profile-avatar-wrap {
  position: absolute;
  bottom: -48px; left: 36px;
}

.pub-profile-avatar {
  width: 96px; height: 96px;
  border: 3px solid var(--bg);
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.pub-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.pub-profile-info {
  padding: 60px 36px 24px;
  border-bottom: 1px solid var(--border);
}

.pub-profile-role {
  font-size: 10px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}

.pub-profile-name {
  font-family: 'Unbounded', sans-serif;
  font-size: 32px; font-weight: 300; letter-spacing: -0.8px;
  margin-bottom: 8px;
}

.pub-profile-bio {
  font-size: 14px; color: var(--text-muted);
  max-width: 500px; line-height: 1.6; margin-bottom: 16px;
}

.pub-profile-stats {
  display: flex; gap: 28px;
}

.pub-profile-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 36px;
  margin-top: 8px;
}

.pub-profile-tab {
  padding: 14px 20px;
  font-size: 13px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: 'Manrope', sans-serif;
}
.pub-profile-tab:hover { color: var(--text); }
.pub-profile-tab.active { color: var(--text); border-bottom-color: var(--accent); }

.pub-profile-tab-content { padding: 8px 0 40px; }

/* Artist name clickable in track */
.track-artist-link {
  cursor: pointer; transition: color 0.15s;
}
.track-artist-link:hover { color: var(--accent); }

@media (max-width: 640px) {
  .pub-profile-banner { height: 140px; }
  .pub-profile-avatar-wrap { left: 16px; bottom: -40px; }
  .pub-profile-avatar { width: 80px; height: 80px; }
  .pub-profile-info { padding: 52px 16px 20px; }
  .pub-profile-name { font-size: 24px; }
  .pub-profile-tabs { padding: 0 16px; }
  .pub-profile-stats { gap: 16px; flex-wrap: wrap; }
}

/* ══ PLAYLIST MODAL TRACK LIST ══ */
.playlist-track-list {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: var(--surface2) transparent;
}

.playlist-track-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; cursor: pointer;
  transition: background 0.15s; border-bottom: 1px solid var(--border);
}
.playlist-track-row:last-child { border-bottom: none; }
.playlist-track-row:hover { background: var(--surface2); }
.playlist-track-row.checked { background: var(--accent-dim); }

.playlist-track-row input[type=checkbox] {
  accent-color: var(--accent);
  width: 15px; height: 15px; flex-shrink: 0; cursor: pointer;
}

.playlist-track-thumb {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--surface2); border: 1px solid var(--border);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}

.playlist-track-info { min-width: 0; flex: 1; }
.playlist-track-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playlist-track-artist { font-size: 11px; color: var(--text-muted); }

/* ══ PLAYLIST COLLAGE ══ */
.playlist-collage {
  width: 100%; height: 100%;
  display: grid; grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  overflow: hidden;
}
.playlist-collage img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.playlist-collage-single img {
  width: 100%; height: 100%; object-fit: cover;
}

/* ══ PLAYLIST TRACK LIST IN MODAL ══ */
.playlist-track-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: var(--surface2) transparent;
}

.playlist-track-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}
.playlist-track-row:last-child { border-bottom: none; }
.playlist-track-row:hover { background: var(--surface2); }
.playlist-track-row.selected { background: var(--accent-dim); }

.playlist-track-check {
  width: 18px; height: 18px; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.15s;
}
.playlist-track-row.selected .playlist-track-check {
  background: var(--accent); border-color: var(--accent);
  color: var(--bg);
}
.playlist-track-check svg { width: 10px; height: 10px; }

.playlist-track-thumb {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--surface2); overflow: hidden;
}
.playlist-track-info { min-width: 0; flex: 1; }
.playlist-track-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playlist-track-artist { font-size: 11px; color: var(--text-muted); }

/* ══ PLAYLIST COVER COLLAGE ══ */
.playlist-collage {
  width: 100%; height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  overflow: hidden;
}
.playlist-collage img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* ══ EXPANDED PLAYER ══ */
.player-expanded {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-end;
  pointer-events: none; opacity: 0;
  transition: opacity 0.3s;
}
.player-expanded.open {
  pointer-events: all; opacity: 1;
}

.player-exp-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(20px);
}

.player-exp-content {
  position: relative; z-index: 1;
  width: 100%; max-width: 520px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 28px 32px 40px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 92vh;
  overflow-y: auto;
  scrollbar-width: none;
}
.player-expanded.open .player-exp-content {
  transform: translateY(0);
}

.player-exp-close {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  margin: 0 auto 24px;
  transition: color 0.15s;
}
.player-exp-close:hover { color: var(--text); }
.player-exp-close svg { width: 20px; height: 20px; }

.player-exp-cover {
  width: 200px; height: 200px;
  margin: 0 auto 24px;
  background: var(--surface2); border: 1px solid var(--border);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.player-exp-cover img { width: 100%; height: 100%; object-fit: cover; }

.player-exp-info { text-align: center; margin-bottom: 24px; }
.player-exp-name {
  font-family: 'Unbounded', sans-serif;
  font-size: 20px; font-weight: 300; letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.player-exp-artist {
  font-size: 14px; color: var(--text-muted); cursor: pointer;
  transition: color 0.15s;
}
.player-exp-artist:hover { color: var(--accent); }

.player-exp-controls { margin-bottom: 24px; }
.player-exp-progress { margin-bottom: 20px; }

.player-exp-btns {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-bottom: 16px;
}

.player-exp-volume {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; color: var(--text-muted);
}

.player-exp-lyrics {
  border-top: 1px solid var(--border);
  padding-top: 20px; margin-top: 8px;
}
.player-exp-lyrics-title {
  font-size: 10px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 12px;
}
.player-exp-lyrics-text {
  font-size: 15px; line-height: 1.8;
  color: var(--text-muted); white-space: pre-wrap;
}
.player-exp-lyrics-empty {
  font-size: 13px; color: var(--text-dim); text-align: center;
  padding: 16px 0;
}

/* ── Make player clickable to open ── */
.player { cursor: pointer; }
.player-controls, .player-right,
.ctrl-btn, .play-btn, .progress-bar,
input[type=range] { cursor: default; }

/* ══ LIBRARY PAGE ══ */
.library-section { padding: 0 36px 40px; }
.library-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 60px 0; color: var(--text-dim); text-align: center;
}
.library-empty svg { width: 48px; height: 48px; opacity: 0.3; }
.library-empty p { font-size: 14px; }

/* ══ NEW PAGE ══ */
.new-page-section { padding: 0 36px 40px; }

/* ══ UPDATED NAV — no label ══ */
.nav-section { margin-bottom: 8px; }
.sidebar-playlists-section { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 16px; }

@media (max-width: 640px) {
  .player-exp-content { max-width: 100%; border-left: none; border-right: none; }
  .player-exp-cover { width: 160px; height: 160px; }
  .library-section, .new-page-section { padding: 0 16px 80px; }
}

/* ══ SIMPLIFIED NAV ══ */
.sidebar { padding-top: 24px; }

.nav-section { margin-bottom: 0; }

.nav-item {
  font-size: 15px;
  padding: 11px 24px;
  font-weight: 500;
}

/* ══ FULLSCREEN PLAYER ══ */
.fullplayer {
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: var(--player-h);
  z-index: 99;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.fullplayer.open { transform: translateY(0); }

.fullplayer-bg {
  position: absolute; inset: 0;
  background: var(--bg);
  z-index: 0;
}

.fullplayer-bg::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(125,212,248,0.12) 0%, transparent 50%);
}

.fullplayer-close {
  position: absolute; top: 20px; left: 50%;
  transform: translateX(-50%);
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  width: 40px; height: 24px; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s;
}
.fullplayer-close:hover { color: var(--text); }
.fullplayer-close svg { width: 18px; height: 18px; }

.fullplayer-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center;
  padding: 60px 40px 40px;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--surface2) transparent;
}

.fullplayer-cover {
  width: min(300px, 60vw);
  height: min(300px, 60vw);
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.fullplayer-cover img {
  width: 100%; height: 100%; object-fit: cover;
}

.fullplayer-info { text-align: center; margin-bottom: 32px; }

.fullplayer-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 22px; font-weight: 400;
  letter-spacing: -0.5px; margin-bottom: 8px;
}

.fullplayer-artist {
  font-size: 14px; color: var(--text-muted);
  cursor: pointer; transition: color 0.15s;
}
.fullplayer-artist:hover { color: var(--accent); }

.fullplayer-lyrics {
  width: 100%; max-width: 560px;
  text-align: center;
}

.lyrics-empty {
  font-size: 13px; color: var(--text-dim);
  padding: 24px 0;
}

.lyrics-text {
  font-size: 16px; line-height: 2;
  color: var(--text-muted);
  white-space: pre-wrap;
}

/* Click zone on player bar */
.player-track { cursor: pointer; }

/* ══ NEW PAGE ══ */
.new-section { padding: 28px 36px 0; }
.new-section-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 13px; font-weight: 400;
  letter-spacing: 1px; color: var(--text-muted);
  text-transform: uppercase; margin-bottom: 16px;
}

/* ══ LIBRARY PAGE ══ */
.library-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 36px; margin-bottom: 8px;
}
.library-tab {
  padding: 14px 20px; font-size: 13px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: 'Manrope', sans-serif; transition: color 0.15s, border-color 0.15s;
}
.library-tab:hover { color: var(--text); }
.library-tab.active { color: var(--text); border-bottom-color: var(--accent); }

/* Track duration + plays under name */
.track-meta-row {
  display: flex; gap: 8px; align-items: center; margin-top: 2px;
}
.track-meta-duration { font-size: 11px; color: var(--text-dim); }
.track-meta-plays    { font-size: 11px; color: var(--text-dim); }
.track-meta-sep      { font-size: 11px; color: var(--text-dim); opacity: 0.4; }

@media (max-width: 640px) {
  .fullplayer-content { padding: 52px 20px 120px; }
  .fullplayer-title { font-size: 18px; }
  .lyrics-text { font-size: 14px; }
  .library-tabs { padding: 0 16px; }
  .new-section { padding: 20px 16px 0; }
}

/* ══ LIKE BUTTON ══ */
.btn-add-playlist.liked {
  color: #ff4d6d;
  border-color: rgba(255,77,109,0.3);
  background: rgba(255,77,109,0.12);
  opacity: 1 !important;
}
.btn-heart.liked svg {
  stroke: #ff4d6d;
}

/* Library tabs rename */
