/* ==========================================================================
   ÉLIA MUSIC — APPLE LIQUID GLASS DESIGN SYSTEM
   Inspired by Apple Music & dashersw/liquid-glass-js
   High-contrast, Specular Glass Highlights, Floating Pill Dock, Tactile Buttons
   ========================================================================== */

:root {
  --bg-core: #06070a;
  --bg-surface: rgba(18, 22, 34, 0.72);
  --bg-elevated: rgba(26, 32, 48, 0.85);
  
  /* Liquid Glass Gradients & Specular Highlights */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-bg-hover: rgba(255, 255, 255, 0.10);
  --glass-bg-active: rgba(255, 255, 255, 0.16);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-hover: rgba(255, 255, 255, 0.22);
  --glass-specular: inset 0 1px 1px 0 rgba(255, 255, 255, 0.35), inset 0 -1px 1px 0 rgba(0, 0, 0, 0.4);
  --glass-blur: blur(36px) saturate(210%);
  
  /* Apple Music Vibrant Accents & Dynamic Multi-Color System */
  --accent-red: #fc3c44;
  --accent-red-hover: #ff5263;
  --apple-red: #fc3c44;
  --apple-red-hover: #ff5263;
  --accent-color: #fc3c44;
  --accent-gradient: linear-gradient(135deg, #fc3c44 0%, #ff5263 50%, #ff758c 100%);
  --accent-glow: rgba(252, 60, 68, 0.42);
  --accent-glow-strong: rgba(252, 60, 68, 0.75);
  --accent-subtle: rgba(252, 60, 68, 0.16);
  --accent-border: rgba(252, 60, 68, 0.42);
  --orb1-color: rgba(252, 60, 68, 0.85);
  --orb2-color: rgba(175, 82, 222, 0.75);
  --orb3-color: rgba(0, 113, 227, 0.7);
  --theme-border-active: #fc3c44;
  --theme-card-glow: rgba(252, 60, 68, 0.35);
  --accent-blue: #0071e3;
  --accent-purple: #af52de;
  --accent-emerald: #34c759;

  /* High Contrast Typography */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.85);
  --text-tertiary: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.35);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", sans-serif;
  --font-display: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', "SF Mono", monospace;

  --sidebar-w: 260px;
  --player-dock-h: 84px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
}

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

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-core);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------------- Ambient Dynamic Aura Background ---------------- */
.ambient-scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.28;
  mix-blend-mode: screen;
  transition: all 1.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

/* Dynamic Ambient Track Art Wash */
.ambient-art-wash {
  position: absolute;
  inset: -120px;
  background-size: cover;
  background-position: center;
  filter: blur(140px) saturate(230%) brightness(0.45);
  opacity: 0.55;
  mix-blend-mode: screen;
  transform: scale(1.1);
  transition: background-image 1.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
  will-change: transform, opacity;
  animation: ambientArtWashFloat 26s ease-in-out infinite alternate;
}

@keyframes ambientArtWashFloat {
  0% { transform: scale(1.06) translate(0, 0); }
  50% { transform: scale(1.18) translate(30px, -25px); }
  100% { transform: scale(1.08) translate(-25px, 20px); }
}

.orb-1 {
  width: 550px;
  height: 550px;
  top: -120px;
  left: 15%;
  background: radial-gradient(circle, var(--orb1-color) 0%, transparent 70%);
  animation: floatOrb1 22s ease-in-out infinite alternate;
  transition: background 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.orb-2 {
  width: 650px;
  height: 650px;
  bottom: 0px;
  right: 5%;
  background: radial-gradient(circle, var(--orb2-color) 0%, transparent 70%);
  animation: floatOrb2 26s ease-in-out infinite alternate;
  transition: background 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.orb-3 {
  width: 480px;
  height: 480px;
  bottom: 25%;
  left: -80px;
  background: radial-gradient(circle, var(--orb3-color) 0%, transparent 70%);
  animation: floatOrb3 20s ease-in-out infinite alternate;
  transition: background 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes floatOrb1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.08); }
  100% { transform: translate(-30px, 80px) scale(0.95); }
}

@keyframes floatOrb2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, -60px) scale(1.12); }
  100% { transform: translate(40px, -30px) scale(0.92); }
}

@keyframes floatOrb3 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -50px) scale(1.05); }
}

/* ---------------- Layout Framework ---------------- */
.app-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  z-index: 1;
}

/* ---------------- Sidebar Navigation ---------------- */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: rgba(10, 13, 20, 0.75);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-border);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
  padding: 8px 12px;
  margin-bottom: 24px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.brand-icon svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 7px;
  background: rgba(252, 60, 68, 0.18);
  border: 1px solid rgba(252, 60, 68, 0.4);
  color: #ff5263;
  border-radius: var(--radius-pill);
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  padding: 8px 12px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  border: 1px solid transparent;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  transition: color 0.2s ease;
}

.nav-item:hover {
  background: var(--glass-bg-hover);
  color: #ffffff;
}

.nav-item:hover svg {
  color: #ffffff;
}

.nav-item.active {
  background: rgba(252, 60, 68, 0.16);
  border-color: rgba(252, 60, 68, 0.32);
  color: #ffffff;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.nav-item.active svg {
  color: var(--accent-red);
}

.sidebar-spacer {
  flex: 1;
}

/* User Widget (Sidebar bottom) */
.user-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-specular);
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-widget:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-status {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

/* ---------------- Main Workspace ---------------- */
.main-view {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 36px calc(var(--player-dock-h) + 48px);
  position: relative;
  z-index: 10;
  scroll-behavior: smooth;
}

/* Custom Sleek Scrollbar */
.main-view::-webkit-scrollbar {
  width: 6px;
}
.main-view::-webkit-scrollbar-track {
  background: transparent;
}
.main-view::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
.main-view::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ---------------- Top Header & Search ---------------- */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 580px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 46px;
  background: rgba(20, 24, 36, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  padding: 0 44px 0 46px;
  color: #ffffff;
  font-size: 0.94rem;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-input:focus {
  outline: none;
  background: rgba(25, 30, 46, 0.85);
  border-color: rgba(252, 60, 68, 0.5);
  box-shadow: 0 0 0 3px rgba(252, 60, 68, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  display: none;
  transition: color 0.15s ease;
}

.search-clear:hover {
  color: #ffffff;
}

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

/* Glass Buttons */
.glass-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-specular);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.glass-btn:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-1px);
}

.glass-btn:active {
  transform: translateY(1px);
}

.glass-btn.primary {
  background: var(--accent-gradient);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 18px var(--accent-glow), inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.glass-btn.primary:hover {
  box-shadow: 0 6px 24px rgba(252, 60, 68, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.5);
  transform: translateY(-1.5px);
}

/* ---------------- Hero Banner ---------------- */
.hero-glass-banner {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(252, 60, 68, 0.15) 0%, rgba(175, 82, 222, 0.08) 50%, rgba(20, 24, 38, 0.6) 100%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), var(--glass-specular);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 36px 40px;
  margin-bottom: 44px;
  overflow: hidden;
}

.hero-glass-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(252, 60, 68, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff5263;
  margin-bottom: 10px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.85) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 0.98rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ---------------- Section Headers ---------------- */
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title span:first-child {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.section-subtitle {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-tertiary);
}

/* ---------------- Playlists Grid (Spotify Curated) ---------------- */
.playlists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
  margin-bottom: 40px;
}

.playlist-card {
  background: rgba(20, 24, 38, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), var(--glass-specular);
  border-radius: var(--radius-lg);
  padding: 14px;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.playlist-card:hover {
  background: rgba(30, 36, 56, 0.75);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 20px rgba(252, 60, 68, 0.18);
}

.playlist-art-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  background: #12151e;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.playlist-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.playlist-card:hover .playlist-art {
  transform: scale(1.05);
}

.playlist-play-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-gradient);
  border: none;
  box-shadow: 0 6px 18px rgba(252, 60, 68, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.playlist-card:hover .playlist-play-btn {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.playlist-play-btn:hover {
  transform: scale(1.1) !important;
}

.playlist-play-btn:active {
  transform: scale(0.94) !important;
}

.playlist-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.playlist-subtitle {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------------- Tracks Card Grid (Today's Top Tamil Blockbusters) ---------------- */
.tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}

.track-card {
  background: rgba(20, 24, 38, 0.55);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), var(--glass-specular);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.track-card:hover {
  background: rgba(30, 36, 56, 0.75);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45), 0 0 16px rgba(252, 60, 68, 0.15);
}

.track-card-art-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 10px;
  background: #141722;
}

.track-card-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.track-card:hover .track-card-art {
  transform: scale(1.06);
}

.track-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.track-card-author {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------------- Song List Rows (Search & Top Charts) ---------------- */
.song-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.song-row {
  display: grid;
  grid-template-columns: 44px 52px 1fr 100px 90px;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: rgba(20, 24, 38, 0.45);
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.song-row:hover {
  background: rgba(30, 36, 56, 0.75);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}

.song-row.active {
  background: rgba(252, 60, 68, 0.14);
  border-color: rgba(252, 60, 68, 0.35);
}

.song-index {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.song-row.active .song-index {
  color: var(--accent-red);
}

.song-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #141722;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

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

.song-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.song-artist {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-duration {
  font-size: 0.84rem;
  color: var(--text-tertiary);
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}

.song-actions {
  display: flex;
  justify-content: flex-end;
}

.song-play-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.song-row:hover .song-play-pill {
  background: var(--accent-gradient);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 10px var(--accent-glow);
}

/* ---------------- 3. FLOATING LIQUID GLASS PLAYER DOCK ---------------- */
.player-dock {
  position: fixed;
  bottom: 22px;
  left: calc(50% + var(--sidebar-w) / 2);
  transform: translateX(-50%);
  width: calc(100% - var(--sidebar-w) - 48px);
  max-width: 1360px;
  min-width: 680px;
  height: var(--player-dock-h);
  background: rgba(14, 18, 28, 0.88);
  backdrop-filter: blur(50px) saturate(220%);
  -webkit-backdrop-filter: blur(50px) saturate(220%);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 1px 0 rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-ambient-halo {
  position: absolute;
  inset: -8px -18px;
  border-radius: 36px;
  background-size: cover;
  background-position: center;
  filter: blur(38px) saturate(240%) brightness(1.22);
  opacity: 0.45;
  z-index: -1;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease, background-image 1s ease;
}

.player-dock.playing .dock-ambient-halo {
  opacity: 0.78;
  animation: dockHaloPulse 4.2s ease-in-out infinite alternate;
}

@keyframes dockHaloPulse {
  0% { transform: scale(0.98); opacity: 0.62; }
  50% { transform: scale(1.03); opacity: 0.88; }
  100% { transform: scale(0.98); opacity: 0.62; }
}

.ambient-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.73rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transition: all 0.25s ease;
}

.ambient-toggle-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.ambient-toggle-pill.active {
  background: linear-gradient(135deg, rgba(252, 60, 68, 0.25) 0%, rgba(255, 82, 99, 0.18) 100%);
  border-color: rgba(252, 60, 68, 0.55);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(252, 60, 68, 0.32);
}

.ambient-toggle-pill svg {
  color: var(--accent-red);
  transition: transform 0.3s ease;
}

.ambient-toggle-pill.active svg {
  transform: rotate(20deg) scale(1.1);
  filter: drop-shadow(0 0 6px var(--accent-red));
}

/* Dock Left: Track Art & Details */
.dock-track-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 1 420px;
  min-width: 160px;
  overflow: visible;
}

.dock-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 160px;
  min-width: 70px;
}

.desktop-media-toggle {
  flex-shrink: 0 !important;
  margin-left: 8px;
  padding: 3px 5px;
  min-width: auto;
  white-space: nowrap;
  display: inline-flex;
}

.desktop-media-toggle .media-toggle-btn {
  padding: 4px 10px;
  font-size: 0.74rem;
  gap: 5px;
}

.dock-art-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), inset 0 0 0 2px rgba(255, 255, 255, 0.25);
  background: #111420;
}

.dock-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.dock-art-vinyl.playing {
  animation: spinVinyl 16s linear infinite;
}

@keyframes spinVinyl {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* dock-details moved */

.dock-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.dock-artist {
  font-size: 0.76rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dock Center: Controls & Scrubber */
.dock-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 1 380px;
  max-width: 420px;
  min-width: 200px;
  margin: 0 8px;
}

.transport-btns {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.transport-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.transport-btn:hover {
  color: #ffffff;
  transform: scale(1.12);
}

.transport-btn:active {
  transform: scale(0.92);
}

.transport-btn.active {
  color: var(--accent-red);
}

/* Play / Pause Master Button with Spring Motion */
.play-master {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: #07090e;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.35);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.play-master:hover {
  background: #ffffff;
  color: #07090e;
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.5);
}

.play-master:active {
  transform: scale(0.92);
}

/* Scrubber Bar */
.scrubber-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.time-stamp {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  min-width: 32px;
}

.scrubber {
  position: relative;
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  cursor: pointer;
  transition: height 0.15s ease;
}

.scrubber:hover {
  height: 7px;
}

.scrubber-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: 3px;
  box-shadow: 0 0 10px var(--accent-glow);
  position: relative;
}

.scrubber-handle {
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
}

.scrubber:hover .scrubber-handle {
  transform: translateY(-50%) scale(1);
}

/* Dock Right: Mode Switcher, Guild Select, Volume */
.dock-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 1 auto;
  flex-shrink: 0;
}

/* Mode Switcher Group (Hear | Discord | Both) */
.mode-switch-group {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.mode-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.73rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.mode-btn:hover {
  color: #ffffff;
}

.mode-btn.active {
  background: #ffffff;
  color: #07090e;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}

.mode-btn.mode-both.active {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 2px 12px var(--accent-glow);
}

/* Guild Select Dropdown */
.guild-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  outline: none;
  max-width: 110px;
  transition: all 0.2s ease;
}

.guild-select option {
  background: #141724;
  color: #ffffff;
}

.guild-select:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Autoplay Pill */
.autoplay-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.autoplay-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.autoplay-pill.active {
  background: rgba(52, 199, 89, 0.2);
  border-color: rgba(52, 199, 89, 0.45);
  color: #34c759;
}

/* Visualizer Bars */
.visualizer-bars {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
  width: 18px;
}

.visualizer-bars .bar {
  width: 2.5px;
  background: var(--accent-red);
  border-radius: 1px;
  height: 4px;
  transition: height 0.15s ease;
}

.visualizer-bars.animating .bar:nth-child(1) { animation: jump 0.6s ease-in-out infinite alternate; }
.visualizer-bars.animating .bar:nth-child(2) { animation: jump 0.8s ease-in-out infinite alternate 0.2s; }
.visualizer-bars.animating .bar:nth-child(3) { animation: jump 0.5s ease-in-out infinite alternate 0.4s; }
.visualizer-bars.animating .bar:nth-child(4) { animation: jump 0.7s ease-in-out infinite alternate 0.1s; }

@keyframes jump {
  0% { height: 4px; }
  100% { height: 16px; }
}

/* Volume Slider Wrap */
.volume-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.volume-slider {
  -webkit-appearance: none;
  width: 72px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* ---------------- 4. USER PROFILE GLASS MODAL ---------------- */
.profile-modal {
  position: fixed;
  bottom: 84px;
  left: 20px;
  width: 290px;
  background: rgba(18, 22, 34, 0.94);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65), var(--glass-specular);
  border-radius: var(--radius-lg);
  padding: 20px;
  z-index: 1200;
  display: none;
  flex-direction: column;
  gap: 14px;
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.profile-modal.show {
  display: flex;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar-lg {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.profile-details {
  display: flex;
  flex-direction: column;
}

.profile-user-name {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
}

.profile-tag {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.profile-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 2px 0;
}

.profile-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: rgba(252, 60, 68, 0.15);
  border: 1px solid rgba(252, 60, 68, 0.35);
  color: #ff5263;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-logout-btn:hover {
  background: rgba(252, 60, 68, 0.28);
  border-color: rgba(252, 60, 68, 0.6);
  color: #ffffff;
}

/* ---------------- 5. RIGHT-CLICK LIQUID GLASS CONTEXT MENU ---------------- */
.glass-context-menu {
  position: fixed;
  background: rgba(20, 24, 38, 0.94);
  backdrop-filter: blur(40px) saturate(220%);
  -webkit-backdrop-filter: blur(40px) saturate(220%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), var(--glass-specular);
  border-radius: var(--radius-md);
  padding: 6px;
  min-width: 200px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: contextIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes contextIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.context-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.context-item svg {
  color: var(--text-tertiary);
  transition: color 0.15s ease;
}

.context-item:hover {
  background: var(--glass-bg-hover);
  color: #ffffff;
}

.context-item:hover svg {
  color: var(--accent-red);
}

.context-item:active {
  transform: scale(0.97);
}

.context-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 4px 6px;
}


/* ---------------- Media Mode Toggle (Song | Video) ---------------- */
.media-toggle-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
  gap: 2px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.media-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.media-toggle-btn svg {
  transition: transform 0.2s ease;
}

.media-toggle-btn.active {
  background: #ffffff;
  color: #07090e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.media-toggle-btn:not(.active):hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-media-toggle-wrap {
  display: flex;
  justify-content: center;
  margin: 4px auto 14px;
}

/* ---------------- Web Player Sandbox & Video Theater ---------------- */
.web-player-sandbox {
  position: fixed;
  top: -9999px;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  z-index: -9999;
  overflow: hidden;
  clip-path: inset(100%);
  border-radius: 16px;
  transition: opacity 0.3s ease;
}

.video-overlay-header {
  display: none;
}

.video-frame-container {
  width: 100%;
  height: 100%;
}

.video-frame-container iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
}

/* Desktop Video PIP Active */
.web-player-sandbox.desktop-video-active {
  position: fixed !important;
  top: auto !important;
  left: auto !important;
  bottom: calc(var(--player-dock-h) + 24px) !important;
  right: 28px !important;
  width: 480px !important;
  height: 300px !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 1005 !important;
  clip-path: none !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(252, 60, 68, 0.25) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
  background: rgba(14, 18, 28, 0.96) !important;
  backdrop-filter: blur(40px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(40px) saturate(200%) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.web-player-sandbox.desktop-video-active .video-overlay-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 38px !important;
  padding: 0 14px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.video-overlay-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fc3c44;
  box-shadow: 0 0 8px #fc3c44;
  animation: pulseGlow 1.8s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.video-overlay-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.video-btn-action {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.video-btn-action:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.web-player-sandbox.desktop-video-active .video-frame-container {
  flex: 1 !important;
  width: 100% !important;
  height: calc(100% - 38px) !important;
  background: #000000 !important;
}

/* Desktop Theater Mode */
.web-player-sandbox.desktop-theater {
  width: min(840px, 85vw) !important;
  height: min(510px, 60vh) !important;
  bottom: 50% !important;
  right: 50% !important;
  transform: translate(50%, 50%) !important;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.95), 0 0 50px rgba(252, 60, 68, 0.35) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
}

/* Mobile Video Mode Active */
@media (max-width: 768px) {
  .web-player-sandbox.mobile-video-active {
    position: fixed !important;
    clip-path: none !important;
    top: auto !important;
    bottom: calc(var(--player-dock-h) + 16px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(340px, 94vw) !important;
    height: 200px !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 2600 !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.9), 0 0 35px rgba(252, 60, 68, 0.35) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.22) !important;
    background: #000000 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .web-player-sandbox.mobile-video-active.in-sheet {
    bottom: auto !important;
    transform: none !important;
  }

  .web-player-sandbox.mobile-video-active .video-overlay-header {
    display: none !important;
  }

  .web-player-sandbox.mobile-video-active .video-frame-container {
    width: 100% !important;
    height: 100% !important;
  }

  .web-player-sandbox.mobile-video-active iframe {
    width: 100% !important;
    height: 100% !important;
    border-radius: 24px !important;
  }
}


/* ---------------- Toast Notifications ---------------- */
.glass-toast {
  background: rgba(18, 22, 34, 0.94);
  backdrop-filter: blur(30px) saturate(190%);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), var(--glass-specular);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
  max-width: 380px;
  pointer-events: auto;
  animation: toastIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.25s ease;
}

.glass-toast.toast-success { border-left: 3px solid #34c759; }
.glass-toast.toast-error { border-left: 3px solid #ff453a; }
.glass-toast.toast-info { border-left: 3px solid #fc3c44; }

.glass-toast.toast-out {
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------------- Mobile Apple Music UI & Responsive Framework ---------------- */

/* Desktop defaults: mobile components hidden */
.mobile-top-bar {
  display: none;
}

.dock-mobile-controls {
  display: none;
}

.mobile-tab-bar {
  display: none;
}

.mobile-player-sheet {
  display: none;
}

/* Responsive Desktop & Laptop Screens */
@media (max-width: 1536px) {
  .player-dock {
    gap: 10px;
    padding: 0 18px;
    width: calc(100% - var(--sidebar-w) - 32px);
  }
  .ambient-toggle-pill span,
  .autoplay-pill span {
    display: none;
  }
  .ambient-toggle-pill,
  .autoplay-pill {
    padding: 6px 8px;
    height: 30px;
    width: 30px;
    border-radius: 50%;
    justify-content: center;
  }
  .guild-select {
    max-width: 105px;
    font-size: 0.72rem;
  }
  .volume-slider {
    width: 65px;
  }
}

@media (max-width: 1366px) {
  .dock-track-info {
    flex: 0 1 240px;
    gap: 8px;
  }
  .dock-details {
    max-width: 105px;
  }
  .mode-btn {
    padding: 4px 6px;
    font-size: 0.7rem;
  }
  .desktop-media-toggle span {
    display: none;
  }
  .desktop-media-toggle .media-toggle-btn {
    padding: 4px 6px;
  }
  .transport-btns {
    gap: 10px;
  }
  #shuffleBtn, #repeatBtn {
    display: none;
  }
}

@media (max-width: 1150px) {
  .visualizer-bars {
    display: none;
  }
  .dock-track-info {
    flex: 0 1 200px;
  }
  .dock-details {
    max-width: 85px;
  }
  .guild-select {
    max-width: 80px;
  }
  .volume-control {
    display: none;
  }
  .dock-center {
    max-width: 340px;
    min-width: 170px;
  }
}

@media (max-width: 1024px) {
  .player-dock {
    padding: 0 12px;
    bottom: 14px;
    gap: 6px;
  }
  .dock-details {
    max-width: 75px;
  }
  .main-view {
    padding: 20px 20px calc(var(--player-dock-h) + 48px);
  }
}

/* ==========================================================================
   APPLE MUSIC iOS MOBILE EXPERIENCE (<= 768px)
   Aesthetic: Native iOS Apple Music + Liquid Glass Accents
   ========================================================================== */
@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
    height: 100vh;
    height: -webkit-fill-available;
    overflow: hidden;
  }

  /* 1. Hide Desktop Sidebar on Mobile */
  .sidebar {
    display: none !important;
  }

  /* 2. Mobile Main View with iPhone Safe Area */
  .main-view {
    padding: 12px 16px calc(56px + 58px + 20px + env(safe-area-inset-bottom)) !important;
    height: 100vh;
    height: -webkit-fill-available;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Top Header on Mobile */
  .top-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 22px;
    padding-top: max(8px, env(safe-area-inset-top));
  }

  .mobile-top-bar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 4px;
  }

  .mobile-top-bar .brand-title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
  }


  .mobile-discord-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #5865f2;
    color: #ffffff;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(88, 101, 242, 0.45);
    transition: all 0.2s ease;
  }
  .mobile-discord-login-btn:active {
    transform: scale(0.95);
  }

  .profile-modal {
    top: calc(max(10px, env(safe-area-inset-top)) + 52px) !important;
    right: 14px !important;
    left: auto !important;
    bottom: auto !important;
    width: min(310px, calc(100vw - 28px)) !important;
  }

  .mobile-profile-wrap {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  }

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

  .search-box {
    max-width: none;
    width: 100%;
  }

  .search-input {
    height: 42px;
    font-size: 0.9rem;
    background: rgba(24, 28, 42, 0.7);
  }

  .header-actions {
    display: none !important;
  }

  /* Compact Hero Banner on Mobile */
  .hero-glass-banner {
    padding: 22px 18px;
    margin-bottom: 26px;
    border-radius: var(--radius-md);
  }

  .hero-tag {
    font-size: 0.68rem;
    margin-bottom: 6px;
  }

  .hero-title {
    font-size: 1.45rem;
    margin-bottom: 8px;
  }

  .hero-desc {
    font-size: 0.86rem;
    line-height: 1.5;
    margin-bottom: 18px;
  }

  /* 3. Horizontal Smooth Carousels for Playlists & Tracks */
  .section-title span:first-child {
    font-size: 1.25rem;
  }

  .playlists-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 14px;
    padding-bottom: 8px;
    margin-bottom: 30px;
    -webkit-overflow-scrolling: touch;
  }

  .playlists-grid::-webkit-scrollbar,
  .tracks-grid::-webkit-scrollbar {
    display: none;
  }

  .playlist-card {
    min-width: 148px;
    width: 148px;
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 10px;
    border-radius: 14px;
  }

  .playlist-card:hover {
    transform: none;
  }

  .playlist-card:active {
    transform: scale(0.96);
  }

  .tracks-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .track-card {
    min-width: 138px;
    width: 138px;
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 10px;
    border-radius: 12px;
  }

  .track-card:hover {
    transform: none;
  }

  .track-card:active {
    transform: scale(0.96);
  }

  .song-row {
    grid-template-columns: 28px 44px 1fr 65px;
    gap: 10px;
    padding: 8px 10px;
  }

  .song-actions {
    display: none;
  }

  /* 4. Apple Music Mini Player Dock (Mobile) - Perfectly Centered & Positioned */
  .player-dock {
    position: fixed !important;
    bottom: calc(56px + env(safe-area-inset-bottom) + 8px) !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    transform: none !important; /* CRITICAL FIX: Overrides desktop translateX(-50%) */
    height: 56px !important;
    border-radius: 14px !important;
    padding: 0 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: rgba(22, 26, 40, 0.94) !important;
    backdrop-filter: blur(35px) saturate(210%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(210%) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
    cursor: pointer;
    z-index: 950 !important;
  }

  .dock-track-info {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    overflow: hidden !important;
    flex: 1 !important;
    pointer-events: none;
  }

  .dock-art-wrap {
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }

  .dock-art {
    border-radius: 8px !important;
  }

  .dock-details {
    overflow: hidden !important;
  }

  .dock-title {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
  }

  .dock-artist {
    font-size: 0.74rem !important;
  }

  /* Hide Desktop center and right sections */
  .dock-center {
    display: none !important;
  }

  .dock-right {
    display: none !important;
  }

  .desktop-media-toggle {
    display: none !important;
  }

  /* Show Mobile Mini Player Controls */
  .dock-mobile-controls {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
  }

  .mini-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    color: #07090e;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.35);
    transition: transform 0.15s ease;
  }

  .mini-play-btn:active {
    transform: scale(0.92);
  }

  .mini-next-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 6px;
    transition: color 0.15s ease;
  }

  .mini-next-btn:active {
    transform: scale(0.92);
  }

  /* 5. Apple Music iOS Native Bottom Tab Bar */
  .mobile-tab-bar {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(54px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(12, 15, 24, 0.94);
    backdrop-filter: blur(35px) saturate(210%);
    -webkit-backdrop-filter: blur(35px) saturate(210%);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45);
    z-index: 990;
    justify-content: space-around;
    align-items: center;
  }

  .tab-bar-item {
    background: none;
    border: none;
    color: var(--text-tertiary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 6px 14px;
    cursor: pointer;
    transition: color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .tab-bar-item svg {
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
    transition: color 0.18s ease;
  }

  .tab-bar-item.active,
  .tab-bar-item.active svg {
    color: var(--accent-red) !important;
  }

  /* 6. Apple Music Full-Screen Now Playing Sheet (iOS Native Fluid Glass) */
  .mobile-player-sheet {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2500;
  }

  .mobile-player-sheet.open {
    display: flex;
  }

  .mobile-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 4, 7, 0.82);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    opacity: 0;
    transition: opacity 0.35s ease;
  }

  .mobile-player-sheet.open .mobile-sheet-backdrop {
    opacity: 1;
  }

  .mobile-sheet-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 95vh;
    max-height: 860px;
    background: rgba(10, 12, 22, 0.78);
    backdrop-filter: blur(65px) saturate(230%);
    -webkit-backdrop-filter: blur(65px) saturate(230%);
    border-top-left-radius: 36px;
    border-top-right-radius: 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.92), inset 0 1px 1px rgba(255, 255, 255, 0.45);
    display: flex;
    flex-direction: column;
    padding: 12px 24px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .mobile-player-sheet.open .mobile-sheet-content {
    transform: translateY(0);
  }

  /* Dynamic Apple Music Mobile Fluid Ambient Backdrop */
  .mobile-ambient-stage {
    position: absolute;
    inset: 0;
    border-top-left-radius: 36px;
    border-top-right-radius: 36px;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.5s ease;
  }

  .mobile-ambient-art {
    position: absolute;
    inset: -60px;
    background-size: cover;
    background-position: center;
    filter: blur(80px) saturate(260%) brightness(0.68);
    opacity: 0.88;
    transform: scale(1.18);
    transition: background-image 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
    animation: mobileAmbientFloat 20s ease-in-out infinite alternate;
  }

  @keyframes mobileAmbientFloat {
    0% { transform: scale(1.12) translate(0, 0); }
    50% { transform: scale(1.24) translate(15px, -18px); }
    100% { transform: scale(1.14) translate(-15px, 15px); }
  }

  .mobile-ambient-stage .mobile-ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(75px);
    opacity: 0.55;
    mix-blend-mode: screen;
    pointer-events: none;
  }

  .mobile-ambient-stage .orb-a {
    width: 280px;
    height: 280px;
    top: 6%;
    left: -40px;
    background: radial-gradient(circle, var(--orb1-color) 0%, transparent 70%);
    animation: floatOrb1 16s ease-in-out infinite alternate;
    transition: background 0.8s ease;
  }

  .mobile-ambient-stage .orb-b {
    width: 320px;
    height: 320px;
    bottom: 16%;
    right: -50px;
    background: radial-gradient(circle, var(--orb2-color) 0%, transparent 70%);
    animation: floatOrb2 20s ease-in-out infinite alternate;
    transition: background 0.8s ease;
  }

  .mobile-ambient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      180deg,
      rgba(6, 8, 14, 0.18) 0%,
      rgba(8, 10, 18, 0.45) 35%,
      rgba(6, 7, 12, 0.82) 75%,
      rgba(4, 5, 8, 0.96) 100%
    );
    z-index: 1;
  }

  /* Sheet Header & Tactile Grabber */
  .mobile-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 4px 0 10px;
    z-index: 2;
  }

  .mobile-sheet-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .mobile-sheet-close-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.18);
  }

  .mobile-sheet-grabber-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: grab;
    touch-action: none;
    padding: 0 10px;
  }

  .mobile-grabber-pill {
    width: 42px;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.32);
    transition: background 0.2s ease, width 0.2s ease;
  }

  .mobile-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
  }

  .mobile-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-glow);
    animation: pulseGlow 1.8s infinite ease-in-out;
  }

  .mobile-ambient-toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    cursor: pointer;
    transition: all 0.25s ease;
  }

  .mobile-ambient-toggle-pill.active {
    background: linear-gradient(135deg, var(--accent-subtle) 0%, rgba(255, 255, 255, 0.12) 100%);
    border-color: var(--accent-border);
    color: #ffffff;
    box-shadow: 0 0 14px var(--accent-glow);
  }

  .mobile-ambient-toggle-pill svg {
    color: var(--accent-red);
    transition: transform 0.3s ease;
  }

  .mobile-ambient-toggle-pill.active svg {
    transform: rotate(18deg) scale(1.12);
    filter: drop-shadow(0 0 6px var(--accent-red));
  }

  /* Segmented Media Toggle */
  .mobile-media-toggle-wrap {
    display: flex;
    justify-content: center;
    margin: 4px 0 12px;
    z-index: 2;
  }

  /* Hero Artwork Stage */
  .mobile-art-stage {
    position: relative;
    width: min(290px, 72vw);
    aspect-ratio: 1;
    margin: 4px auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
  }

  .mobile-art-ambient-halo {
    position: absolute;
    inset: -16px;
    border-radius: 36px;
    background-size: cover;
    background-position: center;
    filter: blur(36px) saturate(280%) brightness(1.28);
    opacity: 0.65;
    pointer-events: none;
    z-index: 1;
    transform: scale(0.96);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), background-image 0.8s ease;
  }

  .mobile-art-ambient-halo.playing {
    transform: scale(1.08);
    opacity: 0.95;
    animation: ambientHaloPulse 3.8s ease-in-out infinite alternate;
  }

  .mobile-art-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.75), inset 0 1px 1px rgba(255, 255, 255, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    background: #0d101a;
    z-index: 2;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
  }

  .mobile-sheet-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
  }

  .mobile-sheet-art.playing {
    transform: scale(1.03);
  }

  /* Track Meta & Like Button Row */
  .mobile-track-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    z-index: 2;
    padding: 0 4px;
  }

  .mobile-track-meta-text {
    flex: 1;
    min-width: 0;
  }

  .mobile-sheet-title {
    font-family: var(--font-display);
    font-size: 1.38rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-sheet-artist {
    font-size: 0.95rem;
    color: var(--text-tertiary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-like-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.75);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-like-btn:active {
    transform: scale(0.88);
  }

  .mobile-like-btn.liked {
    background: var(--accent-subtle);
    border-color: var(--accent-border);
    color: var(--accent-red);
    box-shadow: 0 0 16px var(--accent-glow);
  }

  .mobile-like-btn.liked .mobile-heart-svg {
    fill: var(--accent-red);
    stroke: var(--accent-red);
    animation: heartBeat 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }

  @keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); }
    100% { transform: scale(1); }
  }

  /* Interactive Touch Scrubber */
  .mobile-scrubber-section {
    width: 100%;
    margin-bottom: 20px;
    z-index: 2;
  }

  .mobile-scrubber {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.14);
    position: relative;
    cursor: pointer;
    transition: height 0.2s ease;
    touch-action: none;
  }

  .mobile-scrubber:active,
  .mobile-scrubber.seeking {
    height: 9px;
  }

  .mobile-scrubber .scrubber-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 3px;
    position: relative;
    box-shadow: 0 0 12px var(--accent-glow);
    pointer-events: none;
  }

  .mobile-scrubber .scrubber-handle {
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 8px var(--accent-glow);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.15s ease;
  }

  .mobile-scrubber:hover .scrubber-handle,
  .mobile-scrubber:active .scrubber-handle,
  .mobile-scrubber.seeking .scrubber-handle {
    opacity: 1;
    transform: translateY(-50%) scale(1.15);
  }

  .mobile-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.76rem;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    margin-top: 7px;
    letter-spacing: 0.02em;
  }

  /* Apple Music Native Symmetrical 5-Control Transport Row */
  .mobile-transport-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 22px;
    z-index: 2;
    padding: 0 10px;
  }

  .mobile-aux-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.65);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .mobile-aux-btn:active {
    transform: scale(0.9);
  }

  .mobile-aux-btn.active {
    background: var(--accent-subtle);
    border-color: var(--accent-border);
    color: var(--accent-red);
    box-shadow: 0 0 14px var(--accent-glow);
  }

  .mobile-skip-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .mobile-skip-btn:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.18);
  }

  .mobile-play-master {
    width: 72px !important;
    height: 72px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    color: #07090e !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 8px 28px rgba(255, 255, 255, 0.45), 0 0 24px var(--accent-glow) !important;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease !important;
  }

  .mobile-play-master:active {
    transform: scale(0.92) !important;
  }

  /* Audio Output Routing & Volume */
  .mobile-routing-section {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 2;
  }

  /* 7. Toast Container Safe Position on Mobile */
  #toastContainer {
    top: max(12px, env(safe-area-inset-top)) !important;
    left: 16px !important;
    right: 16px !important;
    align-items: center !important;
    pointer-events: none !important;
  }

  .glass-toast {
    min-width: 0 !important;
    width: auto !important;
    max-width: 90vw !important;
    padding: 8px 16px !important;
    font-size: 0.82rem !important;
    border-radius: var(--radius-pill) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5) !important;
  }
}

/* Ambient Light Disabled Override */
body.ambient-disabled .ambient-art-wash,
body.ambient-disabled .dock-ambient-halo,
body.ambient-disabled .mobile-ambient-stage,
body.ambient-disabled .mobile-art-ambient-halo {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* ---------------- Realtime Discord Voice Playback Banner ---------------- */
.discord-live-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(14, 20, 36, 0.82);
  border: 1px solid rgba(88, 101, 242, 0.45);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 10px 18px;
  border-radius: 16px;
  margin-bottom: 22px;
  box-shadow: 0 4px 20px rgba(88, 101, 242, 0.22);
  transition: all 0.3s ease;
}

.discord-live-banner:hover {
  border-color: rgba(88, 101, 242, 0.8);
  box-shadow: 0 6px 24px rgba(88, 101, 242, 0.35);
}

.live-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 12px #34c759;
  animation: liveDotPulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes liveDotPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.discord-live-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1;
}

.live-badge {
  background: #5865f2;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}

.discord-sync-btn {
  background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.discord-sync-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 12px rgba(88, 101, 242, 0.45);
}

/* ---------------- Category Filter Chips Bar ---------------- */
.category-chips-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  margin-bottom: 24px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.category-chip {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 9999px;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-chip:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.category-chip.active {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 18px var(--accent-glow);
}

/* ---------------- Music Genre Sections ---------------- */
.music-genre-section {
  margin-bottom: 44px;
}

/* ---------------- Search Suggestions Chips ---------------- */
.search-suggestions-wrap {
  margin: 12px 0 24px;
}

.search-suggestions-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.search-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-suggest-chip {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.search-suggest-chip:hover {
  background: rgba(252, 60, 68, 0.22);
  border-color: rgba(252, 60, 68, 0.55);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Session Auth Guard Banner */
.session-auth-banner {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 24, 38, 0.94);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9999px;
  padding: 8px 18px 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 24px rgba(252, 60, 68, 0.2);
  z-index: 10001;
  animation: slideDownFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.session-auth-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #ffffff;
  font-weight: 500;
}

.session-signin-btn {
  background: #ffffff;
  color: #07090e;
  border: none;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 9999px;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
}

.session-signin-btn:hover {
  transform: scale(1.05);
  background: #f0f0f0;
}

/* Responsive PC Dock Controls - Never Overlap */
@media (min-width: 769px) and (max-width: 1450px) {
  .player-dock {
    gap: 8px !important;
    padding: 0 14px !important;
  }
  .ambient-toggle-pill span,
  .autoplay-pill span {
    display: none !important;
  }
  .ambient-toggle-pill,
  .autoplay-pill {
    padding: 6px 8px !important;
    height: 30px !important;
    width: 30px !important;
    border-radius: 50% !important;
    justify-content: center !important;
  }
  .guild-select {
    max-width: 90px !important;
    font-size: 0.7rem !important;
    padding: 4px 6px !important;
  }
  .mode-btn {
    padding: 4px 6px !important;
    font-size: 0.68rem !important;
  }
  .volume-control {
    display: none !important;
  }
}

@media (min-width: 769px) and (max-width: 1250px) {
  #shuffleBtn,
  #repeatBtn {
    display: none !important;
  }
  .ambient-toggle-pill,
  .autoplay-pill {
    display: none !important;
  }
  .transport-btns {
    gap: 6px !important;
  }
  .dock-track-info {
    flex: 0 0 auto !important;
    max-width: 190px !important;
  }
  .dock-details {
    max-width: 85px !important;
  }
  .dock-center {
    flex: 1 1 auto !important;
    max-width: 340px !important;
    min-width: 160px !important;
    margin: 0 4px !important;
  }
  .play-master {
    width: 38px !important;
    height: 38px !important;
  }
}

/* ==========================================================================
   Apple Dynamic Island Floating Music Island
   Pitch-black obsidian liquid glass, spring physics, notch adaptation
   ========================================================================== */
.dynamic-island-container {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 999999;
  pointer-events: none;
}

.dynamic-island {
  position: relative;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(32px) saturate(190%);
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 16px rgba(255, 255, 255, 0.05);
  pointer-events: auto;
  transition: width 0.42s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.42s cubic-bezier(0.16, 1, 0.3, 1),
              border-radius 0.42s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.42s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.42s cubic-bezier(0.16, 1, 0.3, 1);
  width: 220px;
  height: 40px;
  overflow: hidden;
  user-select: none;
  cursor: pointer;
}

/* Compact Pill State */
.island-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 0 10px;
  box-sizing: border-box;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.island-compact-left {
  display: flex;
  align-items: center;
}

.island-compact-art {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  animation: islandSpin 8s linear infinite;
  animation-play-state: paused;
}

.island-compact-art.playing {
  animation-play-state: running;
}

@keyframes islandSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.island-compact-notch-spacer {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.island-notch-camera {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #1c2333 0%, #05070c 80%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.island-compact-right {
  display: flex;
  align-items: center;
}

/* Sound Wave Equalizer */
.island-sound-wave {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 16px;
}

.island-sound-wave .bar {
  width: 3px;
  height: 4px;
  background: linear-gradient(180deg, #fc3c44, #ff6b7b);
  border-radius: 9999px;
  transition: height 0.2s ease;
}

.island-sound-wave.active .bar-1 { animation: soundWave 0.7s ease-in-out infinite alternate; }
.island-sound-wave.active .bar-2 { animation: soundWave 0.9s ease-in-out 0.2s infinite alternate; }
.island-sound-wave.active .bar-3 { animation: soundWave 0.6s ease-in-out 0.4s infinite alternate; }
.island-sound-wave.active .bar-4 { animation: soundWave 0.8s ease-in-out 0.1s infinite alternate; }

@keyframes soundWave {
  0% { height: 4px; }
  100% { height: 16px; }
}

/* Expanded Island Card State */
.island-expanded {
  display: none;
  opacity: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 18px 20px 16px 20px;
  flex-direction: column;
  gap: 14px;
  cursor: default;
  transition: opacity 0.3s ease 0.1s;
}

.dynamic-island.expanded {
  width: min(420px, calc(100vw - 28px));
  height: auto;
  min-height: 200px;
  border-radius: 38px;
  background: rgba(8, 8, 11, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85),
              0 0 35px rgba(252, 60, 68, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.dynamic-island.expanded .island-compact {
  display: none;
  opacity: 0;
}

.dynamic-island.expanded .island-expanded {
  display: flex;
  opacity: 1;
}

/* Expanded Header Row */
.island-exp-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.island-exp-art-wrap {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

.island-exp-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.island-exp-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.island-exp-artist {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.island-exp-badges {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.island-badge {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 6px;
}

.island-badge-lossless {
  background: rgba(252, 60, 68, 0.18);
  color: #ff525b;
  border: 1px solid rgba(252, 60, 68, 0.35);
}

.island-badge-mode {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.island-collapse-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.island-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* Expanded Scrubber Row */
.island-exp-scrubber {
  display: flex;
  align-items: center;
  gap: 10px;
}

.island-time {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.55);
  min-width: 30px;
}

.island-scrubber-track {
  flex: 1;
  height: 5px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.island-scrubber-fill {
  height: 100%;
  background: linear-gradient(90deg, #fc3c44, #ff717b);
  border-radius: 9999px;
  transition: width 0.1s linear;
}

/* Controls & Volume Row */
.island-exp-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.island-transport {
  display: flex;
  align-items: center;
  gap: 12px;
}

.island-btn {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.15s, opacity 0.2s;
}

.island-btn:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

.island-btn:active {
  transform: scale(0.92);
}

.island-btn-play {
  width: 44px;
  height: 44px;
  background: #ffffff;
  color: #000000;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25);
}

.island-btn-play:hover {
  background: #f0f0f0;
}

.island-volume-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  flex: 1;
  max-width: 130px;
}

.island-volume-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}

.island-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
}

/* ==========================================================================
   Multi-Color Themes for Elia Music (Obsidian, Cyber, Ocean, Emerald, Rose, Amber)
   ========================================================================== */
body[data-theme="obsidian"],
:root {
  --accent-red: #fc3c44;
  --accent-red-hover: #ff5263;
  --apple-red: #fc3c44;
  --apple-red-hover: #ff5263;
  --accent-color: #fc3c44;
  --accent-gradient: linear-gradient(135deg, #fc3c44 0%, #ff5263 50%, #ff758c 100%);
  --accent-glow: rgba(252, 60, 68, 0.42);
  --accent-glow-strong: rgba(252, 60, 68, 0.75);
  --accent-subtle: rgba(252, 60, 68, 0.16);
  --accent-border: rgba(252, 60, 68, 0.42);
  --orb1-color: rgba(252, 60, 68, 0.85);
  --orb2-color: rgba(175, 82, 222, 0.75);
  --orb3-color: rgba(0, 113, 227, 0.7);
  --theme-border-active: #fc3c44;
  --theme-card-glow: rgba(252, 60, 68, 0.35);
  --bg-core: #06070a;
}

body[data-theme="cyber"] {
  --accent-red: #a855f7;
  --accent-red-hover: #c084fc;
  --apple-red: #a855f7;
  --apple-red-hover: #c084fc;
  --accent-color: #a855f7;
  --accent-gradient: linear-gradient(135deg, #a855f7 0%, #c084fc 50%, #e879f9 100%);
  --accent-glow: rgba(168, 85, 247, 0.45);
  --accent-glow-strong: rgba(168, 85, 247, 0.75);
  --accent-subtle: rgba(168, 85, 247, 0.18);
  --accent-border: rgba(168, 85, 247, 0.45);
  --orb1-color: rgba(168, 85, 247, 0.85);
  --orb2-color: rgba(59, 130, 246, 0.75);
  --orb3-color: rgba(236, 72, 153, 0.7);
  --theme-border-active: #a855f7;
  --theme-card-glow: rgba(168, 85, 247, 0.35);
  --bg-core: #07050f;
}

body[data-theme="ocean"] {
  --accent-red: #0071e3;
  --accent-red-hover: #38bdf8;
  --apple-red: #0071e3;
  --apple-red-hover: #38bdf8;
  --accent-color: #0071e3;
  --accent-gradient: linear-gradient(135deg, #0071e3 0%, #0ea5e9 50%, #38bdf8 100%);
  --accent-glow: rgba(0, 113, 227, 0.45);
  --accent-glow-strong: rgba(0, 113, 227, 0.75);
  --accent-subtle: rgba(0, 113, 227, 0.18);
  --accent-border: rgba(0, 113, 227, 0.45);
  --orb1-color: rgba(0, 113, 227, 0.85);
  --orb2-color: rgba(6, 182, 212, 0.75);
  --orb3-color: rgba(99, 102, 241, 0.7);
  --theme-border-active: #0071e3;
  --theme-card-glow: rgba(0, 113, 227, 0.35);
  --bg-core: #040914;
}

body[data-theme="emerald"] {
  --accent-red: #1db954;
  --accent-red-hover: #22c55e;
  --apple-red: #1db954;
  --apple-red-hover: #22c55e;
  --accent-color: #1db954;
  --accent-gradient: linear-gradient(135deg, #1db954 0%, #22c55e 50%, #4ade80 100%);
  --accent-glow: rgba(29, 185, 84, 0.45);
  --accent-glow-strong: rgba(29, 185, 84, 0.75);
  --accent-subtle: rgba(29, 185, 84, 0.18);
  --accent-border: rgba(29, 185, 84, 0.45);
  --orb1-color: rgba(29, 185, 84, 0.85);
  --orb2-color: rgba(16, 185, 129, 0.75);
  --orb3-color: rgba(5, 150, 105, 0.7);
  --theme-border-active: #1db954;
  --theme-card-glow: rgba(29, 185, 84, 0.35);
  --bg-core: #040d07;
}

body[data-theme="rose"] {
  --accent-red: #f43f5e;
  --accent-red-hover: #fb7185;
  --apple-red: #f43f5e;
  --apple-red-hover: #fb7185;
  --accent-color: #f43f5e;
  --accent-gradient: linear-gradient(135deg, #f43f5e 0%, #fb7185 50%, #fda4af 100%);
  --accent-glow: rgba(244, 63, 94, 0.45);
  --accent-glow-strong: rgba(244, 63, 94, 0.75);
  --accent-subtle: rgba(244, 63, 94, 0.18);
  --accent-border: rgba(244, 63, 94, 0.45);
  --orb1-color: rgba(244, 63, 94, 0.85);
  --orb2-color: rgba(251, 146, 60, 0.75);
  --orb3-color: rgba(225, 29, 72, 0.7);
  --theme-border-active: #f43f5e;
  --theme-card-glow: rgba(244, 63, 94, 0.35);
  --bg-core: #0d0508;
}

body[data-theme="amber"] {
  --accent-red: #f59e0b;
  --accent-red-hover: #fbbf24;
  --apple-red: #f59e0b;
  --apple-red-hover: #fbbf24;
  --accent-color: #f59e0b;
  --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #fde047 100%);
  --accent-glow: rgba(245, 158, 11, 0.45);
  --accent-glow-strong: rgba(245, 158, 11, 0.75);
  --accent-subtle: rgba(245, 158, 11, 0.18);
  --accent-border: rgba(245, 158, 11, 0.45);
  --orb1-color: rgba(245, 158, 11, 0.85);
  --orb2-color: rgba(239, 68, 68, 0.75);
  --orb3-color: rgba(217, 119, 6, 0.7);
  --theme-border-active: #f59e0b;
  --theme-card-glow: rgba(245, 158, 11, 0.35);
  --bg-core: #0d0903;
}

/* Pause animation smoothing */
.island-compact-art {
  transition: opacity 0.3s ease, filter 0.3s ease;
  animation: islandSpin 8s linear infinite;
  animation-play-state: paused;
}

.island-compact-art.playing {
  animation-play-state: running;
}

.island-sound-wave .bar {
  transition: height 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.island-sound-wave:not(.active) .bar {
  height: 3px !important;
  opacity: 0.35;
  animation: none !important;
}

/* ==========================================================================
   Dedicated Settings Modal Styles
   ========================================================================== */
.settings-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.settings-modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.settings-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.94);
  width: min(520px, calc(100vw - 32px));
  max-height: 85vh;
  background: rgba(16, 16, 22, 0.94);
  backdrop-filter: blur(36px) saturate(200%);
  -webkit-backdrop-filter: blur(36px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 255, 255, 0.05);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.settings-modal.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
}

.settings-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.settings-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.settings-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transform: scale(1.05);
}

.settings-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.settings-section-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #ffffff;
}

.settings-section-subtitle {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 3px;
  margin-bottom: 12px;
}

/* Theme Picker Grid */
.theme-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 480px) {
  .theme-picker-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.theme-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  color: #ffffff;
}

.theme-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.theme-card.active {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--theme-border-active, var(--accent-red));
  box-shadow: 0 0 20px var(--theme-card-glow, var(--accent-glow));
  transform: translateY(-2px);
}

.theme-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.theme-name {
  font-size: 0.82rem;
  font-weight: 600;
}

.theme-tag {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Settings Toggle Rows */
.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}

.settings-toggle-label strong {
  display: block;
  font-size: 0.88rem;
  color: #ffffff;
}

.settings-toggle-label small {
  display: block;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

/* Switch Pill */
.switch-pill {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch-pill input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  transition: background-color 0.3s;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.switch-pill input:checked + .switch-slider {
  background-color: var(--apple-red);
}

.switch-pill input:checked + .switch-slider:before {
  transform: translateX(20px);
}

/* Info Card */
.settings-info-card {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-info-card .info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ==========================================================================
   Platform Strict Separation:
   - PC Desktop: NO Dynamic Island (Uses Liquid Glass Dock)
   - Mobile Website: NO Dynamic Island (Uses Mobile Tab Bar & Sheet)
   - Android APK: ONLY APK displays the Dynamic Island
   ========================================================================== */
.dynamic-island-container {
  display: none !important;
}

body.platform-apk .dynamic-island-container {
  display: block !important;
}


/* ---------------- Liquid Glass User Avatar & Badges ---------------- */
.liquid-avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2.5px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(252, 60, 68, 0.4) 50%, rgba(0, 113, 227, 0.3) 100%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.45), 0 0 15px rgba(252, 60, 68, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.liquid-avatar-wrap:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 22px rgba(252, 60, 68, 0.55), 0 0 25px rgba(255, 255, 255, 0.4);
}

.liquid-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.liquid-avatar-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  background: #23a55a;
  border: 2px solid #07090e;
  border-radius: 50%;
}

/* ---------------- Discord Bot Invite Nav Button ---------------- */
.add-bot-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.22) 0%, rgba(88, 101, 242, 0.45) 100%);
  border: 1px solid rgba(88, 101, 242, 0.55);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(88, 101, 242, 0.3);
  transition: all 0.25s ease;
  cursor: pointer;
}

.add-bot-nav-btn:hover {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.45) 0%, rgba(88, 101, 242, 0.75) 100%);
  box-shadow: 0 6px 24px rgba(88, 101, 242, 0.55);
  transform: translateY(-1px);
}

/* ---------------- Mobile Mini Video Button in Dock ---------------- */
.mini-video-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.75);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mini-video-btn.active {
  background: var(--accent-red);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 14px rgba(252, 60, 68, 0.6);
}

/* ---------------- Spotify Import & Account Memory Styles ---------------- */
.spotify-import-banner {
  background: linear-gradient(135deg, rgba(30, 215, 96, 0.12) 0%, rgba(20, 30, 45, 0.8) 100%);
  border: 1.5px solid rgba(30, 215, 96, 0.3);
  border-radius: 20px;
  padding: 20px 24px;
  margin: 20px 0 30px;
  backdrop-filter: blur(30px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 20px rgba(30, 215, 96, 0.15);
}

.spotify-input-row {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.spotify-url-input {
  flex: 1;
  min-width: 260px;
  background: rgba(0, 0, 0, 0.45);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-size: 0.88rem;
  color: #ffffff;
  outline: none;
  transition: border-color 0.2s ease;
}

.spotify-url-input:focus {
  border-color: #1ed760;
  box-shadow: 0 0 14px rgba(30, 215, 96, 0.35);
}

.spotify-import-btn {
  background: #1ed760;
  color: #07090e;
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.spotify-import-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 18px rgba(30, 215, 96, 0.5);
}

.playlist-tracklist-view {
  background: rgba(14, 18, 28, 0.95);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 24px;
  margin-top: 20px;
}

.track-line-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
}

.track-line-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.track-line-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  overflow: hidden;
}

.track-line-num {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  width: 22px;
  text-align: center;
}

.track-line-art {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.track-line-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.track-line-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-line-artist {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-line-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 12px;
}

.track-line-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.track-line-btn:hover {
  background: #ffffff;
  color: #07090e;
}

/* Mobile Center Video Player Replacement */
.mobile-art-wrapper {
  position: relative !important;
}

.mobile-art-wrapper .web-player-sandbox.in-art-wrapper {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  right: 0 !important;
  transform: none !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  clip-path: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 15 !important;
  background: #000000 !important;
}

.mobile-art-wrapper .web-player-sandbox.in-art-wrapper .video-overlay-header {
  display: none !important;
}

.mobile-art-wrapper .web-player-sandbox.in-art-wrapper .video-frame-container {
  width: 100% !important;
  height: 100% !important;
}

.mobile-art-wrapper .web-player-sandbox.in-art-wrapper iframe {
  width: 100% !important;
  height: 100% !important;
  border-radius: 24px !important;
  border: none !important;
}

@media (max-width: 768px) {
  .player-dock .dock-center {
    display: none !important;
  }
  .player-dock .dock-right {
    display: none !important;
  }
  .player-dock .desktop-media-toggle {
    display: none !important;
  }
  .player-dock .dock-mobile-controls {
    display: flex !important;
  }
}

/* Sidebar APK Download Button */
.download-apk-sidebar-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}
.download-apk-sidebar-btn:hover {
  background: rgba(252, 60, 68, 0.15);
  border-color: rgba(252, 60, 68, 0.4);
  color: #ff375f;
  transform: translateY(-1px);
}
