/* ─────────────────────────────────────────────────────────────────────────────
   SoundLink — single green accent theme
   Spotify-style green (#1DB954) on dark, streaming-style backgrounds
   (#000 / #121212). One color everywhere.
   ────────────────────────────────────────────────────────────────────────── */
:root {
  --bg: #000000;
  --surface: #121212;
  --surfaceHigh: #1c1c1e;
  --card: #181818;
  --green: #1DB954;        /* Spotify green */
  --greenBright: #1ed760;  /* Spotify bright green */
  --greenDark: #128a3e;
  --white: #FAFAFA;
  --muted: #8a8a8a;
  --mutedLight: #b3b3b3;
  --border: rgba(255,255,255,0.08);
  --borderBright: rgba(255,255,255,0.14);

  /* Back-compat aliases so the rest of the CSS keeps working */
  --pink: var(--green);
  --purple: var(--green);
  --cyan: var(--green);
  --yellow: var(--greenBright);
  --orange: var(--greenBright);
  --red: var(--green);
  --redDark: var(--greenDark);

  /* Single-color green accents */
  --blend: linear-gradient(90deg, var(--green) 0%, var(--greenBright) 100%);
  --blend-soft: linear-gradient(135deg, var(--green) 0%, var(--greenBright) 100%);
  --rainbow: var(--blend);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { margin: 0; color: var(--white); background: var(--bg); font-family: 'DM Sans', sans-serif; -webkit-font-smoothing: antialiased; }
button { cursor: pointer; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 99px; }

@keyframes pulse-glow { 0%,100% { opacity: 0.6; } 50% { opacity: 1; } }
@keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.app-shell { display: flex; min-height: 100vh; }

/* ─────────────────────────── Sidebar ─────────────────────────── */
.sidebar {
  width: 220px; background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 80;
  flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; padding: 26px 22px 18px; border-bottom: 1px solid var(--border); font-family: 'Unbounded', sans-serif; font-weight: 900; font-size: 14px; letter-spacing: -0.02em; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; background: var(--card); flex-shrink: 0; }
.sidebar nav { padding: 16px 12px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border-radius: 10px; border: none; background: transparent; color: var(--muted); font-family: 'DM Sans', sans-serif; font-weight: 500; font-size: 13px; text-align: left; margin-bottom: 2px; transition: all 0.15s; border-left: 3px solid transparent; text-decoration: none; }
.nav-ico { width: 17px; text-align: center; color: var(--muted); font-size: 15px; }
.nav-item.active, .nav-item:hover { background: rgba(29,185,84,0.08); color: var(--pink); border-left: 3px solid var(--pink); }
.nav-item.active .nav-ico, .nav-item:hover .nav-ico { color: var(--pink); }
.sidebar-playlists { padding: 0 12px; }
.eyebrow { font: 700 9px 'Unbounded', monospace; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; margin: 0 0 10px; }
.playlist-list { display: grid; gap: 4px; margin-bottom: 8px; max-height: 180px; overflow: auto; }
.playlist-chip { width: 100%; text-align: left; background: transparent; border: none; color: var(--muted); padding: 9px 14px; border-radius: 8px; font: 500 12.5px 'DM Sans'; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: color 0.15s, background 0.15s; }
.playlist-chip:hover { color: var(--white); background: rgba(255,255,255,0.04); }
.playlist-chip.active { color: var(--pink); background: rgba(29,185,84,0.08); }
.playlist-chip .pl-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--pink); flex-shrink: 0; }
.playlist-chip .pl-count { margin-left: auto; font: 700 9px 'Unbounded'; opacity: 0.7; color: var(--muted); }
.playlist-empty-hint { color: var(--muted); font-size: 11px; margin: 0 4px 8px; line-height: 1.5; }
.user-card { margin-top: auto; padding: 14px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--purple), var(--pink)); display: grid; place-items: center; font-family: 'Unbounded', sans-serif; font-weight: 900; font-size: 12px; color: var(--white); flex-shrink: 0; }
.user-name { font-size: 12px; font-weight: 700; color: var(--white); }
.user-plan { font-size: 10px; color: var(--muted); }
.yt-signin-btn { width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--rainbow); color: var(--bg); font-size: 14px; font-weight: 700; cursor: pointer; margin-left: auto; display: grid; place-items: center; flex-shrink: 0; transition: transform 0.15s; }
.yt-signin-btn:hover { transform: scale(1.05); }
.yt-signout-btn { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--borderBright); background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; margin-left: auto; display: grid; place-items: center; flex-shrink: 0; transition: color 0.15s, border-color 0.15s; }
.yt-signout-btn:hover { color: var(--white); border-color: var(--muted); }

/* ─────────────────────────── Main area ─────────────────────────── */
.main-area { margin-left: 220px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }

/* Topbar */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(0,0,0,0.93); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); padding: 14px 36px; display: flex; align-items: center; gap: 20px; }
.topbar-greeting { flex-shrink: 0; }
.topbar-greeting .eyebrow { margin: 0; }
.topbar-search { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--borderBright); border-radius: 99px; padding: 10px 18px; }
.search-ico { color: var(--muted); font-size: 15px; }
.topbar-search input { flex: 1; background: none; border: none; outline: none; font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--white); }
.topbar-search input::placeholder { color: var(--muted); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.upgrade-btn { padding: 8px 18px; border-radius: 99px; background: var(--rainbow); border: none; font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 10px; color: var(--bg); letter-spacing: 0.08em; box-shadow: 0 0 20px rgba(29,185,84,0.33); }
.bell-btn { background: none; border: none; padding: 6px; font-size: 16px; color: var(--muted); }
.profile { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--purple), var(--pink)); display: grid; place-items: center; font-family: 'Unbounded', sans-serif; font-weight: 900; font-size: 12px; color: var(--white); cursor: pointer; flex-shrink: 0; }
.mobile-menu { display: none; }

/* Content */
.content { flex: 1; overflow-y: auto; padding: 36px 36px 120px; max-width: 1250px; width: 100%; margin: auto; }

/* ─────────────────────────── Hero ─────────────────────────── */
.hero { position: relative; overflow: hidden; border-radius: 24px; background: linear-gradient(135deg, #0a0000 0%, #1a000a 40%, #001a08 100%); border: 1px solid var(--border); padding: 48px 40px; margin-bottom: 48px; }
.hero-rainbow { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--rainbow); }
.hero-glow { position: absolute; right: 8%; top: 10%; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(29,185,84,0.25) 0%, rgba(29,185,84,0.12) 40%, transparent 70%); filter: blur(40px); animation: pulse-glow 4s ease-in-out infinite; }
.hero-glow.glow-b { right: 20%; bottom: -10%; top: auto; width: 200px; height: 200px; background: radial-gradient(circle, rgba(29,185,84,0.18) 0%, transparent 70%); filter: blur(30px); }
.hero-glow.glow-c { left: 35%; top: 20%; width: 120px; height: 120px; background: radial-gradient(circle, rgba(30,215,96,0.15) 0%, transparent 70%); filter: blur(20px); }
.hero-copy { position: relative; z-index: 1; max-width: 560px; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(29,185,84,0.12); border: 1px solid rgba(29,185,84,0.25); border-radius: 99px; padding: 5px 14px; margin-bottom: 20px; font: 700 9px 'Unbounded', sans-serif; color: var(--pink); letter-spacing: 0.2em; }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pink); animation: pulse-glow 1.5s infinite; }
h2.hero-title, .hero h2 { font-family: 'Unbounded', sans-serif; font-weight: 900; font-size: 48px; line-height: 1.05; color: var(--white); letter-spacing: -0.03em; margin-bottom: 16px; }
.hero h2 em { font-style: normal; background: var(--rainbow); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-copy > p:last-of-type { font-size: 15px; color: var(--mutedLight); line-height: 1.6; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; }
.hero-play { display: flex; align-items: center; gap: 10px; padding: 13px 26px; border-radius: 99px; border: none; background: var(--rainbow); font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 11px; color: var(--bg); letter-spacing: 0.08em; box-shadow: 0 0 32px rgba(29,185,84,0.4); transition: transform 0.1s; }
.hero-play:hover { transform: translateY(-1px); }
.hero-explore { display: flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 99px; background: transparent; border: 1px solid var(--borderBright); font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 13px; color: var(--mutedLight); }
.hero-art { position: absolute; z-index: 1; right: 6%; top: 18%; display: flex; flex-direction: column; gap: 12px; }
.art-card { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(20px); border-radius: 99px; padding: 8px 14px 8px 8px; }
.art-card.tc1 { transform: rotate(-3deg); }
.art-card.tc2 { transform: rotate(2deg); margin-left: 30px; }
.art-card.tc3 { transform: rotate(-1deg); }
.art-note { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--rainbow); color: var(--bg); font-size: 12px; flex-shrink: 0; }
.art-card b { display: block; font-size: 11px; color: var(--white); white-space: nowrap; }
.art-card small { font-size: 10px; color: var(--muted); }

/* ─────────────────────────── Search strip ─────────────────────────── */
.search-strip { margin-bottom: 58px; }
.add-card, .api-card { border: 1px solid var(--border); background: var(--card); min-height: 92px; border-radius: var(--radius); padding: 16px 18px; display: flex; align-items: center; gap: 14px; box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.add-card { transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.add-card:focus-within { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(29,185,84,0.14), 0 8px 30px rgba(0,0,0,0.3); }
.add-icon { color: var(--bg); background: var(--rainbow); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-size: 15px; box-shadow: 0 6px 14px rgba(29,185,84,0.35); flex-shrink: 0; }
.add-text { display: grid; min-width: 0; }
.add-text strong, .api-card strong { font-size: 12.5px; }
.add-text span, .api-card small { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

/* ─────────────────────────── Section headings ─────────────────────────── */
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 17px; gap: 12px; }
.section-heading h3 { margin: 0; font-size: 20px; letter-spacing: -1px; font-family: 'Unbounded', sans-serif; font-weight: 900; }
.section-heading .count-chip { background: var(--pink); color: var(--bg); font: 700 9px 'Unbounded', sans-serif; padding: 7px 10px; border-radius: 5px; letter-spacing: 0.5px; }
.see-all { cursor: pointer; font: 500 9px 'Unbounded', sans-serif; color: var(--muted); letter-spacing: 0.08em; }

/* ─────────────────────────── Library & results ─────────────────────────── */
.library, .results-section, .discover-section, .playlist-view, .sync-page { margin-top: 62px; }
.text-button { background: none; color: var(--pink); border: 0; font: 700 11px 'DM Sans', sans-serif; cursor: pointer; }
.text-button.danger { color: var(--greenBright); }
.queue-header, .queue li { display: grid; grid-template-columns: 40px 1fr 120px 45px; align-items: center; }
.queue-header { padding: 0 14px 8px; color: var(--muted); font: 500 9px 'Unbounded', sans-serif; letter-spacing: 1px; }
.queue { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); }
.queue li { min-height: 68px; padding: 8px 14px; border-bottom: 1px solid var(--border); transition: background 0.18s; position: relative; }
.queue li:hover { background: var(--surfaceHigh); }
.queue li > span:first-child { color: var(--muted); font: 10px 'Unbounded', sans-serif; }
.queue strong { display: block; font-size: 12.5px; }
.queue small { color: var(--muted); font-size: 10.5px; }
.source-label { color: var(--green); font: 10px 'Unbounded', sans-serif; background: rgba(29,185,84,0.1); border: 1px solid rgba(29,185,84,0.25); padding: 4px 8px; border-radius: 5px; width: fit-content; }
.source-label.yt { background: rgba(29,185,84,0.1); color: var(--red); border-color: rgba(29,185,84,0.25); }
.play-button { border: 0; color: var(--bg); background: var(--rainbow); height: 34px; width: 34px; border-radius: 50%; cursor: pointer; font-size: 12px; transition: all 0.2s; }
.play-button:hover { transform: scale(1.12); box-shadow: 0 6px 14px rgba(29,185,84,0.4); }
.empty-state { padding: 28px; color: var(--muted); border-top: 1px solid var(--border); font-size: 13px; }

/* Library playlist grid */
.playlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.playlist-card { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; cursor: pointer; transition: all 0.2s; color: var(--white); }
.playlist-card:hover { transform: translateY(-3px); border-color: var(--pink); box-shadow: 0 12px 30px rgba(0,0,0,0.4); }
.playlist-card.active { border-color: var(--pink); background: rgba(29,185,84,0.08); }
.pl-cover { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; background: var(--rainbow); color: var(--bg); font-size: 18px; flex-shrink: 0; }
.pl-info { min-width: 0; }
.pl-info strong { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-info small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }

/* Playlist view */
.playlist-view .queue li, .playlist-view .queue-header { grid-template-columns: 40px 1fr 120px 45px 34px; }
.remove-btn { border: 0; background: var(--surfaceHigh); color: var(--greenBright); height: 28px; width: 28px; border-radius: 50%; cursor: pointer; font-size: 12px; transition: all 0.2s; }
.remove-btn:hover { background: var(--greenBright); color: var(--bg); }

/* Results & discover columns */
.results-section .queue li, .discover-section .queue li { grid-template-columns: 56px 1fr 120px 45px 34px; min-height: 78px; gap: 12px; }
.results-section .queue-header, .discover-section .queue-header { grid-template-columns: 56px 1fr 120px 45px 34px; gap: 12px; }
.thumb { position: relative; width: 64px; height: 40px; border-radius: 7px; overflow: hidden; flex-shrink: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .dur { position: absolute; right: 3px; bottom: 3px; background: rgba(0,0,0,0.78); color: #fff; font: 600 8px 'Unbounded', sans-serif; padding: 2px 4px; border-radius: 3px; letter-spacing: 0.3px; }
.res-title { min-width: 0; }
.res-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-title small { display: block; }
.add-to-playlist-btn { border: 0; background: var(--surfaceHigh); color: var(--cyan); height: 28px; width: 28px; border-radius: 50%; cursor: pointer; font-size: 15px; font-weight: 700; transition: all 0.2s; }
.add-to-playlist-btn:hover { background: var(--cyan); color: var(--bg); transform: scale(1.12); }
.add-hint { color: var(--muted); font-size: 11px; margin: 10px 2px 0; }

/* now playing equalizer */
.queue li.now-playing { background: rgba(29,185,84,0.08); box-shadow: inset 3px 0 0 var(--pink); }
.queue li.now-playing strong { color: var(--cyan); }
.eq { display: none; align-items: flex-end; gap: 2px; height: 14px; position: absolute; right: 52px; top: 50%; transform: translateY(-50%); }
.queue li.now-playing .eq { display: flex; }
.eq i { width: 3px; background: var(--pink); border-radius: 2px; animation: prefix-eqbounce 1s ease-in-out infinite; }
.eq i:nth-child(1) { height: 6px; animation-delay: 0s; }
.eq i:nth-child(2) { height: 14px; animation-delay: 0.25s; }
.eq i:nth-child(3) { height: 9px; animation-delay: 0.5s; }
@keyframes prefix-eqbounce { 0%,100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }
.results-section .queue li.now-playing, .discover-section .queue li.now-playing, .playlist-view .queue li.now-playing { padding-right: 52px; }

/* Sync page */
.sync-grid { display: grid; gap: 15px; }
.api-card.big { min-height: 96px; width: 100%; text-align: left; color: var(--white); cursor: pointer; transition: all 0.2s; }
.api-card.big:hover { border-color: var(--purple); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,0.4); }
.yt-icon { background: linear-gradient(135deg, #FF0000, #CC0000) !important; color: #fff !important; }
.spotify-icon { background: linear-gradient(135deg, #1DB954, #1ed760) !important; color: #fff !important; }
.boomplay-icon { background: linear-gradient(135deg, #0033A0, #0050C8) !important; color: #fff !important; }
.sync-status { padding: 16px; color: var(--mutedLight); font-size: 13px; margin-top: 16px; }

/* Source labels in track lists */
.source-label.youtube { background: rgba(255,0,0,0.10); color: #FF4444; border-color: rgba(255,0,0,0.25); }
.source-label.spotify { background: rgba(29,185,84,0.10); color: #1ed760; border-color: rgba(29,185,84,0.25); }
.source-label.boomplay { background: rgba(0,80,200,0.12); color: #5aa0ff; border-color: rgba(0,80,200,0.3); }

/* Thumbnail fallback for non-YouTube sources without artwork */
.thumb-fallback {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  background: var(--surfaceHigh);
  color: var(--muted);
  font-size: 18px;
}

/* Search source selector */
.search-source {
  background: var(--surfaceHigh);
  border: 1px solid var(--borderBright);
  color: var(--white);
  border-radius: 99px;
  padding: 4px 10px;
  font: 600 11px 'DM Sans', sans-serif;
  cursor: pointer;
  outline: none;
}
.search-source:focus { border-color: var(--green); }
.search-source option { background: var(--surface); color: var(--white); }
.sync-setup-guide { padding: 24px; margin-top: 24px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.sync-setup-guide h4 { font-family: 'Unbounded', sans-serif; font-size: 16px; margin-bottom: 16px; color: var(--white); }
.sync-setup-guide ol { padding-left: 20px; color: var(--mutedLight); font-size: 13px; line-height: 1.8; }
.sync-setup-guide li { margin-bottom: 8px; }
.sync-setup-guide a { color: var(--green); text-decoration: none; }
.sync-setup-guide a:hover { text-decoration: underline; }
.sync-setup-guide code { background: var(--surfaceHigh); padding: 2px 6px; border-radius: 4px; font-size: 11px; color: var(--greenBright); }
.setup-note { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.sync-icon { font-size: 25px; color: var(--cyan); }
.api-card > span:nth-child(2) { display: grid; }
.arrow { margin-left: auto; color: var(--cyan); font-size: 18px; transition: transform 0.2s; }
.api-card.big:hover .arrow { transform: translateX(4px); }

/* ─────────────────────────── Persistent player ─────────────────────────── */
.persistent-player { position: fixed; bottom: 0; left: 220px; right: 0; z-index: 50; background: rgba(10,8,8,0.97); backdrop-filter: blur(24px); border-top: 1px solid var(--border); display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 18px; padding: 12px 28px; min-height: 72px; }
.pp-rainbow { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--rainbow); }
.pp-art { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--rainbow); color: var(--bg); font-size: 18px; flex-shrink: 0; }
.pp-art.spinning { animation: spin-slow 3s linear infinite; }
.pp-info { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.pp-info strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-info span { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-hidden-btns { display: flex; gap: 8px; margin-top: 6px; }
.pp-controls { display: flex; align-items: center; gap: 8px; }
.pp-progress { display: flex; align-items: center; gap: 8px; min-width: 220px; }
.pp-progress .progress { flex: 1; }
.persistent-player .ctl { height: 36px; width: 36px; font-size: 12px; }
.persistent-player .ctl-main { height: 44px; width: 44px; font-size: 14px; }
main.content { padding-bottom: 130px; }

/* Player controls */
.ctl { border: 0; background: var(--surfaceHigh); color: var(--cyan); height: 42px; width: 42px; border-radius: 50%; cursor: pointer; font-size: 14px; display: grid; place-items: center; transition: all 0.2s; }
.ctl:hover { background: var(--cyan); color: var(--bg); transform: translateY(-2px); }
.ctl-main { background: var(--rainbow); color: var(--bg); height: 44px; width: 44px; font-size: 16px; box-shadow: 0 10px 22px rgba(29,185,84,0.4); }
.ctl-main:hover { transform: translateY(-2px) scale(1.05); }
.ctl-main.paused { background: var(--cyan); color: var(--bg); }
.ctl.stop { background: var(--greenDark); color: #fff; }

/* Progress bar */
.progress-wrap { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.time { font: 500 10px 'Unbounded', sans-serif; color: var(--muted); min-width: 34px; }
.time:last-child { text-align: right; }
.progress { -webkit-appearance: none; appearance: none; flex: 1; height: 5px; border-radius: 5px; background: linear-gradient(to right, var(--pink) var(--prog, 0%), var(--border) var(--prog, 0%)); outline: none; cursor: pointer; }
.progress::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 2px solid var(--pink); box-shadow: 0 1px 4px rgba(0,0,0,0.4); cursor: pointer; }
.progress::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 2px solid var(--pink); cursor: pointer; }

/* ─────────────────────────── Page switching ─────────────────────────── */
.page[hidden] { display: none; }

/* ─────────────────────────── New Releases & Trending ─────────────────────────── */
.home-row { margin-bottom: 62px; }
.home-row .section-heading { align-items: center; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.music-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; }
.music-card:hover { transform: translateY(-4px); border-color: var(--pink); box-shadow: 0 14px 30px rgba(0,0,0,0.4); }
.mc-cover { position: relative; width: 100%; aspect-ratio: 1.6 / 1; overflow: hidden; }
.mc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mc-dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,0.78); color: #fff; font: 600 9px 'Unbounded', sans-serif; padding: 3px 6px; border-radius: 4px; letter-spacing: 0.3px; }
.mc-play, .mc-add { position: absolute; border: 0; border-radius: 50%; width: 34px; height: 34px; font-size: 13px; cursor: pointer; display: grid; place-items: center; transition: all 0.2s; opacity: 0; transform: translateY(4px); }
.mc-play { right: 8px; top: 8px; background: var(--rainbow); color: var(--bg); box-shadow: 0 6px 14px rgba(29,185,84,0.4); }
.mc-add { right: 8px; bottom: 8px; background: var(--surfaceHigh); color: var(--cyan); border: 1px solid rgba(29,185,84,0.3); }
.music-card:hover .mc-play, .music-card:hover .mc-add { opacity: 1; transform: translateY(0); }
.mc-play:hover { transform: scale(1.1); }
.mc-add:hover { background: var(--cyan); color: var(--bg); }
.mc-info { padding: 12px 14px 14px; }
.mc-title { display: block; font-size: 12.5px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-artist { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) {
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
}

/* ─────────────────────────── Modal ─────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: grid; place-items: center; z-index: 60; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; width: 320px; max-width: 90vw; box-shadow: 0 20px 50px rgba(0,0,0,0.4); }
.modal h4 { margin: 0 0 14px; font-size: 16px; letter-spacing: -0.5px; font-family: 'Unbounded', sans-serif; }
.modal-option { width: 100%; text-align: left; background: var(--surfaceHigh); border: 1px solid var(--border); color: var(--white); padding: 11px 13px; border-radius: 9px; font: 700 12px 'DM Sans', sans-serif; cursor: pointer; margin-bottom: 8px; transition: all 0.18s; }
.modal-option:hover { border-color: var(--pink); }
.modal-close { margin-top: 6px; width: 100%; border: 0; background: none; color: var(--muted); font: 700 11px 'DM Sans', sans-serif; cursor: pointer; padding: 8px; }

/* ─────────────────────────── Toast ─────────────────────────── */
#toast { position: fixed; bottom: 24px; right: 24px; background: var(--surfaceHigh); border: 1px solid var(--borderBright); color: #fff; padding: 13px 16px; border-radius: 10px; font-size: 12px; opacity: 0; transform: translateY(12px); transition: 0.25s; pointer-events: none; box-shadow: 0 14px 30px rgba(0,0,0,0.4); z-index: 50; }
#toast.show { opacity: 1; transform: translateY(0); }

/* ─────────────────────────── Sidebar backdrop (mobile) ─────────────────────────── */
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 70; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.sidebar-backdrop.show { opacity: 1; pointer-events: auto; }

/* ─────────────────────────── Responsive ─────────────────────────── */
@media (max-width: 900px) {
  .sidebar { width: 285px; max-width: 85vw; transform: translateX(-100%); transition: transform 0.28s cubic-bezier(0.2,0.8,0.2,1); box-shadow: 0 0 40px rgba(0,0,0,0.4); overflow-y: auto; }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: block; border: 0; background: var(--surfaceHigh); color: var(--cyan); border-radius: 10px; width: 44px; height: 44px; margin-right: 12px; font-size: 18px; flex-shrink: 0; }
  .main-area { margin-left: 0; }
  .topbar { padding: 14px 18px; gap: 12px; }
  .topbar-greeting { display: none; }
  .content { padding: 24px 18px 120px; }
  .hero { padding: 26px 22px; min-height: 320px; }
  .hero h2 { font-size: clamp(28px, 7vw, 38px); }
  .hero-copy > p:last-of-type { font-size: 12.5px; }
  .hero-art { display: none; }
  .persistent-player { left: 0; right: 0; grid-template-columns: auto 1fr auto; grid-template-areas: "art info controls" "art progress progress"; gap: 6px 12px; padding: 10px 14px; min-height: 0; }
  .persistent-player .pp-art { grid-area: art; align-self: center; }
  .persistent-player .pp-info { grid-area: info; }
  .persistent-player .pp-controls { grid-area: controls; justify-content: flex-end; }
  .persistent-player .pp-hidden-btns { display: none; }
  .persistent-player .pp-progress { grid-area: progress; min-width: 0; margin-top: 2px; }
  .persistent-player .ctl { width: 40px; height: 40px; }
  .persistent-player .ctl-main { width: 48px; height: 48px; }
  .upgrade-btn { display: none; }
  .queue-header, .queue li { grid-template-columns: 35px 1fr 75px 38px; gap: 8px; }
  .queue li { padding: 10px; }
  .results-section .queue li, .results-section .queue-header { grid-template-columns: 56px 1fr 45px 38px; }
  .discover-section .queue li, .discover-section .queue-header { grid-template-columns: 56px 1fr 45px 38px; }
  .results-section .queue-header span:nth-child(3), .discover-section .queue-header span:nth-child(3) { display: none; }
  .source-label.yt { display: none; }
  .playlist-view .queue li, .playlist-view .queue-header { grid-template-columns: 30px 1fr 38px 38px; gap: 8px; }
  .playlist-view .queue-header span:nth-child(3) { display: none; }
  #toast { left: 16px; right: 16px; bottom: 96px; text-align: center; }
}

@media (max-width: 430px) {
  .hero h2 { font-size: 28px; }
  .queue-header, .queue li { grid-template-columns: 30px 1fr 38px; }
  .queue-header span:nth-child(3), .queue li .source-label { display: none; }
  .results-section .queue li { grid-template-columns: 52px 1fr 38px 38px; }
  .results-section .queue-header { display: none; }
  .playlist-view .queue li { grid-template-columns: 30px 1fr 38px 38px; }
  .playlist-view .queue-header { display: none; }
  .section-heading h3 { font-size: 18px; }
  .pp-info strong { font-size: 12px; }
  .pp-controls { gap: 6px; }
}
