:root {
  --bg-base: #0a0e14;
  --bg-surface: #121721;
  --bg-card: #18202d;
  --bg-card-hover: #202b3c;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(29, 185, 84, 0.3);
  
  --spotify-green: #1db954;
  --spotify-green-hover: #1ed760;
  --spotify-green-dim: rgba(29, 185, 84, 0.15);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --color-up: #10b981;
  --color-down: #ef4444;
  --color-new: #f59e0b;
  --color-blue: #3b82f6;
  --color-purple: #a855f7;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   LIGHT MODE THEME OVERRIDES
   ========================================================================== */
body.light-mode {
  --bg-base: #f3f5f9;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-alt: #f1f5f9;
  --bg-card-hover: #f8fafc;
  --border-color: rgba(15, 23, 42, 0.1);
  --border-highlight: rgba(29, 185, 84, 0.45);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --shadow-card: 0 4px 18px -2px rgba(15, 23, 42, 0.08);
}

body.light-mode .sidebar,
body.light-mode .mobile-topbar,
body.light-mode .table-card,
body.light-mode .modal-dialog,
body.light-mode .compare-overview-box,
body.light-mode .inspector-card,
body.light-mode .spotify-card {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

body.light-mode .brand-info h1,
body.light-mode .mobile-brand span,
body.light-mode .spotify-card-title,
body.light-mode .compare-title,
body.light-mode .compare-matchup-title,
body.light-mode .modal-header h3,
body.light-mode .track-title,
body.light-mode .country-picker-name,
body.light-mode .data-table td,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4 {
  color: #0f172a !important;
}

body.light-mode .nav-item {
  color: #475569;
}

body.light-mode .nav-item:hover,
body.light-mode .nav-item.active {
  background: rgba(29, 185, 84, 0.12);
  color: #0f172a;
}

body.light-mode .grid-search-box {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.15) !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

body.light-mode .grid-search-box input,
body.light-mode input,
body.light-mode select {
  color: #0f172a !important;
}

body.light-mode .search-filter-trigger {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

body.light-mode .search-filter-trigger.has-active {
  background: rgba(29, 185, 84, 0.16);
  color: #065f46;
}

body.light-mode .search-suggestions-dropdown,
body.light-mode .compare-search-dropdown {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14) !important;
}

body.light-mode .suggestion-primary,
body.light-mode .compare-search-name {
  color: #0f172a !important;
}

body.light-mode .tier-pill,
body.light-mode .sort-segmented,
body.light-mode .country-picker-card,
body.light-mode .sidebar-share-btn,
body.light-mode .theme-toggle-btn {
  background: #f1f5f9 !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #0f172a !important;
}

body.light-mode .tier-pill.active {
  background: rgba(168, 85, 247, 0.16) !important;
  color: #6b21a8 !important;
}

body.light-mode .sort-pill {
  color: #475569;
}

body.light-mode .sort-pill.active {
  background: var(--spotify-green) !important;
  color: #fff !important;
}

body.light-mode .data-table th {
  background: #f8fafc !important;
  color: #475569 !important;
  border-bottom-color: rgba(15, 23, 42, 0.1) !important;
}

body.light-mode .data-table tr:hover td {
  background: #f8fafc !important;
}

body.light-mode .data-table td > div,
body.light-mode .data-table td strong,
body.light-mode .data-table td > span:not(.artist-link):not(.streams-mono),
body.light-mode .stat-card,
body.light-mode .compare-card,
body.light-mode .milestone-card,
body.light-mode .main-content h1,
body.light-mode .main-content h2,
body.light-mode .main-content h3,
body.light-mode .main-content h4,
body.light-mode .main-content h5,
body.light-mode .modal-body h3,
body.light-mode .modal-body h4,
body.light-mode .modal-body div[style*="color:#fff"],
body.light-mode .modal-body div[style*="color: #fff"] {
  color: #0f172a !important;
}

body.light-mode .stat-card,
body.light-mode .compare-card,
body.light-mode .milestone-card {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}

body.light-mode .btn-secondary,
body.light-mode .compare-mode-chip:not(.active) {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
}

body.light-mode .tag-pill {
  background: rgba(15, 23, 42, 0.06) !important;
  color: #334155 !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}

body.light-mode .modal-close {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
}

body.light-mode .main-content [style*="color:#fff"]:not(.badge-live):not(.btn):not([style*="background:#"]):not([style*="background:rgba(0"]):not([style*="background:rgba(255,0"]),
body.light-mode .main-content [style*="color: #fff"]:not(.badge-live):not(.btn):not([style*="background:#"]):not([style*="background:rgba(0"]):not([style*="background:rgba(255,0"]) {
  color: #0f172a !important;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* App Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
  flex-shrink: 0;
}

.brand {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-color);
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1db954, #0f766e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 20px rgba(29, 185, 84, 0.4);
}

.pulse-icon {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.brand-info h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--spotify-green);
  background: var(--spotify-green-dim);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-top: 3px;
  letter-spacing: 0.05em;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--spotify-green);
  box-shadow: 0 0 8px var(--spotify-green);
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Nav Links */
.nav-links {
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  position: relative;
}

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

.nav-item.active {
  background: linear-gradient(90deg, rgba(29, 185, 84, 0.15), transparent);
  color: var(--spotify-green);
  border-left: 3px solid var(--spotify-green);
}

.nav-item i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.tag-counter, .tag-pill {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.tag-pill {
  background: var(--spotify-green-dim);
  color: var(--spotify-green);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
}

.status-card {
  background: var(--bg-card);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.status-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--spotify-green);
}

.status-header i {
  width: 14px;
  height: 14px;
}

.status-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  background-color: rgba(18, 23, 33, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 10px 36px 10px 42px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--spotify-green);
  box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.2);
}

.clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
}

.controls-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.select-wrapper i {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.select-wrapper select {
  padding: 9px 14px 9px 34px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.select-wrapper select:focus {
  outline: none;
  border-color: var(--spotify-green);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn i {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background-color: var(--spotify-green);
  color: #000;
}

.btn-primary:hover {
  background-color: var(--spotify-green-hover);
  box-shadow: 0 0 16px rgba(29, 185, 84, 0.4);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  min-width: 170px;
  display: none;
  flex-direction: column;
  padding: 6px;
  z-index: 50;
}

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

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.85rem;
  border-radius: 4px;
  transition: var(--transition);
}

.dropdown-menu a:hover {
  background-color: var(--bg-card);
  color: var(--spotify-green);
}

/* Ticker Banner */
.ticker-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  padding: 16px 28px;
  background-color: rgba(24, 32, 45, 0.5);
  border-bottom: 1px solid var(--border-color);
}

.ticker-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ticker-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.ticker-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticker-value.highlight {
  color: var(--spotify-green);
}

/* Content Container & Tabs */
.content-container {
  padding: 24px 28px;
  flex: 1;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

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

/* Tables */
.table-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table thead {
  background-color: rgba(24, 32, 45, 0.9);
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  padding: 14px 18px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.data-table td {
  padding: 14px 18px;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background-color: var(--bg-card);
}

.text-right { text-align: right; }
.text-center { text-align: center; }

/* Rank & Badges */
.rank-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
}

.rank-top {
  color: #fbbf24;
  font-weight: 800;
}

.move-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.move-up {
  color: var(--color-up);
  background: rgba(16, 185, 129, 0.12);
}

.move-down {
  color: var(--color-down);
  background: rgba(239, 68, 68, 0.12);
}

.move-new {
  color: var(--color-new);
  background: rgba(245, 158, 11, 0.15);
  font-weight: 800;
}

.move-same {
  color: var(--text-dim);
}

/* Track & Artist Info */
.track-title {
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.track-title:hover {
  color: var(--spotify-green);
}

.artist-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.artist-link {
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
}

.artist-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* Numeric Streams formatting */
.streams-mono {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #e5e7eb;
}

.streams-diff-up {
  color: var(--color-up);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.streams-diff-down {
  color: var(--color-down);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.action-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  transition: var(--transition);
}

.action-btn:hover {
  border-color: var(--spotify-green);
  color: var(--spotify-green);
  background: var(--spotify-green-dim);
}

/* Loading & Empty */
.loading-cell, .feed-empty {
  text-align: center;
  padding: 48px !important;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--spotify-green);
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

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

/* Official Charts Grid */
.official-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
}

.official-chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.official-chart-card h3 {
  font-size: 1.1rem;
  color: var(--spotify-green);
  margin-bottom: 4px;
}

.official-chart-card .chart-date {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.official-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.official-rank {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  width: 28px;
}

.official-cover {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
  background-color: var(--bg-card);
}

.official-details {
  flex: 1;
  min-width: 0;
}

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

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

/* Inspector */
.inspector-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}

.inspector-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.inspector-card .subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.inspector-input-row {
  display: flex;
  gap: 12px;
  max-width: 800px;
}

.inspector-input-row input {
  flex: 1;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
}

.inspector-input-row input:focus {
  outline: none;
  border-color: var(--spotify-green);
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.show {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

.modal-dialog {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 650px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  z-index: 2;
  overflow: hidden;
  animation: modalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-lg {
  max-width: 900px;
}

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

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

.modal-header h3 {
  font-size: 1.15rem;
  color: #fff;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

/* Activity Feed */
.activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.activity-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
}

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: var(--transition);
}

.activity-card:hover {
  background: var(--bg-card);
  border-color: rgba(255, 255, 255, 0.15);
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--spotify-green-dim);
  color: var(--spotify-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.activity-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.activity-details {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* African Milestones & Subnav */
.milestones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.milestone-card {
  background: linear-gradient(135deg, rgba(24, 32, 45, 0.9), rgba(18, 23, 33, 0.95));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
}

.milestone-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.5);
}

.milestone-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
  align-self: flex-start;
  letter-spacing: 0.04em;
}

.milestone-artist {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}

.milestone-track {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--spotify-green);
  margin-bottom: 8px;
}

.milestone-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: auto;
}

.african-subnav {
  display: flex;
  gap: 8px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.african-tab-btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.african-tab-btn.active {
  background: var(--spotify-green);
  color: #000;
}

/* ========================================================
   Spotify Official Desktop Library Grid View (User Request)
   ======================================================== */
.grid-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

/* ==========================================================================
   Spotify Official Top Quick-Access Hub (Pills + 2x4 Hub Grid)
   ========================================================================== */

.spotify-top-hub {
  margin-bottom: 24px;
  width: 100%;
}

.spotify-pill-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 2px;
}
.spotify-pill-bar::-webkit-scrollbar {
  display: none;
}

.spotify-pill {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.3, 0, 0, 1);
  display: inline-flex;
  align-items: center;
  user-select: none;
}

.spotify-pill:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  transform: translateY(-1px);
}

.spotify-pill.active {
  background: #ffffff !important;
  color: #000000 !important;
  font-weight: 700;
  border-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Light Mode Overrides for Pills */
body.light-mode .spotify-pill {
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  border-color: rgba(15, 23, 42, 0.1);
}
body.light-mode .spotify-pill:hover {
  background: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}
body.light-mode .spotify-pill.active {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #0f172a;
}

/* The 2x4 Quick Access Grid */
.spotify-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
}

@media (max-width: 1100px) {
  .spotify-quick-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
}

@media (max-width: 900px) {
  .spotify-quick-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .spotify-quick-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/* The Spotify Quick-Access Card */
.spotify-quick-card {
  height: 52px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.15s ease, box-shadow 0.2s ease;
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.spotify-quick-card:hover {
  background: rgba(255, 255, 255, 0.20);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.spotify-quick-card:active {
  transform: scale(0.985);
}

.spotify-quick-card.active {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(29, 185, 84, 0.6);
  box-shadow: 0 0 0 1px rgba(29, 185, 84, 0.5);
}

/* Light Mode Overrides for Quick Card */
body.light-mode .spotify-quick-card {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.08);
}
body.light-mode .spotify-quick-card:hover {
  background: rgba(15, 23, 42, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
body.light-mode .spotify-quick-card.active {
  background: rgba(29, 185, 84, 0.1);
  border-color: var(--spotify-green);
}

/* Artwork / Left Square */
.sq-art {
  width: 52px;
  height: 52px;
  min-width: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  position: relative;
}
.sq-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sq-art i, .sq-art svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

/* Art Gradient Themes */
.sq-art-artists {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
}
.sq-art-country {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}
.sq-art-african {
  background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
}
.sq-art-billions {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
}
.sq-art-year {
  background: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
}
.sq-art-albums {
  background: linear-gradient(135deg, #d946ef 0%, #8b5cf6 100%);
}
.sq-art-calc {
  background: linear-gradient(135deg, #10b981 0%, #0d9488 100%);
}
.sq-art-compare {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
}

/* Card Content / Title */
.sq-info {
  flex: 1;
  padding: 0 10px;
  min-width: 0;
  display: flex;
  align-items: center;
}

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

body.light-mode .sq-title {
  color: #0f172a;
}

/* Play Button on Hover */
.sq-play-wrapper {
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sq-play-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1ed760;
  color: #000000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s cubic-bezier(0.3, 0, 0, 1), transform 0.2s cubic-bezier(0.3, 0, 0, 1), background-color 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.sq-play-btn svg {
  margin-left: 2px;
}

.spotify-quick-card:hover .sq-play-btn {
  opacity: 1;
  transform: scale(1);
}

.sq-play-btn:hover {
  background: #1fdf64;
  transform: scale(1.08) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .spotify-top-hub {
    margin-bottom: 18px;
  }
  .spotify-pill-bar {
    gap: 6px;
    margin-bottom: 12px;
    padding: 2px 0;
  }
  .spotify-pill {
    padding: 6px 14px;
    font-size: 0.78rem;
  }
  .spotify-quick-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .spotify-quick-card {
    height: 50px;
    border-radius: 6px;
  }
  .sq-art {
    width: 50px;
    height: 50px;
    min-width: 50px;
  }
  .sq-art i, .sq-art svg {
    width: 18px;
    height: 18px;
  }
  .sq-info {
    padding: 0 8px;
  }
  .sq-title {
    font-size: 0.78rem;
    line-height: 1.18;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .sq-play-wrapper {
    display: none;
  }
}

@media (max-width: 400px) {
  .spotify-quick-card {
    height: 46px;
  }
  .sq-art {
    width: 46px;
    height: 46px;
    min-width: 46px;
  }
  .sq-title {
    font-size: 0.74rem;
  }
}

/* ==========================================================================
   Spotify Home Horizontal Swipe Shelves (Albums, Earners, Regions)
   ========================================================================== */

.spotify-home-shelves {
  width: 100%;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.shelf-section {
  width: 100%;
  position: relative;
}

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

.shelf-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

body.light-mode .shelf-title {
  color: #0f172a;
}

.shelf-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.shelf-nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.shelf-scroll-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.3, 0, 0, 1);
  padding: 0;
  user-select: none;
}

.shelf-scroll-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  transform: scale(1.08);
}

body.light-mode .shelf-scroll-btn {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}
body.light-mode .shelf-scroll-btn:hover {
  background: rgba(15, 23, 42, 0.14);
}

.shelf-swipe-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 2px 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.shelf-swipe-container::-webkit-scrollbar {
  display: none;
}

.loading-shelf {
  padding: 30px;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Spotify Shelf Card */
.spotify-shelf-card {
  flex: 0 0 178px;
  width: 178px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
  position: relative;
  scroll-snap-align: start;
  user-select: none;
}

.spotify-shelf-card:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

body.light-mode .spotify-shelf-card {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
}
body.light-mode .spotify-shelf-card:hover {
  background: rgba(15, 23, 42, 0.09);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Image Wrapper */
.shelf-media-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #14141b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.shelf-media-wrap.is-artist {
  border-radius: 50%;
}

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

.shelf-media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  background: linear-gradient(135deg, #1f1f2e 0%, #101018 100%);
}

/* Floating Hover Play Button */
.shelf-play-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1ed760;
  color: #000000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s cubic-bezier(0.3, 0, 0, 1), transform 0.2s cubic-bezier(0.3, 0, 0, 1), background-color 0.15s ease;
  cursor: pointer;
  padding: 0;
}

.shelf-play-btn svg {
  margin-left: 2px;
}

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

.shelf-play-btn:hover {
  background: #1fdf64;
  transform: scale(1.08) !important;
}

/* Content Text */
.shelf-card-title {
  font-size: 0.90rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  margin-bottom: 4px;
}

body.light-mode .shelf-card-title {
  color: #0f172a;
}

.shelf-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.shelf-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
  align-self: flex-start;
  letter-spacing: -0.01em;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .spotify-shelf-card {
    flex: 0 0 144px;
    width: 144px;
    padding: 10px;
  }
  .shelf-title {
    font-size: 1.15rem;
  }
  .shelf-card-title {
    font-size: 0.82rem;
  }
  .shelf-play-btn {
    width: 32px;
    height: 32px;
  }
}

/* ==========================================================================
   Clean 2-Row Spotify Controls Toolbar
   ========================================================================== */

.grid-controls-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 20px;
  background: transparent;
  border: none;
  padding: 0;
  width: 100%;
}

.grid-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 720px;
  background: #14141c;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  padding-right: 6px;
  transition: all 0.2s ease;
}

.grid-search-box:focus-within {
  border-color: var(--spotify-green);
  background: #181824;
  box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.22);
}

.grid-search-box .search-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.grid-search-box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  border-radius: 26px;
  padding: 12px 10px 12px 44px;
  color: #fff;
  font-size: 0.92rem;
}

.grid-search-box input:focus {
  outline: none;
}

.integrated-clear-btn {
  position: static !important;
  transform: none !important;
  flex-shrink: 0;
  margin-right: 4px;
}

.search-filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.18s ease;
}

.search-filter-trigger:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.search-filter-trigger.has-active {
  background: rgba(29, 185, 84, 0.2);
  border-color: var(--spotify-green);
  color: #fff;
}

.grid-search-box input::placeholder {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.grid-actions-group {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.auto-refresh-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auto-refresh-wrap .action-icon {
  position: absolute;
  left: 12px;
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 2;
}

.auto-refresh-wrap select {
  padding: 8px 14px 8px 34px !important;
  background: #14141c !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 20px !important;
  color: #fff !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  min-width: 128px;
}

.auto-refresh-wrap select:focus {
  border-color: var(--spotify-green);
}

.grid-actions-group .action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  background: #14141c;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.grid-actions-group .action-btn:hover {
  background: #1f1f2e;
  border-color: rgba(255, 255, 255, 0.25);
}

.export-dropdown-wrapper {
  position: relative;
}

.grid-actions-group .export-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 700;
  background: #1db954;
  color: #000;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.grid-actions-group .export-btn:hover {
  background: #1ed760;
  transform: translateY(-1px);
}

/* Row 2: Category Filter Chips & Sort/Filter Dropdowns */
.grid-toolbar-bottom {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.spotify-filter-chips {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
  flex-shrink: 0;
}

.spotify-filter-chips::-webkit-scrollbar {
  display: none;
}

.chip-btn {
  background: #181824;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 7px 16px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.chip-btn:hover {
  background: #242436;
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.chip-btn.active {
  background: #ffffff;
  color: #000000;
  font-weight: 700;
  border-color: #ffffff;
}

.grid-dropdowns-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}

.grid-select-wrap select {
  background: #14141c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 7px 14px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  min-width: 135px;
  white-space: nowrap;
}

.grid-select-wrap select:focus {
  border-color: var(--spotify-green);
  background: #181824;
}

.grid-select-wrap select option {
  background: #181818;
  color: #ffffff;
}

.grid-section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.grid-section-subtitle {
  color: #b3b3b3;
  font-size: 0.88rem;
  margin-top: 4px;
}

.spotify-filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-btn {
  background: #242424;
  color: #ffffff;
  border: none;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

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

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

/* Compact Horizontal Swipe Milestone Ladder */
.timeline-ladder-rail {
  display: flex;
  flex-direction: row;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0 6px 0;
}

.timeline-ladder-rail::-webkit-scrollbar {
  display: none;
}

.timeline-ladder-step {
  flex: 0 0 134px;
  width: 134px;
  scroll-snap-align: start;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.timeline-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.timeline-stat-box {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  padding: 8px 10px;
  border-radius: 10px;
  min-width: 0;
}
.spotify-shelves-wrap {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  width: 100%;
}

.spotify-shelf {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.spotify-shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.spotify-shelf-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.2px;
}

.spotify-shelf-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
}

.spotify-shelf-link:hover {
  color: var(--spotify-green);
}

.spotify-shelf-rail {
  display: flex;
  flex-direction: row;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 2px 6px 2px;
}

.spotify-shelf-rail::-webkit-scrollbar {
  display: none;
}

.spotify-shelf-rail .spotify-card {
  flex: 0 0 144px;
  width: 144px;
  scroll-snap-align: start;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.spotify-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 14px;
}

.spotify-card {
  background-color: #161822;
  padding: 12px;
  border-radius: 10px;
  transition: background-color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.spotify-card:hover {
  background-color: #242424;
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
}

.spotify-card-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 14px;
}

/* Circular profile photo for artists (matching Spotify desktop app) */
.spotify-card.is-artist .spotify-card-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  background-color: #282828;
}

/* Rounded square cover for albums / playlists */
.spotify-card.is-album .spotify-card-img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  background-color: #282828;
}

/* Floating Spotify green play button */
.spotify-play-btn {
  position: absolute;
  right: 10px;
  bottom: 8px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #1ed760;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  border: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.spotify-play-btn i {
  width: 22px;
  height: 22px;
  fill: #000;
  margin-left: 2px;
}

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

.spotify-play-btn:hover {
  background-color: #1fdf64;
  transform: scale(1.08) translateY(0);
}

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

.spotify-card-subtitle {
  font-size: 0.84rem;
  color: #b3b3b3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-card-meta {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  font-family: var(--font-mono);
}

.spotify-card-streams {
  color: #1db954;
  font-weight: 700;
}

.spotify-card-100m-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 800;
}

/* Artist Hero Banner in Modal */
.artist-hero-banner {
  display: flex;
  gap: 24px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.artist-hero-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
  background-color: #282828;
}

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

.artist-verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.artist-hero-name {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 8px;
}

.artist-hero-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.artist-meta-chip {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.artist-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  background: var(--bg-card);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.artist-stat-col {
  display: flex;
  flex-direction: column;
}

.artist-stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
}

.artist-stat-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* ==========================================================================
   Compare Hub Clean Modern & Mobile-Responsive Layout
   ========================================================================== */
.compare-hub-banner {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(239, 68, 68, 0.06));
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.compare-banner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.compare-banner-title-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.compare-badge {
  background: #a855f7;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.4px;
}

.compare-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  white-space: nowrap;
}

.compare-mode-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0;
  max-width: 100%;
}

.compare-mode-scroll::-webkit-scrollbar {
  display: none;
}

.compare-mode-chip {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.compare-mode-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.compare-mode-chip.active {
  background: #a855f7 !important;
  color: #ffffff !important;
  border-color: #a855f7 !important;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.4);
}

.compare-overview-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.compare-overview-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.compare-matchup-header {
  min-width: 0;
}

.compare-sub-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.compare-matchup-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin-top: 2px;
  word-break: break-word;
}

.compare-kpi-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.compare-kpi-item {
  display: flex;
  flex-direction: column;
}

.compare-kpi-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.compare-kpi-val {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--color-spotify);
}

.compare-velocity-banner {
  margin-top: 16px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(239, 68, 68, 0.06));
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.compare-velocity-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.compare-velocity-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.compare-velocity-text {
  min-width: 0;
}

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

.compare-velocity-sub {
  font-size: 0.78rem;
  color: var(--color-new);
  margin-top: 2px;
}

.compare-catchup-pill {
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.35);
  padding: 4px 10px;
  border-radius: 12px;
  color: #c084fc;
  white-space: nowrap;
  flex-shrink: 0;
}

.compare-market-share-section {
  margin-top: 18px;
}

.compare-market-share-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.compare-share-legend {
  font-size: 0.75rem;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.compare-market-bar {
  height: 10px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  background: rgba(255, 255, 255, 0.06);
}

.compare-controls-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.compare-presets-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.compare-presets-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  flex-shrink: 0;
}

.compare-presets-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0;
  max-width: 100%;
}

.compare-presets-scroll::-webkit-scrollbar {
  display: none;
}

.compare-preset-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.compare-preset-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.compare-preset-btn.active {
  background: #a855f7 !important;
  color: #ffffff !important;
  border-color: #a855f7 !important;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.35);
}

.compare-add-artist-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.compare-select {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 7px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  max-width: 200px;
}

.compare-add-btn {
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-md);
}

.compare-active-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Compare Live Search */
.compare-search-container {
  margin-top: 14px;
  position: relative;
  width: 100%;
}

.compare-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.compare-search-svg {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  pointer-events: none;
  transition: color 0.2s ease;
}

.compare-search-input {
  width: 100%;
  background: var(--bg-card-alt);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  color: #fff;
  font-size: 0.88rem;
  padding: 10px 40px 10px 42px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.compare-search-input:focus {
  border-color: #a855f7;
  background: #181824;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.compare-search-input-wrap:focus-within .compare-search-svg {
  color: #a855f7;
}

.compare-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent !important;
  border: none !important;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.compare-search-clear:hover {
  color: #fff;
}

.compare-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #14141c;
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  max-height: 380px;
  overflow-y: auto;
  z-index: 1050;
  padding: 6px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.compare-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.compare-search-item:hover,
.compare-search-item.active {
  background: rgba(168, 85, 247, 0.14);
}

.compare-search-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.compare-search-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #252530;
  flex-shrink: 0;
}

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

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

.compare-search-name mark {
  background: transparent;
  color: #a855f7;
  font-weight: 800;
}

.compare-search-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compare-search-action-btn {
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.compare-search-action-btn:hover {
  background: #a855f7;
  color: #fff;
}

.compare-search-action-btn.added {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #10b981;
  cursor: default;
}

/* ==========================================================================
   Real-Time Artist Tally & Head-to-Head Compare Styling
   ========================================================================== */
.compare-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.compare-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}

.compare-card.is-leader {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.15);
}

.compare-card-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.compare-avatar-wrapper {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
}

.compare-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  background-color: #282828;
}

.compare-crown-badge {
  position: absolute;
  top: -10px;
  right: -6px;
  background: #f59e0b;
  color: #000;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 20px;
  padding: 2px 8px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
  display: flex;
  align-items: center;
  gap: 3px;
}

.compare-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.compare-mini-track {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
}

.compare-mini-track:last-child {
  border-bottom: none;
}

.compare-market-seg {
  height: 100%;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  cursor: pointer;
}

.compare-market-seg:hover {
  filter: brightness(1.15);
}

.compare-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.compare-active-pill button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0 2px;
}

.compare-active-pill button:hover {
  color: #ef4444;
}

.compare-preset-btn.active {
  background: #a855f7 !important;
  color: #ffffff !important;
  border-color: #a855f7 !important;
}

/* ========================================================
   Mobile-Friendly Responsive Layout & Off-Canvas Navigation
   ======================================================== */

.mobile-topbar {
  display: none;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.show {
  display: block;
  opacity: 1;
}

.sidebar-close-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  margin-left: auto;
}

.sidebar-close-btn:hover {
  color: #fff;
}

@media (max-width: 860px) {
  .app-layout {
    flex-direction: column;
    min-width: 0;
    width: 100%;
    overflow-x: hidden;
  }

  /* Mobile Top Navigation Bar */
  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.05rem;
    color: #fff;
  }

  .mobile-brand-icon {
    width: 20px;
    height: 20px;
    color: var(--spotify-green);
  }

  .mobile-menu-btn, .mobile-search-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
  }

  .mobile-menu-btn:active, .mobile-search-btn:active {
    background: var(--bg-card-hover);
  }

  /* Off-Canvas Slide-Over Sidebar */
  .sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    z-index: 999;
    transition: left 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.85);
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Main content area */
  .main-content {
    width: 100%;
    min-width: 0;
    padding: 8px;
    overflow-x: hidden;
  }

  .topbar {
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

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

  .controls-group {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .select-wrapper {
    flex: 1;
    min-width: 120px;
  }

  /* Responsive Search Bar */
  .grid-controls-panel {
    padding: 0;
    margin-bottom: 18px;
    width: 100%;
  }

  .grid-search-box {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .grid-search-box input {
    font-size: 0.86rem !important;
    padding: 10px 6px 10px 38px !important;
    border-radius: 26px !important;
  }

  .search-filter-trigger {
    padding: 5px 10px !important;
    font-size: 0.74rem !important;
  }

  .grid-search-box .search-icon {
    left: 14px !important;
    width: 16px !important;
    height: 16px !important;
  }

  .search-clear-btn {
    right: 12px !important;
    width: 24px !important;
    height: 24px !important;
  }

  /* Responsive Grids on Mobile */
  #spotify-library-grid-container {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .spotify-shelf-rail .spotify-card {
    flex: 0 0 132px !important;
    width: 132px !important;
    padding: 8px !important;
  }

  .spotify-shelf-title {
    font-size: 0.98rem !important;
  }

  .spotify-card {
    padding: 10px !important;
  }

  .spotify-card-img-wrapper {
    margin-bottom: 8px !important;
  }

  .spotify-card-title {
    font-size: 0.85rem !important;
  }

  .spotify-filter-chips {
    overflow-x: auto;
    width: 100%;
    padding-bottom: 4px;
    white-space: nowrap;
  }

  /* Modal Responsive Sizing */
  .modal {
    padding: 8px !important;
  }

  .modal-dialog {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 94vh !important;
    margin: 0 auto !important;
    border-radius: var(--radius-md) !important;
  }

  .modal-header {
    padding: 12px 16px !important;
  }

  .modal-body {
    padding: 12px !important;
  }

  .artist-hero-banner {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 14px !important;
    gap: 12px !important;
  }

  .artist-hero-avatar {
    width: 80px !important;
    height: 80px !important;
  }

  .artist-stat-row {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  .artist-stat-col {
    min-width: 80px !important;
    padding: 6px 10px !important;
  }

  .multi-platform-hub {
    padding: 12px !important;
  }

  .multi-platform-hub div[style*="display:grid"] {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
    gap: 8px !important;
  }

  /* Tables horizontal scroll */
  .table-card {
    border-radius: var(--radius-sm) !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  table {
    min-width: 520px;
  }

  .view-header {
    padding: 12px 4px !important;
  }

  .view-header h2 {
    font-size: 1.25rem !important;
  }

  /* Compare Hub Mobile Tuning */
  .compare-hub-banner {
    padding: 10px 12px !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
  }

  .compare-banner-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .compare-banner-title-area {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .compare-title {
    font-size: 1.02rem !important;
  }

  .compare-mode-scroll {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    gap: 6px !important;
  }

  .compare-mode-chip {
    font-size: 0.74rem !important;
    padding: 5px 10px !important;
  }

  .compare-overview-box {
    padding: 12px !important;
    border-radius: 12px !important;
    margin-bottom: 14px !important;
  }

  .compare-overview-top {
    gap: 10px !important;
  }

  .compare-matchup-title {
    font-size: 1.05rem !important;
  }

  .compare-kpi-row {
    width: 100% !important;
    justify-content: space-between !important;
    gap: 10px !important;
    margin-top: 4px !important;
  }

  .compare-velocity-banner {
    padding: 10px 12px !important;
    margin-top: 10px !important;
  }

  .compare-controls-section {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .compare-presets-wrap {
    width: 100% !important;
  }

  .compare-add-artist-row {
    width: 100% !important;
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
  }

  .compare-select {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 38px !important;
    padding: 0 10px !important;
    font-size: 0.8rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .compare-add-btn {
    height: 38px !important;
    padding: 0 14px !important;
    font-size: 0.8rem !important;
    flex-shrink: 0 !important;
  }

  .compare-search-container {
    margin-top: 8px !important;
  }

  .compare-search-input {
    height: 38px !important;
    font-size: 0.82rem !important;
    padding: 8px 34px 8px 34px !important;
  }

  .share-card-canvas {
    max-height: 250px !important;
  }

  .btn-image-action {
    min-width: 96px !important;
    padding: 7px 8px !important;
    font-size: 0.76rem !important;
  }

  #compare-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
  }
}

/* ==========================================================================
   Search Autocomplete Suggestions Dropdown & Quick Actions Header
   ========================================================================== */

.search-clear-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.15s ease;
}

.search-clear-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12) !important;
}

.search-clear-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2.5;
  display: block;
}

.search-suggestions-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 360px;
  max-width: 680px;
  background: #14141c;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.06);
  max-height: 480px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
  padding: 6px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: dropdownFadeIn 0.15s ease-out;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .search-suggestions-dropdown {
    min-width: min(94vw, 400px) !important;
    width: 100% !important;
    max-width: 95vw !important;
    left: 0 !important;
    max-height: 65vh !important;
    padding: 6px !important;
  }
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.suggestion-group-title {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 10px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  min-width: 0;
  box-sizing: border-box;
}

.suggestion-item:hover,
.suggestion-item.active {
  background: rgba(255, 255, 255, 0.08);
}

.suggestion-item.active {
  border-left: 3px solid var(--spotify-green);
  background: rgba(29, 185, 84, 0.12);
  padding-left: 7px;
}

.suggestion-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
}

.suggestion-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #222228;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.suggestion-track-thumb {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 8px;
  background: rgba(29, 185, 84, 0.15);
  color: var(--spotify-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.suggestion-album-thumb {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #1f1f2e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.suggestion-info {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.suggestion-primary {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.suggestion-primary mark {
  background: transparent;
  color: var(--spotify-green);
  font-weight: 800;
}

.suggestion-secondary {
  font-size: 0.74rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.suggestion-secondary .sub-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-badge {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.suggestion-badge.artist-badge {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
}

.suggestion-badge.album-badge {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.suggestion-badge.track-badge {
  background: rgba(29, 185, 84, 0.2);
  color: var(--spotify-green);
}

.suggestion-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  flex: 0 0 auto;
  text-align: right;
  gap: 2px;
  min-width: 72px;
}

.suggestion-metric {
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.suggestion-submetric {
  font-size: 0.68rem;
  color: var(--text-dim);
  white-space: nowrap;
  font-weight: 600;
}

.suggestion-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 6px;
  padding-top: 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 8px;
  padding-right: 8px;
}

.export-dropdown-wrapper {
  position: relative;
}

.export-dropdown-wrapper .export-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #181824;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 6px;
  min-width: 170px;
  display: none;
  z-index: 1000;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.export-dropdown-wrapper .export-menu.show {
  display: block;
}

.export-dropdown-wrapper .export-menu .dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.export-dropdown-wrapper .export-menu .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   MAMA.STREAM SOCIAL VIRALITY & SHARE ENGINE STYLES
   ========================================================================== */
.share-matchup-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(29, 185, 84, 0.12);
  color: #1db954;
  border: 1px solid rgba(29, 185, 84, 0.35);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.share-matchup-btn:hover {
  background: #1db954;
  color: #000;
  box-shadow: 0 4px 14px rgba(29, 185, 84, 0.4);
  transform: translateY(-1px);
}

.share-dialog {
  max-width: 480px;
}

.share-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(29, 185, 84, 0.15);
  color: #1db954;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-preview-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.share-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.share-brand-tag {
  background: var(--spotify-green);
  color: #000;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: 4px;
}

.share-verified-tag {
  font-size: 0.72rem;
  color: #38bdf8;
  font-weight: 700;
}

.share-preview-body {
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-main);
}

.share-grid-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.share-buttons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.share-channel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.share-channel-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.share-channel-x {
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.share-channel-x:hover {
  background: #16181c;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.share-channel-whatsapp {
  background: #25D366;
  color: #fff;
}
.share-channel-whatsapp:hover {
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.share-channel-telegram {
  background: #229ED9;
  color: #fff;
}
.share-channel-telegram:hover {
  box-shadow: 0 4px 14px rgba(34, 158, 217, 0.35);
}

.share-channel-facebook {
  background: #1877F2;
  color: #fff;
}
.share-channel-facebook:hover {
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.35);
}

.share-copy-box {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px 4px 4px 12px;
}

.share-copy-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-overflow: ellipsis;
}

.btn-copy-share {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-native-share {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  transition: all 0.2s;
}

.btn-native-share:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* Global MAMA.STREAM Toast */
.mama-toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 99999;
  pointer-events: none;
}

.mama-toast {
  background: #12121a;
  color: #fff;
  border: 1px solid var(--spotify-green);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 16px rgba(29, 185, 84, 0.2);
  border-radius: 30px;
  padding: 10px 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.mama-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.mama-toast-icon {
  font-size: 1rem;
}

/* Visual Image Card Sharing Preview & Actions */
.share-card-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.share-card-preview-wrapper {
  position: relative;
  background: #08090e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.share-card-canvas {
  width: 100%;
  max-width: 440px;
  max-height: 380px;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  display: block;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.share-card-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 9, 14, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 5;
}

.share-image-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-image-action {
  flex: 1;
  min-width: 130px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-image-action:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

/* ==========================================================================
   CUSTOM MOBILE-FRIENDLY COUNTRY & DISCOVERY FILTER SYSTEM
   ========================================================================== */
.mama-filter-dock {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  width: 100%;
}

.country-rail-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.country-rail {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
  padding: 2px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 94%, transparent 100%);
}

.country-rail::-webkit-scrollbar {
  display: none;
}

.country-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.country-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.country-pill.active {
  background: rgba(29, 185, 84, 0.2);
  border-color: var(--spotify-green);
  color: #fff;
  box-shadow: 0 2px 12px rgba(29, 185, 84, 0.24);
}

.cp-flag {
  font-size: 0.95rem;
  line-height: 1;
}

.cp-count {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 6px;
  border-radius: 999px;
}

.country-pill.active .cp-count {
  color: #1db954;
  background: rgba(0, 0, 0, 0.45);
}

.country-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #38bdf8;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.18s ease;
}

.country-more-btn:hover {
  background: rgba(56, 189, 248, 0.22);
}

.country-more-btn i,
.country-more-btn svg {
  width: 14px;
  height: 14px;
}

.filter-subrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.tier-pills-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tier-pills-scroll::-webkit-scrollbar {
  display: none;
}

.tier-pill {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tier-pill.active {
  background: rgba(168, 85, 247, 0.22);
  border-color: rgba(168, 85, 247, 0.55);
  color: #fff;
}

.sort-segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sort-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sort-pill.active {
  background: var(--spotify-green);
  color: #000;
  font-weight: 800;
}

.filter-reset-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

/* Country Picker Modal & Mobile Bottom Sheet */
.country-picker-dialog {
  max-width: 640px;
}

.country-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 55vh;
  overflow-y: auto;
  padding-right: 2px;
}

.country-picker-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  text-align: left;
  transition: all 0.16s ease;
}

.country-picker-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(29, 185, 84, 0.45);
}

.country-picker-card.active {
  background: rgba(29, 185, 84, 0.16);
  border-color: var(--spotify-green);
}

.country-picker-flag {
  font-size: 1.45rem;
  line-height: 1;
  flex-shrink: 0;
}

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

.country-picker-name {
  font-size: 0.84rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.country-picker-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

@media (max-width: 768px) {
  .country-pill {
    padding: 5px 10px;
    font-size: 0.76rem;
  }

  .country-more-btn {
    padding: 5px 10px;
    font-size: 0.74rem;
  }

  .country-more-btn #country-more-label {
    display: none;
  }

  #country-picker-modal.modal {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  #country-picker-modal .country-picker-dialog {
    border-radius: 18px 18px 0 0 !important;
    max-height: 82vh !important;
    margin: 0 !important;
  }

  .country-picker-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/* =========================================================
   SEO Clusters, Search Intent Pills & Topic Navigation
   ========================================================= */
.seo-cluster-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 24px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.seo-cluster-bar::-webkit-scrollbar {
  display: none;
}
.seo-cluster-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--spotify-green);
  white-space: nowrap;
  flex-shrink: 0;
}
.seo-cluster-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.seo-cluster-pills::-webkit-scrollbar {
  display: none;
}
.seo-cluster-pill {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.3, 0, 0, 1);
}
.seo-cluster-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  transform: translateY(-1px);
}
.seo-cluster-pill.active {
  background: #1ed760;
  color: #000000;
  border-color: #1ed760;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(30, 215, 96, 0.35);
}

/* SEO Keyword Metric Badge on Each Shelf Header */
.seo-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(30, 215, 96, 0.12);
  color: #1ed760;
  border: 1px solid rgba(30, 215, 96, 0.25);
  border-radius: 12px;
  padding: 2px 8px;
  margin-left: 8px;
  vertical-align: middle;
  letter-spacing: 0.2px;
}
.seo-badge i, .seo-badge svg {
  width: 11px;
  height: 11px;
}

/* Light Mode Overrides for SEO Cluster & Badges */
body.light-mode .seo-cluster-bar {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
}
body.light-mode .seo-cluster-pill {
  background: rgba(15, 23, 42, 0.05);
  color: #475569;
  border-color: rgba(15, 23, 42, 0.08);
}
body.light-mode .seo-cluster-pill:hover {
  background: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}
body.light-mode .seo-cluster-pill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}
body.light-mode .seo-badge {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.25);
}

/* SEO FAQ Section */
.seo-faq-section {
  margin: 48px 0 24px;
  background: linear-gradient(135deg, rgba(20, 24, 33, 0.8), rgba(13, 16, 23, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 28px 24px;
}
body.light-mode .seo-faq-section {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
.seo-faq-header {
  margin-bottom: 20px;
}
.seo-faq-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.seo-faq-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.seo-faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}
.seo-faq-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 16px 18px;
  transition: all 0.2s ease;
}
body.light-mode .seo-faq-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.seo-faq-card:hover {
  border-color: rgba(30, 215, 96, 0.3);
  transform: translateY(-2px);
}
.seo-faq-q {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.seo-faq-a {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.seo-faq-query-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 8px;
}

/* =========================================================
   Spotify Official Artist Modal & Immersive Hero Header
   ========================================================= */
#artist-modal .modal-dialog {
  max-width: 920px;
  max-height: 90vh;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-surface, #121212);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

body.light-mode #artist-modal .modal-dialog {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
}

#artist-modal .modal-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: transparent;
  border-bottom: none;
  padding: 16px 20px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  pointer-events: none;
}

#artist-modal .modal-header h3 {
  display: none;
}

#artist-modal .modal-close {
  pointer-events: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.3, 0, 0, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

#artist-modal .modal-close:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
  color: #1ed760;
  border-color: #1ed760;
}

#artist-modal .modal-body {
  padding: 0 24px 24px;
  overflow-y: auto;
}

/* Full Bleed Background Hero Header */
.spotify-artist-hero {
  position: relative;
  min-height: 330px;
  margin: 0 -24px 20px -24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px 28px 24px;
  background-size: cover;
  background-position: center 25%;
  background-repeat: no-repeat;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.spotify-artist-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.45) 35%,
    rgba(18, 18, 18, 0.85) 75%,
    var(--bg-surface, #121212) 100%
  );
  z-index: 1;
}

body.light-mode .spotify-artist-hero::before {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.25) 0%,
    rgba(15, 23, 42, 0.55) 40%,
    rgba(15, 23, 42, 0.88) 78%,
    #ffffff 100%
  );
}

.spotify-artist-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spotify-verified-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.spotify-hero-name {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 6px 0 10px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.9);
}

.spotify-hero-listeners {
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}
.spotify-hero-listeners strong {
  font-weight: 800;
  color: #ffffff;
}

.spotify-hero-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.spotify-hero-chip {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Action Ribbon */
.spotify-action-ribbon {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.spotify-hero-play-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #1ed760;
  color: #000000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(30, 215, 96, 0.4);
  transition: transform 0.2s cubic-bezier(0.3, 0, 0, 1), background-color 0.15s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}
.spotify-hero-play-btn:hover {
  transform: scale(1.08);
  background: #1fdf64;
  box-shadow: 0 10px 28px rgba(30, 215, 96, 0.55);
}
.spotify-hero-play-btn svg {
  margin-left: 3px;
}

.spotify-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 24px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  transition: all 0.2s ease;
}
.spotify-pill-btn:hover {
  background: var(--bg-card-alt);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}
.spotify-pill-btn.btn-highlight {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  color: #000000;
  border: none;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}
.spotify-pill-btn.btn-spotify {
  background: rgba(30, 215, 96, 0.15);
  color: #1ed760;
  border-color: rgba(30, 215, 96, 0.35);
  text-decoration: none;
}
.spotify-pill-btn.btn-spotify:hover {
  background: #1ed760;
  color: #000000;
}

/* 4-Metric Glass Cards Grid */
.spotify-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
@media (max-width: 768px) {
  .spotify-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .spotify-artist-hero {
    min-height: 270px;
    padding: 32px 18px 18px;
  }
}
.spotify-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  transition: all 0.2s ease;
}
body.light-mode .spotify-stat-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.spotify-stat-card:hover {
  border-color: rgba(30, 215, 96, 0.35);
  transform: translateY(-2px);
}
.spotify-stat-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.spotify-stat-value {
  font-size: 1.25rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: var(--text-main);
  letter-spacing: -0.02em;
}
.spotify-stat-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Streaming Platforms Theme Adaptability */
.multi-platform-hub {
  margin: 16px 0 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px 20px;
}
body.light-mode .multi-platform-hub {
  background: #f8fafc;
  border-color: #e2e8f0;
}

/* Loading hero shimmer */
.spotify-hero-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.04) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: heroShimmer 1.6s ease-in-out infinite;
  z-index: 3;
  pointer-events: none;
}
@keyframes heroShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}




