/* =====================================================================
   Élia 4 — design system
   One stylesheet for the whole site. Functional pieces that position the video
   player / island / expanded overlay live in core.css.
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #0a0a0c;
  --surface-1: #121215;
  --surface-2: #19191d;
  --surface-3: #222227;
  --hover: rgba(255, 255, 255, 0.06);
  --press: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);
  --text-1: #f5f5f7;
  --text-2: rgba(245, 245, 247, 0.66);
  --text-3: rgba(245, 245, 247, 0.42);
  --accent: #ff4f6e;
  --accent-ink: #ffffff;
  --accent-soft: rgba(255, 79, 110, 0.14);
  --ok: #34c759;
  --tint: var(--ambient-accent-rgb, 40, 40, 48);

  --r-xs: 6px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;
  --gap: 8px;
  --sidebar-w: 248px;
  --player-h: 84px;
  --tabbar-h: 62px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* names the player code and older inline styles still use */
  --text-primary: var(--text-1);
  --text-secondary: var(--text-2);
  --text-tertiary: var(--text-3);
  --text-muted: var(--text-3);
  --accent-red: var(--accent);
  --apple-red: var(--accent);
  --accent-color: var(--accent);
  --accent-gradient: var(--accent);
  --accent-glow: var(--accent-soft);
  --accent-subtle: var(--accent-soft);
  --accent-border: var(--accent);
  --glass-bg: var(--surface-2);
  --glass-bg-hover: var(--surface-3);
  --glass-border: var(--line);
  --radius-sm: var(--r-sm); --radius-md: var(--r-md); --radius-lg: var(--r-lg); --radius-pill: var(--r-pill);
  --player-dock-h: var(--player-h);
  --font-sans: var(--font);
  --font-display: var(--font);
}
/* theme picker in Settings: one accent each */
:root[data-theme="obsidian"] { --accent: #ff4f6e; --accent-soft: rgba(255, 79, 110, .14); }
:root[data-theme="cyber"]    { --accent: #8b7bff; --accent-soft: rgba(139, 123, 255, .16); }
:root[data-theme="ocean"]    { --accent: #3ea6ff; --accent-soft: rgba(62, 166, 255, .16); }
:root[data-theme="emerald"]  { --accent: #2fd27a; --accent-soft: rgba(47, 210, 122, .15); --accent-ink: #062b16; }
:root[data-theme="rose"]     { --accent: #ff6fa8; --accent-soft: rgba(255, 111, 168, .15); }
:root[data-theme="amber"]    { --accent: #ffb020; --accent-soft: rgba(255, 176, 32, .15); --accent-ink: #2b1d00; }
:root[data-theme="midnight"] { --accent: #9aa4ff; --accent-soft: rgba(154, 164, 255, .14); --bg: #050507; --surface-1: #0c0c0f; }
:root[data-theme="lavender"] { --accent: #b69cff; --accent-soft: rgba(182, 156, 255, .15); }
:root[data-theme="aqua"]     { --accent: #2fd4d4; --accent-soft: rgba(47, 212, 212, .14); --accent-ink: #032626; }
:root[data-theme="crimson"]  { --accent: #e5303f; --accent-soft: rgba(229, 48, 63, .15); }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text-1);
  font: 400 15px/1.45 var(--font); letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow: hidden; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); }
[hidden] { display: none !important; }
.main-view, .sidebar, .npx-queue-list, .song-list { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* old decorative layers: off */
.ambient-aura, .ambient-orb, .aura-orb, .ambient-track-wash, .dock-ambient-halo, .visualizer-bars,
.liquid-avatar-badge, .hero-glow { display: none !important; }

/* ---------- 3. App shell ---------- */
.app-container {
  position: fixed; inset: 0;
  display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) var(--player-h);
  gap: var(--gap); padding: var(--gap);
}
body.sidebar-collapsed .app-container { grid-template-columns: 0 minmax(0, 1fr); column-gap: 0; }
body.sidebar-collapsed .sidebar { display: none; }

/* sidebar */
.sidebar {
  grid-row: 1; grid-column: 1; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface-1); border-radius: var(--r-lg); padding: 14px 10px;
}
.sidebar-header-row { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-icon { width: 32px; height: 32px; border-radius: 9px; overflow: hidden; flex: 0 0 32px; }
.brand-icon img, .brand-icon svg { width: 100%; height: 100%; object-fit: cover; }
.brand-title { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.02em; white-space: nowrap; }
.sidebar-toggle-btn, .sidebar-mobile-close-btn {
  width: 30px; height: 30px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--text-2);
  transition: background .15s, color .15s;
}
.sidebar-toggle-btn:hover, .sidebar-mobile-close-btn:hover { background: var(--hover); color: var(--text-1); }
.sidebar-mobile-close-btn { display: none; }
.nav-group { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; }
.nav-group + .nav-group { border-top: 1px solid var(--line); margin-top: 4px !important; padding-top: 10px; }
.nav-label { padding: 4px 12px 6px; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 500; font-size: .92rem; cursor: pointer; transition: background .15s, color .15s;
}
.nav-item svg { width: 19px; height: 19px; flex: 0 0 19px; opacity: .9; }
.nav-item:hover { background: var(--hover); color: var(--text-1); }
.nav-item.active { background: var(--hover); color: var(--text-1); font-weight: 600; }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--accent); }
.nav-count { margin-left: auto; font-size: .74rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.add-bot-nav-btn, .download-apk-sidebar-btn { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: var(--r-sm); color: var(--text-2); font-size: .9rem; font-weight: 500; }
.add-bot-nav-btn:hover, .download-apk-sidebar-btn:hover { background: var(--hover); color: var(--text-1); }
.add-bot-nav-btn svg { width: 18px; height: 18px; flex: 0 0 18px; }
.download-apk-sidebar-btn svg { width: 18px; height: 18px; }
.sidebar-spacer { flex: 1; }
.user-widget { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-md); cursor: pointer; transition: background .15s; }
.user-widget:hover { background: var(--hover); }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.user-info { min-width: 0; }
.user-name { font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-status { display: flex; align-items: center; gap: 6px; font-size: .74rem; color: var(--text-3); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); display: inline-block; }
body.authenticated .status-dot, .status-dot.online { background: var(--ok); }

/* main column */
.main-view {
  grid-row: 1; grid-column: 2; min-width: 0; min-height: 0; overflow-y: auto; overflow-x: hidden;
  position: relative; border-radius: var(--r-lg); background: var(--surface-1);
  background-image: linear-gradient(180deg, rgba(var(--tint), .2) 0, rgba(var(--tint), 0) 300px);
  transition: background-image .6s ease;
}
.view-panel { padding: 0 28px 40px; animation: viewIn .34s var(--ease-out) backwards; }
body.ls-lock .view-panel, body.npx-lock .view-panel, body.perm-open .view-panel { animation: none; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* header */
.top-header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 28px; background: transparent; transition: background .2s;
}
.main-view.is-scrolled .top-header { background: rgba(18, 18, 21, .94); box-shadow: 0 1px 0 var(--line); }
.sidebar-unhide-btn { display: none; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2); font-size: .85rem; font-weight: 500; }
body.sidebar-collapsed .sidebar-unhide-btn { display: inline-flex; }
.floating-sidebar-unhide-btn { display: none !important; }
.mobile-top-bar { display: none; }
.search-box { position: relative; flex: 1; max-width: 460px; }
.search-box > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; opacity: .55; pointer-events: none; }
.search-input {
  width: 100%; height: 42px; padding: 0 38px 0 40px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid transparent; color: var(--text-1); font-size: .92rem; outline: none;
  transition: border-color .15s, background .15s;
}
.search-input::placeholder { color: var(--text-3); }
.search-input:hover { background: var(--surface-3); }
.search-input:focus { border-color: var(--line-strong); background: var(--surface-3); }
.search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; color: var(--text-2); font-size: 1.2rem; line-height: 1; display: none; }
.search-input:not(:placeholder-shown) ~ .search-clear { display: grid; place-items: center; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.liquid-avatar-wrap { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; cursor: pointer; padding: 0; background: var(--surface-2); }
.liquid-avatar-img { width: 100%; height: 100%; object-fit: cover; }

/* buttons */
.glass-btn, .primary-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px;
  border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line); color: var(--text-1);
  font-size: .86rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .15s, transform .12s, border-color .15s;
}
.glass-btn:hover, .primary-btn:hover { background: var(--surface-3); }
.glass-btn:active, .primary-btn:active { transform: scale(.97); }
.glass-btn.primary, .primary-btn { background: var(--text-1); color: #0a0a0c; border-color: transparent; }
.glass-btn.primary:hover, .primary-btn:hover { background: #fff; }
#authBtn { background: var(--text-1); color: #0a0a0c; }
#authBtn svg { display: none; }

/* ---------- 4. Section headers & chips ---------- */
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 30px 0 14px; }
.section-title > div:first-child, .section-title > span:first-child { min-width: 0; }
.section-title span:first-child, .section-title > div > span:first-child { display: block; font-size: 1.32rem; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }
.section-subtitle { display: block; margin-top: 3px; font-size: .84rem !important; font-weight: 400 !important; letter-spacing: 0 !important; color: var(--text-3); }
.category-chips-bar, .sx-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; }
.category-chips-bar::-webkit-scrollbar { display: none; }
.category-chip, .sx-chip, .sx-pill {
  flex: 0 0 auto; height: 32px; padding: 0 14px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-1);
  font-size: .84rem; font-weight: 500; white-space: nowrap; transition: background .15s, color .15s;
}
.category-chip:hover, .sx-chip:hover, .sx-pill:hover { background: var(--surface-3); }
.category-chip.active { background: var(--text-1); color: #0a0a0c; }

/* ---------- 5. Home ---------- */
.home-greeting, .hero-glass-banner.home-greeting { padding: 18px 0 10px; background: none !important; border: 0 !important; box-shadow: none !important; }
.hero-tag { font-size: .82rem; font-weight: 500; color: var(--text-2); }
.home-greeting .hero-title { margin: 4px 0 0; font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 750; letter-spacing: -0.035em; line-height: 1.1; }
.home-greeting .hero-desc, .home-greeting #heroPlayBtn { display: none; }
.hero-glass-banner:not(.home-greeting) { padding: 22px; border-radius: var(--r-lg); background: var(--surface-2); }
.hero-glass-banner:not(.home-greeting) .hero-title { margin: 6px 0 8px; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.hero-desc { color: var(--text-2); margin: 0; max-width: 62ch; }

.discord-live-banner {
  display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; padding: 10px 14px; border-radius: var(--r-md);
  background: rgba(88, 101, 242, .12); border: 1px solid rgba(88, 101, 242, .3);
}
.live-pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #5865f2; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.discord-live-text { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-badge { font-size: .66rem; font-weight: 700; letter-spacing: .08em; color: #aab2ff; }
.discord-sync-btn { height: 30px; padding: 0 12px; border-radius: var(--r-pill); background: #5865f2; color: #fff; font-size: .8rem; font-weight: 600; }

/* quick picks */
.feed-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 18px 0 4px; }
.qp-tile {
  position: relative; display: flex; align-items: center; gap: 12px; height: 56px; padding-right: 10px; overflow: hidden; text-align: left;
  border-radius: var(--r-sm); background: rgba(255, 255, 255, .07); transition: background .15s;
}
.qp-tile:hover { background: rgba(255, 255, 255, .12); }
.qp-art { width: 56px; height: 56px; flex: 0 0 56px; object-fit: cover; }
.qp-name { flex: 1; min-width: 0; font-weight: 600; font-size: .86rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qp-play { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink);
  opacity: 0; transform: translateY(4px); transition: opacity .18s, transform .18s; }
.qp-play svg { margin-left: 2px; }
.qp-tile:hover .qp-play, .qp-tile:focus-visible .qp-play { opacity: 1; transform: none; }

/* shelves: one horizontal row each */
#homeFeed { display: flex; flex-direction: column; }
.shelf-row, #homeView .tracks-grid, #feedBecause .tracks-grid {
  display: grid; grid-auto-flow: column; grid-auto-columns: 172px; gap: 6px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; margin: 0 -10px; padding: 2px 10px 6px; scrollbar-width: none;
}
.shelf-row::-webkit-scrollbar, #homeView .tracks-grid::-webkit-scrollbar { display: none; }
.music-genre-section { margin: 0; }

/* cards (playlists, mixes, songs) */
.pl-card, .track-card, .playlist-card {
  position: relative; display: flex; flex-direction: column; gap: 0; padding: 10px; border-radius: var(--r-md);
  text-align: left; background: transparent; scroll-snap-align: start; cursor: pointer; transition: background .2s;
  content-visibility: auto; contain-intrinsic-size: 172px 240px;
}
.pl-card:hover, .track-card:hover, .playlist-card:hover { background: var(--hover); }
.pl-art-wrap, .track-card-art-wrap, .playlist-art-wrap {
  position: relative; aspect-ratio: 1; width: 100%; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.pl-art, .track-card-art, .playlist-art { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.pl-card:hover .pl-art, .track-card:hover .track-card-art { transform: scale(1.03); }
.pl-name, .track-card-title, .playlist-title { margin-top: 10px; font-weight: 600; font-size: .9rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-desc, .track-card-author, .playlist-subtitle { margin-top: 3px; font-size: .8rem; color: var(--text-3); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-play, .card-play-btn, .playlist-play-btn {
  position: absolute; right: 8px; bottom: 8px; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); border: 0;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .4); opacity: 0; transform: translateY(8px); transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.pl-play svg, .card-play-btn svg { margin-left: 3px; }
.pl-card:hover .pl-play, .track-card:hover .card-play-btn, .playlist-card:hover .playlist-play-btn,
.pl-card:focus-visible .pl-play { opacity: 1; transform: none; }
.pl-play:active, .card-play-btn:active { transform: scale(.94); }

/* mix collage */
.mix-art { display: grid !important; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.mix-art img { width: 100%; height: 100%; object-fit: cover; }
.mix-art::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .78)); }
.mix-label { position: absolute; left: 10px; right: 56px; bottom: 10px; z-index: 1; font-weight: 700; font-size: .95rem; line-height: 1.15; color: #fff; }
.js-tag { position: absolute; top: 8px; left: 8px; z-index: 2; padding: 3px 7px; border-radius: var(--r-xs); font-size: .62rem; font-weight: 700; letter-spacing: .04em; color: #fff; background: rgba(0, 0, 0, .55); }

/* ---------- 6. Song rows (charts, search, playlists) ---------- */
.song-list { display: flex; flex-direction: column; }
.track-line-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 6px 12px; border-radius: var(--r-sm); cursor: pointer; transition: background .12s; }
.track-line-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.song-row {
  display: grid; grid-template-columns: 32px 44px minmax(0, 1fr) auto auto; align-items: center; gap: 14px;
  min-height: 58px; padding: 6px 12px; border-radius: var(--r-sm); cursor: pointer; transition: background .12s;
}
.song-row:hover, .track-line-item:hover { background: var(--hover); }
.song-index, .track-line-num { text-align: center; font-size: .88rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.song-meta, .track-line-info { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; }
.song-thumb, .track-line-art { width: 44px; height: 44px; flex: 0 0 44px; border-radius: var(--r-xs); object-fit: cover; background: var(--surface-3); }
.song-title, .track-line-title { font-weight: 550; font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-artist, .track-line-artist { font-size: .82rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-duration { font-size: .82rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.song-actions, .track-line-actions { display: flex; align-items: center; gap: 4px; }
.song-play-pill, .track-line-btn, .play-sp-line-btn { height: 30px; padding: 0 12px; border-radius: var(--r-pill); background: var(--surface-3); font-size: .78rem; font-weight: 600; opacity: 0; transition: opacity .15s; }
.song-row:hover .song-play-pill, .track-line-item:hover .track-line-btn { opacity: 1; }
.song-like { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--text-3); transition: color .15s, transform .15s; }
.song-like:hover { color: var(--text-1); transform: scale(1.08); }
.song-like.is-on { color: var(--accent); }
.song-like.is-on svg { fill: currentColor; }
.pd-skeleton { height: 58px; margin: 2px 0; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- 7. Playlist page ---------- */
#playlistDetailView { position: relative; padding-top: 0; }
.pd-back { position: absolute; top: 14px; left: 20px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; }
.pd-header { position: relative; display: flex; align-items: flex-end; gap: 26px; margin: 0 -28px; padding: 60px 28px 26px; overflow: hidden; }
.pd-backdrop { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(60px) saturate(1.3); opacity: .5; transform: scale(1.2); }
.pd-header::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18, 18, 21, .2), var(--surface-1)); }
.pd-cover { position: relative; z-index: 1; width: 208px; height: 208px; border-radius: var(--r-md); object-fit: cover; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
.pd-meta { position: relative; z-index: 1; min-width: 0; }
.pd-kind { font-size: .76rem; font-weight: 600; color: var(--text-2); }
.pd-title { margin: 6px 0 8px; font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1; }
.pd-desc { color: var(--text-2); font-size: .92rem; max-width: 60ch; }
.pd-stats { margin-top: 8px; font-size: .84rem; color: var(--text-3); }
.pd-actions { display: flex; align-items: center; gap: 14px; padding: 18px 0 10px; }
.pd-play { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 26px rgba(0, 0, 0, .35); transition: transform .15s; }
.pd-play:hover { transform: scale(1.05); }
.pd-icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); }
.pd-icon-btn:hover { color: var(--text-1); background: var(--hover); }

/* ---------- 8. Search ---------- */
.search-view-header-bar { display: none; }
.sx-block { margin-top: 28px; }
.sx-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sx-head h2 { margin: 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.sx-sub { font-size: .84rem; color: var(--text-3); font-weight: 400; }
.sx-link { color: var(--text-2); font-size: .84rem; font-weight: 600; }
.sx-link:hover { color: var(--text-1); }
.sx-recent { display: flex; flex-wrap: wrap; gap: 8px; }
.sx-recent-item { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 14px; border-radius: var(--r-pill); background: var(--surface-2); font-size: .84rem; }
.sx-recent-q { color: var(--text-1); }
.sx-recent-x { width: 22px; height: 22px; border-radius: 50%; color: var(--text-3); }
.sx-recent-x:hover { background: var(--hover); color: var(--text-1); }
.sx-trend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 12px; }
.sx-trend { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--r-sm); text-align: left; cursor: pointer; }
.sx-trend:hover { background: var(--hover); }
.sx-rank { width: 20px; text-align: center; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.sx-trend-art { width: 46px; height: 46px; border-radius: var(--r-xs); object-fit: cover; }
.sx-trend-meta { min-width: 0; flex: 1; }
.sx-trend-title { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-trend-artist, .sx-trend-plays { font-size: .8rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-browse { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.sx-tile { position: relative; aspect-ratio: 1.6; border-radius: var(--r-md); overflow: hidden; padding: 14px; text-align: left; color: #fff; cursor: pointer; transition: transform .2s var(--ease); }
.sx-tile:hover { transform: translateY(-2px); }
.sx-tile-name { position: relative; z-index: 1; font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.sx-tile-art { position: absolute; right: -10px; bottom: -6px; width: 44%; aspect-ratio: 1; border-radius: var(--r-sm); object-fit: cover; transform: rotate(22deg); box-shadow: 0 8px 18px rgba(0, 0, 0, .4); }
.sx-results { margin-top: 26px; }
.sx-top-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 22px; margin-bottom: 18px; }
.sx-top-card { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: var(--r-lg); background: var(--surface-2); text-align: left; cursor: pointer; transition: background .2s; min-height: 220px; }
.sx-top-card:hover { background: var(--surface-3); }
.sx-top-art { width: 96px; height: 96px; border-radius: var(--r-sm); object-fit: cover; box-shadow: 0 10px 26px rgba(0, 0, 0, .4); }
.sx-top-title { font-size: 1.7rem; font-weight: 750; letter-spacing: -0.035em; line-height: 1.1; }
.sx-top-meta { color: var(--text-2); font-size: .86rem; }
.sx-top-play { position: absolute; right: 18px; bottom: 18px; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.sx-top-card:hover .sx-top-play { opacity: 1; transform: none; }
.sx-subhead { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.sx-collection { display: block; margin-top: 26px; }
.sx-top-songs .song-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; min-height: 54px; }
.sx-top-songs .song-index, .sx-top-songs .song-duration, .sx-top-songs .song-play-pill { display: none; }
.sx-empty { padding: 48px 16px; text-align: center; }
.sx-empty-title { font-weight: 700; font-size: 1.05rem; }
.sx-empty-sub { margin-top: 6px; color: var(--text-3); font-size: .88rem; }
.search-suggestions-wrap, .search-suggestion-chip { display: none; }

/* ---------- 9. Charts, Voice Hub, Library ---------- */
#chartsView .glass-btn { height: 34px; }
#chartsView .glass-btn.primary { background: var(--text-1); color: #0a0a0c; }
.live-pill { font-size: .78rem !important; font-weight: 600 !important; }
.vh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.vh-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s; text-align: left; }
.vh-card:hover { background: var(--surface-3); }
.vh-card.is-selected { border-color: var(--accent); }
.vh-icon, .vh-initials { width: 46px; height: 46px; flex: 0 0 46px; border-radius: var(--r-md); object-fit: cover; display: grid; place-items: center; background: var(--surface-3); font-weight: 700; }
.vh-info { min-width: 0; flex: 1; }
.vh-name { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vh-meta, .vh-status { font-size: .78rem; color: var(--text-3); }
.vh-live { color: var(--ok); }
.vh-empty { padding: 30px; text-align: center; color: var(--text-3); }
.vh-empty-title { color: var(--text-1); font-weight: 700; }
.spotify-import-banner { padding: 18px !important; border-radius: var(--r-lg) !important; background: var(--surface-2) !important; border: 0 !important; }
.spotify-import-input { background: var(--surface-1) !important; border: 1px solid var(--line) !important; }
.spotify-import-btn { background: var(--text-1) !important; color: #0a0a0c !important; border-radius: var(--r-pill) !important; }
.playlists-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 6px; }
.playlist-tracklist-view { display: flex; flex-direction: column; }

/* "Playing from ..." */
.stream-src { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; font-size: .68rem; font-weight: 600; color: var(--text-3); }
.stream-src::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.stream-src[data-src*="jiosaavn"]::before { background: #2bc5b4; }
.stream-src[data-src*="youtube"]::before { background: #ff3b30; }
.stream-src[data-src*="spotify"]::before { background: #1ed760; }
.npx-src { justify-content: flex-start; margin-top: 6px; font-size: .74rem; }

/* ---------- 10. Player bar ---------- */
.player-dock {
  grid-row: 2; grid-column: 1 / -1; position: relative; z-index: 30; min-width: 0;
  display: grid; grid-template-columns: minmax(180px, 1fr) minmax(320px, 1.35fr) minmax(180px, 1fr); align-items: center; gap: 18px;
  padding: 0 16px; border-radius: var(--r-lg); background: var(--surface-1); cursor: default;
}
.dock-track-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dock-art-wrap { flex: 0 0 56px; width: 56px; height: 56px; border-radius: var(--r-sm); overflow: hidden; cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.dock-art { width: 100%; height: 100%; object-fit: cover; }
.dock-details { flex: 1 1 auto; min-width: 0; cursor: pointer; }
.dock-like { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; color: var(--text-3); }
.dock-like:hover { color: var(--text-1); }
.dock-like.is-on { color: var(--accent); }
.dock-like.is-on svg { fill: currentColor; }
.dock-title { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-artist { font-size: .78rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-toggle-pill { flex: 0 0 auto; display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--surface-2); }
.media-toggle-btn { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: .74rem; font-weight: 600; color: var(--text-3); }
.media-toggle-btn.active { background: var(--surface-3); color: var(--text-1); }
.dock-mobile-controls { display: none; }
.dock-center { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.transport-btns { display: flex; align-items: center; gap: 8px; }
.transport-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); transition: color .15s, transform .12s; }
.transport-btn:hover { color: var(--text-1); }
.transport-btn:active { transform: scale(.92); }
.transport-btn.active, #shuffleBtn.active, #repeatBtn.active { color: var(--accent); }
.transport-btn.play-master { width: 38px; height: 38px; margin: 0 6px; background: var(--text-1); color: #0a0a0c; }
.transport-btn.play-master:hover { transform: scale(1.06); }
.scrubber-bar-wrap { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 620px; }
.time-stamp { min-width: 38px; font-size: .72rem; color: var(--text-3); font-variant-numeric: tabular-nums; text-align: center; }
.scrubber { position: relative; flex: 1; height: 18px; cursor: pointer; touch-action: none; }
.scrubber:not(.has-wave)::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; background: rgba(255, 255, 255, .18); }
.scrubber-fill { position: absolute; left: 0; top: 50%; height: 4px; margin-top: -2px; width: 0; border-radius: 4px; background: var(--text-1); }
.scrubber.has-wave .scrubber-fill { opacity: 0; }
.scrubber-handle { display: none; }
.dock-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.mode-switch-group { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--surface-2); }
.mode-btn { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: var(--r-pill); color: var(--text-3); font-size: .72rem; font-weight: 600; white-space: nowrap; }
.mode-btn svg { width: 15px; height: 15px; }
.mode-btn.active { background: var(--surface-3); color: var(--text-1); }
.guild-select { max-width: 130px; height: 32px; padding: 0 10px; border-radius: var(--r-pill); background: var(--surface-2); border: 0; color: var(--text-2); font-size: .78rem; outline: none; }
.ambient-toggle-pill { display: none !important; }
.autoplay-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: var(--r-pill); color: var(--text-3); font-size: .74rem; font-weight: 600; }
.autoplay-pill svg { width: 14px; height: 14px; }
.autoplay-pill.active { color: var(--accent); background: var(--accent-soft); }
.volume-wrap { display: flex; align-items: center; gap: 6px; }
.volume-slider { -webkit-appearance: none; appearance: none; width: 92px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .2); outline: none; cursor: pointer; }
.volume-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.volume-slider::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.dock-expand-btn { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); }
.dock-expand-btn:hover { color: var(--text-1); background: var(--hover); }
@media (max-width: 1360px) { .desktop-media-toggle .media-toggle-btn span { display: none; } .desktop-media-toggle .media-toggle-btn { padding: 0 8px; } }
@media (min-width: 769px) and (max-width: 1180px) {
  .autoplay-pill span, .guild-select, .mode-btn span { display: none; }
  .volume-slider { width: 70px; }
}

/* wavy seek line (wave.js) */
.wave-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scrubber.has-wave { --wave-played: var(--text-1); --wave-rest: rgba(255, 255, 255, .2); }
.npx-bar.has-wave { height: 30px; --wave-played: #ffffff; --wave-rest: rgba(255, 255, 255, .24); }
.npx-bar.has-wave::before, .npx-bar.has-wave .npx-fill, .npx-bar.has-wave .npx-knob { opacity: 0 !important; }

/* ---------- 11. Menus, modals, context menu ---------- */
.glass-context-menu { position: fixed; z-index: 9500; min-width: 200px; padding: 6px; flex-direction: column; border-radius: var(--r-md); background: var(--surface-3); box-shadow: 0 18px 50px rgba(0, 0, 0, .55); border: 1px solid var(--line); display: none; animation: pop .16s var(--ease-out); }
.context-item { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--r-xs); font-size: .86rem; cursor: pointer; }
.context-item:hover { background: var(--hover); }
.context-divider { height: 1px; margin: 4px 6px; background: var(--line); }
@keyframes pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

.profile-modal {
  position: fixed; z-index: 9400; top: 64px; right: 24px; width: 320px; max-width: calc(100vw - 24px); padding: 18px;
  border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s var(--ease-out), visibility 0s .18s;
}
.profile-modal.show { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .18s var(--ease-out); }
.profile-header { display: flex; align-items: center; gap: 12px; }
.profile-avatar-lg { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.profile-user-name { font-weight: 700; }
.profile-tag { font-size: .8rem; color: var(--text-3); }
.profile-divider { height: 1px; background: var(--line); margin: 10px 0; }
.profile-logout-btn { width: 100%; height: 38px; border-radius: var(--r-pill); background: var(--surface-3); color: #ff6b6b; font-weight: 600; }

.settings-modal-backdrop { position: fixed; inset: 0; z-index: 9450; background: rgba(0, 0, 0, .6); opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; }
.settings-modal-backdrop.show { opacity: 1; visibility: visible; transition: opacity .2s; }
.settings-modal {
  position: fixed; z-index: 9460; left: 50%; top: 50%; width: min(560px, calc(100vw - 24px)); max-height: min(80vh, 760px); overflow-y: auto;
  border-radius: var(--r-xl); background: var(--surface-1); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  opacity: 0; visibility: hidden; transform: translate(-50%, -48%) scale(.98); transition: opacity .2s, transform .25s var(--ease-out), visibility 0s .25s;
}
.settings-modal.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%); transition: opacity .2s, transform .25s var(--ease-out); }
.settings-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; background: var(--surface-1); border-bottom: 1px solid var(--line); }
.settings-title { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; }
.settings-close-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); }
.settings-close-btn:hover { background: var(--hover); color: var(--text-1); }
.settings-body { padding: 8px 22px 22px; }
.settings-section { padding: 16px 0; border-bottom: 1px solid var(--line); }
.settings-section:last-child { border-bottom: 0; }
.settings-section-title { font-weight: 700; font-size: .95rem; }
.settings-section-subtitle { margin-top: 2px; font-size: .82rem; color: var(--text-3); }
.theme-picker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.theme-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid transparent; cursor: pointer; }
.theme-card.active { border-color: var(--accent); }
.theme-swatch { width: 22px; height: 22px; border-radius: 50%; flex: 0 0 22px; }
.theme-name { font-size: .84rem; font-weight: 600; }
.theme-tag { font-size: .7rem; color: var(--text-3); }
.settings-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; }
.settings-toggle-label { font-size: .9rem; }
.switch-pill { position: relative; width: 42px; height: 24px; flex: 0 0 42px; }
.switch-pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch-slider { position: absolute; inset: 0; border-radius: 24px; background: var(--surface-3); transition: background .2s; pointer-events: none; }
.switch-slider::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.switch-pill input:checked + .switch-slider { background: var(--accent); }
.switch-pill input:checked + .switch-slider::after { transform: translateX(18px); }

.session-auth-banner { position: fixed; z-index: 9300; left: 50%; bottom: calc(var(--player-h) + 24px); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface-3); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }

/* ---------- 12. Now Playing ---------- */
.npx {
  position: fixed; inset: 0; z-index: 9000; display: flex; flex-direction: column; color: #fff; background: #0a0a0c; overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(28px);
  transition: opacity .32s ease, transform .5s var(--ease-out), visibility 0s linear .5s;
}
.npx.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .32s ease, transform .5s var(--ease-out); }
body.npx-lock { overflow: hidden; }
.npx-bg { position: absolute; inset: -12%; background-size: cover; background-position: center; filter: blur(90px) saturate(1.6) brightness(.62); transform: scale(1.15); transition: background-image .6s ease; animation: npxDrift 34s ease-in-out infinite alternate; }
@keyframes npxDrift { to { transform: scale(1.3) rotate(5deg); } }
.npx-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .62)); }
.npx-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(18px, env(safe-area-inset-top)) 24px 6px; }
.npx-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .1); transition: background .2s; }
.npx-icon:hover { background: rgba(255, 255, 255, .2); }
.npx-queue-toggle { visibility: hidden; }
.npx-context { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
.npx-context-label { font-size: .64rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .58); }
.npx-context-name { font-size: .9rem; font-weight: 600; max-width: 60vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.npx-main { position: relative; z-index: 1; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: clamp(24px, 4vw, 64px); padding: 8px clamp(20px, 5vw, 72px) 28px; align-items: center; }
.npx-main > * { min-width: 0; }
.npx-player { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 560px; margin: 0 auto; }
.npx-art-wrap { width: min(46vh, 440px, 80vw); aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden; transition: transform .55s var(--ease-out);
  box-shadow: 0 50px 100px -24px rgba(var(--ambient-accent-rgb, 0, 0, 0), .6), 0 24px 48px -12px rgba(0, 0, 0, .55); }
.npx-art-wrap.is-paused { transform: scale(.9); }
.npx-art-wrap:not(.is-paused) { animation: npxBreathe 7s ease-in-out infinite; }
@keyframes npxBreathe { 50% { transform: scale(1.012); } }
.npx-art { width: 100%; height: 100%; object-fit: cover; }
.npx-meta { width: 100%; margin-top: 26px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.npx-meta-text { min-width: 0; }
.npx-title { margin: 0; font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 750; letter-spacing: -0.03em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.npx-artist { margin: 4px 0 0; font-size: .98rem; color: rgba(255, 255, 255, .66); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.npx-like { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: rgba(255, 255, 255, .75); transition: transform .2s, color .2s; }
.npx-like:hover { color: #fff; transform: scale(1.08); }
.npx-like.is-on { color: var(--accent); }
.npx-like.is-on svg { fill: currentColor; }
.npx-progress { width: 100%; margin-top: 16px; }
.npx-bar { position: relative; height: 18px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.npx-bar::before { content: ""; position: absolute; left: 0; right: 0; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); }
.npx-fill { position: absolute; left: 0; height: 4px; border-radius: 4px; background: #fff; width: 0; }
.npx-knob { position: absolute; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; opacity: 0; left: 0; }
.npx-times { display: flex; justify-content: space-between; margin-top: 2px; font-size: .74rem; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .55); }
.npx-controls { margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: clamp(14px, 3vw, 34px); }
.npx-ctrl { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: rgba(255, 255, 255, .92); transition: transform .15s, background .2s, color .2s; }
.npx-ctrl:hover { background: rgba(255, 255, 255, .1); }
.npx-ctrl:active { transform: scale(.92); }
.npx-small { width: 42px; height: 42px; color: rgba(255, 255, 255, .55); }
.npx-small.is-on { color: var(--accent); }
.npx-play { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; color: #0a0a0c; background: #fff; box-shadow: 0 18px 40px -8px rgba(0, 0, 0, .5); transition: transform .15s; }
.npx-play:hover { transform: scale(1.05); }
.npx-play:active { transform: scale(.95); }
.npx-extra { width: 100%; margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.npx-output { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: var(--r-pill); font-size: .8rem; font-weight: 600; color: rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .08); }
.npx-volume { display: inline-flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .75); }
.npx-volume input { width: 140px; accent-color: #fff; }
.npx-queue { align-self: stretch; max-height: calc(100vh - 120px); display: flex; flex-direction: column; min-height: 0; border-radius: var(--r-xl); padding: 18px 10px 10px; background: rgba(8, 8, 12, .34); }
.npx-queue-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 10px 10px; }
.npx-queue-head h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.npx-vibe { font-size: .75rem; color: rgba(255, 255, 255, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.npx-queue-list { overflow-y: auto; min-height: 0; padding: 0 2px; }
.npx-queue-group { padding: 12px 10px 6px; font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.npx-q-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: var(--r-md); text-align: left; cursor: pointer; }
.npx-q-item:hover { background: rgba(255, 255, 255, .08); }
.npx-q-art { width: 44px; height: 44px; border-radius: var(--r-sm); object-fit: cover; flex-shrink: 0; }
.npx-q-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.npx-q-title { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.npx-q-artist { font-size: .8rem; color: rgba(255, 255, 255, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.npx-q-len { font-size: .75rem; color: rgba(255, 255, 255, .45); font-variant-numeric: tabular-nums; }
.npx-queue-empty { padding: 20px 12px; color: rgba(255, 255, 255, .6); font-size: .9rem; }
@media (max-width: 960px) {
  .npx-queue-toggle { visibility: visible; }
  .npx-main { grid-template-columns: minmax(0, 1fr); padding: 6px 20px 22px; }
  .npx-queue { position: absolute; inset: 12px; max-height: none; transform: translateY(110%); transition: transform .4s var(--ease-out); background: rgba(10, 10, 16, .9); }
  .npx.show-queue .npx-queue { transform: none; }
  .npx-art-wrap { width: min(40vh, 86vw); }
  .npx-volume input { width: 110px; }
}
@media (max-width: 480px) {
  .npx-art-wrap { width: min(38vh, calc(100vw - 48px)); }
  .npx-controls { gap: 8px; }
  .npx-volume input { width: 90px; }
}

/* ---------- 13. Sign in ---------- */
.login-screen {
  position: fixed; inset: 0; z-index: 9600; display: grid; place-items: center; overflow-y: auto; background: #0a0a0c;
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s .3s;
}
.login-screen.is-open { opacity: 1; visibility: visible; transition: opacity .3s ease; }
body.ls-lock { overflow: hidden; }
.ls-aurora, .ls-eq, .ls-card-shine, .ls-feats, .ls-vinyl-wrap { display: none !important; }
.ls-wall { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; padding: 10px; opacity: .22; overflow: hidden; pointer-events: none; transform: rotate(-8deg) scale(1.25); }
.ls-wall-col { display: flex; flex-direction: column; gap: 10px; animation: wallUp 60s linear infinite; }
.ls-wall-col:nth-child(even) { animation-direction: reverse; }
.ls-wall-col img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); }
@keyframes wallUp { to { transform: translateY(-50%); } }
.ls-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(10, 10, 12, .55) 0, rgba(10, 10, 12, .96) 70%); pointer-events: none; }
.ls-close { position: absolute; z-index: 3; top: max(18px, env(safe-area-inset-top)); right: 18px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); background: rgba(255, 255, 255, .06); }
.ls-close:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.ls-stage { position: relative; z-index: 2; width: min(980px, 100%); display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 56px; padding: 40px 28px; }
.ls-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.ls-brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.ls-brand-name { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.ls-title { margin: 0; font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1.02; }
.ls-title-grad { background: none !important; -webkit-text-fill-color: currentColor !important; color: var(--text-2); animation: none !important; }
.ls-sub { margin: 18px 0 0; max-width: 44ch; color: var(--text-2); font-size: 1rem; line-height: 1.55; }
.ls-card { position: relative; padding: 30px 28px; border-radius: var(--r-xl); background: var(--surface-1); border: 1px solid var(--line); box-shadow: 0 40px 100px rgba(0, 0, 0, .55); display: flex; flex-direction: column; gap: 10px; }
.ls-card-title { margin: 0; font-size: 1.4rem; font-weight: 750; letter-spacing: -0.03em; }
.ls-card-sub { margin: 0 0 12px; color: var(--text-3); font-size: .9rem; }
.ls-notice { padding: 11px 13px; border-radius: var(--r-md); font-size: .86rem; line-height: 1.45; background: var(--accent-soft); color: var(--text-1); }
.ls-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; padding: 0 18px; border-radius: var(--r-md); font-size: .95rem; font-weight: 600; transition: transform .12s, background .15s, filter .15s; }
.ls-btn:active { transform: scale(.985); }
.ls-btn-google { order: -1; background: #fff; color: #1f1f1f; }
.ls-btn-google:hover { filter: brightness(.95); }
.ls-btn-discord { background: #5865f2; color: #fff; }
.ls-btn-discord:hover { background: #4f5bdc; }
.ls-btn-discord::before { display: none !important; }
.ls-btn-badge { display: none; }
.ls-btn-ghost { background: var(--surface-2); color: var(--text-1); }
.ls-btn-ghost:hover { background: var(--surface-3); }
.ls-pair-ico { font-family: var(--font-mono); color: var(--text-3); }
.ls-divider { display: flex; align-items: center; gap: 12px; margin: 8px 0 2px; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.ls-divider::before, .ls-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ls-pair { padding: 14px; border-radius: var(--r-md); background: var(--surface-2); text-align: center; }
.ls-code, .ls-pair-code { font-family: var(--font-mono); font-size: 1.8rem; font-weight: 600; letter-spacing: .3em; }
.ls-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: pulse 1.4s infinite; }
.ls-guest { margin-top: 6px; align-self: center; color: var(--text-2); font-size: .88rem; font-weight: 500; }
.ls-guest:hover { color: var(--text-1); }
.ls-guest-note, .ls-legal { margin: 0; text-align: center; font-size: .74rem; color: var(--text-3); line-height: 1.5; }
@media (max-width: 900px) {
  .login-screen { place-items: start center; }
  .ls-stage { grid-template-columns: 1fr; gap: 24px; padding: calc(64px + env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom)); }
  .ls-hero { text-align: left; }
  .ls-title { font-size: 2.3rem; }
  .ls-sub { font-size: .95rem; }
  .ls-card { padding: 22px 18px; }
  .ls-wall { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 14. Android app: permission screen ---------- */
.perm-screen { position: fixed; inset: 0; z-index: 2147483000; overflow-y: auto; display: grid; place-items: center; padding: calc(28px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom)); background: #0a0a0c; color: #fff; }
.perm-screen[hidden] { display: none; }
body.perm-open .dynamic-island-container, body.perm-open .login-screen { visibility: hidden; }
.perm-inner { width: 100%; max-width: 420px; }
.perm-logo { width: 52px; height: 52px; margin-bottom: 22px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.perm-title { margin: 0 0 8px; font-size: 1.65rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.12; }
.perm-sub { margin: 0 0 22px; color: var(--text-2); font-size: .92rem; line-height: 1.5; }
.perm-list { display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--surface-1); overflow: hidden; }
.perm-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.perm-row + .perm-row { border-top: 1px solid var(--line); }
.perm-ico { width: 38px; height: 38px; flex: 0 0 38px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--surface-3); color: var(--text-1); }
.perm-row.is-on .perm-ico { color: var(--ok); }
.perm-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.perm-text b { font-size: .93rem; font-weight: 600; }
.perm-text small { color: var(--text-3); font-size: .78rem; line-height: 1.35; }
.perm-btn { flex: 0 0 auto; height: 32px; padding: 0 14px; border-radius: var(--r-pill); font-size: .82rem; font-weight: 600; background: var(--text-1); color: #0a0a0c; }
.perm-btn:disabled { background: transparent; color: var(--ok); padding-right: 0; }
.perm-continue { width: 100%; margin-top: 18px; min-height: 52px; border-radius: var(--r-md); background: var(--surface-2); color: var(--text-1); font-size: .98rem; font-weight: 600; }
.perm-continue.is-ready { background: var(--accent); color: var(--accent-ink); }
.perm-note { margin: 12px 0 0; text-align: center; font-size: .74rem; color: var(--text-3); }

/* Dynamic Island: placement, real art, drag (app only) */
.dynamic-island-container { top: calc(max(12px, env(safe-area-inset-top)) + var(--di-y, 0px)) !important; transform: translateX(calc(-50% + var(--di-x, 0px))) !important; }
.island-notch-camera { display: none !important; }
body:not(.island-has-track) .dynamic-island-container, body:has(.login-screen.is-open) .dynamic-island-container { display: none !important; }
#islandCompact { touch-action: none; cursor: grab; }
.island-compact-art { object-fit: cover; }
.dynamic-island.is-paused .island-compact-art { filter: grayscale(.6) brightness(.7); animation: none !important; }
.dynamic-island.is-paused .island-sound-wave .bar { animation: none !important; height: 3px !important; opacity: .5; }

/* ---------- 15. Mobile (≤ 768px) ---------- */
@media (max-width: 768px) {
  :root { --player-h: 64px; }
  body { font-size: 14px; }
  .app-container { display: block; padding: 0; }
  .main-view { position: fixed; inset: 0; border-radius: 0; padding-bottom: calc(var(--tabbar-h) + var(--player-h) + 20px + env(safe-area-inset-bottom)); background-image: linear-gradient(180deg, rgba(var(--tint), .3) 0, rgba(var(--tint), 0) 300px); }
  .view-panel { padding: 0 16px 24px; }

  /* sidebar becomes a drawer */
  .sidebar { position: fixed; z-index: 9200; top: 0; bottom: 0; left: 0; width: min(300px, 84vw); border-radius: 0 var(--r-xl) var(--r-xl) 0; transform: translateX(-104%); transition: transform .3s var(--ease-out); padding-top: calc(14px + env(safe-area-inset-top)); }
  body.sidebar-collapsed .sidebar { display: flex; }
  .sidebar.mobile-open { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .5); }
  .sidebar-toggle-btn { display: none; }
  .sidebar-mobile-close-btn { display: grid; }
  .mobile-sidebar-backdrop { position: fixed; inset: 0; z-index: 9190; background: rgba(0, 0, 0, .55); animation: fadeIn .2s ease; }
  @keyframes fadeIn { from { opacity: 0; } }

  /* header */
  .top-header { flex-wrap: wrap; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(10, 10, 12, .92); }
  .mobile-top-bar { display: flex; align-items: center; gap: 10px; width: 100%; }
  .mobile-top-bar .brand-title { flex: 1; font-size: 1.1rem; }
  .mobile-sidebar-toggle-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--text-1); }
  .mobile-google-login-btn, .mobile-discord-login-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-pill); font-size: .8rem; font-weight: 600; }
  .mobile-google-login-btn { background: #fff; color: #1f1f1f; }
  .mobile-discord-login-btn { background: #5865f2; color: #fff; }
  .mobile-google-login-btn svg, .mobile-discord-login-btn svg { width: 14px; height: 14px; }
  body.authenticated .mobile-google-login-btn, body.authenticated .mobile-discord-login-btn { display: none; }
  .mobile-profile-wrap { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; }
  .mobile-avatar { width: 100%; height: 100%; object-fit: cover; }
  .search-box { max-width: none; width: 100%; }
  .search-input { height: 40px; font-size: .9rem; }
  .header-actions, .sidebar-unhide-btn { display: none !important; }

  .section-title { margin: 24px 0 12px; }
  .section-title span:first-child, .section-title > div > span:first-child { font-size: 1.15rem; }
  .feed-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .qp-tile { height: 52px; }
  .qp-art { width: 52px; height: 52px; flex-basis: 52px; }
  .qp-name { font-size: .8rem; }
  .qp-play { display: none; }
  .shelf-row, #homeView .tracks-grid, #feedBecause .tracks-grid { grid-auto-columns: 142px; margin: 0 -8px; padding: 2px 8px 6px; }
  .pl-card, .track-card { padding: 8px; }
  .pl-play, .card-play-btn { display: none; }
  .song-row { grid-template-columns: 44px minmax(0, 1fr) auto; padding: 6px 4px; gap: 12px; }
  .track-line-item { padding: 6px 4px; }
  .song-index, .song-duration, .track-line-num { display: none; }
  .song-play-pill { display: none; }
  .pd-header { flex-direction: column; align-items: flex-start; gap: 16px; margin: 0 -16px; padding: 56px 16px 18px; }
  .pd-cover { width: 160px; height: 160px; align-self: center; }
  .pd-title { font-size: 2rem; }
  .sx-top-row { grid-template-columns: 1fr; }
  .sx-browse { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .settings-modal { top: auto; bottom: 0; left: 0; width: 100%; max-height: 88vh; border-radius: var(--r-xl) var(--r-xl) 0 0; transform: translateY(100%); }
  .settings-modal.show { transform: none; }
  .profile-modal { top: auto; bottom: calc(var(--tabbar-h) + var(--player-h) + 20px); right: 12px; left: 12px; width: auto; }

  /* mini player above the tab bar */
  .player-dock {
    position: fixed; z-index: 9100; left: 8px; right: 8px; bottom: calc(var(--tabbar-h) + 8px + env(safe-area-inset-bottom));
    height: var(--player-h); display: flex; align-items: center; gap: 10px; padding: 0 6px 0 8px; border-radius: var(--r-md); cursor: pointer;
    background: #141418; background: color-mix(in srgb, rgb(var(--tint)) 55%, #141418); box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  }
  .dock-art-wrap { flex-basis: 46px; width: 46px; height: 46px; box-shadow: none; }
  .dock-track-info { flex: 1; }
  .dock-title { font-size: .86rem; }
  .dock-artist { font-size: .76rem; color: rgba(255, 255, 255, .7); }
  .player-dock .stream-src, .desktop-media-toggle, .dock-center, .dock-right { display: none !important; }
  .dock-mobile-controls { display: flex; align-items: center; gap: 2px; }
  .mini-video-btn { display: none; }
  .mini-play-btn, .mini-next-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; }

  /* tab bar */
  .mobile-tab-bar {
    position: fixed; z-index: 9150; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    display: flex; align-items: stretch; background: linear-gradient(180deg, rgba(10, 10, 12, 0), rgba(10, 10, 12, .96) 30%);
  }
  .tab-bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: .66rem; font-weight: 500; color: var(--text-3); }
  .tab-bar-item svg { width: 22px; height: 22px; }
  .tab-bar-item.active { color: var(--text-1); }

  .npx-art-wrap { border-radius: var(--r-md); }
}
@media (min-width: 769px) {
  .mobile-tab-bar, .mobile-player-sheet, .mobile-sidebar-backdrop { display: none !important; }
}
@media (min-width: 769px) and (max-width: 1100px) { :root { --sidebar-w: 220px; } .feed-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* app (APK) */
body.platform-apk .home-greeting .hero-title { font-size: 1.6rem; }
body.platform-apk .top-header { padding-top: calc(8px + env(safe-area-inset-top)); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* YouTube thumbnails (hqdefault/sddefault/0.jpg) are 4:3 with black bars around a 16:9 frame:
   zoom into the centre so only the picture/cover shows, at the same box size. */
img[src*="ytimg.com/vi"][src*="hqdefault"], img[src*="ytimg.com/vi"][src*="sddefault"],
img[src*="ytimg.com/vi"][src$="/0.jpg"], img[src*="youtube.com/vi"][src*="hqdefault"],
img[src*="youtube.com/vi"][src*="sddefault"], img[src*="youtube.com/vi"][src$="/0.jpg"] {
  object-fit: cover; transform: scale(1.34); clip-path: inset(12.69% round 6px);
}
.pl-card:hover .pl-art[src*="hqdefault"], .track-card:hover .track-card-art[src*="hqdefault"] { transform: scale(1.38); }
.sx-top-meta .sx-pill { margin-right: 8px; height: 24px; padding: 0 10px; display: inline-flex; align-items: center; font-size: .74rem; font-weight: 600; }

/* =====================================================================
   Now Playing — Apple Music (iPhone) style
   ===================================================================== */
.npx { background: #111; }
.npx-bg { filter: blur(80px) saturate(1.5) brightness(.48); }
.npx-bg::before, .npx-bg::after { content: ""; position: absolute; inset: 0; background-image: inherit; background-size: cover; background-position: center; }
.npx-bg::before { opacity: .55; mix-blend-mode: screen; animation: npxOrbitA 28s ease-in-out infinite alternate; }
.npx-bg::after { opacity: .5; mix-blend-mode: overlay; animation: npxOrbitB 34s ease-in-out infinite alternate; }
@keyframes npxOrbitA { from { transform: scale(1.5) rotate(180deg) translate(12%, -10%); } to { transform: scale(1.7) rotate(220deg) translate(-8%, 6%); } }
@keyframes npxOrbitB { from { transform: scale(1.8) rotate(90deg) translate(-14%, 12%); } to { transform: scale(1.6) rotate(40deg) translate(10%, -6%); } }
.npx-shade { background: linear-gradient(180deg, rgba(0, 0, 0, .1) 0%, rgba(0, 0, 0, .22) 55%, rgba(0, 0, 0, .45) 100%); }

/* top: just the grab handle */
.npx-top { justify-content: center; padding: max(10px, env(safe-area-inset-top)) 16px 0; }
.npx-grabber { width: 72px; height: 28px; display: grid; place-items: center; }
.npx-grabber span { width: 38px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .42); transition: background .2s, width .2s; }
.npx-grabber:hover span { background: rgba(255, 255, 255, .7); width: 44px; }

.npx-main { padding-top: 0; }
.npx-player { width: 100%; max-width: 440px; }

/* artwork */
.npx-art-wrap { width: min(46vh, 440px, calc(100vw - 48px)); border-radius: 10px; animation: none !important;
  box-shadow: 0 24px 50px -8px rgba(0, 0, 0, .5); transition: transform .55s cubic-bezier(.3, 1.2, .5, 1), box-shadow .55s; }
.npx-art-wrap.is-paused { transform: scale(.8); box-shadow: 0 12px 28px -8px rgba(0, 0, 0, .35); }

/* title row */
.npx-meta { width: 100%; margin-top: clamp(22px, 4.5vh, 40px); display: flex; align-items: center; gap: 14px; }
.npx-meta-text { flex: 1; min-width: 0; }
.npx-title { font-size: 1.28rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; }
.npx-artist { margin: 1px 0 0; font-size: 1.28rem; font-weight: 400; letter-spacing: -0.015em; color: rgba(255, 255, 255, .55); }
.npx-like { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; }
.npx-like svg { width: 17px; height: 17px; }
.npx-like:hover { background: rgba(255, 255, 255, .22); transform: none; }
.npx-like.is-on { color: #fff; background: rgba(255, 255, 255, .22); }
.npx-like.is-on svg { fill: currentColor; }

/* progress: thin line, grows while dragging */
.npx-progress { width: 100%; margin-top: 22px; }
.npx-bar { height: 22px; }
.npx-bar::before { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .22); transition: height .2s; }
.npx-fill { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .78); transition: height .2s, background .2s; }
.npx-knob { display: none; }
.npx-bar.is-dragging::before, .npx-bar.is-dragging .npx-fill, .npx-bar:active::before, .npx-bar:active .npx-fill { height: 12px; border-radius: 6px; }
.npx-bar.is-dragging .npx-fill { background: #fff; }
.npx-times { position: relative; display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font-size: .74rem; font-weight: 600; color: rgba(255, 255, 255, .45); }
.npx-src { position: absolute; left: 50%; transform: translateX(-50%); margin: 0; padding: 2px 7px; border-radius: 4px;
  font-size: .62rem; font-weight: 600; letter-spacing: .02em; text-transform: none; color: rgba(255, 255, 255, .62); background: rgba(255, 255, 255, .12); }
.npx-src::before { display: none; }

/* transport */
.npx-controls { width: 100%; margin-top: clamp(14px, 3vh, 26px); display: flex; align-items: center; justify-content: space-evenly; gap: 0; }
.npx-ctrl, .npx-play { position: relative; display: grid; place-items: center; color: #fff; background: transparent; border-radius: 50%; box-shadow: none; transition: transform .18s ease; }
.npx-ctrl { width: 74px; height: 74px; }
.npx-ctrl svg { width: 40px; height: 40px; }
.npx-play { width: 92px; height: 92px; }
.npx-play svg { width: 54px; height: 54px; filter: none; }
.npx-ctrl::before, .npx-play::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: rgba(255, 255, 255, .14); opacity: 0; transform: scale(.7); transition: opacity .2s, transform .2s; }
.npx-ctrl:active::before, .npx-play:active::before { opacity: 1; transform: none; }
.npx-ctrl:active, .npx-play:active { transform: scale(.88); }
.npx-ctrl:hover, .npx-play:hover { background: transparent; }

/* volume */
.npx-volume { width: 100%; margin-top: clamp(14px, 3vh, 26px); display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, .5); }
.npx-volume input { flex: 1; width: auto; -webkit-appearance: none; appearance: none; height: 7px; border-radius: 4px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, rgba(255, 255, 255, .78) var(--vol, 80%), rgba(255, 255, 255, .22) var(--vol, 80%)); }
.npx-volume input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: transparent; }
.npx-volume input::-moz-range-thumb { width: 14px; height: 14px; border: 0; background: transparent; }

/* bottom tools */
.npx-dock { width: 100%; margin-top: clamp(16px, 3.4vh, 30px); display: flex; justify-content: space-around; align-items: center; }
.npx-tool { width: 44px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: rgba(255, 255, 255, .62); transition: background .15s, color .15s; }
.npx-tool:hover { color: #fff; }
.npx-tool.is-on, .npx-tool.active { color: #fff; background: rgba(255, 255, 255, .18); }
.npx-output { cursor: default; }
.npx-output #npxOutputText { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#npxQueueToggle { visibility: visible; }
@media (min-width: 961px) { #npxQueueToggle { display: none; } }
@media (max-height: 700px) { .npx-art-wrap { width: min(40vh, 400px); } }
@media (prefers-reduced-motion: reduce) { .npx-bg::before, .npx-bg::after { animation: none; } }
.npx-output.is-on, .npx-output.active { background: transparent; color: rgba(255, 255, 255, .62); }
.npx :focus-visible { outline: 2px solid rgba(255, 255, 255, .55); outline-offset: 2px; }
.npx-tool.npx-output { background: transparent; padding: 0; border-radius: 9px; }
.npx-play:focus-visible, .npx-ctrl:focus-visible { outline: none; }


/* ---------- Élia 5: curved edges + floating top notch ---------- */
:root { --r-md: 14px; --r-lg: 24px; --r-xl: 30px; }
.sidebar, .main-view, .player-dock { border-radius: 26px; }
.pl-art-wrap, .pl-art, .qp-tile, .mix-card, .song-item, .track-card { border-radius: 16px; }
.qp-tile { overflow: hidden; }
.qp-art { border-radius: 12px; }
.search-box, .search-box input, .chip, .filter-chip { border-radius: 999px; }
.dock-art-wrap { border-radius: 14px; }

/* no Dynamic Island on PC: it's a phone idea */
@media (min-width: 769px) { .dynamic-island-container { display: none !important; } }

/* ---------- Élia 5: full themes ----------
   Each theme sets the page colour, the panels and the accent. The playing
   song adds only a light tint at the top. The user's pick is saved to their account. */
:root, :root[data-theme="navy"] {
  --bg: #0d1220; --panel: rgba(22, 30, 52, .82); --surface-2: #1d2742; --surface-3: #26314f;
  --accent: #6c8cff; --accent-soft: rgba(108, 140, 255, .16);
}
:root[data-theme="obsidian"] { --bg: #0b0b0e; --panel: rgba(22, 22, 27, .85); --surface-2: #1e1e24; --surface-3: #28282f; }
:root[data-theme="midnight"] { --bg: #000; --panel: rgba(14, 14, 16, .9); --surface-2: #17171a; --surface-3: #212125; }
:root[data-theme="cyber"]    { --bg: #110e22; --panel: rgba(32, 26, 58, .82); --surface-2: #2a2250; --surface-3: #342b60; }
:root[data-theme="ocean"]    { --bg: #08172a; --panel: rgba(16, 38, 62, .82); --surface-2: #17324f; --surface-3: #1f3d5e; }
:root[data-theme="emerald"]  { --bg: #0a1913; --panel: rgba(18, 40, 32, .82); --surface-2: #1b3a2e; --surface-3: #234638; }
:root[data-theme="rose"]     { --bg: #1b0e16; --panel: rgba(46, 24, 36, .82); --surface-2: #3a2030; --surface-3: #47283b; }
:root[data-theme="amber"]    { --bg: #19130a; --panel: rgba(44, 34, 18, .82); --surface-2: #3a2e1a; --surface-3: #463822; }
:root[data-theme="lavender"] { --bg: #16122a; --panel: rgba(38, 31, 62, .82); --surface-2: #322a52; --surface-3: #3d3460; }
:root[data-theme="crimson"]  { --bg: #190b0d; --panel: rgba(44, 19, 23, .82); --surface-2: #3a1c21; --surface-3: #47242a; }
:root[data-theme="aqua"]     { --bg: #071a1c; --panel: rgba(15, 42, 45, .82); --surface-2: #17393c; --surface-3: #1f4548; }
:root { --surface-1: var(--panel); --tint: var(--ambient-accent-rgb, 0, 0, 0); }

body {
  background: radial-gradient(80% 60% at 20% -10%, rgba(var(--tint), .14), transparent 70%), var(--bg);
  transition: background .8s ease;
}
.ambient-scene { display: none !important; }
.sidebar, .main-view, .player-dock {
  background-color: var(--panel) !important;
  border: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .6);
}
.main-view { background-image: linear-gradient(180deg, rgba(var(--tint), .14) 0, rgba(var(--tint), 0) 320px) !important; transition: background-image 1s ease; }
.nav-item.active { background: var(--accent-soft); }

/* =====================================================================
   Élia 5 — Now Playing for PC (desktop layout, not the phone sheet)
   Cover left, details and controls right, queue on the side (can be hidden).
   ===================================================================== */
@media (min-width: 961px) {
  .npx-shade { background: linear-gradient(90deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .55)); }
  .npx-top { justify-content: flex-start; padding: 18px 24px 0; }
  .npx-grabber { width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .1); transition: background .2s; }
  .npx-grabber:hover { background: rgba(255, 255, 255, .2); }
  .npx-grabber span, .npx-grabber:hover span { width: 11px; height: 11px; border-radius: 1px; background: none;
    border-right: 2.4px solid #fff; border-bottom: 2.4px solid #fff; transform: translateY(-3px) rotate(45deg); }

  .npx-main { grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; padding: 0 48px 40px; }
  .npx.hide-queue .npx-main { grid-template-columns: minmax(0, 1fr); }
  .npx.hide-queue .npx-queue { display: none; }
  .npx-queue { max-height: calc(100vh - 110px); background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .08); }

  .npx-player { display: grid; width: 100%; max-width: 1000px; margin: 0 auto; align-content: center; row-gap: 18px;
    grid-template-columns: min(54vh, 440px) 56px repeat(5, minmax(0, 1fr)); }
  .npx-controls, .npx-dock { display: contents; }
  .npx-art-wrap { grid-column: 1; grid-row: 1 / span 5; align-self: center; width: 100%; border-radius: 18px;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .7); }
  .npx-art-wrap.is-paused { transform: scale(.96); }
  .npx-meta { grid-column: 3 / 8; grid-row: 1; margin: 0; align-self: end; }
  .npx-title { font-size: clamp(1.6rem, 2.6vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; white-space: normal;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .npx-artist { font-size: 1.05rem; font-weight: 500; margin-top: 6px; color: rgba(255, 255, 255, .65); }
  .npx-like { flex: 0 0 42px; width: 42px; height: 42px; }
  .npx-progress { grid-column: 3 / 8; grid-row: 2; margin: 6px 0 0; }
  .npx-bar::before, .npx-fill { height: 5px; }
  .npx-bar:hover .npx-knob { display: block; opacity: 1; }

  #npxShuffle { grid-column: 3; } #npxPrev { grid-column: 4; } #npxPlay { grid-column: 5; } #npxNext { grid-column: 6; } #npxRepeat { grid-column: 7; }
  #npxShuffle, #npxPrev, #npxPlay, #npxNext, #npxRepeat { grid-row: 3; justify-self: center; align-self: center; }
  .npx-ctrl { width: 56px; height: 56px; }
  .npx-ctrl svg { width: 30px; height: 30px; }
  .npx-ctrl:hover { background: rgba(255, 255, 255, .1); }
  .npx-play { width: 70px; height: 70px; background: #fff; color: #0b0b0e; box-shadow: 0 14px 30px -8px rgba(0, 0, 0, .5); }
  .npx-play:hover { background: #fff; transform: scale(1.05); }
  .npx-play svg { width: 34px; height: 34px; }
  #npxShuffle, #npxRepeat { width: 46px; height: 46px; border-radius: 50%; }
  #npxShuffle:hover, #npxRepeat:hover { background: rgba(255, 255, 255, .1); }

  .npx-volume { grid-column: 3 / 8; grid-row: 4; margin: 4px 0 0; color: rgba(255, 255, 255, .75); }
  .npx-volume input { height: 5px; }
  .npx-volume input::-webkit-slider-thumb { width: 14px; height: 14px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
  .npx-volume input::-moz-range-thumb { background: #fff; }

  #npxOutput { grid-column: 3 / 6; grid-row: 5; justify-self: start; width: auto; height: 34px; padding: 0 14px; gap: 8px;
    display: inline-flex; border-radius: 999px; background: rgba(255, 255, 255, .1) !important; color: rgba(255, 255, 255, .85); }
  #npxOutput svg { width: 17px; height: 17px; }
  .npx-output #npxOutputText { position: static; width: auto; height: auto; overflow: visible; clip: auto; font-size: .82rem; }
  #npxQueueToggle { display: inline-flex !important; grid-column: 6 / 8; grid-row: 5; justify-self: end; width: auto; height: 34px;
    padding: 0 14px; gap: 8px; align-items: center; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #fff; }
  #npxQueueToggle svg { width: 17px; height: 17px; }
  #npxQueueToggle::after { content: "Hide up next"; font-size: .82rem; font-weight: 600; }
  .npx.hide-queue #npxQueueToggle::after { content: "Show up next"; }
  #npxQueueToggle:hover { background: rgba(255, 255, 255, .18); }
}

/* =====================================================================
   Élia 5 — Search page
   ===================================================================== */
.sx-block { margin-top: 34px; }
.sx-head { margin-bottom: 16px; }
.sx-head h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.03em; }

/* recent searches */
.sx-recent-item { height: 36px; padding: 0 8px 0 14px; gap: 8px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); transition: background .15s; }
.sx-recent-item:hover { background: rgba(255, 255, 255, .11); }

/* trending: two clean columns, each row = rank, cover, title over artist, plays */
.sx-trend-grid { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 6px 18px; padding: 10px; border-radius: 20px;
  background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .06); }
.sx-trend { display: grid; grid-template-columns: 26px 52px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 8px 12px; border-radius: 14px; transition: background .15s; }
.sx-trend:hover { background: rgba(255, 255, 255, .07); }
.sx-rank { width: auto; font-size: 1rem; font-weight: 800; color: var(--text-3); }
.sx-trend:nth-child(-n+3) .sx-rank { color: var(--accent); }
.sx-trend-art { width: 52px; height: 52px; border-radius: 10px; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.sx-trend-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sx-trend-title { display: block; font-size: .95rem; font-weight: 650; color: var(--text-1); }
.sx-trend-artist { display: block; font-size: .82rem; }
.sx-trend-plays { font-size: .74rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: var(--text-2); }

/* browse all: coloured cards, cover tucked in the corner */
.sx-browse { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.sx-tile { aspect-ratio: 1.55; padding: 18px; border-radius: 20px; isolation: isolate;
  background: linear-gradient(135deg, var(--tile, #3b3b55) 0%, color-mix(in srgb, var(--tile, #3b3b55) 55%, #000) 100%);
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .12);
  transition: transform .25s var(--ease-out), box-shadow .25s; }
.sx-tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, .16), transparent 55%); }
.sx-tile:hover { transform: translateY(-4px); box-shadow: 0 20px 36px -14px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .16); }
.sx-tile-name { display: block; max-width: 62%; font-size: 1.15rem; font-weight: 800; line-height: 1.15; text-shadow: 0 1px 8px rgba(0, 0, 0, .25); }
.sx-tile-art { right: -14px; bottom: -10px; width: 48%; border-radius: 12px; transform: rotate(20deg); box-shadow: 0 10px 24px rgba(0, 0, 0, .5); transition: transform .3s var(--ease-out); }
.sx-tile:hover .sx-tile-art { transform: rotate(14deg) scale(1.06); }
