@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-tertiary: #1e1e1e;
  --bg-card: rgba(30, 30, 30, 0.9);
  --accent-1: #ff6b6b;
  --accent-2: #feca57;
  --accent-gradient: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.08);
  --hover-bg: rgba(255, 255, 255, 0.08);
  --sidebar-width: 250px;
  --player-height: 90px;
}

[data-theme="light"] {
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f3f4;
  --bg-card: rgba(255, 255, 255, 0.95);
  --text-primary: #1a1a1a;
  --text-secondary: rgba(0, 0, 0, 0.7);
  --text-muted: rgba(0, 0, 0, 0.45);
  --glass-bg: rgba(0, 0, 0, 0.03);
  --glass-border: rgba(0, 0, 0, 0.08);
  --hover-bg: rgba(0, 0, 0, 0.05);
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: background 0.3s ease, color 0.3s ease;
}

/* ============ BACKGROUND ============ */
.bg-wrapper {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-blur {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(120px) saturate(1.8);
  opacity: 0.2;
  transform: scale(1.5);
  transition: background-image 1s ease;
}

/* ============ MAIN LAYOUT ============ */
.app-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--player-height);
  display: flex;
  z-index: 1;
}

/* ============ SIDEBAR ============ */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100%;
  background: var(--bg-secondary);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 15px;
  overflow-y: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 20px;
}

.logo h1 {
  font-size: 1.4rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 4px;
  font-size: 0.9rem;
  position: relative;
}

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

.nav-item.active {
  background: var(--accent-gradient);
  color: #1a1a1a;
  font-weight: 500;
}

.nav-item i {
  font-size: 1.25rem;
}

.badge {
  position: absolute;
  right: 10px;
  background: var(--accent-1);
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.nav-item.active .badge {
  background: rgba(0, 0, 0, 0.3);
}

/* User Section */
.user-section {
  padding: 12px 0 0;
  border-top: 1px solid var(--glass-border);
  margin-top: 10px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: var(--glass-bg);
}

.user-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a1a1a;
  overflow: hidden;
}

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

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

.user-info h4 {
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-info p {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
}

.logout-btn:hover {
  color: var(--accent-1);
  background: var(--hover-bg);
}

.logout-btn i {
  font-size: 1.1rem;
}

/* ============ MAIN CONTENT ============ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* Synced Lyrics */
.lyrics-content {
  height: 80vh;
  max-height: 80vh;
}

.lyrics-text {
  height: 60vh;
  overflow-y: auto;
  text-align: center;
  padding: 20px;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-muted);
  scroll-behavior: smooth;
  /* Hide scrollbar */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.lyrics-text::-webkit-scrollbar {
  display: none;
}

.lyric-line {
  margin: 10px 0;
  transition: all 0.3s ease;
  cursor: pointer;
  border-radius: 8px;
  padding: 5px 10px;
}

.lyric-line:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.lyric-line.active {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.4rem;
  transform: scale(1.05);
  text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.5);
}

/* Header */
.header {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--glass-border);
}

.search-container {
  position: relative;
  flex: 1;
  max-width: 420px;
}

.search-container input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.search-container input:focus {
  outline: none;
  border-color: var(--accent-1);
  background: var(--hover-bg);
}

.search-container input::placeholder {
  color: var(--text-muted);
}

.search-container>i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.15rem;
}

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

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: var(--accent-gradient);
  color: #1a1a1a;
  border-color: transparent;
}

.icon-btn i {
  font-size: 1.2rem;
}

/* User Menu & Dropdown */
.user-menu-container {
  position: relative;
}

.user-menu-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.user-menu-btn:hover {
  transform: scale(1.05);
}

.user-avatar-small {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1a1a1a;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  overflow: hidden;
}

.user-avatar-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1000;
  transform-origin: top right;
  animation: dropdownFade 0.2s ease;
}

.user-dropdown.show {
  display: block;
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.dropdown-header {
  padding: 12px 15px;
}

.dropdown-user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.dropdown-user-email {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-align: left;
}

.dropdown-item:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.dropdown-item i {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.dropdown-item.logout-action:hover {
  background: rgba(255, 107, 107, 0.1);
  color: var(--accent-1);
}

.dropdown-item.logout-action:hover i {
  color: var(--accent-1);
}

/* ============ CONTENT AREA ============ */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Welcome Banner */
.welcome-banner {
  background: var(--accent-gradient);
  border-radius: 16px;
  padding: 25px 30px;
  margin-bottom: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.welcome-content h1 {
  font-size: 1.6rem;
  color: #1a1a1a;
  margin-bottom: 5px;
}

.welcome-content p {
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.95rem;
}

.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.15);
  border: none;
  border-radius: 50px;
  color: #1a1a1a;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-btn:hover {
  background: rgba(0, 0, 0, 0.25);
  transform: scale(1.05);
}

.quick-btn i {
  font-size: 1rem;
}

/* Section Title */
.section-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title i {
  color: var(--accent-1);
  font-size: 1.4rem;
}

/* View Header */
.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.view-actions {
  display: flex;
  gap: 10px;
}

.action-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--accent-gradient);
  border: none;
  border-radius: 50px;
  color: #1a1a1a;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-button:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(255, 107, 107, 0.3);
}

.action-button.secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.action-button.secondary:hover {
  background: var(--hover-bg);
  box-shadow: none;
}

/* ============ SONGS GRID ============ */
.songs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 16px;
}

.song-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid var(--glass-border);
  position: relative;
}

.song-card.menu-open {
  z-index: 1000;
}

.song-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.song-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

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

.song-card:hover .song-card-img img {
  transform: scale(1.05);
}

.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.song-card:hover .play-overlay {
  opacity: 1;
}

.play-overlay i {
  font-size: 42px;
  color: var(--accent-1);
}

.song-card h4 {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Song Options Menu */
.song-card {
  position: relative;
}

.song-options-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 5;
}

.song-options-btn i {
  font-size: 1.2rem;
}

.song-card:hover .song-options-btn {
  opacity: 1;
}

.song-options-btn:hover {
  background: var(--accent-1);
  transform: scale(1.1);
}

.song-menu {
  position: absolute;
  top: 52px;
  right: 12px;
  background: var(--bg-tertiary);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: none;
  flex-direction: column;
  padding: 8px;
  z-index: 1100;
  min-width: 185px;
  animation: menuFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .song-menu {
  background: #ffffff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

@keyframes menuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.song-menu.show {
  display: flex;
}

.song-menu button {
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  transition: all 0.2s;
  width: 100%;
  white-space: nowrap;
}

.song-menu button:hover {
  background: var(--hover-bg);
  color: var(--accent-1);
}

.song-menu button i {
  font-size: 1.2rem;
}

/* ============ SONG LIST ============ */
.song-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.song-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.song-list-item:hover {
  background: var(--hover-bg);
}

.song-list-item.playing {
  background: var(--hover-bg);
}

.song-list-item.playing .song-list-title {
  color: var(--accent-1);
}

.song-list-index {
  width: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.song-list-item:hover .song-list-index {
  display: none;
}

.song-list-item .play-icon {
  display: none;
  color: var(--accent-1);
}

.song-list-item:hover .play-icon {
  display: block;
}

.song-list-img {
  width: 45px;
  height: 45px;
  border-radius: 6px;
  object-fit: cover;
}

.song-list-info {
  flex: 1;
  min-width: 0;
}

.song-list-title {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.song-list-duration {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.song-list-actions {
  display: flex;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.song-list-item:hover .song-list-actions {
  opacity: 1;
}

.song-list-actions button {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.song-list-actions button:hover {
  color: var(--accent-1);
  background: var(--hover-bg);
}

/* Autoplay Visuals */
.queue-separator {
  margin: 25px 0 15px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.queue-separator span {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent-1);
  letter-spacing: 1px;
  white-space: nowrap;
}

.queue-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--accent-1), transparent);
  opacity: 0.3;
}

.autoplay-item {
  opacity: 0.85;
}

.autoplay-tag {
  background: var(--accent-gradient);
  color: white;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 500;
  vertical-align: middle;
}

/* ============ GENRE GRID ============ */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 10px;
}

.genre-card {
  background: var(--gradient);
  border-radius: 12px;
  padding: 25px 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.genre-card:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.genre-card i {
  font-size: 2rem;
  color: white;
  margin-bottom: 8px;
  display: block;
}

.genre-card span {
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ============ PLAYLISTS GRID ============ */
.playlists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}

.playlist-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid var(--glass-border);
}

.playlist-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.playlist-card-cover {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.playlist-card-cover i {
  font-size: 3rem;
  color: rgba(0, 0, 0, 0.3);
}

.playlist-card h4 {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 3px;
}

.playlist-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.playlist-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* ============ PLAYLIST DETAIL ============ */
.playlist-header {
  display: flex;
  gap: 25px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.playlist-cover {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.playlist-cover i {
  font-size: 5rem;
  color: rgba(0, 0, 0, 0.3);
}

.playlist-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.playlist-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.playlist-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.playlist-info h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.playlist-info>p {
  color: var(--text-muted);
  margin-bottom: 15px;
}

.playlist-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.back-nav-btn {
  color: var(--text-primary);
  opacity: 0.7;
  transition: all 0.2s;
}

.back-nav-btn:hover {
  opacity: 1;
  transform: translateX(-4px);
}

/* ============ QUEUE LIST ============ */
.queue-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.queue-item:hover {
  background: var(--hover-bg);
}

.queue-item.current {
  background: var(--hover-bg);
  border-left: 3px solid var(--accent-1);
}

.queue-item.current .queue-title {
  color: var(--accent-1);
  font-weight: 500;
}

.queue-drag {
  color: var(--text-muted);
  cursor: grab;
}

.queue-img {
  width: 45px;
  height: 45px;
  border-radius: 6px;
  object-fit: cover;
}

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

.queue-title {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.queue-remove {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s ease;
}

.queue-item:hover .queue-remove {
  opacity: 1;
}

.queue-remove:hover {
  color: var(--accent-1);
  background: var(--hover-bg);
}

/* ============ SEARCH RESULTS ============ */
.search-results {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.search-results.show {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-result-item:hover {
  background: var(--hover-bg);
}

.search-result-item img {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-info h4 {
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-result-actions {
  display: flex;
  gap: 4px;
}

.search-result-actions button {
  padding: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
}

.search-result-actions button:hover {
  color: var(--accent-1);
  background: var(--hover-bg);
}

/* ============ PLAYER BAR ============ */
.player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--player-height);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  z-index: 100;
}

.now-playing {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 250px;
  min-width: 180px;
}

.now-playing-img {
  position: relative;
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.now-playing-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.now-playing-animation {
  position: absolute;
  bottom: 3px;
  right: 3px;
  display: none;
  gap: 2px;
  align-items: flex-end;
  height: 12px;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 3px;
  border-radius: 3px;
}

.now-playing-animation.playing {
  display: flex;
}

.now-playing-animation span {
  width: 3px;
  background: var(--accent-1);
  border-radius: 2px;
  animation: audioWave 0.8s ease-in-out infinite;
}

.now-playing-animation span:nth-child(1) {
  height: 40%;
  animation-delay: 0s;
}

.now-playing-animation span:nth-child(2) {
  height: 70%;
  animation-delay: 0.1s;
}

.now-playing-animation span:nth-child(3) {
  height: 50%;
  animation-delay: 0.2s;
}

.now-playing-animation span:nth-child(4) {
  height: 80%;
  animation-delay: 0.3s;
}

@keyframes audioWave {

  0%,
  100% {
    transform: scaleY(1);
  }

  50% {
    transform: scaleY(0.5);
  }
}

.now-playing-info {
  flex: 1;
  min-width: 0;
}

.now-playing-info h4 {
  font-size: 0.88rem;
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-actions {
  display: flex;
  gap: 2px;
}

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

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

.action-btn.active {
  color: var(--accent-1);
}

/* Player Controls */
.player-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 550px;
}

.control-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.control-btn:hover {
  color: var(--accent-1);
  transform: scale(1.08);
}

.control-btn.active {
  color: var(--accent-1);
}

.play-btn {
  width: 42px;
  height: 42px;
  background: var(--accent-gradient);
  color: #1a1a1a !important;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.35);
}

.play-btn:hover {
  transform: scale(1.08);
}

.progress-container {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.progress-container span {
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 36px;
  text-align: center;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--glass-bg);
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.progress-bar:hover {
  height: 6px;
}

.progress {
  height: 100%;
  background: var(--accent-gradient);
  width: 0%;
  transition: width 0.1s linear;
}

/* Player Extra */
.player-extra {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 200px;
  justify-content: flex-end;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 4px;
}

.volume-slider {
  width: 85px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--glass-bg);
  border-radius: 4px;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: var(--accent-1);
  border-radius: 50%;
  cursor: pointer;
}

/* ============ MODALS ============ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.2s ease;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  max-height: 85vh;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--hover-bg);
}

.modal-body {
  padding: 20px;
  max-height: 50vh;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 20px;
  border-top: 1px solid var(--glass-border);
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.btn-primary,
.btn-secondary {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--accent-gradient);
  border: none;
  color: #1a1a1a;
}

.btn-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--hover-bg);
}

.playlist-select-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 15px;
}

.playlist-select-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.playlist-select-item:hover {
  background: var(--hover-bg);
}

.playlist-select-item i {
  color: var(--accent-1);
}

.create-new-playlist-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: var(--glass-bg);
  border: 1px dashed var(--glass-border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.create-new-playlist-btn:hover {
  color: var(--accent-1);
  border-color: var(--accent-1);
}

/* Settings */
.settings-group {
  margin-bottom: 20px;
}

.settings-group h4 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--glass-border);
}

.setting-item span {
  font-size: 0.9rem;
}

.theme-toggle-btns {
  display: flex;
  gap: 8px;
}

.theme-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-btn.active {
  background: var(--accent-gradient);
  color: #1a1a1a;
  border-color: transparent;
}

.theme-btn i {
  font-size: 1rem;
}

.setting-item select {
  padding: 8px 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
}

/* ============ EMPTY STATE ============ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  text-align: center;
}

.empty-state i {
  font-size: 65px;
  color: var(--text-muted);
  margin-bottom: 15px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============ LOADING ============ */
.loading-spinner {
  display: flex;
  justify-content: center;
  padding: 35px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--accent-1);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============ TOAST ============ */
.toast-container {
  position: fixed;
  bottom: calc(var(--player-height) + 12px);
  right: 15px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.25s ease, fadeOut 0.25s ease 2.75s forwards;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  font-size: 0.88rem;
}

.toast.success {
  border-left: 4px solid #2ed573;
}

.toast.error {
  border-left: 4px solid #ff6b6b;
}

.toast.info {
  border-left: 4px solid #feca57;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1000px) {
  .sidebar {
    width: 200px;
    min-width: 200px;
  }

  .now-playing {
    width: 200px;
    min-width: 150px;
  }

  .player-extra {
    width: auto;
  }

  .player-extra .action-btn:not(#volume-btn) {
    display: none;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  :root {
    --sidebar-width: 0px;
  }

  .player-extra {
    display: none;
  }

  .now-playing {
    width: auto;
    min-width: 120px;
    flex: 0 0 auto;
  }

  .now-playing-actions {
    display: none;
  }

  .welcome-banner {
    padding: 18px 20px;
  }

  .welcome-content h1 {
    font-size: 1.3rem;
  }

  .playlist-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .playlist-cover {
    width: 140px;
    height: 140px;
  }
}

@media (max-width: 500px) {
  .content-area {
    padding: 15px;
  }

  .header {
    padding: 10px 15px;
  }

  .songs-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
  }

  .genre-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .player-bar {
    height: auto;
    min-height: 80px;
    flex-wrap: wrap;
    padding: 10px 15px;
    gap: 8px;
  }

  .now-playing {
    width: 100%;
    order: 1;
  }

  .player-controls {
    width: 100%;
    order: 2;
    max-width: none;
  }

}

/* ============ LYRICS SIDEBAR ============ */
.lyrics-sidebar {
  width: 0;
  max-width: 0;
  background: rgba(0, 0, 0, 0.3);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  flex-shrink: 0;
  height: 100%;
  opacity: 0;
}

.lyrics-sidebar.show {
  width: 320px;
  max-width: 320px;
  opacity: 1;
}

.lyrics-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: var(--glass-bg);
}

.lyrics-song-info {
  padding: 10px 20px;
  opacity: 0.8;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.1);
}

.lyrics-content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  text-align: center;
  mask-image: linear-gradient(to bottom, transparent 10%, black 30%, black 70%, transparent 90%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 10%, black 30%, black 70%, transparent 90%);
  scroll-behavior: smooth;
}

.lyrics-content-scroll::-webkit-scrollbar {
  width: 0px;
  /* Hide scrollbar for cleaner look */
}

/* Lyric Focus Effect */
.lyric-line {
  padding: 15px 10px;
  margin: 8px 0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.6;

  /* Non-active state: Blurred & Faded */
  opacity: 0.15;
  filter: blur(1.5px);
  transform: scale(0.95);
}

.lyric-line:hover {
  opacity: 0.6;
  filter: blur(0);
}

.lyric-line.active {
  opacity: 1;
  filter: blur(0);
  transform: scale(1.1);
  color: #ff6b6b !important;
  font-weight: 800;
  font-size: 1.5rem;
  margin: 30px 0;
  /* Highlight isolation */
  background: transparent;
  text-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
}

.lyrics-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  background: var(--glass-bg);
}

.empty-state-lyrics {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  opacity: 0.6;
}

.pulse {
  animation: pulse-animation 1.5s infinite;
}

@keyframes pulse-animation {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.btn-small {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.btn-small:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(255, 107, 107, 0.05);
}

/* Mini Lyrics in Player Bar */
.mini-lyrics {
  flex: 1;
  /* Take available space */
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 15px;
  height: 36px;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
  max-width: 500px;
  border: 1px solid transparent;
}

.mini-lyrics:hover {
  background: rgba(255, 255, 255, 0.08);
  /* Highlight on hover */
  border-color: rgba(255, 255, 255, 0.1);
}

.mini-lyrics:active {
  transform: scale(0.98);
}

#mini-lyric-text {
  color: #ff6b6b;
  /* Active color */
  opacity: 0.9;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  width: 100%;
}

@media (max-width: 900px) {
  .mini-lyrics {
    display: none;
    /* Hide on smaller screens */
  }
}

/* Mobile Bottom Sheet (Song Options) */
.mobile-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-sheet-overlay.show {
  display: flex;
  opacity: 1;
}

.mobile-sheet-content {
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(25px);
  border-top: 1px solid var(--glass-border);
  border-radius: 24px 24px 0 0;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.33, 1, 0.68, 1);
}

.mobile-sheet-overlay.show .mobile-sheet-content {
  transform: translateY(0);
}

.mobile-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--glass-border);
}

.mobile-sheet-song-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.mobile-sheet-song-info img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
}

.mobile-sheet-song-info h4 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.mobile-sheet-song-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.mobile-sheet-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sheet-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 15px;
  background: none;
  border: none;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.sheet-item:active {
  background: var(--hover-bg);
  transform: scale(0.98);
}

.sheet-item i {
  font-size: 1.4rem;
  color: var(--text-muted);
}

/* Playlist Picker Modal */
.playlist-picker-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 350px;
  overflow-y: auto;
  margin-top: 15px;
  padding-right: 5px;
}

.picker-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.picker-item:hover {
  background: var(--hover-bg);
  border-color: var(--accent-1);
  transform: translateX(4px);
}

.picker-img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
}

.picker-item i {
  font-size: 26px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border-radius: 8px;
  color: var(--accent-1);
}

.picker-item span {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* ============ MOBILE RESPONSIVENESS ============ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
  padding: 10px 0;
}

.bottom-nav-item i {
  font-size: 24px;
}

.bottom-nav-item span {
  font-size: 0.7rem;
  font-weight: 500;
}

.bottom-nav-item.active {
  color: var(--accent-1);
}

.mobile-only {
  display: none;
}

/* Mobile Player Overlay */
.mobile-player-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.33, 1, 0.68, 1);
  overflow: hidden;
  /* Ensure blurred bg doesn't spill out */
}

.mobile-player-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--player-bg, none);
  background-size: cover;
  background-position: center;
  filter: blur(100px) saturate(2);
  opacity: 0.35;
  z-index: -1;
  transition: background-image 1s ease;
}

.mobile-player-overlay.active {
  transform: translateY(0);
}

.mobile-player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.mobile-header-info {
  text-align: center;
}

.mobile-header-info span {
  font-size: 0.65rem;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.mobile-header-info h5 {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.mobile-player-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
}

.mobile-main-view {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  min-height: 350px;
  display: flex;
  align-items: center;
}

.mobile-art-wrapper,
.mobile-lyrics-wrapper {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: none;
}

.mobile-art-wrapper.active,
.mobile-lyrics-wrapper.active {
  display: flex;
  flex-direction: column;
  height: 350px;
  animation: viewSlideUp 0.5s ease;
}

@keyframes viewSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-art-wrapper {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.mobile-art-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-lyrics-wrapper {
  background: none;
  backdrop-filter: none;
  border: none;
  padding: 0;
}

.mobile-lyrics-content {
  flex: 1;
  overflow-y: auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 24px;
  scrollbar-width: none;
  padding: 40px 20px;
  /* Added 20px horizontal padding */
  mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.mobile-lyrics-content::-webkit-scrollbar {
  display: none;
}

.mobile-lyric-line {
  font-size: 1.8rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  line-height: 1.2;
}

.mobile-lyric-line.active {
  color: #fff;
  transform: scale(1.02);
  opacity: 1;
}

.mobile-info-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 0 10px;
  /* Added some breathing room */
}

.mobile-title-artist h2 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.mobile-title-artist p {
  color: var(--text-muted);
}

.mobile-playback-controls {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.mobile-progress-container .progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.mobile-progress-container .time-info {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mobile-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-buttons .control-btn i {
  font-size: 2rem;
}

.mobile-play-btn i {
  font-size: 4rem !important;
  color: var(--accent-1);
}

.mobile-footer-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .app-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 130px;
    /* Offset for player bar (65px) + bottom nav (65px) */
    height: auto;
    display: flex;
    flex-direction: row;
    z-index: 10;
  }

  .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.5);
    /* Darker backdrop for better contrast */
    backdrop-filter: blur(12px) saturate(1.5);
    -webkit-backdrop-filter: blur(12px) saturate(1.5);
    position: relative;
    overflow: hidden;
  }

  .content-area {
    padding-bottom: 20px;
    /* Base padding */
  }

  .bottom-nav {
    display: flex;
    z-index: 1001;
  }

  .player-bar {
    bottom: 65px;
    height: 65px;
    padding: 0 15px;
    border-radius: 12px 12px 0 0;
    margin: 0 8px;
    width: calc(100% - 16px);
    background: var(--bg-tertiary);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
  }

  .player-controls,
  .player-extra,
  .mini-lyrics {
    display: none;
  }

  .now-playing {
    width: 100%;
    justify-content: space-between;
  }

  .mobile-only {
    display: block;
  }

  #mobile-player-expand {
    position: absolute;
    inset: 0;
    z-index: 10;
    cursor: pointer;
  }

  .now-playing-actions {
    z-index: 11;
    /* Keep above expander */
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .hide-mobile {
    display: none !important;
  }

  .mobile-mini-controls {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-mini-controls .action-btn i {
    font-size: 1.8rem;
  }

  .song-options-btn,
  .song-list-actions {
    opacity: 1 !important;
  }
}

@media (max-width: 600px) {
  .songs-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  .welcome-banner {
    padding: 20px;
  }

  .welcome-content h1 {
    font-size: 1.3rem;
  }

  .view-header {
    flex-direction: column;
    align-items: flex-start;
  }
}