/* ═══════════════════════════════════════════
   VORLENTIS — Design System
   Dark glass + neon violet/cyan
   No heavy animations — performance first
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #0a0a0f;
  --bg2:          #0f0f18;
  --bg3:          #16162a;
  --glass:        rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.08);
  --accent:       #7c5cfc;
  --accent2:      #00d4ff;
  --accent-glow:  rgba(124,92,252,0.3);
  --text:         #f0f0ff;
  --text2:        #8888aa;
  --text3:        #44445a;
  --danger:       #ff4466;
  --green:        #1db954;
  --sidebar-w:    220px;
  --player-h:     88px;
  --r:            12px;
  --r2:           18px;
}

html, body {
  height: 100%; background: var(--bg); color: var(--text);
  font-family: 'Outfit', sans-serif; overflow: hidden;
}
a { text-decoration: none; color: inherit; }
button { background: none; border: none; cursor: pointer; color: inherit; font-family: inherit; }
input { font-family: inherit; }
ul { list-style: none; }

/* ── LAYOUT ── */
body {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 1fr var(--player-h);
  grid-template-areas: "sidebar main" "player player";
}

/* subtle static bg gradient — no animation */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 600px 400px at -10% -10%, rgba(124,92,252,0.08), transparent),
    radial-gradient(ellipse 500px 400px at 110% 110%, rgba(0,212,255,0.05), transparent);
}

/* ── SIDEBAR ── */
.sidebar {
  grid-area: sidebar;
  background: rgba(8,8,16,0.9);
  border-right: 1px solid var(--glass-border);
  display: flex; flex-direction: column;
  padding: 18px 10px 12px;
  gap: 4px; overflow-y: auto; overflow-x: hidden;
  position: relative; z-index: 20;
  transition: transform 0.25s ease;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 2px; }

.vrl-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 14px; flex-shrink: 0;
}
.logo-icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.logo-icon img { width: 34px; height: 34px; display: block; border-radius: 9px; }
.logo-text { font-size: 17px; font-weight: 800; letter-spacing: -0.5px; white-space: nowrap; }

.vrl-nav { display: flex; flex-direction: column; gap: 2px; }
.vrl-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px; border-radius: var(--r);
  color: var(--text2); font-weight: 500; font-size: 14px;
  transition: color 0.15s, background 0.15s;
}
.vrl-nav-item i { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }
.vrl-nav-item:hover { color: var(--text); background: var(--glass); }
.vrl-nav-item.active {
  color: var(--text);
  background: rgba(124,92,252,0.14);
  border-left: 2px solid var(--accent);
}

.sidebar-divider { height: 1px; background: var(--glass-border); margin: 6px 4px; flex-shrink: 0; }

.sidebar-section-label {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 10px; color: var(--text3);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  flex-shrink: 0;
}

.vrl-playlist-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; min-height: 0; }
.vrl-playlist-item {
  padding: 7px 10px; border-radius: 8px;
  color: var(--text2); font-size: 13px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.15s, background 0.15s;
}
.vrl-playlist-item:hover { color: var(--text); background: var(--glass); }
.vrl-playlist-item.active { color: var(--accent); }

.sidebar-footer {
  margin-top: auto; padding-top: 10px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.source-pills { display: flex; gap: 5px; flex-wrap: wrap; }
.src-pill {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 500px;
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text2); font-size: 11px; font-weight: 600;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.src-pill:hover { color: var(--text); border-color: var(--accent); }
.src-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Credits */
.sidebar-credits {
  font-size: 10px; color: var(--text3); line-height: 1.6;
  padding: 0 4px 4px;
}
.sidebar-credits a { color: var(--accent); }

/* ── MAIN ── */
.vrl-main {
  grid-area: main;
  display: flex; flex-direction: column;
  overflow: hidden; position: relative; z-index: 5;
}

/* ── TOPBAR ── */
.vrl-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  background: rgba(8,8,16,0.7);
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.topbar-left, .topbar-right { flex-shrink: 0; display: flex; align-items: center; gap: 6px; }

.vrl-searchbar {
  flex: 1; max-width: 440px;
  display: flex; align-items: center; gap: 8px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 500px; padding: 7px 14px;
  transition: border-color 0.15s;
}
.vrl-searchbar:focus-within { border-color: var(--accent); }
.vrl-searchbar i { color: var(--text3); font-size: 13px; flex-shrink: 0; }
.vrl-searchbar input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 14px; min-width: 0;
}
.vrl-searchbar input::placeholder { color: var(--text3); }

/* ── VIEWS ── */
.vrl-views { flex: 1; overflow: hidden; position: relative; }
.vrl-view {
  display: none; height: 100%; overflow-y: auto;
  padding: 24px 20px 40px;
}
.vrl-view.active { display: block; }
.vrl-view::-webkit-scrollbar { width: 5px; }
.vrl-view::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 3px; }

.view-title { font-size: 22px; font-weight: 800; margin-bottom: 20px; }

/* ── HERO ── */
.hero-banner {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, rgba(124,92,252,0.12), rgba(0,212,255,0.06));
  border: 1px solid var(--glass-border);
  border-radius: var(--r2); padding: 28px 32px;
  margin-bottom: 28px; overflow: hidden; position: relative;
  gap: 16px;
}
.hero-eyebrow { color: var(--accent2); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }
.hero-title { font-size: 28px; font-weight: 800; line-height: 1.2; }
.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* Vinyl — only spins when playing, no glow animation */
.vinyl {
  width: 100px; height: 100px; border-radius: 50%;
  background: conic-gradient(#1a1a2e 0deg, #16213e 90deg, #0f3460 180deg, #1a1a2e 270deg, #16213e 360deg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 24px rgba(124,92,252,0.2);
}
.vinyl.spinning { animation: vinylSpin 6s linear infinite; }
@keyframes vinylSpin { to { transform: rotate(360deg); } }

.vinyl-label {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.vinyl-label img { width: 32px; height: 32px; border-radius: 50%; }

/* ── SECTIONS ── */
.vrl-section { margin-bottom: 28px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-header h2 { font-size: 16px; font-weight: 700; }
.queue-count, .section-sub { color: var(--text3); font-size: 12px; }

/* ── CARDS ── */
.vrl-card-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.vrl-card-row::-webkit-scrollbar { height: 3px; }
.vrl-card-row::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 2px; }

.vrl-card, .featured-card {
  flex-shrink: 0; width: 148px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--r); padding: 12px;
  cursor: pointer; position: relative; overflow: hidden;
  transition: background 0.15s;
}
.featured-card { width: 190px; }
.vrl-card:hover, .featured-card:hover { background: rgba(255,255,255,0.07); }
.vrl-card:hover .card-play-btn, .featured-card:hover .card-play-btn { opacity: 1; }

.card-art {
  width: 100%; aspect-ratio: 1; border-radius: 7px;
  background: var(--bg3); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--text3); margin-bottom: 9px;
}
.featured-card .card-art { aspect-ratio: 16/9; }
.card-art img { width: 100%; height: 100%; object-fit: cover; }
.card-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { font-size: 11px; color: var(--text2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.card-play-btn {
  position: absolute; bottom: 46px; right: 10px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s;
  box-shadow: 0 2px 12px var(--accent-glow);
}

/* ── QUEUE LIST ── */
.vrl-queue { display: flex; flex-direction: column; gap: 1px; }

.q-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 9px;
  cursor: pointer; transition: background 0.12s;
}
.q-item:hover { background: var(--glass); }
.q-item.active { background: rgba(124,92,252,0.1); }
.q-item.active .q-title { color: var(--accent); }

.q-num { width: 20px; text-align: center; color: var(--text3); font-size: 11px; flex-shrink: 0; }
.q-item.active .q-num { display: none; }
.q-wave { display: none; width: 20px; text-align: center; color: var(--accent); font-size: 11px; flex-shrink: 0; }
.q-item.active .q-wave { display: block; }

.q-art {
  width: 38px; height: 38px; border-radius: 5px;
  background: var(--bg3); flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--text3);
}
.q-art img { width: 100%; height: 100%; object-fit: cover; }

.q-info { flex: 1; min-width: 0; }
.q-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-artist { font-size: 11px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.q-src { font-size: 11px; color: var(--text3); flex-shrink: 0; }
.q-src.yt { color: #ff4444; }
.q-src.sp { color: var(--green); }
.q-dur { font-size: 11px; color: var(--text3); flex-shrink: 0; }

/* ── SEARCH ── */
.vrl-search-results { min-height: 200px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 60px 0; color: var(--text3); }
.empty-state i { font-size: 36px; }
.empty-state p { font-size: 14px; }
.search-group-title { font-size: 14px; font-weight: 700; margin: 18px 0 8px; color: var(--text2); }

/* ── NOW PLAYING BAR ── */
.vrl-player {
  grid-area: player;
  background: rgba(6,6,14,0.95);
  border-top: 1px solid var(--glass-border);
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  z-index: 100;
  position: relative;
}
/* accent line — static, no animation */
.vrl-player::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 40%, var(--accent2) 60%, transparent 100%);
  opacity: 0.4;
}

/* Track info */
.player-track { display: flex; align-items: center; gap: 10px; min-width: 0; }
.player-art {
  width: 50px; height: 50px; border-radius: 7px;
  background: var(--bg3); flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.player-art img { width: 100%; height: 100%; object-fit: cover; }
.art-placeholder { font-size: 18px; color: var(--text3); }
/* playing ring — no pulse animation, just a static ring */
.player-art.playing { box-shadow: 0 0 0 2px var(--accent); }

.player-meta { min-width: 0; flex: 1; }
.player-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-artist { font-size: 11px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Controls */
.player-center { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.player-controls { display: flex; align-items: center; gap: 12px; }

.ctrl-btn {
  color: var(--text2); font-size: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.12s, background 0.12s;
}
.ctrl-btn:hover { color: var(--text); background: var(--glass); }
.ctrl-btn.active { color: var(--accent); }

.play-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.12s;
}
.play-btn:hover { opacity: 0.88; }

/* Progress */
.player-progress { display: flex; align-items: center; gap: 8px; width: 100%; }
.time { font-size: 10px; color: var(--text3); flex-shrink: 0; min-width: 28px; }
#timeCur { text-align: right; }

.progress-track {
  flex: 1; height: 3px; background: var(--bg3);
  border-radius: 2px; cursor: pointer; position: relative;
  padding: 6px 0; margin: -6px 0;
}
.progress-track:hover .progress-fill { background: var(--accent); }
.progress-track:hover .progress-dot { opacity: 1; }
.progress-fill { height: 3px; background: var(--text3); border-radius: 2px; width: 0%; pointer-events: none; }
.progress-dot {
  position: absolute; top: 50%; left: 0%;
  transform: translate(-50%, -50%);
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--text); opacity: 0;
  transition: opacity 0.12s; pointer-events: none;
}

/* Right */
.player-right { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.source-badge {
  font-size: 12px; padding: 2px 7px; border-radius: 500px;
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text2); flex-shrink: 0;
}
.source-badge.yt { color: #ff4444; }
.source-badge.sp { color: var(--green); }

.vol-track {
  width: 68px; height: 3px; background: var(--bg3);
  border-radius: 2px; cursor: pointer; position: relative;
  padding: 6px 0; margin: -6px 0;
}
.vol-track:hover .progress-fill { background: var(--accent); }

/* ── BUTTONS ── */
.vrl-icon-btn {
  width: 30px; height: 30px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); font-size: 13px;
  transition: color 0.12s, background 0.12s;
}
.vrl-icon-btn:hover { color: var(--text); background: var(--glass); }

.like-btn.liked { color: var(--danger); }
.like-btn.liked i::before { content: "\f004"; font-weight: 900; }

/* Share button in player */
.share-song-btn { color: var(--text2); }
.share-song-btn:hover { color: var(--accent2); }

.vrl-pill-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 500px;
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text); font-size: 13px; font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.vrl-pill-btn:hover { background: var(--accent); border-color: var(--accent); }
.vrl-pill-btn.small { padding: 4px 10px; font-size: 11px; }

/* ── MODAL ── */
.vrl-modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; opacity: 0; pointer-events: none;
  transition: opacity 0.18s;
}
.vrl-modal-bg.open { opacity: 1; pointer-events: all; }

.vrl-modal {
  background: var(--bg2); border: 1px solid var(--glass-border);
  border-radius: var(--r2); padding: 24px;
  width: 400px; max-width: 92vw;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.modal-top { display: flex; align-items: center; justify-content: space-between; }
.modal-top h3 { font-size: 16px; font-weight: 700; }
.modal-src-row { display: flex; gap: 8px; }

.vrl-input {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--r); padding: 9px 13px;
  color: var(--text); font-size: 14px; width: 100%;
  outline: none; transition: border-color 0.15s;
}
.vrl-input:focus { border-color: var(--accent); }

.vrl-action-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px; border-radius: var(--r);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-size: 14px; font-weight: 700;
  transition: opacity 0.15s;
}
.vrl-action-btn:hover { opacity: 0.88; }

/* ── SHARE MODAL ── */
.share-track-preview {
  display: flex; align-items: center; gap: 12px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--r); padding: 11px;
}
.share-track-preview img { width: 44px; height: 44px; border-radius: 5px; object-fit: cover; flex-shrink: 0; }
.stp-icon { width: 44px; height: 44px; border-radius: 5px; background: var(--bg3); display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--text3); flex-shrink: 0; }
.stp-title { font-weight: 600; font-size: 13px; }
.stp-artist { font-size: 11px; color: var(--text2); }

.share-link-row { display: flex; gap: 7px; align-items: center; }
.share-link-row .vrl-input { font-size: 11px; color: var(--text2); }
.copy-btn { flex-shrink: 0; width: 34px; height: 34px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--glass-border); }
.copy-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.copy-success { color: var(--accent2) !important; }

.share-btns { display: flex; gap: 8px; }
.share-social-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px; border-radius: var(--r);
  font-size: 13px; font-weight: 600; transition: opacity 0.15s;
}
.share-social-btn:hover { opacity: 0.85; }
.share-social-btn.twitter { background: #000; color: #fff; }
.share-social-btn.whatsapp { background: #25d366; color: #fff; }

/* ── AD OVERLAY ── */
.vrl-ad-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.82);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.vrl-ad-overlay.show { opacity: 1; pointer-events: all; }

.ad-card {
  background: var(--bg2); border: 1px solid var(--glass-border);
  border-radius: var(--r2); padding: 36px 30px;
  width: 360px; max-width: 90vw;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,0.7);
  position: relative;
}
.ad-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 4px; padding: 2px 6px;
  font-size: 9px; font-weight: 700; color: var(--text3); text-transform: uppercase;
}
.ad-icon { font-size: 48px; color: #5865f2; }
.ad-title { font-size: 20px; font-weight: 800; }
.ad-sub { color: var(--text2); font-size: 13px; line-height: 1.5; }
.ad-join-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 24px; border-radius: 500px;
  background: #5865f2; color: #fff;
  font-size: 14px; font-weight: 700;
  transition: opacity 0.15s;
}
.ad-join-btn:hover { opacity: 0.88; }
.ad-skip-btn {
  color: var(--text3); font-size: 12px; padding: 5px 12px;
  border-radius: 500px; border: 1px solid var(--glass-border);
  transition: color 0.15s, border-color 0.15s;
}
.ad-skip-btn:not(:disabled):hover { color: var(--text); border-color: var(--text3); }
.ad-skip-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── TOAST ── */
.vrl-toast {
  position: fixed; bottom: 100px; left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg3); border: 1px solid var(--glass-border);
  color: var(--text); padding: 8px 18px; border-radius: 500px;
  font-size: 13px; font-weight: 500;
  opacity: 0; transition: opacity 0.2s, transform 0.2s;
  z-index: 9999; pointer-events: none; white-space: nowrap;
}
.vrl-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── SPINNER ── */
.spinner {
  width: 26px; height: 26px;
  border: 3px solid var(--bg3); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.7s linear infinite;
  margin: 50px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════
   MISC HELPERS
════════════════════════════════════════════ */
.hint-text { color: var(--text3); font-size: 13px; padding: 8px 0; }
.btn-label { display: inline; }

/* ════════════════════════════════════════════
   TABLET  ≤ 900px
════════════════════════════════════════════ */
@media (max-width: 900px) {
  :root { --sidebar-w: 62px; }

  .logo-text,
  .vrl-nav-item span,
  .sidebar-section-label,
  .vrl-playlist-list,
  .sidebar-credits,
  .source-pills { display: none; }

  .vrl-logo { justify-content: center; padding: 4px 0 14px; }
  .vrl-nav-item { justify-content: center; padding: 12px 0; }
  .sidebar-footer { padding-top: 4px; }

  /* hide vol on tablet */
  .vol-track { display: none; }
}

/* ════════════════════════════════════════════
   MOBILE  ≤ 640px
   Layout: main → mini-player → bottom-nav
════════════════════════════════════════════ */
@media (max-width: 640px) {
  :root {
    --sidebar-w: 0px;
    --player-h: auto;
  }

  /* ── Grid ── */
  body {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto auto;
    grid-template-areas:
      "main"
      "player"
      "sidebar";
    overflow: hidden;
    height: 100dvh; /* dynamic viewport height — handles mobile browser chrome */
  }

  /* ── Bottom nav (was sidebar) ── */
  .sidebar {
    grid-area: sidebar;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-around;
    padding: 0 0 env(safe-area-inset-bottom, 0px);
    border-right: none;
    border-top: 1px solid var(--glass-border);
    background: rgba(6,6,14,0.97);
    overflow: visible;
    height: auto;
    min-height: 56px;
    gap: 0;
  }
  /* hide everything except nav */
  .vrl-logo, .sidebar-divider, .sidebar-section-label,
  .vrl-playlist-list, .sidebar-footer, .sidebar-credits { display: none !important; }

  .vrl-nav {
    flex-direction: row;
    flex: 1;
    justify-content: space-around;
    align-items: stretch;
    gap: 0;
  }
  .vrl-nav-item {
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    border-left: none !important;
    background: none !important;
    border-radius: 0;
    color: var(--text3);
    font-size: 10px;
    min-width: 0;
  }
  .vrl-nav-item span { display: block !important; font-size: 10px; line-height: 1; }
  .vrl-nav-item i { font-size: 20px; width: auto; }
  .vrl-nav-item.active { color: var(--accent); }
  .vrl-nav-item.active i { color: var(--accent); }

  /* ── Mini player — compact single row on mobile ── */
  .vrl-player {
    grid-area: player;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "track  controls"
      "prog   prog";
    padding: 10px 12px 8px;
    gap: 6px 10px;
    align-items: center;
  }

  .player-track {
    grid-area: track;
    gap: 8px;
    min-width: 0;
  }
  .player-art { width: 42px; height: 42px; border-radius: 6px; flex-shrink: 0; }
  .player-meta { min-width: 0; flex: 1; }
  .player-title { font-size: 13px; max-width: none; }
  .player-artist { font-size: 11px; max-width: none; }

  /* like + share + expand — keep them small */
  .like-btn, .share-song-btn, .expand-btn { width: 28px; height: 28px; font-size: 13px; }

  /* controls inline on the right */
  .player-center {
    grid-area: controls;
    flex-direction: row;
    gap: 0;
    align-items: center;
  }
  .player-controls { gap: 4px; }
  .ctrl-btn { width: 28px; height: 28px; font-size: 14px; }
  .play-btn { width: 36px; height: 36px; font-size: 13px; }

  /* hide shuffle + repeat on mobile mini player — they're in expanded */
  #shuffleBtn, #repeatBtn { display: none; }

  /* progress full width below */
  .player-progress {
    grid-area: prog;
    gap: 6px;
  }
  .time { font-size: 10px; min-width: 24px; }

  /* hide right section entirely on mobile */
  .player-right { display: none; }

  /* ── Main ── */
  .vrl-main { grid-area: main; overflow: hidden; }

  /* ── Topbar ── */
  .vrl-topbar { padding: 8px 12px; gap: 8px; }
  .vrl-searchbar { max-width: none; }
  .btn-label { display: none; }

  /* ── Views ── */
  .vrl-view { padding: 14px 12px 24px; }
  .view-title { font-size: 20px; margin-bottom: 16px; }

  /* ── Hero ── */
  .hero-banner { padding: 18px 16px; gap: 0; }
  .hero-title { font-size: 24px; }
  .vinyl { display: none; }

  /* ── Cards ── */
  .vrl-card { width: 128px; }
  .featured-card { width: 155px; }

  /* ── Modals slide up from bottom ── */
  .vrl-modal-bg { align-items: flex-end; }
  .vrl-modal {
    width: 100%; max-width: 100%;
    border-radius: var(--r2) var(--r2) 0 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }
}

/* ════════════════════════════════════════════
   VERY SMALL  ≤ 380px
════════════════════════════════════════════ */
@media (max-width: 380px) {
  .vrl-card { width: 115px; }
  .featured-card { width: 140px; }
  .hero-title { font-size: 20px; }
  .vrl-nav-item span { font-size: 9px; }
  .vrl-nav-item i { font-size: 18px; }
}

/* ════════════════════════════════════════════
   EXPANDED NOW PLAYING PANEL
   Slides up over the whole app — not browser fullscreen
════════════════════════════════════════════ */
.np-expanded {
  position: fixed;
  inset: 0;
  z-index: 500;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.np-expanded.open { transform: translateY(0); }

.npe-bg {
  position: absolute; inset: 0; z-index: 0;
  background: var(--bg2);
}
.npe-bg.has-art {
  background-size: cover;
  background-position: center;
  filter: blur(40px) brightness(0.25) saturate(2);
}
.npe-bg::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(6,6,14,0.7);
}

.npe-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  height: 100%; overflow-y: auto;
  padding: 0 24px calc(24px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}
.npe-inner::-webkit-scrollbar { display: none; }

.npe-topbar {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 16px 0 8px; flex-shrink: 0;
}
.npe-label { font-size: 12px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.1em; }

.npe-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); font-size: 16px;
  background: none; border: none; cursor: pointer;
  transition: color 0.12s, background 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.npe-btn:hover { color: var(--text); background: var(--glass); }
.npe-btn.liked { color: var(--danger); }

.npe-art-wrap {
  width: min(300px, 70vw);
  margin: 12px 0 20px; flex-shrink: 0;
}
.npe-art {
  width: 100%; aspect-ratio: 1; border-radius: 14px;
  background: var(--bg3); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 56px; color: var(--text3);
  box-shadow: 0 20px 50px rgba(0,0,0,0.55);
}
.npe-art img { width: 100%; height: 100%; object-fit: cover; }

.npe-info { text-align: center; width: 100%; flex-shrink: 0; margin-bottom: 10px; padding: 0 8px; }
.npe-title { font-size: 20px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.npe-artist { font-size: 14px; color: var(--text2); margin-top: 4px; }

.npe-actions { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-shrink: 0; }

.npe-progress { width: 100%; flex-shrink: 0; margin-bottom: 4px; }
.npe-progress .progress-track { width: 100%; height: 4px; padding: 10px 0; margin: -10px 0; }
.npe-progress .progress-fill { height: 4px; }
.npe-times { display: flex; justify-content: space-between; font-size: 11px; color: var(--text3); margin-top: 12px; }

.npe-controls { display: flex; align-items: center; gap: 18px; margin: 14px 0; flex-shrink: 0; }
.npe-play { width: 54px !important; height: 54px !important; font-size: 20px !important; }

.npe-volume { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-shrink: 0; width: 100%; max-width: 280px; }
.npe-volume .vol-track { flex: 1; display: block; }

.npe-queue-section { width: 100%; flex-shrink: 0; }
.npe-queue-title { font-size: 12px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.npe-queue { display: flex; flex-direction: column; gap: 1px; }

/* Desktop: constrain and offset from top */
@media (min-width: 700px) {
  .np-expanded { top: 56px; border-radius: 18px 18px 0 0; box-shadow: 0 -6px 32px rgba(0,0,0,0.5); }
  .npe-inner { max-width: 460px; margin: 0 auto; width: 100%; }
}

