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

:root {
  --white: #ffffff;
  --w80:   rgba(255,255,255,0.80);
  --w55:   rgba(255,255,255,0.55);
  --w35:   rgba(255,255,255,0.35);
  --w18:   rgba(255,255,255,0.18);
  --w10:   rgba(255,255,255,0.10);
  --w07:   rgba(255,255,255,0.07);
  --w04:   rgba(255,255,255,0.04);
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── DYNAMIC BLURRED BACKGROUND ── */
.scene-bg {
  position: fixed;
  inset: -80px;
  z-index: 0;
  background: #0f0f12;
  transition: background 1.4s ease;
}

.scene-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(90px) saturate(1.8) brightness(0.45);
  transition: opacity 1.2s ease;
  opacity: 0;
}

.scene-layer.visible {
  opacity: 1;
}

.scene-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.38);
}

/* ── PLAYER SHELL ── */
.player {
  position: relative;
  z-index: 1;
  display: flex;
  width: 860px;
  height: 540px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.09),
    0 24px 64px rgba(0,0,0,0.65),
    0 4px 16px rgba(0,0,0,0.40);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: rgba(20,20,24,0.88);
  backdrop-filter: blur(48px) saturate(2);
  -webkit-backdrop-filter: blur(48px) saturate(2);
  border-right: 0.5px solid rgba(255,255,255,0.08);
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px 16px;
  border-bottom: 0.5px solid rgba(255,255,255,0.06);
}

.app-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.82);
  letter-spacing: -0.02em;
}

.track-count-badge {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.30);
  background: rgba(255,255,255,0.07);
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.list-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

.list-scroll::-webkit-scrollbar { width: 0; }

/* ── Track Row ── */
.t-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 14px;
  margin: 0 6px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.14s;
  user-select: none;
}

.t-row:hover  { background: rgba(255,255,255,0.06); }
.t-row.active { background: rgba(255,255,255,0.09); }

/* Thumbnail */
.t-thumb {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Animated equalizer bars */
.live-bars {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: rgba(0,0,0,0.42);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.t-row.active.playing .live-bars {
  display: flex;
}

.lb {
  width: 3px;
  background: #fff;
  border-radius: 2px;
  animation: lbBounce 0.65s ease-in-out infinite alternate;
}

.lb:nth-child(1) { height: 5px;  animation-delay: 0.00s; }
.lb:nth-child(2) { height: 9px;  animation-delay: 0.10s; }
.lb:nth-child(3) { height: 6px;  animation-delay: 0.20s; }

@keyframes lbBounce {
  to { height: 16px; }
}

/* Track text */
.t-info { flex: 1; min-width: 0; }

.t-name {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.86);
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.t-row.active .t-name { color: #fff; font-weight: 600; }

.t-artist {
  font-size: 11px;
  color: rgba(255,255,255,0.32);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.t-dur {
  font-size: 10.5px;
  color: rgba(255,255,255,0.25);
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

/* ============================================================
   MAIN PANEL
   ============================================================ */
.main-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(14,14,17,0.55);
  backdrop-filter: blur(64px) saturate(1.7);
  -webkit-backdrop-filter: blur(64px) saturate(1.7);
}

/* Now playing area */
.np-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 48px 20px;
}

/* ── Album Art ── */
.art-shell {
  width: 192px;
  height: 192px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.08),
    0 18px 50px rgba(0,0,0,0.65),
    0 4px 14px rgba(0,0,0,0.40);
  transition:
    transform  0.35s cubic-bezier(0.34,1.56,0.64,1),
    box-shadow 0.35s ease;
}

.art-shell.playing {
  transform: scale(1.045);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.10),
    0 26px 70px rgba(0,0,0,0.70),
    0 8px 24px rgba(0,0,0,0.50);
}

.art-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.9s ease;
}

/* ── Song Info Strip ── */
.info-strip {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  margin-top: 22px;
  gap: 8px;
}

.info-left { flex: 1; min-width: 0; }

.song-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-by {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.45);
  letter-spacing: -0.01em;
  margin-top: 4px;
}

/* Like button */
.btn-like {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.30);
  padding: 4px;
  border-radius: 50%;
  display: flex;
  transition: color 0.18s, transform 0.15s;
  flex-shrink: 0;
  margin-top: 2px;
}

.btn-like:hover  { color: rgba(255,255,255,0.65); }
.btn-like.liked  { color: #ff375f; }
.btn-like:active { transform: scale(1.25); }

/* ============================================================
   CONTROLS STRIP
   ============================================================ */
.ctrl-strip {
  padding: 0 48px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Progress Bar ── */
.prog-block { display: flex; flex-direction: column; gap: 5px; }

.prog-rail {
  height: 4px;
  border-radius: 20px;
  background: rgba(255,255,255,0.14);
  position: relative;
  cursor: pointer;
  transition: height 0.14s;
}

.prog-rail:hover { height: 6px; }

.prog-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: rgba(255,255,255,0.90);
  border-radius: 20px;
  width: 0%;
  pointer-events: none;
  transition: width 0.1s linear;
}

.prog-knob {
  position: absolute;
  top: 50%; right: 0;
  transform: translate(50%, -50%);
  width: 13px; height: 13px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 1px 5px rgba(0,0,0,0.5);
  transition: opacity 0.14s;
}

.prog-rail:hover .prog-knob { opacity: 1; }

.prog-times { display: flex; justify-content: space-between; }

.prog-time {
  font-size: 10.5px;
  color: rgba(255,255,255,0.30);
  letter-spacing: 0.03em;
}

/* ── Playback Buttons ── */
.btns-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.ic-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.50);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border-radius: 50%;
  transition: color 0.15s, transform 0.12s;
}

.ic-btn:hover  { color: rgba(255,255,255,0.88); }
.ic-btn:active { transform: scale(0.88); }
.ic-btn.on     { color: rgba(255,255,255,0.90); }

.ic-btn-nav {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.78);
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 50%;
  transition: color 0.14s, transform 0.12s;
}

.ic-btn-nav:hover  { color: #fff; }
.ic-btn-nav:active { transform: scale(0.88); }

.play-btn {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  transition:
    transform  0.20s cubic-bezier(0.34,1.56,0.64,1),
    background 0.14s;
  box-shadow: 0 4px 24px rgba(0,0,0,0.45);
}

.play-btn:hover  { transform: scale(1.07); background: rgba(255,255,255,0.93); }
.play-btn:active { transform: scale(0.94); }

/* ── Volume Row ── */
.vol-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.vol-ic { color: rgba(255,255,255,0.30); flex-shrink: 0; }

.vol-rail {
  flex: 1;
  height: 3px;
  border-radius: 20px;
  background: rgba(255,255,255,0.14);
  position: relative;
  cursor: pointer;
  transition: height 0.14s;
}

.vol-rail:hover { height: 5px; }

.vol-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: rgba(255,255,255,0.50);
  border-radius: 20px;
  pointer-events: none;
}

.vol-rail:hover .vol-fill { background: rgba(255,255,255,0.70); }

/* ── Autoplay Toggle ── */
.ap-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  padding: 5px 11px;
  border-radius: 20px;
  border: 0.5px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  transition: background 0.16s, border-color 0.16s;
  user-select: none;
  flex-shrink: 0;
}

.ap-toggle:hover { background: rgba(255,255,255,0.09); }

.ap-toggle.on {
  background: rgba(255,255,255,0.11);
  border-color: rgba(255,255,255,0.18);
}

.sw {
  width: 28px; height: 16px;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  position: relative;
  transition: background 0.18s;
}

.sw::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.40);
  transition:
    transform  0.20s cubic-bezier(0.34,1.56,0.64,1),
    background 0.18s;
}

.ap-toggle.on .sw { background: rgba(255,255,255,0.32); }
.ap-toggle.on .sw::after { transform: translateX(12px); background: #fff; }

.ap-text {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.02em;
}

.ap-toggle.on .ap-text { color: rgba(255,255,255,0.70); }