/* ==========================================================================
   GG MUSIC — SPOTIFY & APPLE MUSIC INSPIRED DESIGN SYSTEM
   Supports: Dark Mode (OLED Pitch Black) & Light Mode (Clean Apple Frost)
   ========================================================================== */

/* DARK THEME (Default) */
body.theme-dark {
  --bg-black: #000000;
  --bg-base: #121212;
  --bg-surface: #181818;
  --bg-elevated: #242424;
  --bg-highlight: #2a2a2a;
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-card-hover: rgba(255, 255, 255, 0.12);
  
  --spotify-green: #1ed760;
  --spotify-green-hover: #1fdf64;
  
  --text-primary: #ffffff;
  --text-subdued: #b3b3b3;
  --text-muted: #727272;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.05);
  --nav-backdrop: linear-gradient(180deg, rgba(18, 18, 18, 0.9) 0%, #000 100%);
  --modal-bg: #1e1e1e;
  --mini-player-bg: #282828;
}

/* LIGHT THEME (Apple Music & Clean Modern) */
body.theme-light {
  --bg-black: #ffffff;
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --bg-highlight: #e2e8f0;
  --bg-card: rgba(0, 0, 0, 0.04);
  --bg-card-hover: rgba(0, 0, 0, 0.08);
  
  --spotify-green: #10b981;
  --spotify-green-hover: #059669;
  
  --text-primary: #0f172a;
  --text-subdued: #475569;
  --text-muted: #64748b;
  
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-card: rgba(0, 0, 0, 0.05);
  --nav-backdrop: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, #f8fafc 100%);
  --modal-bg: #ffffff;
  --mini-player-bg: #ffffff;
}

:root {
  --font-stack: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bottom-nav-height: 64px;
  --mini-player-height: 56px;
  --topbar-height: 56px;
  
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-black);
  color: var(--text-primary);
  font-family: var(--font-stack);
  font-size: 14px;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.app-shell {
  display: flex;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  position: relative;
  background: var(--bg-black);
}

/* ==========================================================================
   DESKTOP SIDEBAR
   ========================================================================== */
.desktop-sidebar {
  display: none;
  width: 250px;
  min-width: 250px;
  background: var(--bg-base);
  border-right: 1px solid var(--border-subtle);
  flex-direction: column;
  padding: 24px 16px;
  gap: 20px;
}

@media (min-width: 900px) {
  .desktop-sidebar {
    display: flex;
  }
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 8px;
}

.logo-icon {
  width: 36px;
  height: 36px;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.brand-tag {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--spotify-green);
  font-weight: 700;
  display: block;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.s-nav-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 6px;
  background: none;
  border: none;
  color: var(--text-subdued);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.s-nav-btn .icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.s-nav-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.s-nav-btn.active {
  color: var(--text-primary);
  background: var(--bg-surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.s-nav-btn.active .icon {
  fill: var(--spotify-green);
}

.btn-sidebar-create-pl {
  background: var(--bg-elevated);
  border: 1px dashed var(--border-subtle);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-sidebar-create-pl:hover {
  background: var(--bg-highlight);
  border-color: var(--spotify-green);
}

.btn-sidebar-create-pl svg {
  width: 18px;
  height: 18px;
  fill: var(--spotify-green);
}

.sidebar-footer-card {
  margin-top: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px;
  font-size: 11px;
}

.sf-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-subdued);
  margin-bottom: 6px;
}

.sf-progress {
  width: 100%;
  height: 4px;
  background: rgba(128, 128, 128, 0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.sf-bar {
  height: 100%;
  background: var(--spotify-green);
}

.sf-quality {
  color: var(--spotify-green);
  font-weight: 700;
  font-size: 10px;
}

/* ==========================================================================
   MAIN VIEWPORT & TOPBAR
   ========================================================================== */
.main-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
  background: var(--bg-black);
}

.spotify-topbar {
  height: var(--topbar-height);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 10;
  padding-top: var(--safe-top);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon-sm {
  width: 28px;
  height: 28px;
  display: block;
}

@media (min-width: 900px) {
  .mobile-brand-icon {
    display: none;
  }
}

.topbar-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-icon-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-subdued);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.topbar-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.topbar-icon-btn:hover {
  color: var(--text-primary);
  background: var(--bg-highlight);
}

/* User Profile Nickname Chip */
.topbar-user-chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  height: 36px;
  padding: 0 12px 0 6px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.topbar-user-chip:hover {
  background: var(--bg-highlight);
  border-color: var(--spotify-green);
}

.user-avatar-initial {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--spotify-green);
  color: #000;
  font-weight: 800;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tab Content Area */
.tab-content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--bottom-nav-height) + var(--mini-player-height) + 24px + var(--safe-bottom));
  scrollbar-width: none;
}

.tab-content-area::-webkit-scrollbar {
  display: none;
}

.page-tab {
  display: none;
  padding: 12px 16px 20px;
}

.page-tab.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0.7; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

/* ==========================================================================
   CHIP FILTER BAR
   ========================================================================== */
.chips-scroll-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 16px;
  scrollbar-width: none;
}

.chips-scroll-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-subdued);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.filter-chip.active {
  background: var(--spotify-green);
  border-color: var(--spotify-green);
  color: #000;
  font-weight: 700;
}

/* ==========================================================================
   QUICK PICKS 6-GRID
   ========================================================================== */
.quick-picks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

@media (min-width: 600px) {
  .quick-picks-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.quick-pick-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  position: relative;
}

.quick-pick-card:hover {
  background: var(--bg-card-hover);
}

.quick-pick-card.playing {
  background: rgba(30, 215, 96, 0.2);
  border-color: var(--spotify-green);
}

.quick-pick-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  flex-shrink: 0;
}

.quick-pick-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding-right: 8px;
}

/* ==========================================================================
   HORIZONTAL SHELVES & CAROUSELS
   ========================================================================== */
.shelf-section {
  margin-bottom: 28px;
}

.shelf-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
}

.shelf-header h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.shelf-sub {
  font-size: 12px;
  color: var(--text-subdued);
  margin-top: 2px;
}

.btn-create-playlist-pill {
  background: var(--spotify-green);
  color: #000;
  border: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 9999px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn-create-playlist-pill:hover {
  transform: scale(1.04);
}

.see-all-btn {
  background: none;
  border: none;
  color: var(--text-subdued);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px;
}

.see-all-btn:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.shelf-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.shelf-carousel::-webkit-scrollbar {
  display: none;
}

/* Card in Shelves */
.music-item-card {
  width: 140px;
  min-width: 140px;
  background: transparent;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border-radius: 8px;
  padding: 6px;
  transition: all 0.15s ease;
}

@media (min-width: 600px) {
  .music-item-card {
    width: 160px;
    min-width: 160px;
    padding: 10px;
  }
}

.music-item-card:hover {
  background: var(--bg-surface);
}

.music-cover-box {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: var(--bg-elevated);
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.music-cover-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-hover-play {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--spotify-green);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.2s ease;
  cursor: pointer;
}

.music-item-card:hover .card-hover-play {
  opacity: 1;
  transform: translateY(0);
}

.card-hover-play svg {
  width: 18px;
  height: 18px;
  fill: #000;
  margin-left: 2px;
}

.card-tag-pill {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: var(--spotify-green);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.music-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.music-sub {
  font-size: 11px;
  color: var(--text-subdued);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   VERTICAL TRACK LISTS (Library, Search Results, Catalogs)
   ========================================================================== */
.library-tracks-container,
.catalog-vertical-list,
.search-result-cards-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.track-row {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  gap: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.track-row:hover {
  background: var(--bg-card-hover);
}

.track-row.now-playing {
  background: rgba(30, 215, 96, 0.12);
}

.track-row.now-playing .track-row-title {
  color: var(--spotify-green);
}

.track-thumb-img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-elevated);
}

.track-row-info {
  flex: 1;
  overflow: hidden;
}

.track-row-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-row-sub {
  font-size: 11.5px;
  color: var(--text-subdued);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.track-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.track-action-btn {
  background: none;
  border: none;
  color: var(--text-subdued);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.track-action-btn:hover {
  color: var(--text-primary);
}

.track-action-btn.fav-active svg {
  fill: var(--spotify-green);
}

.track-action-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Add / Download Pill in Catalogs & Search */
.btn-add-track {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-add-track:hover {
  background: var(--spotify-green);
  border-color: var(--spotify-green);
  color: #000;
}

.btn-add-track.in-library {
  background: rgba(30, 215, 96, 0.15);
  border-color: rgba(30, 215, 96, 0.3);
  color: var(--spotify-green);
  cursor: default;
}

/* ==========================================================================
   PLAYLISTS, ARTISTS & ALBUMS GRIDS (Library Multi-View)
   ========================================================================== */
.library-playlists-grid,
.library-albums-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 600px) {
  .library-playlists-grid,
  .library-albums-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.library-artists-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (min-width: 600px) {
  .library-artists-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.grid-item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.15s ease;
}

.grid-item-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.grid-item-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 6px;
  object-fit: cover;
  margin-bottom: 8px;
}

/* Circular avatar for artists */
.artist-circle-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 50% !important;
  object-fit: cover;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.grid-item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid-item-sub {
  font-size: 11px;
  color: var(--text-subdued);
  margin-top: 2px;
}

/* ==========================================================================
   SEARCH TAB
   ========================================================================== */
.spotify-search-box {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  height: 44px;
  padding: 0 12px;
  gap: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.s-search-icon {
  width: 20px;
  height: 20px;
  fill: var(--text-subdued);
  flex-shrink: 0;
}

.spotify-search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
}

.spotify-search-box input::placeholder {
  color: var(--text-subdued);
}

.search-clear-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-subdued);
  cursor: pointer;
}

.browse-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.browse-tiles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 600px) {
  .browse-tiles-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.category-tile {
  height: 96px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  padding: 12px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-tile span {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  position: relative;
  z-index: 2;
  line-height: 1.2;
}

.category-tile img {
  position: absolute;
  right: -10px;
  bottom: -5px;
  width: 58px;
  height: 58px;
  transform: rotate(25deg);
  box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.4);
  border-radius: 4px;
}

.tile-purple { background: #8c1932; }
.tile-red { background: #e91429; }
.tile-cyan { background: #1e3264; }
.tile-green { background: #006450; }
.tile-orange { background: #e13300; }
.tile-blue { background: #27856a; }
.tile-yellow { background: #ba5d07; }
.tile-pink { background: #bc5900; }

/* ==========================================================================
   CATALOG HERO BANNERS
   ========================================================================== */
.catalog-hero-banner {
  padding: 24px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.trending-banner { background: linear-gradient(135deg, #af2896 0%, #509bf5 100%); }
.retro-banner { background: linear-gradient(135deg, #ba5d07 0%, #e13300 100%); }
.starter-banner { background: linear-gradient(135deg, #1e3264 0%, #1ed760 100%); }

.sub-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.catalog-hero-banner h1 {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin: 6px 0 8px;
  line-height: 1.2;
}

.catalog-hero-banner p {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 500px;
  line-height: 1.5;
  margin-bottom: 14px;
}

.spotify-btn-green {
  background: var(--spotify-green);
  color: #000;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  height: 40px;
  padding: 0 20px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.spotify-btn-green:hover {
  transform: scale(1.03);
}

.spotify-btn-green .icon {
  width: 18px;
  height: 18px;
  fill: #000;
}

.starter-batch-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.batch-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 11px;
  color: #fff;
}

.spinner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--spotify-green);
  animation: pulseDot 1s infinite alternate;
}

@keyframes pulseDot {
  from { opacity: 0.3; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.2); }
}

/* ==========================================================================
   FLOATING MINI PLAYER BAR
   ========================================================================== */
.spotify-mini-player {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(var(--bottom-nav-height) + 6px + var(--safe-bottom));
  height: var(--mini-player-height);
  background: var(--mini-player-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  z-index: 80;
  overflow: hidden;
  cursor: pointer;
}

@media (min-width: 900px) {
  .spotify-mini-player {
    left: 250px;
    right: 0;
    bottom: 0;
    border-radius: 0;
    height: 72px;
    background: var(--bg-base);
    border-top: 1px solid var(--border-subtle);
    padding: 0 24px;
  }
}

.mini-player-track {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  overflow: hidden;
}

.mini-thumb {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: #282828;
}

.mini-meta {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mini-title-marquee {
  overflow: hidden;
  white-space: nowrap;
}

.mini-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-block;
}

.mini-artist {
  font-size: 11px;
  color: var(--text-subdued);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mini-ctrl-btn {
  background: none;
  border: none;
  color: var(--text-subdued);
  cursor: pointer;
  padding: 4px;
}

.mini-ctrl-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.mini-ctrl-btn.fav-active svg {
  fill: var(--spotify-green);
}

.mini-play-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 4px;
}

.mini-play-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.mini-progress-line {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2.5px;
  background: var(--spotify-green);
  transition: width 0.2s linear;
}

/* ==========================================================================
   FULLSCREEN NOW PLAYING SHEET
   ========================================================================== */
.now-playing-sheet {
  position: fixed;
  inset: 0;
  background: var(--bg-black);
  z-index: 150;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.now-playing-sheet.expanded {
  transform: translateY(0);
}

.sheet-blur-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(50px) brightness(0.2);
  opacity: 0.8;
  pointer-events: none;
}

.sheet-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: calc(var(--safe-top) + 12px) 24px calc(var(--safe-bottom) + 24px);
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
}

.sheet-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.sheet-icon-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
}

.sheet-icon-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.sheet-playing-from {
  text-align: center;
}

.sheet-playing-from span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
  display: block;
}

.sheet-playing-from strong {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.sheet-artwork-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.sheet-artwork-card {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  background: #181818;
}

.sheet-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sheet-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.sheet-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.sheet-artist {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

.sheet-fav-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 8px;
}

.sheet-fav-btn svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.sheet-fav-btn.fav-active svg {
  fill: var(--spotify-green);
}

.sheet-seek-container {
  margin-bottom: 18px;
}

.sheet-slider-wrap {
  position: relative;
  height: 16px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.sheet-buffer-bar, .sheet-fill-bar {
  position: absolute;
  left: 0;
  height: 4px;
  border-radius: 4px;
  pointer-events: none;
}

.sheet-buffer-bar {
  background: rgba(255, 255, 255, 0.2);
  width: 0%;
}

.sheet-fill-bar {
  background: #fff;
  width: 0%;
}

.sheet-slider-wrap input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  outline: none;
  position: relative;
  z-index: 2;
}

.sheet-slider-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.sheet-timestamps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

.sheet-quality-badge {
  color: var(--spotify-green);
  font-weight: 700;
  font-size: 10px;
}

.sheet-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.sheet-ctrl-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 8px;
  position: relative;
}

.sheet-ctrl-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.sheet-ctrl-btn.active {
  color: var(--spotify-green);
}

.sheet-repeat-1 {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--spotify-green);
  color: #000;
  font-size: 9px;
  font-weight: 800;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sheet-play-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.sheet-play-circle:active {
  transform: scale(0.94);
}

.sheet-play-circle svg {
  width: 28px;
  height: 28px;
  fill: #000;
}

.sheet-footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.sheet-action-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sheet-action-pill:hover,
.sheet-action-pill.active {
  background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   SPOTIFY MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */
.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--bottom-nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--nav-backdrop);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  border-top: 1px solid var(--border-subtle);
}

@media (min-width: 900px) {
  .mobile-bottom-nav {
    display: none;
  }
}

.b-nav-item {
  background: none;
  border: none;
  color: var(--text-subdued);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
  padding: 6px 0;
  transition: color 0.15s ease;
}

.nav-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.b-nav-item:hover,
.b-nav-item.active {
  color: var(--text-primary);
}

.b-nav-item.active .nav-icon {
  fill: var(--spotify-green);
}

/* ==========================================================================
   PLAYLIST DETAIL HERO & MODAL
   ========================================================================== */
.pl-detail-card {
  width: 600px;
  max-width: 100%;
  max-height: 85vh;
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pl-detail-hero {
  background: linear-gradient(180deg, rgba(30, 215, 96, 0.25) 0%, var(--bg-surface) 100%);
  padding: 24px;
  position: relative;
}

.pl-back-btn {
  position: absolute;
  top: 14px;
  right: 14px;
}

.pl-hero-content {
  display: flex;
  align-items: center;
  gap: 18px;
}

.pl-detail-cover {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.pl-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--spotify-green);
}

#pl-detail-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 4px 0 2px;
}

.pl-meta-text {
  font-size: 12px;
  color: var(--text-subdued);
  margin-bottom: 12px;
}

.pl-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pl-action-icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pl-action-icon-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.pl-action-icon-btn:hover {
  background: var(--bg-card-hover);
}

.pl-tracks-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ==========================================================================
   QUEUE DRAWER & MODALS
   ========================================================================== */
.bottom-sheet-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 65vh;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.4);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  padding: 12px 16px;
}

.bottom-sheet-drawer.open {
  transform: translateY(0);
}

.drawer-drag-pill {
  width: 36px;
  height: 4px;
  background: rgba(128, 128, 128, 0.4);
  border-radius: 4px;
  margin: 0 auto 12px;
}

.drawer-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-title-row h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.drawer-close-btn {
  background: none;
  border: none;
  color: var(--text-subdued);
  font-size: 22px;
  cursor: pointer;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Modal Generic */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 16px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--modal-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  width: 480px;
  max-width: 100%;
  padding: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-subdued);
  font-size: 24px;
  cursor: pointer;
}

.modal-form-group {
  margin-bottom: 14px;
}

.modal-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-subdued);
  margin-bottom: 6px;
}

.modal-form-group input {
  width: 100%;
  height: 42px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-primary);
  outline: none;
}

.modal-form-group input:focus {
  border-color: var(--spotify-green);
}

.modal-btn-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.btn-create-in-dialog {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px dashed var(--border-subtle);
  color: var(--spotify-green);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  height: 42px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 14px;
}

.playlists-choice-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
}

.choice-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--bg-card);
  cursor: pointer;
  transition: background 0.15s ease;
}

.choice-row:hover {
  background: var(--bg-card-hover);
}

.choice-thumb {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
}

.choice-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.choice-sub {
  font-size: 11px;
  color: var(--text-subdued);
}

/* Graphic Equalizer */
.eq-presets-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 20px;
  padding-bottom: 4px;
}

.eq-pill {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-subdued);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
}

.eq-pill.active {
  background: var(--spotify-green);
  border-color: var(--spotify-green);
  color: #000;
  font-weight: 700;
}

.eq-sliders-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 6px;
  background: var(--bg-elevated);
  border-radius: 8px;
}

.eq-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.eq-db {
  font-size: 10px;
  font-weight: 700;
  color: var(--spotify-green);
}

.v-slider-box {
  height: 120px;
  display: flex;
  align-items: center;
}

.v-range {
  -webkit-appearance: none;
  width: 110px;
  height: 4px;
  background: rgba(128, 128, 128, 0.3);
  border-radius: 4px;
  transform: rotate(-90deg);
  outline: none;
  cursor: pointer;
}

.v-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--spotify-green);
}

.eq-f {
  font-size: 10px;
  color: var(--text-subdued);
}

/* Fullscreen Canvas Visualizer */
.visualizer-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 300;
  display: none;
  flex-direction: column;
}

.visualizer-overlay.open {
  display: flex;
}

.viz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 16px) 20px 10px;
  z-index: 10;
  background: linear-gradient(180deg, rgba(0,0,0,0.8), transparent);
}

.viz-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--spotify-green);
}

.viz-title {
  font-size: 18px;
  color: #fff;
  font-weight: 700;
}

.viz-artist {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.viz-btns {
  display: flex;
  gap: 6px;
  align-items: center;
}

.viz-type-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 9999px;
  cursor: pointer;
}

.viz-type-btn.active {
  background: var(--spotify-green);
  color: #000;
  font-weight: 700;
}

.viz-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  padding-left: 8px;
}

#viz-canvas {
  width: 100vw;
  height: 100vh;
  display: block;
}

/* Toast Shelf */
.toast-shelf {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + var(--mini-player-height) + 16px + var(--safe-bottom));
  left: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 250;
  pointer-events: none;
}

.toast-msg {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  border-left: 3px solid var(--spotify-green);
  animation: toastIn 0.25s ease;
  pointer-events: auto;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   PASSCODE SECURITY GATE (Protection against bots & unauthorized access)
   ========================================================================== */
.passcode-gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.passcode-gate-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.passcode-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  width: 420px;
  max-width: 100%;
  padding: 32px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(30, 215, 96, 0.08);
  text-align: center;
  animation: scaleInModal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleInModal {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.passcode-icon-ring {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(30, 215, 96, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(30, 215, 96, 0.3);
}

.passcode-logo {
  width: 42px;
  height: 42px;
}

.passcode-brand h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.passcode-brand p {
  font-size: 13px;
  color: var(--text-subdued);
  line-height: 1.5;
  margin-bottom: 24px;
}

.passcode-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.passcode-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.passcode-input-wrap:focus-within {
  border-color: var(--spotify-green);
  box-shadow: 0 0 0 3px rgba(30, 215, 96, 0.15);
}

.lock-icon {
  width: 18px;
  height: 18px;
  fill: var(--text-subdued);
  flex-shrink: 0;
  margin-right: 10px;
}

.passcode-input-wrap input {
  flex: 1;
  height: 48px;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
}

.passcode-input-wrap input::placeholder {
  color: var(--text-subdued);
  font-weight: 400;
}

.btn-toggle-pwd {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.6;
  padding: 4px;
}

.passcode-error-msg {
  font-size: 12px;
  color: #ef4444;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.1);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.2);
  text-align: left;
}

.btn-unlock-passcode {
  width: 100%;
  height: 48px;
  font-size: 14px;
  justify-content: center;
  border-radius: 10px;
}

.passcode-footer-hint {
  margin-top: 18px;
  font-size: 11px;
  color: var(--text-subdued);
}

.passcode-footer-hint code {
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  color: var(--spotify-green);
}

/* ==========================================================================
   OFFLINE DATA SAVER BADGE & SOUNDWAVE BARS
   ========================================================================== */
.badge-cached {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(30, 215, 96, 0.15);
  border: 1px solid rgba(30, 215, 96, 0.35);
  color: var(--spotify-green);
}

.soundwave-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
  margin-left: 6px;
}

.soundwave-bars .sw-bar {
  width: 2.5px;
  background: var(--spotify-green);
  border-radius: 2px;
  animation: soundwaveJump 0.8s ease-in-out infinite alternate;
}

.soundwave-bars .sw-bar:nth-child(1) { height: 4px; animation-delay: 0.1s; }
.soundwave-bars .sw-bar:nth-child(2) { height: 12px; animation-delay: 0.3s; }
.soundwave-bars .sw-bar:nth-child(3) { height: 8px; animation-delay: 0.2s; }
.soundwave-bars .sw-bar:nth-child(4) { height: 14px; animation-delay: 0.4s; }

@keyframes soundwaveJump {
  0% { height: 3px; }
  100% { height: 14px; }
}

/* Subtle pulse for active cards */
.playing .music-cover-box::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--spotify-green);
  border-radius: 6px;
  pointer-events: none;
}

/* ==========================================================================
   AMBIENT COVER GLOW & NOW PLAYING ENHANCEMENTS
   ========================================================================== */
.sheet-artwork-card {
  position: relative !important;
  border-radius: 18px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7) !important;
}

.sheet-cover-ambient-glow {
  position: absolute;
  inset: -14px;
  background-size: cover;
  background-position: center;
  filter: blur(35px) opacity(0.7) saturate(160%);
  border-radius: 26px;
  z-index: 0;
  transition: opacity 0.5s ease, filter 0.5s ease, background-image 0.5s ease;
  pointer-events: none;
}

.sheet-cover {
  position: relative;
  z-index: 1;
  border-radius: 18px !important;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sheet-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sheet-delete-btn {
  color: var(--text-subdued);
  transition: color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.sheet-delete-btn:hover {
  color: #ef4444 !important;
  transform: scale(1.1);
  background: rgba(239, 68, 68, 0.15) !important;
}

.pill-danger {
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  background: rgba(239, 68, 68, 0.08) !important;
}

.pill-danger:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

.track-action-btn[data-act="del"]:hover {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.15) !important;
}

/* ==========================================================================
   DELETE CONFIRMATION MODAL & ACTIONS
   ========================================================================== */
.delete-modal-card {
  max-width: 420px !important;
  border-radius: 20px !important;
  padding: 24px !important;
  background: var(--modal-bg) !important;
  border: 1px solid rgba(239, 68, 68, 0.28) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(239, 68, 68, 0.12) !important;
  animation: modalScaleUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.delete-modal-hero {
  text-align: center;
  margin-bottom: 20px;
}

.delete-icon-pulse {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px auto;
  color: #ef4444;
}

.delete-icon-pulse svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.delete-modal-hero h3 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.delete-modal-warning {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-subdued);
  max-width: 340px;
  margin: 0 auto;
}

.delete-song-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 22px;
}

.del-song-cover {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.del-song-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 2px;
}

.del-song-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.del-song-artist {
  font-size: 12px;
  color: var(--text-subdued);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.del-song-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #ef4444;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.delete-modal-actions {
  display: flex;
  gap: 12px;
}

.btn-cancel-delete {
  flex: 1;
  height: 44px;
  border-radius: 9999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel-delete:hover {
  background: var(--bg-highlight);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-confirm-delete {
  flex: 1.25;
  height: 44px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-confirm-delete:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(239, 68, 68, 0.6);
  filter: brightness(1.1);
}

.btn-confirm-delete:active {
  transform: scale(0.97);
}

