/* ============================================================
   Echo — premium music UI
   Design tokens
   ============================================================ */
:root {
  --bg: #000;
  --surface: #121212;
  --surface-1: #181818;
  --surface-2: #1f1f1f;
  --surface-hover: #2a2a2a;
  --line: rgba(255, 255, 255, 0.08);
  --text: #fff;
  --text-muted: #a7a7a7;
  --text-dim: #6a6a6a;
  --accent: #1ed760;
  --accent-hot: #1fdf64;
  --accent-glow: rgba(30, 215, 96, 0.35);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.5);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --player-h: 92px;
  --sidebar-w: 280px;
  --queue-w: 340px;
  --easing: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 999px; }
input { font: inherit; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

/* Custom scrollbar */
[hidden] { display: none !important; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.28); border: 2px solid transparent; background-clip: padding-box; }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.14) transparent; }

/* ============================================================
   Layout
   ============================================================ */
#app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: calc(100vh - var(--player-h));
  gap: 8px;
  padding: 8px 8px 0;
  transition: grid-template-columns .35s var(--easing);
}
body.queue-open #app {
  grid-template-columns: var(--sidebar-w) 1fr var(--queue-w);
}

.sidebar {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 12px;
  overflow: hidden;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 12px;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #1ed760, #0d8a3f);
  position: relative; box-shadow: 0 6px 18px var(--accent-glow);
}
.brand-mark::after {
  content:''; position: absolute; inset: 6px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.5), transparent 60%);
  border-radius: 6px;
}
.brand-name { font-weight: 800; letter-spacing: -0.02em; font-size: 18px; }

.nav { display: grid; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-weight: 600; font-size: 14px;
  transition: color .15s var(--easing), background-color .15s var(--easing);
}
.nav-item svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { color: var(--text); }
.nav-item[aria-current="true"] { color: var(--text); background: var(--surface-1); }

.library {
  background: var(--surface);
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
}
.library-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  font-size: 14px; font-weight: 700; color: var(--text-muted);
}
.icon-btn {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 999px;
  color: var(--text-muted);
  transition: color .15s var(--easing), background-color .15s var(--easing), transform .15s var(--easing);
}
.icon-btn:hover { color: var(--text); background: rgba(255,255,255,.08); }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.playlist-list {
  overflow-y: auto;
  padding: 4px 4px 12px;
  display: grid; gap: 2px;
  align-content: start;
  grid-auto-rows: max-content;
}
.playlist-item {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color .15s var(--easing), color .15s var(--easing);
}
.playlist-item:hover { background: var(--surface-1); color: var(--text); }
.playlist-item[aria-current="true"] { color: var(--text); background: var(--surface-1); }
.playlist-cover {
  width: 40px; height: 40px; border-radius: 6px;
  background: linear-gradient(135deg, #232526, #414345);
  display: grid; place-items: center;
  font-size: 16px; color: rgba(255,255,255,.6);
}
.playlist-cover[data-grad="0"] { background: linear-gradient(135deg, #ff8a00, #e52e71); }
.playlist-cover[data-grad="1"] { background: linear-gradient(135deg, #1ed760, #0d8a3f); }
.playlist-cover[data-grad="2"] { background: linear-gradient(135deg, #4f46e5, #06b6d4); }
.playlist-cover[data-grad="3"] { background: linear-gradient(135deg, #f43f5e, #fb923c); }
.playlist-cover[data-grad="4"] { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.playlist-cover[data-grad="5"] { background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.playlist-meta { min-width: 0; }
.playlist-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playlist-sub  { font-size: 12px; color: var(--text-dim); }
.playlist-del {
  opacity: 0; transition: opacity .15s var(--easing);
  width: 26px; height: 26px;
}
.playlist-item:hover .playlist-del { opacity: 1; }

/* ============================================================
   Main
   ============================================================ */
.main {
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    linear-gradient(180deg, var(--theme-tint, rgba(40,40,40,.4)), rgba(0,0,0,0) 280px),
    var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
  position: relative;
  transition: background 1s var(--easing);
}
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 24px;
  position: sticky; top: 0; z-index: 5;
  background: linear-gradient(180deg, rgba(0,0,0,.4), rgba(0,0,0,0));
  backdrop-filter: blur(12px);
}
.nav-arrows { display: flex; gap: 8px; }
.round-btn {
  width: 36px; height: 36px; border-radius: 999px;
  background: rgba(0,0,0,.5); color: #fff;
  display: grid; place-items: center;
  transition: transform .15s var(--easing);
}
.round-btn:hover { transform: scale(1.05); }
.round-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.search-wrap {
  flex: 0 1 480px;
  position: relative; display: flex; align-items: center;
}
.search-wrap svg {
  position: absolute; left: 14px;
  width: 18px; height: 18px; color: var(--text-muted);
  stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round;
}
.search-wrap input {
  width: 100%;
  background: var(--text); color: #000;
  border: 0; border-radius: 999px;
  padding: 12px 16px 12px 44px;
  font-size: 14px; font-weight: 500;
  transition: box-shadow .15s var(--easing);
}
.search-wrap input::placeholder { color: #535353; }
.search-wrap input:focus { outline: 0; box-shadow: 0 0 0 3px var(--accent-glow); }

.topbar-spacer { flex: 1; }
.pill {
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.08); color: var(--text);
  font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background-color .15s var(--easing), transform .15s var(--easing);
}
.pill:hover { background: rgba(255,255,255,.14); }
.pill svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pill.active { color: var(--accent); }

.view { padding: 0 24px 32px; overflow-y: auto; }

/* ============================================================
   Home / hero / sections
   ============================================================ */
.greeting { padding: 8px 0 24px; }
.greeting h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800; letter-spacing: -0.025em;
}

.section { margin: 24px 0 32px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-size: 22px; font-weight: 800; letter-spacing: -0.02em;
}
.section-sub { color: var(--text-muted); font-size: 13px; font-weight: 600; }
.section-link { color: var(--text-muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.section-link:hover { color: var(--text); text-decoration: underline; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  background: var(--surface-1);
  padding: 16px;
  border-radius: var(--radius);
  transition: background-color .25s var(--easing), transform .25s var(--easing);
  cursor: pointer;
  isolation: isolate;
}
.card:hover { background: var(--surface-hover); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card-art {
  position: relative;
  width: 100%; aspect-ratio: 1; border-radius: 8px;
  overflow: hidden; margin-bottom: 14px;
  background: var(--surface-2);
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.card-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-title { font-size: 15px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; margin: 0 0 6px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.card-sub   { font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }

.card-art { position: relative; }
.card-play {
  position: absolute; right: 8px; bottom: 8px;
  width: 48px; height: 48px; border-radius: 999px;
  background: var(--accent); color: #000;
  display: grid; place-items: center;
  box-shadow: 0 8px 16px rgba(0,0,0,.5);
  opacity: 0; transform: translateY(8px);
  transition: opacity .25s var(--easing), transform .25s var(--easing), background-color .15s var(--easing);
}
.card:hover .card-play { opacity: 1; transform: translateY(0); }
.card-play:hover { background: var(--accent-hot); transform: scale(1.06); }
.card-play svg { width: 22px; height: 22px; fill: currentColor; }

/* Featured / hero block on home */
.featured {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.featured-tile {
  position: relative; height: 80px;
  display: flex; align-items: center; gap: 14px;
  background: var(--surface-1);
  border-radius: 8px; overflow: hidden;
  transition: background-color .2s var(--easing);
  cursor: pointer;
  padding-right: 10px;
}
.featured-tile:hover { background: var(--surface-hover); }
.featured-tile .tile-art { width: 80px; height: 80px; flex: 0 0 auto; }
.featured-tile .tile-art img { width: 80px; height: 80px; object-fit: cover; display: block; }
.featured-tile span { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.featured-tile .tile-play {
  width: 40px; height: 40px; border-radius: 999px;
  background: var(--accent); color: #000;
  display: grid; place-items: center;
  margin-right: 10px; flex: 0 0 auto;
  opacity: 0; transform: translateY(8px);
  transition: opacity .25s var(--easing), transform .25s var(--easing), background-color .15s var(--easing);
  box-shadow: 0 8px 16px rgba(0,0,0,.5);
}
.featured-tile:hover .tile-play { opacity: 1; transform: translateY(0); }
.featured-tile .tile-play:hover { background: var(--accent-hot); transform: scale(1.06); }
.featured-tile .tile-play svg { width: 18px; height: 18px; fill: currentColor; }

/* ============================================================
   Track list
   ============================================================ */
.tracklist {
  display: grid;
  gap: 2px;
  margin-top: 12px;
}
.track-head, .track {
  display: grid;
  grid-template-columns: 28px minmax(0, 4fr) minmax(0, 3fr) minmax(0, 1.5fr) 36px 64px;
  align-items: center;
  gap: 16px;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--text-muted);
}
.track-head {
  border-bottom: 1px solid var(--line);
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 6px;
  padding: 0 12px 8px;
  position: sticky; top: 76px; backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(0,0,0,.5), rgba(0,0,0,.2));
  z-index: 2;
}
.track {
  cursor: pointer;
  transition: background-color .12s var(--easing), color .12s var(--easing);
}
.track:hover { background: rgba(255,255,255,.06); color: var(--text); }
.track[aria-current="true"] { color: var(--accent); }
.track[aria-current="true"] .t-title { color: var(--accent); }
.track .t-num { text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; }
.track:hover .t-num.idx { display: none; }
.track .t-num.play { display: none; width: 16px; height: 16px; }
.track:hover .t-num.play { display: inline-block; }
.track[aria-current="true"] .t-num.idx { display: none; }
.track[aria-current="true"] .t-num.bars { display: inline-flex; }
.track .t-num.bars { display: none; gap: 2px; align-items: end; height: 14px; }
.track .t-num.bars span {
  width: 2px; background: var(--accent); border-radius: 1px;
  animation: bar 1s var(--easing) infinite;
}
.track .t-num.bars span:nth-child(2) { animation-delay: .2s; }
.track .t-num.bars span:nth-child(3) { animation-delay: .4s; }
@keyframes bar { 0%,100% { height: 4px; } 50% { height: 12px; } }

.t-title-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.t-art { width: 40px; height: 40px; border-radius: 4px; background: var(--surface-2); flex: 0 0 auto; overflow: hidden; }
.t-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.t-name-wrap { min-width: 0; }
.t-title { color: var(--text); font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-artist { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-album, .t-time { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-time { font-variant-numeric: tabular-nums; text-align: right; }

.t-like { display: flex; align-items: center; justify-content: center; }
.t-like button { opacity: 0; }
.track:hover .t-like button { opacity: 1; }
.track[aria-current="true"] .t-like button { opacity: 1; }

/* ============================================================
   Playlist detail header
   ============================================================ */
.detail-hero {
  display: flex; align-items: end; gap: 24px;
  padding: 24px 0 20px;
  margin-bottom: 16px;
}
.detail-cover {
  width: 232px; height: 232px; border-radius: 6px;
  box-shadow: 0 8px 36px rgba(0,0,0,.6);
  background: linear-gradient(135deg, #1ed760, #0d8a3f);
  flex: 0 0 auto;
  display: grid; place-items: center;
  font-size: 80px; color: rgba(255,255,255,.4);
  overflow: hidden;
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-info .label { font-size: 12px; font-weight: 700; }
.detail-info h1 {
  margin: 8px 0;
  font-size: clamp(36px, 6vw, 88px);
  line-height: 1; letter-spacing: -0.04em; font-weight: 900;
}
.detail-info .sub { color: var(--text-muted); font-size: 14px; }
.detail-info .sub strong { color: var(--text); }

.detail-actions {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 0;
}
.btn {
  padding: 10px 16px; border-radius: 999px;
  font-weight: 700; font-size: 14px;
  transition: transform .12s var(--easing), background-color .12s var(--easing), color .12s var(--easing);
}
.btn.primary {
  background: var(--accent); color: #000;
}
.btn.primary:hover { background: var(--accent-hot); transform: scale(1.03); }
.btn.ghost { background: transparent; color: var(--text-muted); }
.btn.ghost:hover { color: var(--text); }
.big-play {
  width: 56px; height: 56px; border-radius: 999px;
  background: var(--accent); color: #000;
  display: grid; place-items: center;
  box-shadow: 0 8px 16px rgba(0,0,0,.5);
  transition: transform .12s var(--easing), background-color .12s var(--easing);
}
.big-play:hover { background: var(--accent-hot); transform: scale(1.05); }
.big-play svg { width: 26px; height: 26px; fill: currentColor; }

/* ============================================================
   Empty / loading
   ============================================================ */
.empty {
  text-align: center;
  padding: 80px 16px;
  color: var(--text-muted);
}
.empty h3 { color: var(--text); margin: 0 0 8px; font-size: 22px; }
.empty p { margin: 0 0 16px; }

.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 22px; }
.skel {
  background: var(--surface-1);
  border-radius: var(--radius);
  padding: 16px;
}
.skel-art {
  width: 100%; aspect-ratio: 1; border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-2) 0%, #2a2a2a 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  margin-bottom: 14px;
}
.skel-line {
  height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2) 0%, #2a2a2a 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  margin-top: 8px;
}
.skel-line.short { width: 60%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============================================================
   Queue panel
   ============================================================ */
.queue-panel {
  position: fixed; right: 8px; top: 8px;
  width: var(--queue-w);
  height: calc(100vh - var(--player-h) - 8px);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: grid; grid-template-rows: auto auto auto 1fr;
  gap: 12px; overflow: hidden;
  transform: translateX(calc(100% + 16px));
  transition: transform .35s var(--easing);
  z-index: 20;
  box-shadow: var(--shadow-lg);
}
.queue-panel.open { transform: translateX(0); }
.queue-head { display: flex; align-items: center; justify-content: space-between; }
.queue-head h3 { margin: 0; font-size: 16px; font-weight: 800; }
.queue-head .icon-btn {
  width: auto; height: 30px; padding: 0 12px; border-radius: 999px;
  background: rgba(255,255,255,.06); font-size: 12px; font-weight: 700;
}
.queue-section-title { color: var(--text-muted); font-size: 13px; font-weight: 700; padding: 6px 4px 0; }
.queue-section { display: grid; gap: 6px; }
.queue-list { overflow-y: auto; display: grid; gap: 6px; padding: 4px; }
.queue-item {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: 6px; cursor: pointer;
  transition: background-color .12s var(--easing);
}
.queue-item:hover { background: var(--surface-1); }
.queue-item .t-art { width: 40px; height: 40px; }
.queue-item .meta { min-width: 0; }
.queue-item .name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-item .by { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-item .remove { width: 26px; height: 26px; opacity: 0; transition: opacity .12s var(--easing); }
.queue-item:hover .remove { opacity: 1; }
.queue-item.now { background: rgba(30, 215, 96, 0.08); }
.queue-item.now .name { color: var(--accent); }

/* ============================================================
   Player
   ============================================================ */
.player {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: var(--player-h);
  background: #000;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 30% 1fr 30%; align-items: center;
  padding: 0 16px;
  z-index: 30;
}
.player-track { display: flex; align-items: center; gap: 14px; min-width: 0; }
.player-art {
  width: 56px; height: 56px; border-radius: 4px; flex: 0 0 auto;
  background: var(--surface-1) center/cover no-repeat;
  box-shadow: 0 6px 14px rgba(0,0,0,.5);
}
.player-meta { min-width: 0; }
.player-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-artist { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.like-btn { color: var(--text-muted); }
.like-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linejoin: round; }
.like-btn.active { color: var(--accent); }
.like-btn.active svg { fill: var(--accent); }

.player-center { display: grid; grid-template-rows: auto auto; gap: 6px; padding: 0 12px; }
.player-controls { display: flex; align-items: center; justify-content: center; gap: 16px; }
.player-controls .icon-btn { color: var(--text-muted); }
.player-controls .icon-btn:hover { color: var(--text); transform: scale(1.06); background: transparent; }
.player-controls .icon-btn.active { color: var(--accent); }
.player-controls .icon-btn.active::after {
  content: ''; position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 999px; background: var(--accent);
}
.player-controls .icon-btn { position: relative; }
.play-btn {
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--text); color: #000;
  display: grid; place-items: center;
  transition: transform .12s var(--easing), background-color .12s var(--easing);
}
.play-btn:hover { transform: scale(1.06); }
.play-btn svg { width: 18px; height: 18px; fill: currentColor; }

.player-progress {
  display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 10px;
  font-variant-numeric: tabular-nums;
}
.t { font-size: 11px; color: var(--text-muted); }
.t#t-current { text-align: right; }

.progress, .volume { padding: 6px 0; cursor: pointer; }
.progress-track {
  position: relative;
  width: 100%; height: 4px;
  background: rgba(255,255,255,.12);
  border-radius: 2px;
  transition: height .12s var(--easing);
}
.progress:hover .progress-track,
.volume:hover .progress-track { height: 6px; }
.progress-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--text);
  border-radius: 2px;
  width: 0%;
  transition: background-color .15s var(--easing);
}
.progress:hover .progress-fill,
.volume:hover .progress-fill { background: var(--accent); }
.progress-thumb {
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 999px; background: #fff;
  top: 50%; transform: translate(-50%, -50%); left: 0%;
  opacity: 0;
  transition: opacity .15s var(--easing);
}
.progress:hover .progress-thumb,
.volume:hover .progress-thumb { opacity: 1; }

.player-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.volume { width: 100px; }

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--player-h) + 16px);
  transform: translateX(-50%) translateY(20px);
  background: #fff; color: #000;
  padding: 10px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--easing), transform .25s var(--easing);
  z-index: 50;
}
.toast.show {
  opacity: 1; transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ============================================================
   Modal
   ============================================================ */
.modal {
  border: 0; padding: 0; background: transparent;
  color: var(--text);
}
.modal::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(4px); }
.modal-card {
  width: min(440px, 92vw);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: grid; gap: 16px;
}
.modal-card h3 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.modal-card input {
  width: 100%; padding: 12px 14px; border-radius: 6px;
  background: var(--surface-1); border: 1px solid var(--line); color: var(--text);
  font-size: 15px;
}
.modal-card input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ============================================================
   Context menu
   ============================================================ */
.menu {
  position: fixed; z-index: 100;
  background: #282828;
  border-radius: 6px;
  padding: 4px;
  min-width: 220px;
  box-shadow: 0 16px 36px rgba(0,0,0,.5);
  font-size: 14px;
}
.menu-item {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 4px;
  color: var(--text);
  white-space: nowrap;
}
.menu-item:hover { background: rgba(255,255,255,.08); }
.menu-sep { height: 1px; background: var(--line); margin: 4px 0; }
.menu-sub { color: var(--text-muted); font-size: 12px; padding: 8px 12px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  :root { --sidebar-w: 80px; }
  .brand-name, .nav-item span, .library, .playlist-meta { display: none; }
  .nav-item { justify-content: center; }
  .player { grid-template-columns: 1fr 1fr; padding: 0 12px; }
  .player-right { display: none; }
  .queue-panel { width: 92vw; }
  .detail-cover { width: 160px; height: 160px; }
  .track-head, .track { grid-template-columns: 24px 1fr 60px; }
  .track .t-album { display: none; }
}
