:root {
  --bg: #000;
  --panel: #121212;
  --panel-2: #181818;
  --panel-3: #232323;
  --panel-4: #2a2a2a;
  --text: #fff;
  --muted: #b3b3b3;
  --muted-2: #8a8a8a;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #1ed760;
  --accent-rgb: 30, 215, 96;
  --radius: 10px;
  --sidebar-w: 300px;
  --now-w: 340px;
  --playbar-h: 88px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.hidden { display: none !important; }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border: 3px solid transparent;
  border-radius: 10px;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.32); background-clip: content-box; }

/* app shell ------------------------------------------------------------- */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) auto;
  gap: 8px;
  height: calc(100vh - var(--playbar-h));
  padding: 8px 8px 0;
}

/* sidebar --------------------------------------------------------------- */

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px 12px 12px;
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 18px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.35);
  transition: background 0.5s ease;
}
.brand-mark svg { width: 20px; height: 20px; stroke-width: 2; }

.primary-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-item:hover { color: var(--text); background: var(--panel-2); }
.nav-item.is-active { color: var(--text); }
.nav-item svg { width: 22px; height: 22px; }

.side-section {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px 0 0;
}

.side-title {
  margin: 0;
  padding: 0 10px 8px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.library-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  transition: color 0.15s ease, background 0.15s ease;
}
.library-item:hover, .library-item.is-active { color: var(--text); background: var(--panel-2); }
.library-item .count { margin-left: auto; color: var(--muted-2); font-size: 12px; font-weight: 600; }
.library-icon, .liked-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--panel-3);
  color: var(--muted);
  flex: none;
}
.liked-icon {
  background: linear-gradient(135deg, #450af5, #c4efd9);
  color: #fff;
}
.library-icon svg, .liked-icon svg { width: 16px; height: 16px; }
.liked-icon svg { fill: currentColor; stroke: none; }

.artists-section { flex: 1; min-height: 0; }
.artist-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 4px 8px;
  scrollbar-width: thin;
}

.artist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 6px 6px;
  border-radius: 6px;
  color: var(--muted);
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}
.artist-item:hover, .artist-item.is-active { background: var(--panel-2); color: var(--text); }
.artist-item .artist-thumb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-3);
  flex: none;
}
.artist-item .artist-thumb.fallback {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.artist-item .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}
.artist-item .count { color: var(--muted-2); font-size: 11px; }

.sidebar-footer {
  padding: 12px 10px 0;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 11px;
}

/* main ------------------------------------------------------------------ */

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  background: rgba(18, 18, 18, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.menu-btn { display: none; }

.search-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(420px, 100%);
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--panel-3);
  color: var(--muted);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.search-pill:focus-within {
  border-color: rgba(255, 255, 255, 0.35);
  background: var(--panel-4);
  color: var(--text);
}
.search-pill svg { width: 18px; height: 18px; flex: none; }
.search-pill input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}
.search-pill input::placeholder { color: var(--muted-2); }
.search-pill kbd {
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  color: var(--muted-2);
  font-size: 11px;
  font-family: inherit;
}

.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.pill-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--panel-3);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.pill-btn:hover { color: var(--text); background: var(--panel-4); }
.pill-btn.is-active { color: #000; background: var(--accent); }
.pill-btn svg { width: 16px; height: 16px; }
.pill-btn .badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 10px;
}

.view {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 22px 40px;
  scroll-behavior: smooth;
}

/* hero ------------------------------------------------------------------ */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 26px;
  min-height: 300px;
  margin: 0 -22px 26px;
  padding: 34px 22px 26px;
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.30), rgba(18, 18, 18, 0.35) 62%, var(--panel) 100%),
    var(--panel);
  overflow: hidden;
  transition: background 0.5s ease;
}
.hero-glow {
  position: absolute;
  inset: auto -10% -40% 20%;
  height: 360px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.30), transparent 65%);
  filter: blur(10px);
  pointer-events: none;
}
.hero-art {
  position: relative;
  z-index: 1;
  width: 208px;
  height: 208px;
  flex: none;
  border-radius: 12px;
  background: var(--panel-3);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.hero-art.is-photo .hero-mosaic { display: none; }
.hero-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  height: 100%;
  gap: 2px;
}
.hero-mosaic img { width: 100%; height: 100%; object-fit: cover; }
.hero-mosaic .mosaic-fallback {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.55), var(--panel-3));
}

.hero-copy { position: relative; z-index: 1; min-width: 0; padding-bottom: 4px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero-copy h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.hero-copy .subtitle { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.hero-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; }

.play-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #000;
  font-weight: 800;
  transition: transform 0.12s ease, filter 0.15s ease;
}
.play-pill:hover { transform: scale(1.04); filter: brightness(1.08); }
.play-pill svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }

.ghost-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--text);
  font-weight: 700;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.ghost-pill:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }
.ghost-pill svg { width: 16px; height: 16px; }

/* sections -------------------------------------------------------------- */

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 16px;
}
.section-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.section-meta { color: var(--muted); font-size: 12px; }
.link-btn {
  margin-left: auto;
  padding: 4px 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.link-btn:hover { color: var(--text); text-decoration: underline; }

.cards-section { margin-bottom: 34px; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.artist-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background: var(--panel-2);
  text-align: left;
  transition: background 0.18s ease, transform 0.18s ease;
}
.artist-card:hover { background: var(--panel-3); }
.artist-card:hover .card-art { transform: scale(1.03); }
.card-art {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--panel-4);
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease;
  overflow: hidden;
}
.card-art img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.card-art .art-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.4), var(--panel-4));
  color: rgba(255, 255, 255, 0.7);
  font-size: 26px;
  font-weight: 800;
}
.artist-card .card-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 14px;
}
.artist-card .card-sub { color: var(--muted-2); font-size: 12px; margin-top: -8px; }

.list-head, .song-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1.6fr) minmax(0, 1fr) 64px 36px;
  align-items: center;
  gap: 14px;
}

.list-head {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.list-head .time-head { text-align: right; }

.song-list { padding-top: 6px; }

.song-row {
  position: relative;
  min-height: 56px;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--muted);
  scroll-margin-top: 130px;
  transition: background 0.13s ease;
  cursor: pointer;
}
.song-row:hover { background: var(--panel-3); }
.song-row.is-current { background: rgba(255, 255, 255, 0.055); }
.song-row.is-current .row-title strong { color: var(--accent); }

.row-index {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--muted-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.row-index .num { transition: opacity 0.1s ease; }
.row-index .row-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.1s ease;
}
.row-index .row-play svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.song-row:hover .row-index .num,
.song-row.is-current .row-index .num { opacity: 0; }
.song-row:hover .row-index .row-play,
.song-row.is-current .row-index .row-play { opacity: 1; }

.row-index .bars {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.row-index .bars i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: bottom;
  animation: eq 0.9s ease-in-out infinite;
}
.row-index .bars i:nth-child(2) { animation-delay: -0.3s; height: 60%; }
.row-index .bars i:nth-child(3) { animation-delay: -0.6s; height: 80%; }
.song-row.is-playing .row-index .num,
.song-row.is-playing .row-index .row-play { opacity: 0; }
.song-row.is-playing .row-index .bars { display: flex; }

@keyframes eq {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}

.row-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-art {
  position: relative;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 4px;
  overflow: hidden;
  background: var(--panel-4);
}
.row-art img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.row-art .art-fallback { font-size: 14px; }
.row-text { min-width: 0; }
.row-title strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.row-title small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}
.row-album {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted-2);
  font-size: 12px;
}
.row-time { color: var(--muted-2); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }

.row-like {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--muted-2);
  opacity: 0;
  transition: opacity 0.12s ease, color 0.12s ease, transform 0.12s ease;
}
.row-like svg { width: 17px; height: 17px; }
.song-row:hover .row-like, .row-like.is-liked { opacity: 1; }
.row-like:hover { color: var(--text); transform: scale(1.1); }
.row-like.is-liked { color: var(--accent); }
.row-like.is-liked svg { fill: currentColor; }

.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--panel-3);
  color: var(--muted-2);
  font-size: 28px;
}
.empty h3 { margin: 0 0 6px; color: var(--text); font-size: 18px; }
.empty p { margin: 0; font-size: 13px; }

/* now playing panel ----------------------------------------------------- */

.now-panel {
  display: none;
  flex-direction: column;
  width: var(--now-w);
  min-height: 0;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.22), transparent 42%),
    var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  transition: background 0.5s ease;
}
.now-panel.is-open { display: flex; }

.now-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 10px; }
.now-head .eyebrow { margin: 0; }
.now-head .icon-btn { color: var(--muted); }
.now-head .icon-btn:hover { color: var(--text); }

.now-art {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 16px;
  border-radius: 10px;
  background: var(--panel-3);
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}
.now-art img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }

.art-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.35), var(--panel-4));
  color: rgba(255, 255, 255, 0.65);
}
.art-fallback svg { width: 30px; height: 30px; }
.now-art img:not([src]), .now-art img[src=""] { display: none; }
.now-art img + .art-fallback { display: none; }
.now-art img:not([src]) + .art-fallback,
.now-art img[src=""] + .art-fallback { display: grid; }

.now-track { flex: none; }
.now-track h2 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.now-track p {
  margin: 4px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}
.yt-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.yt-link:hover { color: var(--text); text-decoration: underline; }

.lyrics-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.lyrics-status { letter-spacing: 0.02em; font-weight: 600; text-transform: none; }

.lyrics {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 6px 40px 2px;
  scroll-behavior: smooth;
}
.lyrics-empty { margin: 10px 0; color: var(--muted-2); font-size: 13px; }
.lyric-line {
  margin: 0;
  padding: 7px 8px;
  border-radius: 6px;
  color: var(--muted-2);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
.lyric-line.is-past { opacity: 0.55; }
.lyric-line.is-active {
  color: var(--text);
  opacity: 1;
  transform: translateX(2px);
}
.lyric-line.is-active::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 14px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--accent);
  vertical-align: -2px;
}

/* playbar --------------------------------------------------------------- */

.playbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(300px, 2fr) minmax(160px, 1fr);
  align-items: center;
  gap: 16px;
  height: var(--playbar-h);
  padding: 0 18px;
  background: rgba(0, 0, 0, 0.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.yt-host {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 320px;
  height: 180px;
  opacity: 0;
  pointer-events: none;
}

.pb-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pb-art {
  position: relative;
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 6px;
  background: var(--panel-3);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.pb-art img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.pb-art .art-fallback svg { width: 20px; height: 20px; }
.pb-expand {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.pb-art:hover .pb-expand { opacity: 1; }
.pb-expand svg { width: 20px; height: 20px; color: #fff; }

.pb-meta { min-width: 0; }
.pb-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}
.pb-artist {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.like-btn { color: var(--muted-2); flex: none; }
.like-btn:hover { color: var(--text); }
.like-btn.is-liked { color: var(--accent); }
.like-btn.is-liked svg { fill: currentColor; }

.pb-center { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.controls { display: flex; align-items: center; gap: 16px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.icon-btn.is-active { color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

.play-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  transition: transform 0.12s ease;
}
.play-btn:hover { transform: scale(1.06); }
.play-btn svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }

.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 620px;
  color: var(--muted-2);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(to right, var(--text) 0%, var(--text) var(--p, 0%), rgba(255, 255, 255, 0.16) var(--p, 0%));
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transition: opacity 0.12s ease;
}
input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:focus::-webkit-slider-thumb { opacity: 1; }
input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}
#progress { flex: 1; min-width: 60px; }
#volume { width: 96px; flex: none; }

.pb-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.pb-right .icon-btn { width: 30px; height: 30px; }

/* queue panel ----------------------------------------------------------- */

.queue-panel {
  position: fixed;
  inset: 8px 8px calc(var(--playbar-h) + 8px) auto;
  z-index: 75;
  display: flex;
  flex-direction: column;
  width: min(360px, 92vw);
  padding: 18px 16px;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: translateX(calc(100% + 16px));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.queue-panel.is-open { transform: translateX(0); opacity: 1; pointer-events: auto; }

.queue-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 0 2px 14px; border-bottom: 1px solid var(--line); }
.queue-head h3 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.queue-head .eyebrow { margin-bottom: 4px; }

.queue-list { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 0 20px; }
.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.queue-item:hover { background: var(--panel-2); }
.queue-item.is-current { background: var(--panel-3); }
.queue-item img, .queue-item .q-art {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 4px;
  object-fit: cover;
  background: var(--panel-4);
}
.queue-item .q-info { flex: 1; min-width: 0; }
.queue-item .q-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}
.queue-item.is-current .q-title { color: var(--accent); }
.queue-item .q-artist {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted-2);
  font-size: 11px;
}
.queue-item .q-time { color: var(--muted-2); font-size: 11px; }
.queue-empty { padding: 40px 10px; color: var(--muted); text-align: center; font-size: 13px; }

/* scrim ----------------------------------------------------------------- */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.scrim.is-visible { opacity: 1; pointer-events: auto; }

/* toast ----------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--playbar-h) + 18px);
  z-index: 90;
  max-width: min(520px, 90vw);
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, 14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* responsive ------------------------------------------------------------ */

@media (max-width: 1180px) {
  :root { --sidebar-w: 260px; --now-w: 320px; }
  .hero-art { width: 176px; height: 176px; }
}

@media (max-width: 1000px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    inset: 8px auto 8px 8px;
    z-index: 70;
    width: min(320px, 86vw);
    transform: translateX(calc(-100% - 16px));
    transition: transform 0.22s ease;
    box-shadow: var(--shadow);
  }
  .sidebar.is-open { transform: translateX(0); }
  .menu-btn { display: grid; }
  .now-panel {
    position: fixed;
    inset: 8px 8px calc(var(--playbar-h) + 8px) auto;
    z-index: 70;
    width: min(360px, 90vw);
    box-shadow: var(--shadow);
    transform: translateX(calc(100% + 16px));
    transition: transform 0.22s ease;
  }
  .now-panel.is-open { display: flex; transform: translateX(0); }
  .now-panel.is-open ~ .scrim { opacity: 1; pointer-events: auto; }
  .view { padding: 0 16px 30px; }
  .hero { margin: 0 -16px 22px; padding: 26px 16px 22px; }
  .list-head { top: 66px; }
}

@media (max-width: 720px) {
  :root { --playbar-h: 76px; }
  .topbar { padding: 10px 12px; gap: 8px; }
  .top-actions .pill-btn span:not(.badge) { display: none; }
  .top-actions .pill-btn { padding: 9px 10px; }
  .search-pill { width: 100%; }
  .search-pill kbd { display: none; }
  .hero { flex-direction: column; align-items: flex-start; min-height: 0; gap: 16px; }
  .hero-art { width: 132px; height: 132px; }
  .hero-copy h1 { font-size: 32px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
  .artist-card { padding: 10px; }
  .list-head, .song-row { grid-template-columns: 30px minmax(0, 1fr) 52px 30px; gap: 10px; }
  .album-head, .row-album { display: none; }
  .playbar { grid-template-columns: minmax(0, 1fr) auto; padding: 0 12px; gap: 8px; }
  .pb-center .progress-row { display: none; }
  .pb-center .controls { gap: 8px; }
  .pb-center #shuffle-mini, .pb-center #lyrics-btn { display: none; }
  .pb-right { display: none; }
  .pb-left .like-btn { display: none; }
  .pb-art { width: 46px; height: 46px; }
  .toast { bottom: calc(var(--playbar-h) + 12px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .view, .lyrics { scroll-behavior: auto; }
}
