/* ==========================================================================
   SYMPHONY MUSIC STREAMING - MODERN DARK PREMIUM THEME CSS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Colors */
  --bg-base: #09090b;       /* Pure slate black for core background */
  --bg-sidebar: #0e0e11;    /* Slightly lighter container contrast */
  --bg-card: #18181b;       /* Card surface color */
  --bg-card-hover: #27272a; /* Card hover intensity */
  --border-color: #27272a;  /* Subtle divider lines */
  --brand-primary: #1db954; /* Symphony / Spotify Green */
  --brand-primary-hover: #1ed760;
  --text-main: #fafafa;     /* High-contrast off-white */
  --text-muted: #a1a1aa;    /* Distant gray for secondary details */
  --accent-blue: #3b82f6;   /* Rich electric accent */
  --glass-player: rgba(14, 14, 17, 0.85);

  /* Fonts */
  --font-sans: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --sidebar-width: 260px;
  --player-height: 90px;
  --header-height: 70px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-main);
  overflow: hidden;
  height: 100vh;
  display: flex;
  user-select: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #3f3f46;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #52525b;
}

/* ==========================================================================
   APP CONTAINER & LAYOUT
   ========================================================================== */

#app-container {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: var(--header-height) 1fr var(--player-height);
  grid-template-areas:
    "sidebar header"
    "sidebar main"
    "player player";
  width: 100vw;
  height: 100vh;
}

/* Skeletons Loader Screen */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-base);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#loading-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-pulse {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 4px solid var(--border-color);
  border-top-color: var(--brand-primary);
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loader-text {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-sans);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   SIDEBAR STYLING
   ========================================================================== */

#sidebar {
  grid-area: sidebar;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  overflow-y: auto;
  z-index: 100;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding-left: 8px;
}

.logo-icon {
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
  padding-left: 12px;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-item i {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

.nav-item:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: var(--brand-primary);
  background-color: rgba(29, 185, 84, 0.1);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 4px;
  background-color: var(--brand-primary);
  border-radius: 0 4px 4px 0;
}

/* Mini Library Panel inside Sidebar */
.my-playlists-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  margin-top: 8px;
}

.playlists-scroll {
  overflow-y: auto;
  max-height: calc(100vh - 480px);
  padding-right: 4px;
}

.playlist-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.playlist-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.playlist-link-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
  padding-right: 8px;
}

/* ==========================================================================
   TOP HEADER STYLING
   ========================================================================== */

#top-header {
  grid-area: header;
  background-color: var(--bg-base);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 99;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-grow: 1;
  max-width: 500px;
}

.nav-arrows {
  display: flex;
  gap: 8px;
}

.arrow-btn {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.arrow-btn:hover {
  color: var(--text-main);
  border-color: #3f3f46;
}

.search-bar-wrapper {
  position: relative;
  width: 100%;
}

.search-bar-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  width: 18px;
  height: 18px;
}

.search-input {
  width: 100%;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 10px 16px 10px 42px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input:focus {
  border-color: var(--brand-primary);
  background-color: rgba(29, 185, 84, 0.05);
  box-shadow: 0 0 12px rgba(29, 185, 84, 0.15);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.action-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  position: relative;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border-radius: 50%;
}

.action-icon-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.04);
}

.action-icon-btn i {
  width: 20px;
  height: 20px;
}

.btn-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  background-color: var(--brand-primary);
  border-radius: 50%;
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  padding: 4px 14px 4px 6px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.user-profile-widget:hover {
  border-color: #3f3f46;
  background-color: var(--bg-card-hover);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: crop;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
}

/* ==========================================================================
   MAIN PANEL CONTENT AREA
   ========================================================================== */

#main-content {
  grid-area: main;
  background-color: var(--bg-base);
  overflow-y: auto;
  padding: 32px;
  position: relative;
  overflow-x: hidden;
}

.view-section {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Featured Hero Banner on Home */
.hero-banner {
  width: 100%;
  height: 260px;
  background: linear-gradient(135deg, rgba(29,185,84,0.4) 0%, rgba(9,9,11,1) 90%), url('https://images.unsplash.com/photo-1514525253161-7a46d19cd819?w=1200&h=400&fit=crop') no-repeat center center;
  background-size: cover;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  margin-bottom: 36px;
  box-shadow: inset 0 0 100px rgba(0,0,0,0.8);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--brand-primary);
  margin-bottom: 8px;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  gap: 12px;
}

.btn-primary {
  background-color: var(--brand-primary);
  color: #000000;
  border: none;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
  background-color: var(--brand-primary-hover);
  transform: scale(1.05);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Shelf Categories Group */
.shelf-container {
  margin-bottom: 36px;
}

.shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.shelf-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.shelf-see-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-primary);
  cursor: pointer;
  transition: color 0.2s;
}

.shelf-see-more:hover {
  color: var(--brand-primary-hover);
  text-decoration: underline;
}

/* Shelf Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

/* ==========================================================================
   MUSIC CARD COMPONENT (GORGEOUS DETAILED HOVER STYLE)
   ========================================================================== */

.music-card {
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
}

.music-card:hover {
  background-color: var(--bg-card-hover);
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}

.card-media-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
}

.card-artwork {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.music-card:hover .card-artwork {
  transform: scale(1.06);
}

.card-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 2;
}

.music-card:hover .card-play-overlay {
  opacity: 1;
}

.card-play-btn {
  background-color: var(--brand-primary);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  box-shadow: 0 8px 16px rgba(29, 185, 84, 0.3);
  transform: scale(0.85);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.card-play-btn i {
  fill: #000000;
  width: 22px;
  height: 22px;
  margin-left: 2px;
}

.music-card:hover .card-play-btn {
  transform: scale(1);
}

.card-play-btn:hover {
  background-color: var(--brand-primary-hover);
  transform: scale(1.1) !important;
}

.card-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-primary);
  backdrop-filter: blur(4px);
  z-index: 3;
  pointer-events: none;
}

/* ==========================================================================
   ALBUM & ARTIST SPLIT DETAIL PAGES
   ========================================================================== */

/* Header Panel layouts */
.detail-view-header {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  margin-bottom: 32px;
  position: relative;
}

.detail-view-cover {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 16px 32px rgba(0,0,0,0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-view-info {
  display: flex;
  flex-direction: column;
}

.detail-view-type {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 6px;
}

.detail-view-title {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.detail-view-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.meta-split {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--text-muted);
}

.bold-tag {
  color: var(--text-main);
  font-weight: 600;
}

/* Standard Tracklist Grid Row */
.songs-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.songs-list-header {
  display: grid;
  grid-template-columns: 40px 4fr 3fr 2fr 80px;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 12px;
}

.song-row {
  display: grid;
  grid-template-columns: 40px 4fr 3fr 2fr 80px;
  align-items: center;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
}

.song-row:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

.song-row.active {
  background-color: rgba(29, 185, 84, 0.08);
}

.song-row.active .song-title-cell {
  color: var(--brand-primary);
}

.song-number-cell {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
}

.song-media-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
}

.song-media-artwork {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
}

.song-text-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.song-title-cell {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.song-artist-cell, .song-album-cell {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-duration-cell {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.song-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s;
  padding: 4px;
}

.song-action-btn:hover {
  color: var(--text-main);
}

.song-action-btn.liked {
  color: var(--brand-primary);
}

/* ==========================================================================
   ARTIST DETAILED BANNER
   ========================================================================== */

.artist-hero-banner {
  width: 100%;
  height: 320px;
  background-size: cover;
  background-position: center 30%;
  border-radius: 16px;
  display: flex;
  align-items: flex-end;
  padding: 40px;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.artist-hero-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(9, 9, 11, 0) 30%, rgba(9, 9, 11, 0.95) 100%);
  z-index: 1;
}

.artist-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.verified-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 8px;
}

.verified-badge i {
  fill: var(--accent-blue);
  color: #fff;
  width: 16px;
  height: 16px;
}

.artist-banner-name {
  font-size: 3.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1;
}

.listener-count {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   PERMANENT MUSIC PLAYER COMPONENT (FIXED BOTTOM)
   ========================================================================== */

#music-player-panel {
  grid-area: player;
  background-color: var(--glass-player);
  backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--border-color);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 150;
}

/* Player Left: Current Track Meta */
.player-track-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 30%;
  min-width: 180px;
}

.player-artwork-wrapper {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.player-artwork {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-track-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.player-track-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.player-track-title:hover {
  text-decoration: underline;
}

.player-track-artist {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.player-track-artist:hover {
  color: var(--text-main);
}

.player-track-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

/* Player Center: Control Deck */
.player-controls-deck {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 40%;
  max-width: 580px;
}

.deck-buttons {
  display: flex;
  align-items: center;
  gap: 20px;
}

.deck-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deck-btn:hover {
  color: var(--text-main);
}

.deck-btn i {
  width: 20px;
  height: 20px;
}

.deck-btn.toggle-active {
  color: var(--brand-primary);
  position: relative;
}

.deck-btn.toggle-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--brand-primary);
}

.play-pause-btn {
  background-color: var(--text-main);
  color: #000000;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  gap: 0 !important;
}

.play-pause-btn:hover {
  transform: scale(1.06);
  background-color: #ffffff;
}

.play-pause-btn i {
  fill: #000000;
  color: #000000;
  width: 20px;
  height: 20px;
}

/* Timeline range bar */
.deck-timeline {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.time-stamp {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 32px;
}

.slider-wrapper {
  flex-grow: 1;
  position: relative;
  display: flex;
  align-items: center;
  height: 12px;
  cursor: pointer;
}

.slider-input {
  position: absolute;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  outline: none;
  background: #3f3f46;
  appearance: none;
  cursor: pointer;
  z-index: 3;
  margin: 0;
  opacity: 0; /* Fully transparent visually, we use timeline-track */
}

.timeline-track {
  position: absolute;
  width: 100%;
  height: 4px;
  background-color: #3f3f46;
  border-radius: 2px;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.timeline-progress {
  height: 100%;
  width: 0%;
  background-color: var(--brand-primary);
  border-radius: 2px;
}

.slider-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--text-main);
  left: 0%;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.slider-wrapper:hover .slider-handle {
  opacity: 1;
}

.slider-wrapper:hover .timeline-progress {
  background-color: var(--brand-primary-hover);
}

/* Player Right: Utilities Dashboard */
.player-utilities {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 30%;
  justify-content: flex-end;
  min-width: 180px;
}

.volume-deck {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 120px;
}

.volume-deck i {
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   QUEUE PANEL (COLLAPSIBLE SLIDE-UP SIDEBAR)
   ========================================================================== */

#queue-panel {
  position: fixed;
  top: var(--header-height);
  right: -360px; /* Hidden initially */
  width: 340px;
  height: calc(100vh - var(--header-height) - var(--player-height));
  background-color: var(--bg-sidebar);
  border-left: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  flex-direction: column;
  z-index: 120;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}

#queue-panel.open {
  right: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.panel-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.panel-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.panel-close-btn:hover {
  color: var(--text-main);
}

.queue-subheading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 600;
}

.queue-items-scroll {
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s;
  cursor: pointer;
}

.queue-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

.queue-item.active {
  background-color: rgba(29, 185, 84, 0.08);
}

.queue-item.active .queue-item-title {
  color: var(--brand-primary);
}

.queue-item-art {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
}

.queue-item-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-grow: 1;
}

.queue-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item-artist {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   GENRES CATEGORY TILES (SEARCH GRID)
   ========================================================================== */

.genre-card {
  height: 140px;
  border-radius: 12px;
  padding: 16px;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s;
}

.genre-card:hover {
  transform: scale(1.04);
}

.genre-card span {
  position: relative;
  z-index: 2;
}

.genre-card img {
  position: absolute;
  right: -20px;
  bottom: -10px;
  width: 80px;
  height: 80px;
  object-fit: cover;
  transform: rotate(25deg);
  border-radius: 4px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  z-index: 1;
  transition: transform 0.3s;
}

.genre-card:hover img {
  transform: rotate(15deg) scale(1.08);
}

/* ==========================================================================
   FULLSCREEN AUDIO PANEL INTERACTIVE OVERLAY
   ========================================================================== */

#fullscreen-player-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #1c1917 0%, #09090b 100%);
  z-index: 200;
  display: none;
  flex-direction: column;
  animation: slideUpFullscreen 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 40px;
  justify-content: space-between;
}

#fullscreen-player-overlay.open {
  display: flex;
}

@keyframes slideUpFullscreen {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.fullscreen-close-btn {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px;
  border-radius: 50%;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.fullscreen-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.fullscreen-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  flex-grow: 1;
}

.fullscreen-art-container {
  width: 420px;
  height: 420px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.fullscreen-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fullscreen-text-section {
  display: flex;
  flex-direction: column;
  max-width: 480px;
}

.fullscreen-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.fullscreen-artist {
  font-size: 1.4rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 24px;
}

/* Lyrics Display inside Fullscreen */
.lyrics-box {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 24px;
  height: 200px;
  overflow-y: auto;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
  text-align: left;
}

.lyrics-line.active {
  color: var(--brand-primary);
  font-weight: 600;
  font-size: 1.05rem;
}

/* ==========================================================================
   RESPONSIVE LAYOUT MEDIA QUERIES
   ========================================================================== */

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 200px;
  }
  .detail-view-cover {
    width: 150px;
    height: 150px;
  }
  .detail-view-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  body {
    overflow-y: auto;
  }

  #app-container {
    grid-template-columns: 1fr;
    grid-template-rows: var(--header-height) 1fr var(--player-height) 64px; /* Space for Mobile Navigator */
    grid-template-areas:
      "header"
      "main"
      "player"
      "mobilenav";
    height: auto;
    min-height: 100vh;
  }

  #sidebar {
    display: none; /* Hide desktop sidebar */
  }

  /* Insert layout for bottom mobile navigation bar */
  .mobile-navigator {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background-color: var(--bg-sidebar);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 180;
    padding: 4px 0;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    cursor: pointer;
    gap: 4px;
  }

  .mobile-nav-item i {
    width: 20px;
    height: 20px;
  }

  .mobile-nav-item.active {
    color: var(--brand-primary);
  }

  #top-header {
    padding: 0 16px;
  }

  #main-content {
    padding: 16px;
    margin-bottom: calc(var(--player-height) + 16px);
  }

  .hero-banner {
    height: 200px;
    padding: 20px;
    margin-bottom: 24px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 0.85rem;
    margin-bottom: 12px;
  }

  .songs-list-header {
    grid-template-columns: 40px 1fr 60px;
    padding: 8px;
  }

  .song-album-cell, .song-artist-cell {
    display: none; /* Hide extra columns on mobile list */
  }

  .song-row {
    grid-template-columns: 40px 1fr 60px;
    padding: 8px;
  }

  #music-player-panel {
    padding: 0 16px;
  }

  .player-track-meta {
    width: 50%;
  }

  .player-track-actions {
    display: none; /* Hide heart, etc. in crowded metadata space */
  }

  .player-controls-deck {
    width: 50%;
  }

  .deck-timeline, .volume-deck, .player-utilities .deck-btn:not(#btn-play-fullscreen) {
    display: none !important; /* Hide seeker timelines and volume on compact mobile bottom player */
  }

  .player-utilities {
    width: auto;
    min-width: unset;
  }

  /* Fullscreen content dimensions stack */
  .fullscreen-main {
    flex-direction: column;
    gap: 32px;
  }

  .fullscreen-art-container {
    width: 260px;
    height: 260px;
  }

  .fullscreen-title {
    font-size: 2rem;
    text-align: center;
  }

  .fullscreen-artist {
    font-size: 1.1rem;
    text-align: center;
  }
}
