:root {
  --bg-app: #000000;
  --bg-base: #121212;
  --bg-highlight: #181818;
  --bg-elevated: #242424;
  --bg-hover: #282828;
  --text-base: #ffffff;
  --text-subdued: #b3b3b3;
  --spotify-green: #1db954;
  --spotify-green-hover: #1ed760;
  --sonic-cyan: #00F5D4;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-base);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  user-select: none;
}

/* Master Container */
.sonic-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background-color: var(--bg-app);
  overflow: hidden;
}

/* ==========================================================================
   TOP GLOBAL BAR (Spotify-Exact Header matching User Screenshot 2)
   ========================================================================== */
.top-nav-bar {
  height: 64px;
  min-height: 64px;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
  z-index: 100;
}

/* Left: Logo & Circular Home Button */
.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
}

.sonic-icon {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 4px 10px rgba(0, 245, 212, 0.35));
  transition: transform 0.2s cubic-bezier(0.3, 0, 0, 1);
}

.logo:hover .sonic-icon {
  transform: rotate(8deg) scale(1.06);
}

.brand-text {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.6px;
  background: linear-gradient(135deg, #ffffff 40%, var(--sonic-cyan) 80%, #00f5d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home-circle-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #1f1f1f;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.home-circle-btn:hover {
  background-color: #2a2a2a;
  transform: scale(1.06);
  color: var(--sonic-cyan);
}

.home-circle-btn:active {
  transform: scale(0.96);
}

.home-circle-btn .svg-icon {
  width: 24px;
  height: 24px;
}

/* Center: Spotify Search Capsule */
.nav-center {
  flex: 1;
  max-width: 520px;
  display: flex;
  justify-content: center;
}

.spotify-search-capsule {
  width: 100%;
  max-width: 480px;
  height: 48px;
  background-color: #1f1f1f;
  border-radius: 500px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}

.spotify-search-capsule:hover {
  background-color: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.18);
}

.spotify-search-capsule:focus-within {
  background-color: #2a2a2a;
  border-color: #ffffff;
  box-shadow: 0 0 0 1px #ffffff;
}

.search-lens {
  color: var(--text-subdued);
  display: flex;
  align-items: center;
  margin-right: 12px;
  pointer-events: none;
  flex-shrink: 0;
}

.search-lens .svg-icon {
  width: 20px;
  height: 20px;
}

#searchInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 500;
  min-width: 0;
}

#searchInput::placeholder {
  color: #7b7b7b;
  font-weight: 500;
}

.clear-btn {
  background: none;
  border: none;
  color: var(--text-subdued);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s;
}

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

.capsule-divider {
  width: 1px;
  height: 24px;
  background-color: #3e3e3e;
  margin: 0 12px;
  flex-shrink: 0;
}

.browse-shelf-btn {
  background: none;
  border: none;
  color: var(--text-subdued);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.browse-shelf-btn:hover {
  color: #ffffff;
  transform: scale(1.08);
}

.browse-shelf-btn .svg-icon {
  width: 22px;
  height: 22px;
}

/* Right: Links & Auth */
.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

.quick-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-text-btn {
  background: none;
  border: none;
  color: var(--text-subdued);
  font-weight: 700;
  font-size: 0.98rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease, transform 0.15s ease;
}

.nav-text-btn:hover {
  color: #ffffff;
  transform: scale(1.04);
}

.nav-pipe {
  width: 1px;
  height: 24px;
  background-color: #3e3e3e;
  flex-shrink: 0;
}

.install-app-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.94rem;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease;
}

.install-app-btn:hover {
  color: var(--sonic-cyan);
  transform: scale(1.04);
}

.svg-icon-sm {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.auth-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.signup-btn {
  color: var(--text-subdued);
  font-weight: 700;
  font-size: 1rem;
}

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

.login-pill-btn {
  background-color: #ffffff;
  color: #000000;
  border: none;
  border-radius: 500px;
  padding: 12px 32px;
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}

.login-pill-btn:hover {
  background-color: #f2f2f2;
  transform: scale(1.04);
}

.login-pill-btn:active {
  transform: scale(0.98);
}

.auth-user-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1f1f1f;
  padding: 4px 14px 4px 5px;
  border-radius: 500px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.user-profile-badge:hover {
  background-color: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.3);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sonic-cyan), var(--spotify-green));
  color: #000000;
  font-weight: 800;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-display-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
}

.logout-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text-subdued);
  border-radius: 500px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.logout-btn:hover {
  color: #ffffff;
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   APP BODY & SPOTIFY LIBRARY SIDEBAR
   ========================================================================== */
.app-body {
  flex: 1;
  display: flex;
  width: 100%;
  gap: 8px;
  padding: 0 8px 8px 8px;
  overflow: hidden;
  min-height: 0;
  box-sizing: border-box;
}

/* Left Sidebar (Spotify Desktop "Your Library") */
.sidebar {
  width: 320px;
  flex-shrink: 0;
  background-color: var(--bg-base);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  overflow-y: hidden;
  border: 1px solid var(--border-subtle);
  gap: 14px;
}

.library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
}

.library-title-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-subdued);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.15s;
}

.library-title-btn:hover {
  color: #ffffff;
}

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

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

.icon-round-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* Library Filter Chips */
.library-filter-chips {
  display: flex;
  gap: 8px;
  padding: 0 4px;
}

.lib-chip {
  background: #242424;
  border: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 500px;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}

.lib-chip:hover {
  background: #2f2f2f;
}

.lib-chip.active {
  background: #ffffff;
  color: #000000;
}

/* Search & Recents */
.library-search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px;
}

.lib-search-toggle {
  background: none;
  border: none;
  color: var(--text-subdued);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 50%;
  transition: color 0.15s;
}

.lib-search-toggle:hover {
  color: #ffffff;
}

.lib-search-input {
  background: #242424;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  color: #ffffff;
  font-size: 0.82rem;
  padding: 4px 8px;
  outline: none;
  font-family: inherit;
  flex: 1;
  margin-left: 8px;
}

.lib-sort-text {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-subdued);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.lib-sort-text:hover {
  color: #ffffff;
}

/* Library Items List */
.library-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.library-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.library-row.active {
  background: rgba(255, 255, 255, 0.1);
}

.lib-artwork {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.liked-pin-box {
  background: linear-gradient(135deg, #450af5, #8e8ee5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.offline-pin-box {
  background: linear-gradient(135deg, #0077b6, #00b4d8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.svg-offline-pin {
  width: 20px;
  height: 20px;
}

.offline-tag {
  color: #00b4d8;
  font-weight: 700;
}

.offline-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 180, 216, 0.15);
  border: 1px solid rgba(0, 180, 216, 0.35);
  color: #00b4d8;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.offline-top-btn:hover {
  background: rgba(0, 180, 216, 0.28);
  color: #ffffff;
  border-color: #00b4d8;
  transform: translateY(-1px);
}

.svg-heart-white {
  width: 20px;
  height: 20px;
}

.lib-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

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

.lib-sub {
  font-size: 0.78rem;
  color: var(--text-subdued);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pin-tag {
  color: var(--spotify-green);
  font-weight: 700;
}

/* Sidebar Promo Box */
.sidebar-promo {
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-promo h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
}

.sidebar-promo p {
  font-size: 0.82rem;
  color: var(--text-subdued);
  line-height: 1.4;
}

.promo-btn {
  align-self: flex-start;
  background: #ffffff;
  color: #000000;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 500px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, background-color 0.15s;
}

.promo-btn:hover {
  background-color: #f2f2f2;
  transform: scale(1.04);
}

/* ==========================================================================
   MAIN CANVAS & SHELVES (Matching All 12 User Reference Images)
   ========================================================================== */
.main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
  background: linear-gradient(180deg, #18221e 0%, var(--bg-base) 400px);
  border-radius: 8px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-subtle);
  position: relative;
  min-height: 0;
}

/* Sub-filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: rgba(18, 18, 18, 0.8);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border-subtle);
}

.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  align-items: center;
  max-width: 100%;
}

.filter-pills::-webkit-scrollbar {
  display: none;
}

.filter-pill-sep {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.18);
  margin: 0 4px;
  flex-shrink: 0;
}

.pill {
  background: var(--bg-elevated);
  border: none;
  color: var(--text-base);
  padding: 8px 18px;
  border-radius: 500px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.pill:hover {
  background: var(--bg-hover);
  transform: translateY(-1px);
}

.pill.active {
  background: #ffffff;
  color: #000000;
}

/* Dynamic Mood Pills */
.mood-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #dcdcdc;
  font-size: 0.82rem;
  padding: 6px 14px;
}

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

.mood-pill.active-mood {
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.22), rgba(29, 185, 84, 0.28));
  border-color: #00f5d4;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(0, 245, 212, 0.3);
  font-weight: 800;
}

.discover-btn {
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.35);
  color: var(--sonic-cyan);
  padding: 8px 18px;
  border-radius: 500px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.discover-btn:hover {
  background: rgba(0, 245, 212, 0.25);
  color: #ffffff;
  transform: scale(1.03);
}

/* Browse Prompt Container */
.browse-prompt {
  padding: 24px 28px;
}

/* Shelf Blocks */
.shelf-block {
  margin-bottom: 40px;
}

.shelf-preheader {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-subdued);
  margin-bottom: 4px;
}

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

.shelf-header h2 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  cursor: pointer;
}

.shelf-header h2:hover {
  text-decoration: underline;
}

.show-all-btn {
  background: none;
  border: none;
  color: var(--text-subdued);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s;
  font-family: inherit;
}

.show-all-btn:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Shelf Carousel Container */
.shelf-carousel-container {
  position: relative;
  width: 100%;
}

/* Horizontal Cards Carousel Row (Matches Spotify Desktop) */
.cards-carousel-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 10px 6px 20px 6px;
}

.cards-carousel-row::-webkit-scrollbar {
  display: none;
}

.cards-carousel-row .spotify-card,
.cards-carousel-row .artist-card,
.cards-carousel-row .radio-card {
  flex: 0 0 190px;
  width: 190px;
  min-width: 190px;
  max-width: 190px;
}

/* Floating Round Navigation Arrow Button (Matches User Screenshot) */
.shelf-arrow-btn {
  position: absolute;
  top: 100px;
  transform: translateY(-50%) scale(0.92);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(24, 24, 24, 0.95);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 40;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s ease, border-color 0.15s ease;
}

.shelf-arrow-btn.visible {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(-50%) scale(1) !important;
}

.shelf-arrow-btn:hover {
  background: #383838;
  color: #ffffff;
  transform: translateY(-50%) scale(1.08) !important;
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.95);
}

.shelf-arrow-btn:active {
  transform: translateY(-50%) scale(0.95) !important;
}

.shelf-arrow-left {
  left: 6px;
}

.shelf-arrow-right {
  right: 6px;
}

.shelf-arrow-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Universal Spotify Card */
.spotify-card {
  background: #181818;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background 0.25s cubic-bezier(0.3, 0, 0, 1), transform 0.25s cubic-bezier(0.3, 0, 0, 1);
}

.spotify-card:hover {
  background: #282828;
  transform: translateY(-4px);
}

.card-img-wrap {
  width: 100%;
  aspect-ratio: 1/1;
  position: relative;
  margin-bottom: 12px;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

/* Floating Spotify Green Play Button */
.card-play-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--spotify-green);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s cubic-bezier(0.3, 0, 0, 1);
  cursor: pointer;
}

.card-play-btn .play-icon-svg {
  width: 20px;
  height: 20px;
  fill: #000000;
}

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

.card-play-btn:hover {
  transform: scale(1.08) !important;
  background: var(--spotify-green-hover);
}

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

.card-sub {
  font-size: 0.82rem;
  color: var(--text-subdued);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Special: Artist Card (Image 5 - Circular Avatar) */
.artist-card .card-img-wrap img {
  border-radius: 50% !important;
}

.artist-card .card-title,
.artist-card .card-sub {
  text-align: center;
}

.artist-card .card-play-btn {
  right: 4px;
  bottom: 4px;
}

/* Special: Spotify Radio Cards (Image 3 - 3 Overlapping Artist Circles) */
.radio-card {
  padding: 16px;
  border-radius: 8px;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 220px;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s cubic-bezier(0.3, 0, 0, 1), box-shadow 0.25s;
}

.radio-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
}

.radio-top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
}

.radio-badge-text {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: #000000;
}

.radio-avatars-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0;
}

.radio-avatar-left, .radio-avatar-right {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.radio-avatar-left {
  margin-right: -16px;
}

.radio-avatar-center {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.95);
  z-index: 2;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.radio-avatar-right {
  margin-left: -16px;
}

.radio-bottom {
  display: flex;
  flex-direction: column;
}

.radio-title {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radio-sub {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   DYNAMIC ENTITY DETAIL VIEW (Artist / Album / Playlist / Radio)
   ========================================================================== */
.detail-view {
  padding: 24px 28px;
  flex: 1;
}

.back-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 500px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  margin-bottom: 24px;
  transition: background 0.15s;
  font-family: inherit;
}

.back-nav-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Shelf Show All Grid View (Matches User Screenshots 1 & 2) */
.show-all-view {
  padding: 24px 32px 64px 32px;
}

.show-all-header {
  margin: 16px 0 24px 0;
}

.show-all-title {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin: 0;
}

.cards-grid-show-all {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 24px;
}

@media (min-width: 1200px) {
  .cards-grid-show-all {
    grid-template-columns: repeat(6, 1fr);
  }
}

.detail-hero {
  display: flex;
  align-items: flex-end;
  gap: 28px;
  margin-bottom: 28px;
}

.detail-hero-art {
  width: 210px;
  height: 210px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
  flex-shrink: 0;
}

.detail-hero-art.artist-round {
  border-radius: 50% !important;
}

.detail-hero-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-type-badge {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.detail-main-title {
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -1.2px;
  line-height: 1.1;
  color: #ffffff;
}

.detail-sub-line {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-actions-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}

.detail-play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--spotify-green);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.detail-play-btn:hover {
  transform: scale(1.08);
  background: var(--spotify-green-hover);
}

.play-svg-lg {
  width: 24px;
  height: 24px;
}

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

.detail-action-btn:hover {
  color: #ffffff;
  transform: scale(1.1);
}

.detail-heart-svg {
  width: 28px;
  height: 28px;
}

/* Tracklist Table */
.detail-tracklist-section {
  display: flex;
  flex-direction: column;
}

.table-header-row {
  display: grid;
  grid-template-columns: 40px 1fr 1fr auto 60px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-subdued);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.detail-tracks-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.track-row {
  display: grid;
  grid-template-columns: 40px 1fr 1fr auto 60px;
  align-items: center;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.track-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.track-row.playing {
  background: rgba(0, 245, 212, 0.1);
}

.track-row.playing .tr-title {
  color: var(--sonic-cyan);
}

.tr-num {
  font-size: 0.9rem;
  color: var(--text-subdued);
  font-variant-numeric: tabular-nums;
}

.tr-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

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

.tr-title-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tr-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.tr-album {
  font-size: 0.85rem;
  color: var(--text-subdued);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.tr-like-btn.liked {
  color: var(--spotify-green);
}

.tr-like-btn:hover {
  transform: scale(1.15);
  color: #ffffff;
}

.tr-duration {
  font-size: 0.82rem;
  color: var(--text-subdued);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   SPOTIFY CATALOG FOOTER (Exact Match to Image 13)
   ========================================================================== */
.spotify-catalog-footer {
  margin-top: 60px;
  padding: 40px 0 60px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 32px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
}

.footer-link {
  color: var(--text-subdued);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-link.active-plan {
  color: var(--sonic-cyan);
  font-weight: 700;
}

.creator-link {
  color: var(--sonic-cyan) !important;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
}

.creator-link:hover {
  text-decoration: underline;
  color: #ffffff !important;
}

.free-text-pill {
  display: inline-block;
  background: rgba(0, 245, 212, 0.15);
  border: 1px solid rgba(0, 245, 212, 0.4);
  color: var(--sonic-cyan);
  padding: 4px 12px;
  border-radius: 500px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-top: 6px;
  width: fit-content;
}

.free-note {
  font-size: 0.78rem;
  color: var(--text-subdued);
  margin-top: 4px;
}

.ig-top-link {
  color: var(--sonic-cyan) !important;
  font-weight: 800 !important;
  text-decoration: none;
}

.ig-glow:hover {
  background: linear-gradient(135deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
  transform: scale(1.1) !important;
  box-shadow: 0 4px 16px rgba(225, 48, 108, 0.5);
}

.svg-inline-xs {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.footer-socials {
  display: flex;
  gap: 14px;
}

.social-circle-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #242424;
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.social-circle-btn:hover {
  background: #383838;
  transform: scale(1.06);
}

.footer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 36px 0 24px 0;
}

.footer-legal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-subdued);
  flex-wrap: wrap;
  gap: 16px;
}

.legal-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.legal-links a {
  color: var(--text-subdued);
  text-decoration: none;
  transition: color 0.15s;
}

.legal-links a:hover {
  color: #ffffff;
}

/* ==========================================================================
   LIKED SONGS VIEW
   ========================================================================== */
.liked-view {
  padding: 24px 28px;
}

.liked-header-card {
  display: flex;
  align-items: flex-end;
  gap: 28px;
  padding: 28px;
  border-radius: 12px;
  background: linear-gradient(135deg, #450af5, #8e8ee5 100%);
  box-shadow: 0 12px 36px rgba(69, 10, 245, 0.35);
}

.liked-art-box {
  width: 140px;
  height: 140px;
  background: linear-gradient(135deg, #7440ff, #ba9fff);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  flex-shrink: 0;
}

.large-heart-svg {
  width: 64px;
  height: 64px;
}

.liked-meta .badge {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffffff;
}

.liked-meta h1 {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.1;
  margin: 6px 0;
}

.liked-meta span {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   OFFLINE MUSIC VAULT (PRE-INSTALLED 55 SONGS)
   ========================================================================== */
.offline-view {
  padding: 24px 28px;
}

.offline-header-card {
  display: flex;
  align-items: flex-end;
  gap: 28px;
  padding: 28px;
  border-radius: 12px;
  background: linear-gradient(135deg, #104f55, #264653 100%);
  box-shadow: 0 12px 36px rgba(16, 79, 85, 0.35);
  margin-bottom: 24px;
}

.offline-art-box {
  width: 140px;
  height: 140px;
  background: linear-gradient(135deg, #2a9d8f, #264653);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.large-offline-svg {
  width: 64px;
  height: 64px;
}

.offline-meta .badge {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffffff;
}

.offline-meta h1 {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.1;
  margin: 6px 0;
  color: #ffffff;
}

.offline-meta span {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.offline-action-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 0 20px;
}

.offline-play-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--spotify-green);
  color: #000000;
  border: none;
  border-radius: 9999px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.offline-play-all-btn:hover {
  background: var(--spotify-green-hover);
  transform: scale(1.04);
}

.offline-play-all-btn .play-svg {
  width: 18px;
  height: 18px;
}

.offline-filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.offline-search-wrap {
  margin-left: auto;
}

.offline-search-input {
  background: var(--bg-highlight);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  color: #ffffff;
  padding: 8px 16px;
  font-size: 0.85rem;
  outline: none;
  width: 200px;
  transition: all 0.2s ease;
}

.offline-search-input:focus {
  border-color: #00b4d8;
  width: 240px;
  background: var(--bg-elevated);
}

.offline-ready-badge {
  display: none !important;
}

/* ==========================================================================
   SEARCH RESULTS (Pathfinder Layout)
   ========================================================================== */
.search-results-section {
  padding: 24px 28px;
}

.results-top-split {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 28px;
  margin-bottom: 40px;
}

.top-result-section h3, .songs-section h3, .shelf-section h3 {
  font-size: 1.45rem;
  margin-bottom: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.top-result-card {
  background: var(--bg-highlight);
  border-radius: 10px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  transition: all 0.3s cubic-bezier(0.3, 0, 0, 1);
}

.top-result-card:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.top-result-card img {
  width: 108px;
  height: 108px;
  border-radius: 6px;
  margin-bottom: 16px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.top-title {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.top-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-subdued);
  font-size: 0.9rem;
  font-weight: 600;
}

.top-meta .badge {
  background: #121212;
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 500px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.top-play-btn {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--spotify-green);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s cubic-bezier(0.3, 0, 0, 1);
  cursor: pointer;
}

.top-play-btn .play-icon-svg {
  width: 22px;
  height: 22px;
  fill: #000000;
}

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

.songs-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.song-row {
  display: grid;
  grid-template-columns: 48px 1fr auto 56px;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.song-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.song-row.playing {
  background: rgba(0, 245, 212, 0.1);
}

.song-row.playing .song-title {
  color: var(--sonic-cyan);
}

.song-row img {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  object-fit: cover;
}

.song-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.song-title {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

.row-heart-btn.liked {
  color: var(--spotify-green);
}

.row-heart-btn:hover {
  transform: scale(1.15);
  color: #ffffff;
}

.song-duration {
  font-size: 0.82rem;
  color: var(--text-subdued);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.shelf-section {
  margin-bottom: 36px;
}

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

/* ==========================================================================
   BOTTOM PLAYER BAR (1:1 Spotify Desktop Exact Replication)
   ========================================================================== */
.player-bar {
  height: 80px;
  min-height: 80px;
  background-color: #000000;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 90;
  user-select: none;
}

/* --- Left: Track Info & Artwork --- */
.now-playing {
  width: 30%;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.artwork-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  background: #181818;
}

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

.playing-equalizer {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.playing-equalizer span {
  width: 3px;
  height: 16px;
  background: var(--spotify-green);
  border-radius: 2px;
  animation: eq 0.7s ease-in-out infinite alternate;
}

.playing-equalizer span:nth-child(2) { animation-delay: 0.2s; }
.playing-equalizer span:nth-child(3) { animation-delay: 0.4s; }

@keyframes eq {
  0% { height: 4px; }
  100% { height: 20px; }
}

.track-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  margin-right: 4px;
}

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

.track-title:hover {
  text-decoration: underline;
}

.track-artist {
  font-size: 0.72rem;
  color: #b3b3b3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  line-height: 1.25;
  margin-top: 3px;
}

.track-artist:hover {
  color: #ffffff;
  text-decoration: underline;
}

.add-library-btn {
  background: none;
  border: none;
  color: #b3b3b3;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.add-library-btn:hover {
  color: #ffffff;
  transform: scale(1.08);
}

.add-library-btn.liked {
  color: var(--spotify-green);
}

.svg-add-circle {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* --- Center: Controls & Scrubber --- */
.player-controls {
  width: 40%;
  max-width: 722px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

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

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

.control-btn .svg-ctrl {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

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

.control-btn.active {
  color: var(--spotify-green);
  position: relative;
}

.control-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--spotify-green);
}

.play-main-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.12s ease;
  margin: 0 4px;
}

.play-main-btn .play-svg {
  width: 14px;
  height: 14px;
  fill: #000000;
}

.play-main-btn:hover {
  transform: scale(1.06);
  background: #f6f6f6;
}

.play-main-btn:active {
  transform: scale(0.96);
}

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

.time {
  font-size: 0.68rem;
  color: #a7a7a7;
  min-width: 34px;
  font-variant-numeric: tabular-nums;
}

#currentTime {
  text-align: right;
}

#totalTime {
  text-align: left;
}

.progress-track {
  flex: 1;
  height: 4px;
  background: #4d4d4d;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
}

.progress-fill {
  height: 100%;
  background: #ffffff;
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

.progress-knob {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, 0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  left: 0%;
}

.progress-track:hover .progress-fill {
  background: var(--spotify-green);
}

.progress-track:hover .progress-knob {
  opacity: 1;
}

/* --- Right: Utilities (Lyrics, Queue, Device, Volume, PiP, Fullscreen) --- */
.player-right-tools {
  width: 30%;
  min-width: 180px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

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

.tool-btn .svg-tool {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

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

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

.player-volume-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.volume-slider-track {
  position: relative;
  width: 92px;
  height: 4px;
  background: #4d4d4d;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.volume-slider-fill {
  height: 100%;
  background: #ffffff;
  border-radius: 2px;
  pointer-events: none;
}

.volume-knob {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, 0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  left: 85%;
}

.volume-slider-track:hover .volume-slider-fill {
  background: var(--spotify-green);
}

.volume-slider-track:hover .volume-knob {
  opacity: 1;
}

#volumeSlider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

/* ==========================================================================
   MODALS (Auth & Create Playlist)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.auth-modal-card {
  background: #181818;
  border-radius: 14px;
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  color: var(--text-subdued);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s;
}

.modal-close-btn:hover {
  color: #ffffff;
}

.modal-header {
  text-align: center;
  margin-bottom: 22px;
}

.modal-sonic-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
}

#authModalTitle {
  font-size: 1.6rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.modal-sub {
  font-size: 0.88rem;
  color: var(--text-subdued);
}

.auth-tab-switch {
  display: flex;
  gap: 6px;
  background: #121212;
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 22px;
}

.tab-btn {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: transparent;
  color: var(--text-subdued);
  font-weight: 700;
  font-size: 0.92rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.tab-btn.active {
  background: #282828;
  color: #ffffff;
}

.auth-form {
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
}

.form-group input {
  background: #242424;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 12px 14px;
  color: #ffffff;
  font-size: 0.92rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: var(--spotify-green);
  box-shadow: 0 0 0 1px var(--spotify-green);
}

.auth-error-msg {
  background: rgba(235, 87, 87, 0.15);
  border: 1px solid rgba(235, 87, 87, 0.4);
  color: #ff6b6b;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  margin-bottom: 14px;
  text-align: left;
}

.auth-submit-btn {
  width: 100%;
  background: var(--spotify-green);
  color: #000000;
  font-weight: 800;
  font-size: 1rem;
  padding: 14px;
  border-radius: 500px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 6px;
  font-family: inherit;
}

.auth-submit-btn:hover {
  background: var(--spotify-green-hover);
  transform: scale(1.02);
}

/* ==========================================================================
   GOOGLE AUTHENTICATION & GMAIL 1-CLICK (Spotify Standard)
   ========================================================================== */
.google-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 13px 20px;
  border-radius: 500px;
  background: #ffffff;
  color: #000000;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  margin-bottom: 18px;
}

.google-auth-btn:hover {
  background: #f1f3f4;
  transform: scale(1.01);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15);
}

.google-svg-icon {
  flex-shrink: 0;
}

/* Auth Divider ("or") */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 4px 0 18px 0;
  color: var(--text-subdued);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-divider span {
  padding: 0 14px;
}

/* Google Account Chooser Modal */
.google-chooser-card {
  background: #202124;
  color: #e8eaed;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 28px 24px 20px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.google-chooser-header {
  text-align: center;
  margin-bottom: 20px;
}

.google-chooser-header h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 8px 0 4px 0;
  color: #ffffff;
}

.google-chooser-header p {
  font-size: 0.88rem;
  color: #9aa0a6;
}

.google-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 0;
  margin-bottom: 18px;
}

.google-acc-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.google-acc-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.google-acc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1a73e8;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.google-acc-avatar.other {
  background: rgba(255, 255, 255, 0.1);
  color: #9aa0a6;
}

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

.google-acc-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #ffffff;
}

.google-acc-email {
  font-size: 0.82rem;
  color: #9aa0a6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.google-check-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(30, 215, 96, 0.15);
  color: #1ed760;
  padding: 4px 8px;
  border-radius: 500px;
  white-space: nowrap;
}

.google-chooser-footer {
  text-align: center;
}

.google-chooser-footer p {
  font-size: 0.75rem;
  line-height: 1.4;
  color: #9aa0a6;
  margin-bottom: 16px;
}

.google-cancel-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 8px 24px;
  border-radius: 500px;
  cursor: pointer;
  transition: all 0.15s;
}

.google-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  gap: 16px;
  color: var(--text-subdued);
  font-size: 0.95rem;
}

.pulsing-wave {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 32px;
}

.pulsing-wave span {
  width: 4px;
  height: 100%;
  background: var(--spotify-green);
  border-radius: 4px;
  animation: wave 1s ease-in-out infinite;
}

.pulsing-wave span:nth-child(2) { animation-delay: 0.15s; }
.pulsing-wave span:nth-child(3) { animation-delay: 0.3s; }
.pulsing-wave span:nth-child(4) { animation-delay: 0.45s; }
.pulsing-wave span:nth-child(5) { animation-delay: 0.6s; }

@keyframes wave {
  0%, 100% { height: 8px; opacity: 0.3; }
  50% { height: 32px; opacity: 1; }
}

/* SVG Helpers */
.svg-icon-xs {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.svg-icon-xxs {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 960px) {
  .app-body {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .quick-links {
    display: none;
  }
  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 650px) {
  .top-nav-bar {
    padding: 0 12px;
  }
  .brand-text {
    display: none;
  }
  .spotify-search-capsule {
    height: 42px;
  }
  .home-circle-btn {
    width: 42px;
    height: 42px;
  }
  .login-pill-btn {
    padding: 8px 18px;
    font-size: 0.88rem;
  }
  .player-volume {
    display: none;
  }
  .progress-bar-container {
    display: none;
  }
}

/* ==========================================================================
   SPOTIFY REAL-TIME KARAOKE LYRICS VIEW (Matches User Screenshot 2)
   ========================================================================== */
.lyrics-view {
  position: relative;
  flex: 1 1 0%;
  width: 100%;
  min-height: 100%;
  padding: 28px 36px 80px 36px;
  background: linear-gradient(180deg, #421614 0%, #210a09 45%, #121212 100%);
  transition: background 0.5s ease;
  overflow-y: auto;
}

.lyrics-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 0;
  backdrop-filter: blur(8px);
}

.lyrics-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 500px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}

.lyrics-back-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.lyrics-track-info {
  display: flex;
  flex-direction: column;
}

.lyrics-header-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.lyrics-header-artist {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.lyrics-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 20px 24px 160px 10px;
}

.lyric-line {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: color 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
  letter-spacing: -0.5px;
  transform-origin: left center;
  user-select: none;
  max-width: 100%;
}

.lyric-line:hover {
  color: rgba(255, 255, 255, 0.75);
}

.lyric-line.active {
  color: #ffffff;
  transform: scale(1.02);
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.25);
}

.lyric-line.past {
  color: rgba(255, 255, 255, 0.25);
}

.lyrics-empty-msg, .lyrics-status {
  font-size: 1.4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  padding: 60px 0;
  text-align: center;
}

/* ==========================================================================
   SPOTIFY SIDE PANELS (Connect to Device & Queue - Matches Screenshot 2)
   ========================================================================== */
.spotify-side-panel {
  width: 380px;
  min-width: 340px;
  max-width: 420px;
  flex-shrink: 0;
  margin-left: auto;
  height: 100%;
  border-radius: 8px;
  background: #121212;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 90;
  overflow: hidden;
  animation: slidePanelIn 0.25s cubic-bezier(0, 0, 0.2, 1);
}

.spotify-side-panel.hidden {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

@keyframes slidePanelIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.side-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #121212;
  flex-shrink: 0;
}

.side-panel-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.side-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

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

.side-panel-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.side-panel-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Devices Panel Details (Screenshot 2 1:1 match) */
.active-device-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(30, 215, 96, 0.3);
}

.device-icon-box.active {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(30, 215, 96, 0.15);
  color: #1ed760;
  display: flex;
  align-items: center;
  justify-content: center;
}

.svg-device-icon {
  width: 24px;
  height: 24px;
}

.device-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.device-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.device-sub {
  font-size: 0.8rem;
  color: #1ed760;
  display: flex;
  align-items: center;
  gap: 6px;
}

.device-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1ed760;
  display: inline-block;
  box-shadow: 0 0 8px #1ed760;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.devices-empty-state h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin: 12px 0 16px 0;
}

.device-help-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.device-help-item .help-icon {
  width: 28px;
  height: 28px;
  color: var(--text-subdued);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.device-help-item .help-icon svg {
  width: 22px;
  height: 22px;
}

.device-help-item .help-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.help-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
}

.help-desc {
  font-size: 0.8rem;
  color: var(--text-subdued);
  line-height: 1.35;
}

.device-links {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
}

.device-ext-link {
  font-size: 0.82rem;
  color: var(--text-subdued);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}

.device-ext-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.device-ext-link svg {
  width: 14px;
  height: 14px;
}

/* Queue Panel Styling */
.queue-section-label {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-subdued);
  letter-spacing: 0.5px;
}

.queue-current-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  margin-top: 8px;
}

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

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

.queue-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1ed760;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.queue-tracks-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

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

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

.queue-row-num {
  font-size: 0.75rem;
  color: var(--text-subdued);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.queue-thumb-sm,
.queue-row-art {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  border-radius: 4px;
  object-fit: cover !important;
  flex-shrink: 0;
  display: block;
}

.queue-row-meta,
.queue-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

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

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

.queue-row-dur,
.queue-row-time {
  font-size: 0.76rem;
  color: var(--text-subdued);
  flex-shrink: 0;
  margin-left: 6px;
}

/* Floating Mini-Player Widget */
.mini-player-dock {
  position: fixed;
  bottom: 84px;
  right: 24px;
  width: 320px;
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow: hidden;
  animation: popMiniIn 0.2s cubic-bezier(0, 0, 0.2, 1);
}

@keyframes popMiniIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.mini-drag-handle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #242424;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-subdued);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mini-close-btn {
  background: transparent;
  border: none;
  color: var(--text-subdued);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.mini-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.mini-content {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mini-art {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.mini-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.mini-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

.mini-ctrl-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, background 0.1s;
}

.mini-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.08);
}

.mini-ctrl-btn.play {
  background: #ffffff;
  color: #000000;
  width: 30px;
  height: 30px;
  font-size: 0.75rem;
}

/* Active Highlight for Player Utility Buttons (Turns Bright Green like Screenshot 2) */
.tool-btn.active-btn,
.tool-btn.active-btn svg,
.utility-btn.active-btn,
.utility-btn.active-btn svg,
.control-btn.active-btn,
.control-btn.active-btn svg {
  color: #1ed760 !important;
  fill: #1ed760 !important;
}

.tool-btn.active-btn,
.utility-btn.active-btn {
  position: relative;
}

.tool-btn.active-btn::after,
.utility-btn.active-btn::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #1ed760;
}
