:root {
  --spotify-black: #000000;
  --spotify-dark: #0b0b0b;
  --spotify-bg: #121212;
  --spotify-surface: #181818;
  --spotify-elevated: #282828;
  --spotify-text: #ffffff;
  --spotify-muted: #b3b3b3;
  --spotify-green: #1ed760;
  --album-color: 30, 215, 96;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* ===== SCROLLBARS ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

html, body {
  width: 100%;
  height: 100%;
  background: var(--spotify-bg);
  color: var(--spotify-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
}

button {
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

.app-frame {
  display: grid;
  grid-template-rows: 1fr 90px;
  height: 100vh;
  gap: 8px;
  padding: 8px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width, 320px) 3px 1fr 300px;
  gap: 8px;
  min-height: 0;
}

.resizer {
  cursor: col-resize;
  transition: background-color 0.2s;
}
.resizer:hover {
  background-color: var(--spotify-green);
}

/* ===== LEFT SIDEBAR ===== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.sidebar-panel {
  background: var(--spotify-surface);
  border-radius: 8px;
}

.nav-panel {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.library-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  gap: 8px;
  min-height: 0;
}

.library-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.library-content .sidebar-section {
  margin-top: 0;
}

.sidebar-search {
  position: relative;
}

.sidebar-search input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  background: var(--spotify-elevated);
  border: none;
  border-radius: 20px;
  color: var(--spotify-text);
  font-size: 14px;
}

.sidebar-search input::placeholder {
  color: var(--spotify-muted);
}

.sidebar-search input:focus {
  outline: none;
  border: 1px solid var(--spotify-muted);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--spotify-muted);
  font-size: 14px;
}

.sidebar-section {
  margin-top: 12px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--spotify-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.playlists-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.library-panel {
  background: var(--spotify-sidebar);
  padding: 14px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
}
.sidebar-item {
  padding: 8px;
  background: none;
  border: none;
  color: var(--spotify-muted);
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.sidebar-item:hover {
  color: var(--spotify-text);
  background: var(--spotify-elevated);
}
.playlist-link.active {
  color: var(--spotify-text);
  background: var(--spotify-elevated);
}
.sidebar-item-artwork {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 4px;
  background-color: var(--spotify-elevated);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.sidebar-item-text {
  overflow: hidden;
}

.album-link {
  /* Override playlist-link's muted color */
  color: var(--spotify-text);
}

.sidebar-item-title {
  color: var(--spotify-text);
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-item-subtitle {
  font-size: 12px;
  color: var(--spotify-muted) !important;
  transition: color 0.2s;
}

.sidebar-item-eq {
  margin-left: auto;
  display: none;
}

.sidebar-item.playing .sidebar-item-eq {
  display: flex;
}

.sidebar-item.paused .sidebar-item-eq .eq-bar {
  animation: none;
  height: 2px;
}

.album-link:hover .sidebar-item-subtitle {
  color: var(--spotify-text);
}

.empty-sidebar-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
  color: var(--spotify-muted);
  text-align: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  margin: 0 8px;
}
.empty-sidebar-state i {
  font-size: 24px;
  opacity: 0.5;
}
.empty-sidebar-state span {
  font-size: 13px;
  font-weight: 500;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  background: linear-gradient(180deg, #2a2a2a 0%, #121212 40%);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  position: relative;
  animation: fadeIn 0.3s ease-out;
  transition: background 0.5s ease;
}

.audio-visualizer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  mix-blend-mode: screen;
  display: none;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  gap: 16px;
  background: rgba(18, 18, 18, 0.6);
  position: relative;
  z-index: 10;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.main-view {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-height: 0;
}

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

.topbar-right {
  justify-content: flex-end;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 900;
  color: var(--spotify-text);
}

.topbar-logo-icon {
  width: 52px;
  height: 52px;
  background: transparent;
}

.topbar-search {
  position: relative;
  max-width: 480px; /* Bigger search bar container */
  width: 100%;
}
.topbar-search input {
  width: 100%;
  height: 48px;
  padding: 10px 16px 10px 48px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 20px;
  color: var(--spotify-text);
  font-size: 14px;
}

.topbar-search input::placeholder {
  color: var(--spotify-muted);
}

.topbar-search input:focus,
.mobile-search-bar input:focus {
  outline: 2px solid var(--spotify-green);
  outline-offset: -2px;
  box-shadow: none;
}

/* Subtly scale artwork on hover */
.track-row-artwork, .queue-item-artwork, .sidebar-item-artwork {
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.6s ease-in-out !important;
}
.tracks-table tbody tr:hover .track-row-artwork {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.queue-item:hover .queue-item-artwork {
  transform: scale(1.1);
}
.sidebar-item:hover .sidebar-item-artwork {
  transform: scale(1.05);
}

.topbar-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--spotify-muted);
  font-size: 16px;
  pointer-events: none;
}

.autocomplete-results {
  position: absolute;
  top: 100%;
  width: 100%;
  background: linear-gradient(180deg, rgba(22, 25, 33, 0.98), rgba(14, 16, 22, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  margin-top: 6px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.42);
  z-index: 100;
  max-height: 50vh;
  overflow-y: auto;
  padding: 8px;
}

.autocomplete-panel-meta {
  padding: 6px 10px 10px;
  color: var(--spotify-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.autocomplete-group + .autocomplete-group {
  margin-top: 8px;
}

.autocomplete-group-label {
  padding: 8px 10px 6px;
  color: var(--spotify-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 14px;
  transition: background-color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
  border: 1px solid transparent;
}

.autocomplete-text {
  min-width: 0;
  flex: 1;
}

.autocomplete-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
}

.autocomplete-title mark {
  background: rgba(244, 196, 85, 0.18);
  color: #f4c455;
  border-radius: 6px;
  padding: 0 4px;
}

.autocomplete-item:hover,
.autocomplete-item.is-active {
  background: rgba(255,255,255,0.07);
  border-color: rgba(244, 196, 85, 0.2);
  transform: translateY(-1px);
}

.autocomplete-artwork {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background-color: var(--spotify-elevated);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.autocomplete-artwork.artist {
  border-radius: 50%;
}

.autocomplete-subtitle {
  font-size: 12px;
  color: var(--spotify-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-pill {
  align-self: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--spotify-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.autocomplete-item-none {
  padding: 16px;
  color: var(--spotify-muted);
  text-align: center;
}

.autocomplete-item-none strong {
  color: var(--spotify-text);
  font-weight: 500;
}

.topbar-icon-btn {
  background: transparent;
  border: none;
  color: var(--spotify-muted);
  font-size: 18px;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s, background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 9px;
  border-radius: 18px;
}
.topbar-icon-btn:hover {
  color: var(--spotify-text);
  background: rgba(255, 255, 255, 0.1);
}
.topbar-icon-btn:active {
  transform: scale(0.92);
}
.topbar-icon-btn.active {
  color: var(--spotify-black);
  background: var(--spotify-green);
}

.hero {
  padding: 40px 32px;
  --hero-color: var(--spotify-green);
  background: transparent;
}

.hero-artwork {
  width: 192px;
  height: 192px;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.hero-info {
  display: flex;
  flex-direction: column;
}

.hero h2 {
  font-size: 56px;
  font-weight: 900;
  margin-bottom: 8px;
  line-height: 1.1;
}

.hero-subtitle {
  color: var(--spotify-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.hero-controls {
  display: flex;
  gap: 12px;
}

.play-btn,
.shuffle-btn {
  padding: 12px 32px;
  background: rgb(var(--album-color));
  border: none;
  border-radius: 24px;
  color: var(--spotify-black);
  font-weight: 700;
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.2s, background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn:hover {
  transform: scale(1.04);
  filter: brightness(1.1);
}

.shuffle-btn {
  background: transparent;
  border: 1px solid var(--spotify-muted);
  color: var(--spotify-text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.shuffle-btn:hover {
  border-color: var(--spotify-text);
  color: var(--spotify-text);
}

.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 0 32px 32px;
  min-height: 0;
}

.table-container {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  overflow: hidden;
}

.tracks-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.tracks-table thead {
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--spotify-elevated);
}

.tracks-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--spotify-muted);
  position: sticky;
  top: 0;
  background: rgba(18, 18, 18, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
}

.tracks-table th.is-sortable {
  padding: 0;
}

.table-sort-btn {
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.table-sort-btn:hover,
.table-sort-btn:focus-visible {
  color: var(--spotify-text);
  outline: none;
}

.table-sort-btn.is-active {
  color: var(--spotify-text);
}

.table-sort-arrow {
  min-width: 10px;
  font-size: 12px;
  line-height: 1;
  color: rgb(var(--album-color));
}

.tracks-table th:first-child {
  border-top-left-radius: 8px;
}

.tracks-table th:last-child {
  border-top-right-radius: 8px;
}

.col-num {
  width: 50px;
}

.track-equalizer {
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  height: 14px;
  width: 14px;
}

.eq-bar {
  width: 2px;
  background-color: rgb(var(--album-color));
  animation: equalize 1s ease-in-out infinite;
}

.eq-bar:nth-child(1) { animation-delay: 0.0s; }
.eq-bar:nth-child(2) { animation-delay: 0.3s; animation-duration: 0.9s; }
.eq-bar:nth-child(3) { animation-delay: 0.1s; animation-duration: 1.1s; }
.eq-bar:nth-child(4) { animation-delay: 0.4s; animation-duration: 0.8s; }

@keyframes equalize {
  0%, 100% { height: 2px; }
  50% { height: 14px; }
}

.track-play-icon {
  display: none;
  color: var(--spotify-text);
  font-size: 14px;
  cursor: pointer;
}

.tracks-table tbody tr:hover .track-index {
  display: none;
}

.tracks-table tbody tr:hover .track-play-icon {
  display: inline-block;
}

.tracks-table tbody tr.playing .track-index {
  display: none;
}

.tracks-table tbody tr.playing .track-equalizer {
  display: flex;
}

.tracks-table tbody tr.playing:hover .track-equalizer {
  display: none;
}

.tracks-table tbody tr.paused .eq-bar {
  animation: none;
  height: 2px;
}

.tracks-table tbody tr.playing .track-play-icon {
  color: rgb(var(--album-color));
}

.tracks-table tbody tr.playing .track-title-text {
  color: rgb(var(--album-color));
}

.col-title {
  flex: 1;
  min-width: 0;
}

.track-title-container {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.track-row-artwork {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background-color: var(--spotify-elevated);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--spotify-muted);
  flex-shrink: 0;
}

.track-row-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.track-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.track-title-text {
  color: var(--spotify-text);
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist-text {
  color: var(--spotify-muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-album {
  width: 30%;
}

.col-plays {
  width: 80px;
}

.col-duration {
  width: 120px;
}

.tracks-table th.col-duration {
  text-align: right;
  padding-right: 48px;
}

.tracks-table th.col-duration .table-sort-btn {
  justify-content: flex-end;
  padding-right: 48px;
}

.tracks-table th.col-num .table-sort-btn {
  justify-content: center;
}

.tracks-table td.col-duration {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.track-options-btn {
  opacity: 0;
  background: transparent;
  border: none;
  color: var(--spotify-muted);
  cursor: pointer;
  font-size: 16px;
}

.tracks-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.2s;
}

.tracks-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.08);
}

.tracks-table tbody tr:hover .track-options-btn {
  opacity: 1;
}

.track-options-btn:hover {
  color: var(--spotify-text);
}

.tracks-table td {
  padding: 12px 16px;
  font-size: 14px;
}

/* ===== COMPACT MODE ===== */
.tracks-table.compact-mode td {
  padding: 6px 16px;
}
.tracks-table.compact-mode .track-row-artwork {
  width: 32px;
  height: 32px;
}
.tracks-table.compact-mode .track-title-text {
  font-size: 14px;
}

body.view-density-compact .tracks-table td {
  padding: 8px 14px;
}

body.view-density-compact .track-row-artwork {
  width: 34px;
  height: 34px;
}

body.view-density-compact .track-title-text {
  font-size: 14px;
}

body.view-density-dense .tracks-table td {
  padding: 5px 12px;
}

body.view-density-dense .tracks-table th {
  padding: 10px 12px;
}

body.view-density-dense .track-row-artwork {
  width: 28px;
  height: 28px;
  border-radius: 3px;
}

body.view-density-dense .track-title-container {
  gap: 10px;
}

body.view-density-dense .track-title-text {
  font-size: 13px;
}

body.view-density-dense .track-artist-text {
  font-size: 12px;
}

body.view-artwork-large .hero-artwork {
  width: 228px;
  height: 228px;
}

body.view-artwork-large .homepage-card-artwork {
  aspect-ratio: 1 / 1.05;
}

body.view-artwork-large .homepage-track-artwork {
  width: 68px;
  height: 68px;
}

body.view-artwork-large .now-playing-cover {
  border-radius: 14px;
}

.hero-card,
.subpanel,
.current-track-card,
.playlist-card,
/* === Old component styles removed - using new 3-column layout === */


.album-name,
.album-artist,
.player-title,
#playerMeta {
  margin: 0;
}

.album-name {
  font-size: 0.95rem;
  font-weight: 700;
}

.album-artist {
  font-size: 0.85rem;
}

.table-wrap {
  margin: 0 12px;
  overflow: auto;
  background: rgba(0, 0, 0, 0.06);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

thead th {
  padding: 0 16px 10px;
  text-align: left;
  color: var(--spotify-muted);
  font-size: 0.75rem;
  font-weight: 500;
  border-bottom: 1px solid var(--spotify-line);
}

tbody td {
  padding: 10px 16px;
  vertical-align: middle;
}

/* === Old track-row styles removed - using new tracks-table === */


.track-trigger {
  width: 100%;
  padding: 0;
  border: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.track-art {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: linear-gradient(135deg, #5b5b5b, #1c1c1c);
  flex: none;
}

.track-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.track-copy strong {
  font-size: 0.94rem;
  font-weight: 500;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 290px;
}

.mini-button {
  padding: 8px 10px;
}

.icon-mini {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-mini.active {
  color: #8ef0af;
  background: rgba(var(--album-color), 0.16);
}

.playlist-select {
  min-width: 150px;
  background: #2a2a2a;
}

.split-layout {
  padding: 0 12px;
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px;
}

.subpanel {
  padding: 18px;
  background: rgba(0, 0, 0, 0.18);
}

.form-stack textarea {
  min-height: 96px;
  resize: vertical;
}

.primary-button {
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: rgb(var(--album-color));
  color: #000000;
  font-weight: 700;
  cursor: pointer;
}

.playlist-card {
  display: grid;
  gap: 10px;
}

.playlist-card-main {
  width: 100%;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.playlist-card-main strong,
.queue-copy strong {
  display: block;
}

/* ===== RIGHT SIDEBAR ===== */
.sidebar-right {
  background: var(--spotify-surface);
  border-radius: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

.queue-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.now-playing-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: slideUp 0.4s ease-out;
  padding: 14px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

.now-playing-card.is-linkable {
  cursor: pointer;
}

.now-playing-card.is-linkable:hover .track-info .now-playing-title,
.now-playing-card.is-linkable:hover .track-info .now-playing-artist {
  color: rgb(var(--album-color));
}

.now-playing-cover {
  width: 100%;
  aspect-ratio: 1;
  background: var(--spotify-elevated);
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: opacity 0.6s ease-in-out;
  position: relative;
  z-index: 1;
}

.now-playing-cover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--dynamic-bg, none);
  background-size: cover;
  background-position: center;
  filter: blur(24px) saturate(1.5);
  opacity: 0.5;
  z-index: -1;
  border-radius: inherit;
  transform: scale(1.05) translateY(4px);
}

.now-playing-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.track-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.now-playing-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-artist {
  font-size: 14px;
  color: var(--spotify-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-album {
  font-size: 12px;
  color: var(--spotify-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-panel {
  background: var(--spotify-elevated);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: slideUp 0.5s ease-out;
}

.sidebar-insights-card {
  background:
    radial-gradient(circle at top left, rgba(var(--album-color), 0.18), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    var(--spotify-elevated);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.sidebar-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sidebar-stat {
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-stat-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--spotify-muted);
}

.sidebar-stat-value {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sidebar-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  color: var(--spotify-text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-chip-accent {
  background: rgba(var(--album-color), 0.2);
  border-color: rgba(var(--album-color), 0.35);
  color: rgb(var(--album-color));
}

.sidebar-chip-warm {
  background: rgba(255, 193, 94, 0.12);
  border-color: rgba(255, 193, 94, 0.26);
  color: #ffd88b;
}

.sidebar-chip-cool {
  background: rgba(125, 196, 255, 0.12);
  border-color: rgba(125, 196, 255, 0.24);
  color: #bfe2ff;
}

.sidebar-empty-copy {
  font-size: 13px;
  color: var(--spotify-muted);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header-copy {
  min-width: 0;
}

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

.panel-header h4 {
  font-size: 14px;
  font-weight: 700;
}

.queue-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--spotify-muted);
}

.queue-action-btn {
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--spotify-muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.queue-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--spotify-text);
}

.queue-action-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.queue-action-btn:disabled:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--spotify-muted);
}

.control-btn {
  background: transparent;
  border: none;
  color: var(--spotify-muted);
  font-size: 16px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s, background-color 0.2s;
}

.control-btn:hover {
  color: var(--spotify-text);
  background: rgba(255, 255, 255, 0.1);
}

.queue-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.queue-header {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--spotify-muted);
}

.queue-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  max-height: 400px;
}

.queue-item {
  padding: 8px;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.queue-item[draggable="true"] {
  cursor: grab;
}

.queue-item[draggable="true"]:active {
  cursor: grabbing;
}

.queue-item:active {
  transform: scale(0.98);
}

.queue-item.dragging {
  opacity: 0.4;
  background: rgba(255, 255, 255, 0.1);
}

.queue-item.drag-over {
  border-top: 2px solid rgb(var(--album-color));
}

.queue-drag-handle {
  margin-left: auto;
  color: var(--spotify-muted);
  cursor: grab;
}

.queue-item-artwork {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 4px;
  background-color: var(--spotify-elevated);
  background-size: cover;
  background-position: center;
}

.queue-item-text {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.queue-item-title, .queue-item-artist {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.queue-item-index {
  font-size: 14px;
  color: var(--spotify-muted);
}

.queue-item-title {
  font-weight: 500;
}

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

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

.queue-item-remove:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--spotify-text);
}

.track-row-spotlight {
  animation: trackSpotlight 1.6s ease-out;
}

@keyframes trackSpotlight {
  0% {
    background: rgba(var(--album-color), 0.34);
  }
  100% {
    background: transparent;
  }
}

/* ===== PLAYER FOOTER ===== */
.player-footer {
  background: rgba(18, 18, 18, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  display: grid;
  grid-template-columns: 30% 40% 30%;
  align-items: center;
  padding: 0 16px;
  height: 90px;
  z-index: 100;
}

.player-left {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 722px;
  width: 100%;
  margin: 0 auto;
}

.player-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.player-track-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.player-track-thumbnail {
  width: 56px;
  height: 56px;
  background: var(--spotify-elevated);
  border-radius: 4px;
  flex-shrink: 0;
  transition: opacity 0.6s ease-in-out, transform 0.2s, filter 0.2s;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.player-track-thumbnail:hover {
  transform: scale(1.05);
  filter: brightness(0.8);
}

.player-track-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.player-track-title {
  color: var(--spotify-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-track-title:hover {
  text-decoration: underline;
}

.player-track-artist {
  color: var(--spotify-muted);
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-track-artist:hover {
  text-decoration: underline;
  color: var(--spotify-text);
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.player-btn {
  background: transparent;
  border: none;
  color: var(--spotify-muted);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s;
}

.player-btn:hover {
  color: var(--spotify-text);
}

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

.play-pause-btn {
  width: 32px;
  height: 32px;
  background: var(--spotify-text);
  color: var(--spotify-black);
  border-radius: 50%;
  font-size: 14px;
  transition: transform 0.2s;
}

.play-pause-btn:hover {
  color: var(--spotify-black);
  transform: scale(1.05);
}

.play-pause-btn:active {
  transform: scale(0.98) !important;
}

.footer-btn[data-player-action="repeat"] {
    position: relative;
}

.footer-btn[data-player-action="repeat"].repeat-one::after {
    content: '1';
    position: absolute;
    top: -2px;
    right: -4px;
    font-size: 9px;
    font-weight: 700;
    color: var(--spotify-black);
    background: rgb(var(--album-color));
    border-radius: 50%;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 1px solid var(--spotify-black);
    pointer-events: none;
}

.playback-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.player-time {
  font-size: 11px;
  color: var(--spotify-muted);
  min-width: 40px;
  text-align: center;
}

.progress-bar-container {
  height: 12px;
  width: 100%;
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.progress-bar {
  height: 4px;
  width: 100%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.progress-bar-container:hover .progress-fill {
  background: #f4c455;
}

.progress-fill {
  height: 100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  position: relative;
  transform-origin: left center;
  transform: scaleX(var(--progress-scale, 0));
  will-change: transform;
  transition: background-color 0.2s ease;
  z-index: 2;
}

.progress-fill::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background-color: #f4c455;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  display: none;
}

.progress-bar-container:hover .progress-fill::after {
  display: block;
}

.progress-scrub-bubble {
  position: absolute;
  left: var(--scrub-left, 0%);
  bottom: calc(100% + 12px);
  transform: translateX(-50%) translateY(6px);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(10, 12, 18, 0.96);
  border: 1px solid rgba(244, 196, 85, 0.28);
  color: var(--spotify-text);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.16s ease, transform 0.16s ease;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.36);
  z-index: 6;
}

.progress-bar-container.is-scrubbing .progress-scrub-bubble {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.waveform-bars {
  display: none;
}

.waveform-bar {
  width: 100%;
  height: calc(var(--bar-height, 0.2) * 100%);
  align-self: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  transition: background-color 0.15s ease;
}

.waveform-bar.is-played {
  background: rgb(var(--album-color));
}

.player-volume {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 125px;
}

.volume-slider {
  height: 12px;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  position: relative;
}

.volume-slider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.volume-fill {
  height: 4px;
  width: 100%;
  background: var(--spotify-text);
  border-radius: 2px;
  position: relative;
  transform-origin: left center;
  transform: scaleX(var(--volume-scale, 1));
  will-change: transform;
  z-index: 1;
  transition: transform 0.12s linear, background-color 0.2s ease;
}

.volume-fill::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background-color: var(--spotify-text);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  display: none;
}

.player-volume:hover .volume-fill {
  background: rgb(var(--album-color));
}

.player-volume:hover .volume-fill::after {
  display: block;
}

.player-volume button {
  background: transparent;
  border: none;
  color: var(--spotify-muted);
  font-size: 16px;
  cursor: pointer;
}

.player-volume button:hover {
  color: var(--spotify-text);
}

/* ===== HOMEPAGE ===== */
.homepage-content {
  padding-top: 24px;
}

#greeting {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 24px;
}

.homepage-grid-section {
  margin-bottom: 32px;
}

.homepage-grid-section h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}

.homepage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
}

.homepage-track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.homepage-compact-album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.homepage-card {
  background: var(--spotify-surface);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  overflow: hidden;
  animation: slideUp 0.4s ease-out backwards;
}

.homepage-card:hover {
  background: var(--spotify-elevated);
  transform: translateY(-4px);
}

.homepage-card-artwork {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  background-color: var(--spotify-elevated);
  background-size: cover;
  background-position: center;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.homepage-card-title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.homepage-card-subtitle {
  font-size: 14px;
  color: var(--spotify-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.homepage-track-card {
  border: none;
  text-align: left;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  color: var(--spotify-text);
  animation: slideUp 0.4s ease-out backwards;
  transition: transform 0.2s, background-color 0.2s;
}

.homepage-track-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
}

.homepage-track-artwork {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  flex-shrink: 0;
  background-color: var(--spotify-elevated);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.homepage-track-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.homepage-track-title,
.homepage-track-subtitle,
.homepage-track-meta {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.homepage-track-title {
  font-weight: 700;
}

.homepage-track-subtitle,
.homepage-track-meta {
  font-size: 13px;
  color: var(--spotify-muted);
}

.homepage-compact-album-card {
  border: none;
  text-align: left;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.025));
  border-radius: 16px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  cursor: pointer;
  color: var(--spotify-text);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
  animation: slideUp 0.4s ease-out backwards;
}

.homepage-compact-album-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.homepage-compact-album-artwork {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background-color: var(--spotify-elevated);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 10px 20px rgba(0,0,0,0.28);
}

.homepage-compact-album-copy {
  min-width: 0;
}

.homepage-compact-album-title,
.homepage-compact-album-subtitle,
.homepage-compact-album-meta {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.homepage-compact-album-title {
  font-weight: 700;
}

.homepage-compact-album-subtitle,
.homepage-compact-album-meta {
  font-size: 13px;
  color: var(--spotify-muted);
}

.homepage-compact-album-meta {
  margin-top: 4px;
}

.homepage-compact-album-badge {
  grid-column: 2;
  justify-self: start;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--spotify-muted);
  font-size: 11px;
  font-weight: 700;
}

.homepage-progress-chip {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--spotify-text);
  font-size: 12px;
  width: fit-content;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 12px;
  height: 48px;
  border-radius: 6px;
  color: var(--spotify-muted);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: color 0.2s;
}
.sidebar-nav-item > i {
  font-size: 28px;
  width: 28px;
}

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

.stat-box {
  flex: 1;
  background: var(--spotify-elevated);
  padding: 24px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  min-width: 0;
}
.stat-box-value {
  font-size: 28px;
  font-weight: 900;
  color: var(--spotify-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-box-label {
  font-size: 14px;
  color: var(--spotify-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.stats-insights {
  margin-bottom: 24px;
}

.stats-insights-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.stats-insights-header h3 {
  margin: 0;
  font-size: 18px;
}

.stats-insights-header span {
  color: var(--spotify-muted);
  font-size: 13px;
}

.stats-insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.insight-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 18px;
  min-width: 0;
}

.insight-card-label {
  color: var(--spotify-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

.insight-card-value {
  color: var(--spotify-text);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.insight-card-meta {
  color: var(--spotify-muted);
  font-size: 13px;
  line-height: 1.45;
}

.sidebar-icon-container {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  background: linear-gradient(135deg, #450af5, #c4efd9);
  flex-shrink: 0;
  color: #ffffff;
}

.sidebar-icon-container i {
  color: #ffffff !important;
}

.empty-state {
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.compact-empty {
  padding: 14px;
}

.empty-note {
  margin: 0;
  padding: 8px 4px;
}

@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .queue {
    display: none;
  }
}

@media (max-width: 860px) {
  body {
    overflow: hidden;
  }

  .app-frame {
    height: 100vh;
    min-height: 0;
    grid-template-rows: 1fr 90px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .icon-rail {
    display: none;
  }

  .split-layout {
    grid-template-columns: 1fr;
  }

  .player {
    grid-template-columns: 1fr;
  }

  .player-side {
    justify-self: start;
    text-align: left;
  }
}

@media (min-width: 721px) {
  .mobile-only-view {
    display: none !important;
  }
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
  position: fixed;
  bottom: -64px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--spotify-elevated);
  color: var(--spotify-text);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  transition: bottom 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 9999;
  pointer-events: none;
}
.toast.show {
  bottom: 110px;
}

/* ===== PARTY REACTIONS ===== */
.party-reactions-bar {
  position: fixed;
  bottom: 110px;
  right: 24px;
  display: flex;
  gap: 8px;
  z-index: 999;
  animation: popIn 0.3s ease-out;
}

.reaction-btn {
  background: rgba(18, 18, 18, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 20px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s, background 0.2s;
}

.reaction-btn:hover {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.2);
}

.floating-emoji {
  position: fixed;
  bottom: 120px;
  font-size: 36px;
  pointer-events: none;
  z-index: 9999;
  animation: floatUpEmoji 2.5s ease-out forwards;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

@keyframes floatUpEmoji {
  0% { transform: translateY(0) scale(0.5); opacity: 0; }
  15% { transform: translateY(-30px) scale(1.2); opacity: 1; }
  100% { transform: translateY(-250px) scale(1); opacity: 0; }
}

/* ===== DVD SCREENSAVER ===== */
.screensaver-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: var(--spotify-black);
  z-index: 99999; /* Topmost */
  overflow: hidden;
}
.screensaver-artwork {
  position: absolute;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 16px 48px rgba(0,0,0,0.8);
  transition: filter 0.3s ease;
}


/* ===== BOTTOM NAV (MOBILE) ===== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 100;
  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(--spotify-muted);
  text-decoration: none;
  font-size: 10px;
  transition: color 0.2s;
  flex: 1;
}
.bottom-nav-item.active, .bottom-nav-item:hover {
  color: var(--spotify-text);
}
.bottom-nav-item i {
  font-size: 20px;
  margin-bottom: 2px;
}

@media (max-width: 720px) {
  .tracks-table {
    table-layout: fixed;
  }

  .tracks-table,
  .tracks-table thead,
  .tracks-table tbody,
  .tracks-table tr,
  .tracks-table th,
  .tracks-table td {
    min-width: 0;
  }

  .tracks-table th.col-num,
  .tracks-table td.col-num {
    width: 44px;
  }

  .tracks-table th.col-title,
  .tracks-table td.col-title {
    width: auto;
  }

  .track-title-container {
    gap: 10px;
  }

  .main-content {
    border-radius: 0;
  }
  .hero {
    padding: 24px 16px;
  }
  .content-area {
    padding: 0 16px 150px;
  }

  .desktop-only-section {
    display: none !important;
  }

  #topbarSettingsBtn {
    display: none !important;
  }

  .app-frame {
    padding: 0;
    gap: 0;
    grid-template-rows: 1fr;
    height: 100dvh;
  }

  .app-shell {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .sidebar, .sidebar-right, .resizer {
    display: none !important;
  }

  .bottom-nav {
    display: flex;
  }

  .topbar-search {
    display: none !important;
  }

  .topbar {
    display: flex !important;
    justify-content: space-between;
  }

  .player-footer {
    position: fixed;
    bottom: calc(64px + 8px);
    left: 8px;
    right: 8px;
    height: 56px;
    border-radius: 8px;
    background: var(--spotify-elevated);
    grid-template-columns: 1fr auto;
    padding: 0 12px;
    z-index: 99;
    border: none;
  }

  .player-right, .playback-bar,
  .player-footer .footer-btn[data-player-action="shuffle"],
  .player-footer .footer-btn[data-player-action="repeat"],
  #playerFooterLikeBtn {
    display: none !important;
  }

  .player-track-thumbnail {
    width: 40px;
    height: 40px;
  }

  .player-controls {
    margin-bottom: 0;
    gap: 16px;
  }

  /* Stats & Hero Mobile Layout Fixes */
  .hero-content {
    flex-direction: column;
    align-items: center !important;
    text-align: center !important;
    gap: 16px !important;
  }

  .hero-info {
    align-items: center !important;
    text-align: center !important;
  }

  .hero h2 {
    font-size: 36px;
  }

  .hero-controls {
    justify-content: center;
  }

  .stats-summary {
    flex-direction: column;
    gap: 12px !important;
  }

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

  .stats-insights-grid,
  .homepage-compact-album-grid,
  .homepage-track-grid {
    grid-template-columns: 1fr;
  }

  .autocomplete-pill {
    display: none;
  }

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

  .settings-page-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .settings-page-control {
    width: 100%;
    justify-content: space-between;
  }

  .tracks-table th.col-album, .tracks-table td.col-album,
  .tracks-table th.col-plays, .tracks-table td.col-plays, 
  .tracks-table th.col-duration {
    display: none !important;
  }

  .tracks-table td.col-duration span {
    display: none !important;
  }

  /* Fix hover-only actions for touch screens */
  .track-options-btn {
    opacity: 1 !important;
  }

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

  .track-index {
    display: none !important;
  }
  .track-play-icon {
    display: inline-block !important;
    opacity: 0.8;
  }

  .party-reactions-bar {
    bottom: 130px;
    right: 16px;
    flex-direction: column;
  }

  .toast.show {
    bottom: 140px;
  }
}

/* ===== SHORTCUTS MENU ===== */
.shortcuts-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

.shortcuts-modal {
  background: var(--spotify-surface);
  border-radius: 8px;
  padding: 24px;
  width: 400px;
  max-width: 90vw;
  position: relative;
  box-shadow: 0 16px 24px rgba(0, 0, 0, 0.5);
  animation: popIn 0.3s ease-out;
}

.shortcuts-modal h2 {
  font-size: 24px;
  margin-bottom: 20px;
  font-weight: 700;
}

.shortcuts-modal ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shortcuts-modal li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--spotify-muted);
}

.shortcuts-modal li strong {
  color: var(--spotify-text);
  background: var(--spotify-elevated);
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: normal;
}

.close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  background: transparent;
  border: none;
  color: var(--spotify-muted);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.close-btn:hover {
  color: var(--spotify-text);
}

/* ===== CONTEXT MENU ===== */
.context-menu {
  position: fixed;
  background: var(--spotify-elevated);
  border-radius: 4px;
  padding: 4px;
  min-width: 180px;
  box-shadow: 0 16px 24px rgba(0,0,0,0.5);
  z-index: 1000;
  transform-origin: top left;
  animation: popIn 0.15s ease-out;
}

.context-menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: none;
  color: var(--spotify-text);
  text-align: left;
  font-size: 15px;
  cursor: pointer;
  border-radius: 2px;
}

.context-menu-item:hover {
  background: rgba(255,255,255,0.1);
}

.context-menu-item:disabled {
  opacity: 0.45;
  cursor: default;
}

.context-menu-item:disabled:hover {
  background: transparent;
}

.context-menu-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 4px 0;
}

.context-menu-submenu-parent {
  position: relative;
}

.context-menu-submenu {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  background: var(--spotify-elevated);
  border-radius: 4px;
  padding: 4px;
  min-width: 160px;
  box-shadow: 0 16px 24px rgba(0,0,0,0.5);
}

.context-menu-submenu-parent:hover .context-menu-submenu {
  display: block;
}

.context-menu-text {
  padding: 10px 12px;
  color: var(--spotify-muted);
  font-size: 14px;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.2s ease-out;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-content {
  background: var(--spotify-surface);
  padding: 24px;
  border-radius: 22px;
  width: 400px;
  max-width: 90%;
  animation: popIn 0.25s ease-out;
  position: relative;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 24px 64px rgba(0,0,0,0.45);
}

.modal-content h2 {
  margin-bottom: 18px;
  padding-right: 52px;
  font-weight: 700;
  font-size: 24px;
}

.modal-content input {
  width: 100%;
  padding: 12px;
  margin-bottom: 24px;
  background: rgba(255,255,255,0.1);
  border: 1px solid transparent;
  border-radius: 4px;
  color: white;
}

.modal-content input:focus { border-color: var(--spotify-muted); outline: none; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-actions button {
  padding: 12px 24px;
  border-radius: 24px;
  font-weight: 700;
  border: none;
  cursor: pointer;
}

.metadata-modal {
  width: min(720px, 92vw);
  padding: 28px;
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-height: 60vh;
  overflow: auto;
  padding-right: 6px;
}

.metadata-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.05);
}

.metadata-label {
  color: var(--spotify-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metadata-value {
  color: var(--spotify-text);
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}

.metadata-modal .close-btn {
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.metadata-modal .close-btn:hover {
  background: rgba(255,255,255,0.12);
  transform: scale(1.04);
}

@media (max-width: 720px) {
  .metadata-modal {
    width: min(94vw, 94vw);
    padding: 22px;
  }

  .metadata-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ===== SETTINGS PAGE ===== */
.settings-page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 0;
}

.settings-page-section {
  margin-bottom: 40px;
}

.settings-page-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--spotify-text);
  margin-bottom: 16px;
}

.settings-page-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  margin-bottom: 8px;
}

.settings-page-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-page-label span:first-child {
  font-size: 14px;
  color: var(--spotify-text);
}

.settings-page-label .settings-page-desc {
  font-size: 13px;
  color: var(--spotify-muted);
}

.eq-val {
  text-align: right;
  color: var(--spotify-muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  width: 45px;
}

.settings-page-control {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  justify-content: flex-end;
}

.settings-page-select {
  background-color: rgba(14, 14, 14, 0.9);
  color: var(--spotify-text);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px 42px 10px 16px;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
    url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center, right 14px center;
  background-size: auto, 16px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 10px 24px rgba(0,0,0,0.22);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.sonus-select {
  position: relative;
  display: inline-flex;
  width: max-content;
  min-width: 170px;
  max-width: 100%;
  flex: 0 1 auto;
}

.sonus-select .settings-page-select {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  margin: 0;
}

.sonus-select-trigger {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  background-color: rgba(14, 14, 14, 0.9);
  color: var(--spotify-text);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background-image: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 10px 24px rgba(0,0,0,0.22);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.sonus-select-trigger:hover {
  border-color: rgba(var(--album-color), 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.07),
    0 14px 28px rgba(0,0,0,0.28);
  transform: translateY(-1px);
}

.sonus-select-trigger:focus-visible {
  outline: none;
  border-color: rgba(var(--album-color), 0.55);
  box-shadow:
    0 0 0 4px rgba(var(--album-color), 0.16),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 14px 32px rgba(0,0,0,0.3);
}

.sonus-select-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sonus-select-caret {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.86);
}

.sonus-select-caret::before {
  content: "<";
  font-size: 18px;
  line-height: 1;
  transform: rotate(0deg);
  transform-origin: center;
  transition: transform 0.18s ease;
}

.sonus-select.is-open .sonus-select-caret::before {
  transform: rotate(-90deg);
}

.sonus-select-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(var(--album-color), 0.16), transparent 50%),
    linear-gradient(180deg, rgba(22, 22, 22, 0.98), rgba(10, 10, 10, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top center;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.sonus-select.is-open .sonus-select-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.sonus-select-option {
  border: none;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  border-radius: 14px;
  background: transparent;
  color: var(--spotify-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.sonus-select-option:hover,
.sonus-select-option:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(2px);
}

.sonus-select-option.is-selected {
  background: rgba(var(--album-color), 0.18);
  color: rgb(var(--album-color));
}

.sonus-select-option:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.equalizer-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.2);
  padding: 24px 12px;
  border-radius: 8px;
  height: 200px;
  overflow-x: auto;
  overflow-y: hidden;
}

.eq-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  position: relative;
  flex: 0 0 30px;
}

.eq-band-value {
  font-size: 11px;
  color: var(--spotify-text);
  font-variant-numeric: tabular-nums;
}

.eq-band input[type="range"] {
  width: 120px;
  height: 20px;
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
}

.eq-band-label {
  font-size: 11px;
  color: var(--spotify-muted);
  font-weight: 700;
}

.settings-page-select:hover {
  border-color: rgba(var(--album-color), 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.07),
    0 14px 28px rgba(0,0,0,0.28);
  transform: translateY(-1px);
}

.settings-page-select:focus-visible {
  outline: none;
  border-color: rgba(var(--album-color), 0.55);
  box-shadow:
    0 0 0 4px rgba(var(--album-color), 0.16),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 14px 32px rgba(0,0,0,0.3);
}

.settings-page-select option {
  background: #111111;
  color: var(--spotify-text);
}

@media (max-width: 720px) {
  .sonus-select {
    min-width: 0;
    width: 100%;
  }
}

.spotify-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.spotify-toggle input { opacity: 0; width: 0; height: 0; }
.spotify-toggle .slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #535353;
  transition: .4s;
  border-radius: 24px;
}
.spotify-toggle .slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
.spotify-toggle input:checked + .slider { background-color: rgb(var(--album-color)); }
.spotify-toggle input:checked + .slider:before { transform: translateX(20px); }

/* Custom Range Input */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 14px;
  width: 14px;
  border-radius: 50%;
  background: var(--spotify-text);
  cursor: pointer;
  margin-top: -5px;
}
input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  background: var(--spotify-elevated);
  border-radius: 2px;
}
input[type="range"]:focus { outline: none; }
input[type="range"]:focus::-webkit-slider-runnable-track { background: rgba(255, 255, 255, 0.3); }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes popIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideUpPopover {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== NOW PLAYING MOBILE OVERLAY ===== */
.now-playing-mobile-overlay {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  background-color: var(--spotify-bg);
  background-image: none;
  z-index: 1001;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), background-image 0.5s ease;
  padding-bottom: env(safe-area-inset-bottom);
  overflow-y: auto;
  overflow-x: hidden;
}

body.now-playing-active .now-playing-mobile-overlay {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  display: flex;
}

.now-playing-mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  padding-top: env(safe-area-inset-top, 24px);
  flex-shrink: 0;
}

.now-playing-mobile-header-album {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
  text-align: center;
}

.now-playing-mobile-close-btn {
  background: none;
  border: none;
  color: var(--spotify-text);
  font-size: 20px;
  cursor: pointer;
}

.now-playing-mobile-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 32px 16px;
  min-height: 0;
}

.now-playing-mobile-artwork {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  margin: 0 auto 24px;
  flex-shrink: 1;
}

.now-playing-mobile-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.now-playing-mobile-info {
  text-align: left;
  flex: 1;
  min-width: 0;
}

.now-playing-mobile-info-bar .player-btn {
  font-size: 24px;
  flex-shrink: 0;
}

.now-playing-mobile-info-bar #nowPlayingLikeIcon.fas {
  color: var(--spotify-green);
}

.now-playing-mobile-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-mobile-artist {
  font-size: 18px;
  color: var(--spotify-muted);
}

.now-playing-mobile-progress {
  margin-bottom: 16px;
}

.now-playing-mobile-progress .playback-bar {
  display: flex;
}

.now-playing-mobile-controls {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 16px;
  margin-top: 16px;
}

.now-playing-mobile-controls .player-btn {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  color: white;
}

.now-playing-mobile-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgb(var(--album-color));
  font-size: 13px;
  font-weight: 600;
  margin-top: 32px;
}

.now-playing-mobile-controls .play-pause-btn {
  flex: 0 0 72px;
  height: 72px;
  font-size: 28px;
  border-radius: 50%;
  background: white;
  color: black;
}

.now-playing-mobile-queue-container {
  flex-shrink: 0;
  padding-bottom: 16px;
  max-height: 30%;
  display: flex;
  flex-direction: column;
}

.now-playing-mobile-queue-container .queue-list {
  max-height: none;
  overflow-y: auto;
  padding: 0 16px;
}

@media (max-width: 720px) {
  .player-left {
    cursor: pointer;
  }
}

/* ===== FOCUS MODE ===== */
body.focus-mode-active .app-shell {
  grid-template-columns: 1fr;
}

body.focus-mode-active .sidebar,
body.focus-mode-active .sidebar-right,
body.focus-mode-active .resizer,
body.focus-mode-active .topbar,
body.focus-mode-active .main-view {
  display: none !important;
}

body.focus-mode-active .audio-visualizer.active {
  display: block;
  opacity: 0.6;
  z-index: 5;
}

.focus-bg {
  position: absolute;
  top: -10%; left: -10%; width: 120%; height: 120%;
  background-size: cover;
  background-position: center;
  filter: blur(50px) brightness(0.4);
  opacity: 0;
  transition: opacity 1s, background-image 1s;
  z-index: 0;
  pointer-events: none;
}
body.focus-mode-active .focus-bg {
  opacity: 1;
}

.focus-mode-view {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  animation: popIn 0.5s ease-out;
}
body.focus-mode-active .focus-mode-view {
  display: flex;
}

.focus-artwork {
  width: 40vh;
  height: 40vh;
  min-width: 250px;
  min-height: 250px;
  max-width: 500px;
  max-height: 500px;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  background-size: cover;
  background-position: center;
  margin-bottom: 32px;
  transition: transform 0.3s;
}
.focus-artwork:hover {
  transform: scale(1.02);
}
.focus-title {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 8px;
  text-align: center;
  max-width: 80%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.focus-artist {
  font-size: 1.5rem;
  color: rgba(255,255,255,0.7);
  text-align: center;
  max-width: 80%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* ===== LIQUID GLASS THEME ===== */
body.theme-liquid-glass {
  --spotify-surface: rgba(255, 255, 255, 0.04);
  --spotify-elevated: rgba(255, 255, 255, 0.08);
  --spotify-bg: transparent;
  --spotify-black: transparent;
  
  background: linear-gradient(-45deg, #0f2027, #203a43, #2c5364, #0f2027);
  background-size: 400% 400%;
  animation: liquidGradient 20s ease infinite;
}

@keyframes liquidGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body.theme-liquid-glass .sidebar-panel,
body.theme-liquid-glass .main-content,
body.theme-liquid-glass .sidebar-right,
body.theme-liquid-glass .player-footer,
body.theme-liquid-glass .settings-popover-content,
body.theme-liquid-glass .shortcuts-modal,
body.theme-liquid-glass .context-menu,
body.theme-liquid-glass .autocomplete-results {
  background: var(--spotify-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body.theme-liquid-glass .main-content {
  background: rgba(255, 255, 255, 0.02);
}

body.theme-liquid-glass .hero {
  background: linear-gradient(180deg, color-mix(in srgb, var(--hero-color) 30%, transparent) 0%, transparent 100%);
}

body.theme-liquid-glass .tracks-table th {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

body.theme-liquid-glass .topbar {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
