/* ==========================================================================
   BD Band Music - Lossless FLAC Web Player Stylesheet
   Modern Dark-Mode / Glassmorphic UI with Responsive Mobile Layout
   ========================================================================== */

:root {
  --bg-primary: #0b0e14;
  --bg-secondary: #121721;
  --bg-tertiary: #19202e;
  --bg-card: rgba(25, 32, 46, 0.7);
  --bg-glass: rgba(18, 23, 33, 0.85);
  
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --accent-light: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.25);
  
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  
  --player-height: 88px;
  --header-height: 64px;
  --subnav-height: 52px;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* App Wrapper */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 1.5rem;
}

.header-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.brand-flag {
  font-size: 1.75rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-light);
  display: block;
  margin-top: -2px;
}

/* Live Global Search Box */
.search-container {
  flex: 1;
  max-width: 580px;
  min-width: 0;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.4rem 0.85rem;
  transition: all 0.2s ease;
  min-width: 0;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-tertiary);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  padding: 0.25rem 0.6rem;
}

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

.clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  font-size: 0.85rem;
  border-radius: var(--radius-full);
}
.clear-btn:hover {
  color: var(--text-primary);
}

.search-shortcut {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 6px;
  user-select: none;
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.stats-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

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

.icon-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.queue-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
}

/* Sub-Navigation & Filter Bar */
.sub-nav {
  position: sticky;
  top: var(--header-height);
  z-index: 45;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1.25rem;
  overflow: hidden;
  white-space: nowrap;
}

.view-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.5rem 0;
  border-right: 1px solid var(--border-color);
  padding-right: 1rem;
  flex-shrink: 0;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
}

.artist-filter-bar {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0 0.55rem 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;

  /* Modern standard scrollbar styling (Baseline) */
  --scrollbar-thumb: rgba(139, 92, 246, 0.5);
  --scrollbar-thumb-hover: var(--accent);
  --scrollbar-track: rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* Custom horizontal scrollbar for WebKit browsers */
.artist-filter-bar::-webkit-scrollbar {
  height: 6px;
  display: block;
}

.artist-filter-bar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  margin: 0 4px;
}

.artist-filter-bar::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.5);
  border-radius: var(--radius-full);
  transition: background 0.2s ease;
}

.artist-filter-bar::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.filter-pill {
  flex-shrink: 0;
  user-select: none;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.filter-pill:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.filter-pill .pill-count {
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

/* Active Filter Banner */
.active-filter-banner {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.15), rgba(59, 130, 246, 0.05));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.filter-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.filter-value {
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}
.reset-filter-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  cursor: pointer;
}
.reset-filter-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 1.5rem;
  padding-bottom: calc(var(--player-height) + 2rem);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
}

.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.results-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sort-controls select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}

/* Tracks Table */
.tracks-table-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-sm);
}

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

.tracks-table th {
  background: var(--bg-tertiary);
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.tracks-table td {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.tracks-table tbody tr {
  transition: background-color 0.15s ease;
  cursor: pointer;
}

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

.tracks-table tbody tr.playing {
  background: rgba(139, 92, 246, 0.12);
}

.tracks-table tbody tr.playing .track-title-cell {
  color: var(--accent-light);
  font-weight: 700;
}

/* Table Cells */
.th-play, .td-play { width: 50px; text-align: center; }
.th-year, .td-year { width: 70px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }
.th-quality, .td-quality { width: 110px; }
.th-actions, .td-actions { width: 90px; text-align: right; }

.track-num-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.row-play-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.tracks-table tbody tr:hover .track-num-text {
  display: none;
}
.tracks-table tbody tr:hover .row-play-btn {
  display: flex;
}

/* Playing row shows mini equalizer */
.row-equalizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.row-equalizer span {
  width: 3px;
  background: var(--accent-light);
  border-radius: 1px;
  animation: bounce 0.8s infinite ease-in-out alternate;
}
.row-equalizer span:nth-child(2) { animation-delay: 0.2s; }
.row-equalizer span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0% { height: 3px; }
  100% { height: 14px; }
}

.track-main-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.track-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-tertiary);
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.track-details {
  display: flex;
  flex-direction: column;
}

.track-title-cell {
  color: var(--text-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.track-feat {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.clickable-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}
.clickable-link:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

/* Badges */
.flac-badge {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.lossy-badge {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.trending-play-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: #ff9800;
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.25);
  border-radius: 4px;
  padding: 1px 5px;
  margin-top: 3px;
  width: fit-content;
  font-weight: 600;
  line-height: 1.2;
  transition: transform 0.25s ease, background 0.3s ease, color 0.3s ease;
}

.trending-play-badge.badge-bump {
  animation: badgePulse 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badgePulse {
  0% { transform: scale(1); background: rgba(255, 152, 0, 0.1); }
  40% { transform: scale(1.22); background: rgba(255, 152, 0, 0.35); box-shadow: 0 0 10px rgba(255, 152, 0, 0.6); }
  100% { transform: scale(1); background: rgba(255, 152, 0, 0.1); }
}

.track-num-text.top-rank {
  color: #ff9800;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(255, 152, 0, 0.4);
}

/* Real-time Dynamic Rank Shift Animations */
#tracksTable tbody tr {
  will-change: transform;
}

#tracksTable tbody tr.rank-shift-up {
  background: rgba(255, 152, 0, 0.14) !important;
  animation: rankShiftUpGlow 1.2s ease-out forwards;
}

#tracksTable tbody tr.rank-shift-down {
  background: rgba(255, 255, 255, 0.04) !important;
  animation: rankShiftDownFade 1.2s ease-out forwards;
}

@keyframes rankShiftUpGlow {
  0% { background: rgba(255, 152, 0, 0.22); }
  100% { background: transparent; }
}

@keyframes rankShiftDownFade {
  0% { background: rgba(255, 255, 255, 0.08); }
  100% { background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  #tracksTable tbody tr {
    transition: none !important;
    transform: none !important;
  }
  .trending-play-badge.badge-bump {
    animation: none !important;
  }
}

/* Row Action Buttons */
.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.row-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.row-action-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* See More Tracks Button Container */
.see-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 2.25rem 1rem 1.5rem;
}

.see-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
  transition: all 0.2s ease;
}

.see-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(139, 92, 246, 0.6);
}

.see-more-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

/* Albums Grid View */
.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1.5rem;
}

.album-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.album-card:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.album-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: var(--bg-primary);
}

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

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

.album-play-overlay {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.5);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

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

.album-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.album-artist {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.album-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Artists Grid View */
.artists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}

.artist-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.artist-card:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.artist-share-btn,
.album-share-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 2;
}

.artist-card:hover .artist-share-btn,
.album-card:hover .album-share-btn {
  opacity: 1;
}

.artist-share-btn:hover,
.album-share-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: scale(1.1);
}

@media (hover: none) {
  .artist-share-btn,
  .album-share-btn {
    opacity: 0.85;
  }
}

.share-filter-btn {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.share-filter-btn:hover {
  background: var(--accent);
  color: #fff;
}

.artist-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.85rem;
  border: 3px solid var(--bg-tertiary);
  box-shadow: var(--shadow-sm);
}

.artist-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.artist-card-count {
  font-size: 0.75rem;
  color: var(--accent-light);
  font-weight: 600;
}

/* No Results State */
.no-results {
  text-align: center;
  padding: 4rem 1rem;
}
.no-results-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}
.no-results h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.no-results p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.primary-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  cursor: pointer;
}

/* Side Drawer: Up Next Queue */
.queue-drawer {
  position: fixed;
  top: 0;
  right: -360px;
  width: 360px;
  height: calc(100vh - var(--player-height));
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  border-left: 1px solid var(--border-color);
  z-index: 60;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.queue-drawer.open {
  right: 0;
}

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

.queue-header h3 {
  font-size: 1.1rem;
}

.queue-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.text-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
}
.text-btn:hover { color: var(--text-primary); }

.queue-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
}
.queue-item:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}
.queue-item.current {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.1);
}
.queue-thumb {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  object-fit: cover;
}
.queue-info {
  flex: 1;
  overflow: hidden;
}
.queue-title {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.queue-artist {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.queue-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

/* Audio Visualizer Canvas */
.visualizer-canvas {
  position: fixed;
  bottom: var(--player-height);
  left: 0;
  width: 100%;
  height: 90px;
  pointer-events: none;
  z-index: 10;
  opacity: 0.85;
  display: none;
}
.visualizer-canvas.active {
  display: block;
}

#themeToggleBtn.active {
  color: var(--accent-light);
  background: rgba(139, 92, 246, 0.25);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.5);
}

/* Sticky Bottom Player Bar */
.player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--player-height);
  background: rgba(15, 20, 30, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-color);
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 1.5rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

/* Player Left: Track Details */
.player-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1 1 340px;
  min-width: 0;
  max-width: 440px;
}

.now-playing-cover {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-tertiary);
  flex-shrink: 0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

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

.cover-visualizer-bars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.cover-visualizer-bars.playing {
  display: flex;
}
.cover-visualizer-bars span {
  width: 4px;
  height: 16px;
  background: #fff;
  border-radius: 2px;
  animation: bounce 0.8s infinite ease-in-out alternate;
}
.cover-visualizer-bars span:nth-child(2) { animation-delay: 0.2s; }
.cover-visualizer-bars span:nth-child(3) { animation-delay: 0.4s; }

.now-playing-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.track-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.player-track-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.quality-badge {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  flex-shrink: 0;
}

.player-meta-row {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.player-artist {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  max-width: 55%;
  cursor: pointer;
  transition: color 0.15s ease;
}
.player-album {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  cursor: pointer;
  transition: color 0.15s ease;
}
.player-artist:hover,
.player-album:hover,
.player-link-item:hover {
  color: var(--text-primary);
  text-decoration: underline;
}
.player-link-item {
  cursor: pointer;
  transition: color 0.15s ease;
}
.player-cover-wrap {
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.player-cover-wrap:hover {
  transform: scale(1.05);
}
.bullet { font-size: 0.6rem; opacity: 0.5; }

/* Player Center: Controls & Progress */
.player-center {
  flex: 1;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.control-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: var(--radius-full);
  transition: all 0.15s ease;
  position: relative;
}

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

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

.repeat-one-indicator {
  position: absolute;
  top: 0px;
  right: 0px;
  font-size: 0.6rem;
  font-weight: 800;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn {
  background: #fff;
  color: #000;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(255, 255, 255, 0.3);
}

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

/* Spinner */
.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Seek Slider & Progress Bar */
.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
}

.time-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 34px;
  text-align: center;
}

.seek-slider-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  height: 16px;
}

.buffer-bar {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  width: 0%;
  pointer-events: none;
  transition: width 0.2s ease;
}

.seek-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  outline: none;
  position: relative;
  z-index: 2;
  cursor: pointer;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 100%;
  background-repeat: no-repeat;
}

.seek-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: all 0.15s ease;
}

.seek-slider-wrap:hover .seek-slider::-webkit-slider-thumb {
  opacity: 1;
  transform: scale(1.15);
}

.seek-slider-wrap:hover .seek-slider {
  height: 6px;
}

/* Player Right: Volume & Download */
.player-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  width: 240px;
  flex-shrink: 0;
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 85px;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
  background-image: linear-gradient(var(--text-secondary), var(--text-secondary));
  background-size: 85% 100%;
  background-repeat: no-repeat;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.volume-container:hover .volume-slider::-webkit-slider-thumb {
  opacity: 1;
}

.download-btn:hover {
  color: var(--green);
  border-color: var(--green);
}

/* Floating Toast Notification */
.toast {
  position: fixed;
  bottom: calc(var(--player-height) + 1.25rem);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-hover);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================================================
   Responsive Mobile Media Queries
   ========================================================================== */

@media (max-width: 900px) {
  .th-year, .td-year,
  .th-quality, .td-quality {
    display: none;
  }
  
  .player-right .volume-container {
    display: none;
  }
  
  .player-left {
    flex: 1 1 240px;
    min-width: 140px;
    max-width: 320px;
  }
  .player-right {
    width: auto;
  }
}

@media (max-width: 768px) {
  :root {
    --player-height: 106px;
    --header-height: 56px;
  }
  
  .app-header {
    padding: 0 0.85rem;
    gap: 0.6rem;
  }
  
  .header-left {
    flex-shrink: 0;
  }

  .brand-text, .search-shortcut, .stats-badge {
    display: none;
  }

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

  .search-box {
    padding: 0.35rem 0.65rem;
  }

  .search-box input {
    font-size: 0.82rem;
    padding: 0.2rem 0.35rem;
  }

  .header-right {
    flex-shrink: 0;
    gap: 0.45rem;
    display: flex;
    align-items: center;
  }

  .icon-btn {
    width: 35px;
    height: 35px;
    min-width: 35px;
    padding: 0;
    flex-shrink: 0;
  }
  
  .sub-nav {
    padding: 0 0.85rem;
    gap: 0.5rem;
  }
  
  .main-content {
    padding: 0.85rem;
    padding-bottom: calc(var(--player-height) + 1.5rem);
  }
  
  /* Tracks Table: Enable horizontal swipe/sliding so all song details (album, year, format, actions) are accessible */
  .tracks-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    border-radius: var(--radius-md);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
  }

  .tracks-table-container::-webkit-scrollbar {
    height: 4px;
  }

  .tracks-table-container::-webkit-scrollbar-track {
    background: transparent;
  }

  .tracks-table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
  }

  .tracks-table {
    min-width: 680px;
    width: 100%;
  }

  /* Explicitly unhide all columns on mobile so horizontal sliding exposes full track info */
  .th-play, .td-play,
  .th-title, .td-title,
  .th-artist, .td-artist,
  .th-album, .td-album,
  .th-year, .td-year,
  .th-quality, .td-quality,
  .th-actions, .td-actions {
    display: table-cell !important;
  }

  .th-play, .td-play {
    width: 44px;
    min-width: 44px;
    text-align: center;
  }

  .th-title, .td-title {
    min-width: 170px;
  }

  .th-artist, .td-artist {
    min-width: 120px;
    white-space: nowrap;
  }

  .th-album, .td-album {
    min-width: 120px;
    white-space: nowrap;
  }

  .th-year, .td-year {
    width: 58px;
    min-width: 58px;
    text-align: center;
  }

  .th-quality, .td-quality {
    width: 78px;
    min-width: 78px;
    text-align: center;
  }

  .th-actions, .td-actions {
    width: 90px;
    min-width: 90px;
    text-align: right;
  }

  .row-action-btn {
    padding: 6px;
  }

  /* Mobile Player Bar: 2-Tier Stacked Layout
     Tier 1 (Top): Cover art thumbnail + Title + Artist/Album badge
     Tier 2 (Downside): Full-width toolbar with Shuffle, Prev, Play/Pause, Next, Repeat, Share, Download */
  .player-bar {
    padding: 0.45rem 0.85rem 0.45rem;
    height: var(--player-height);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    box-sizing: border-box;
    background: rgba(13, 17, 23, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    z-index: 70;
  }

  /* Full-width scrub bar pinned to top edge of mobile player */
  .progress-bar-container {
    position: absolute;
    top: -3px;
    left: 0;
    width: 100%;
    height: 6px;
    padding: 0;
    margin: 0;
    z-index: 10;
  }

  .progress-bar-container .time-label {
    display: none;
  }

  .seek-slider-wrap {
    height: 6px;
    border-radius: 0;
  }

  .seek-slider {
    height: 6px;
    border-radius: 0;
  }

  .seek-slider::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    opacity: 1;
  }

  /* Tier 1 (Top): Now Playing Info spanning 100% width */
  .player-left {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    height: 42px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0.25rem;
    margin-bottom: 0.15rem;
  }

  .now-playing-cover {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

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

  .player-track-title {
    font-size: 0.88rem;
  }

  .player-meta-row {
    font-size: 0.74rem;
    gap: 0.25rem;
  }

  .player-artist {
    max-width: 55%;
  }

  /* Tier 2 (Downside below player): Playback controls and action buttons */
  .player-center {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 46px;
    max-width: none;
    position: static;
    gap: 0;
    min-width: 0;
  }

  .player-controls {
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    gap: 0.25rem;
  }

  /* Ensure shuffle, prev, play, next, repeat are all visible and comfortably sized */
  #shuffleBtn, #prevBtn, #repeatBtn {
    display: flex !important;
  }

  .play-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.25);
  }

  .control-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }

  /* Downside right actions: Share & Download */
  .player-right {
    flex: 0 0 auto;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    height: 46px;
    width: auto;
    margin-left: 0.35rem;
  }

  .player-right .volume-container,
  .player-right .eq-btn {
    display: none !important;
  }

  .player-right #playerShareBtn,
  .player-right #playerDownloadBtn {
    display: flex !important;
    width: 34px;
    height: 34px;
    min-width: 34px;
    align-items: center;
    justify-content: center;
  }
  
  .queue-drawer {
    width: 100%;
    right: -100%;
  }
  
  .albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.artists-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

  .credits-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .credits-card {
    padding: 1.25rem 1rem;
  }
}

@media (max-width: 420px) {
  .brand-flag {
    font-size: 1.4rem;
  }
  
  .app-header {
    padding: 0 0.5rem;
    gap: 0.4rem;
  }

  .search-box input {
    font-size: 0.78rem;
    padding: 0.15rem 0.25rem;
  }

  .icon-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }

  .player-bar {
    padding: 0.35rem 0.5rem 0.4rem;
  }

  .now-playing-cover {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .player-left {
    width: 100%;
    max-width: 100%;
    gap: 0.5rem;
  }

  .play-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .control-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }

  .player-right #playerShareBtn,
  .player-right #playerDownloadBtn {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }

  .player-controls {
    gap: 0.15rem;
  }
}


/* ==========================================================================
   Credits & Acknowledgements Section & Modal
   ========================================================================== */

.credits-section {
  margin-top: 3.5rem;
  margin-bottom: 2rem;
}

.credits-card {
  background: linear-gradient(135deg, rgba(26, 31, 46, 0.75) 0%, rgba(17, 24, 39, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.credits-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #10b981 0%, #8b5cf6 50%, #ec4899 100%);
  opacity: 0.8;
}

.credits-header {
  margin-bottom: 1.5rem;
}

.credits-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c084fc;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.credits-intro {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  width: 100%;
  max-width: 100%;
  text-wrap: pretty;
}

.credits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.credit-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.credit-item:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
}

.credit-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cd-glow {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.art-glow {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.dev-glow {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.credit-role {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.credit-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.credit-link {
  color: #38bdf8;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.15s ease;
}

.credit-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

.credit-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.credit-text strong {
  color: #ffffff;
}

/* Credits Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}

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

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  animation: modalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

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

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

.modal-title-wrap h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 2px;
}

.modal-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-light);
  letter-spacing: 0.05em;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-lead {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.credits-modal-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.credit-modal-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
}

.credit-modal-card.cd-border {
  border-left: 3px solid #22d3ee;
}

.credit-modal-card.art-border {
  border-left: 3px solid #c084fc;
}

.credit-modal-card.dev-border {
  border-left: 3px solid #34d399;
}

.credit-modal-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.credit-modal-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.credit-modal-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.modal-footer {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Full-Screen Immersive Landing Page & Manifesto Overlay
   ========================================================================== */
.landing-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: radial-gradient(circle at 50% 12%, rgba(139, 92, 246, 0.22) 0%, rgba(9, 13, 22, 0.98) 55%), #06090e;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem 1.5rem 5rem;
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.4s;
  cursor: default;
}

.landing-overlay.dismissed {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  pointer-events: none;
}

.landing-container {
  width: 100%;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  margin: auto 0;
  cursor: default;
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.landing-flag {
  font-size: 1.8rem;
  line-height: 1;
}

.landing-brand-text {
  display: flex;
  flex-direction: column;
}

.landing-brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.landing-brand-sub {
  font-size: 0.74rem;
  color: var(--accent-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.landing-skip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.landing-skip-btn:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: var(--accent-light);
  transform: translateY(-1px);
}

.landing-skip-key {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.landing-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #c084fc;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.25);
}

.sparkle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.landing-headline {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.landing-manifesto-card {
  position: relative;
  background: linear-gradient(145deg, rgba(26, 32, 48, 0.85) 0%, rgba(15, 21, 35, 0.95) 100%);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2.5rem;
  text-align: left;
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  width: 100%;
}

.landing-manifesto-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981 0%, #8b5cf6 50%, #ec4899 100%);
}

.manifesto-quote-icon {
  position: absolute;
  top: 0.75rem;
  right: 1.5rem;
  font-size: 5rem;
  line-height: 1;
  font-family: Georgia, serif;
  color: rgba(139, 92, 246, 0.12);
  pointer-events: none;
}

.landing-quote {
  font-size: 1.18rem;
  font-weight: 500;
  color: #f1f5f9;
  line-height: 1.65;
  margin: 0;
  position: relative;
}

.landing-quote strong {
  color: #c084fc;
  font-weight: 700;
}

.landing-gratitude {
  margin-top: 1.15rem;
  font-size: 0.98rem;
  color: #cbd5e1;
  line-height: 1.6;
}

.landing-gratitude strong {
  color: #38bdf8;
}

.landing-curator {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.curator-avatar {
  font-size: 1.6rem;
  line-height: 1;
}

.curator-meta {
  display: flex;
  flex-direction: column;
}

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

.curator-title {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.landing-specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: 100%;
}

.landing-spec-card {
  background: rgba(17, 24, 39, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.landing-spec-card:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
}

.landing-spec-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.landing-spec-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.landing-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding-top: 1rem;
}

.landing-enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
  transition: all 0.25s ease;
}

.landing-enter-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 35px rgba(236, 72, 153, 0.6);
}

.landing-advisory-card {
  position: relative;
  background: linear-gradient(145deg, rgba(35, 27, 15, 0.88) 0%, rgba(20, 18, 26, 0.96) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.7), 0 0 25px rgba(245, 158, 11, 0.08);
  width: 100%;
  overflow: hidden;
}

.landing-advisory-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b 0%, #f97316 50%, #e11d48 100%);
}

.advisory-icon-wrap {
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
  flex-shrink: 0;
}

.advisory-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.advisory-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fbbf24;
}

.pulse-amber-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 8px #f59e0b;
  }
  50% {
    transform: scale(1.25);
    opacity: 0.75;
    box-shadow: 0 0 16px #f59e0b;
  }
}

.advisory-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.35;
}

.advisory-text {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #cbd5e1;
  margin: 0;
}

.advisory-highlight {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #fef08a;
  margin: 0.25rem 0 0;
  padding: 0.85rem 1.1rem;
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid #f59e0b;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.advisory-highlight strong {
  color: #ffffff;
}

.advisory-highlight svg {
  display: inline-block;
  vertical-align: -2px;
  color: #38bdf8;
}

@media (max-width: 860px) {
  .landing-specs-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .landing-manifesto-card {
    padding: 1.5rem;
  }

  .landing-advisory-card {
    flex-direction: column;
    padding: 1.4rem;
    gap: 1rem;
  }

  .advisory-icon-wrap {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .landing-quote {
    font-size: 1.05rem;
  }
  
  .landing-overlay {
    padding: 1.5rem 1rem 4rem;
  }
}

/* --- Direct Song Link Sharing & Glow Animation --- */
.player-bar .share-btn {
  color: var(--text-muted);
}
.player-bar .share-btn:hover {
  color: var(--accent-light);
  background: var(--bg-tertiary);
}

.row-action-btn.share-track-btn:hover {
  color: var(--accent-light);
  background: rgba(139, 92, 246, 0.2);
}

@keyframes trackSharedGlow {
  0% {
    background-color: rgba(139, 92, 246, 0.45);
    box-shadow: inset 0 0 0 2px var(--accent-light);
  }
  60% {
    background-color: rgba(139, 92, 246, 0.25);
    box-shadow: inset 0 0 0 2px var(--accent);
  }
  100% {
    background-color: transparent;
    box-shadow: none;
  }
}

.tracks-table tr.highlight-shared {
  animation: trackSharedGlow 3.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
}

/* --- Album Artwork & Physical Archive Gallery --- */
.album-gallery-section {
  margin-top: 3rem;
  padding: 2rem;
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.7) 0%, rgba(18, 18, 20, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  animation: fadeIn 0.3s ease;
}

.album-gallery-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.gallery-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-light);
  border: 1px solid rgba(139, 92, 246, 0.3);
  margin-bottom: 0.5rem;
}

.gallery-heading {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.35rem;
  letter-spacing: -0.01em;
}

.gallery-subtext {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.gallery-count-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.album-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}

.album-gallery-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.album-gallery-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.25);
}

.gallery-card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #09090b;
  overflow: hidden;
}

.gallery-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.album-gallery-card:hover .gallery-card-thumb {
  transform: scale(1.05);
}

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.album-gallery-card:hover .gallery-card-overlay {
  opacity: 1;
}

.gallery-zoom-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transform: scale(0.85);
  transition: transform 0.2s ease;
}

.album-gallery-card:hover .gallery-zoom-icon {
  transform: scale(1);
}

.gallery-card-info {
  padding: 0.65rem 0.75rem;
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gallery-card-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
}

.lightbox-container {
  position: relative;
  z-index: 10001;
  width: 92vw;
  max-width: 1000px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-right: 0.75rem;
}

.lightbox-counter {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lightbox-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  transition: all 0.15s ease;
}

.lightbox-action-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.lightbox-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lightbox-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.lightbox-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #09090b;
  min-height: 350px;
  max-height: calc(90vh - 70px);
  overflow: hidden;
}

.lightbox-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: calc(90vh - 110px);
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.2s ease;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(24, 24, 27, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.15s ease;
  backdrop-filter: blur(4px);
}

.lightbox-nav-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-nav-btn.prev {
  left: 1rem;
}

.lightbox-nav-btn.next {
  right: 1rem;
}

@media (max-width: 640px) {
  .album-gallery-section {
    padding: 1.25rem 1rem;
  }
  .album-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .lightbox-container {
    width: 96vw;
  }
  .lightbox-nav-btn {
    width: 36px;
    height: 36px;
  }
}

/* ==========================================================================
   Direct Song Link Autoplay Prompt (One-Touch / First-Gesture Playback)
   ========================================================================== */
.direct-autoplay-prompt {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(13, 17, 23, 0.94);
  border: 1px solid rgba(139, 92, 246, 0.45);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(139, 92, 246, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.55rem 1rem 0.55rem 0.65rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  animation: promptSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.25s ease;
  max-width: 90vw;
  user-select: none;
}

.direct-autoplay-prompt:hover {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.8), 0 0 28px rgba(16, 185, 129, 0.35);
  transform: translateX(-50%) translateY(-2px);
}

@keyframes promptSlideUp {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(16px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.autoplay-pulse-ring {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(16, 185, 129, 0.5);
  animation: ringPulse 2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
  pointer-events: none;
}

@keyframes ringPulse {
  0% { transform: translateY(-50%) scale(0.85); opacity: 0.9; }
  100% { transform: translateY(-50%) scale(1.6); opacity: 0; }
}

.autoplay-play-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5);
  transition: transform 0.2s ease, background 0.2s ease;
}

.direct-autoplay-prompt:hover .autoplay-play-icon {
  transform: scale(1.08);
}

.autoplay-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow: hidden;
}

.autoplay-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.autoplay-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse 1.8s infinite;
}

.autoplay-badge-text {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #34d399;
}

.autoplay-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.autoplay-dismiss-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 0.25rem;
  transition: all 0.2s ease;
}

.autoplay-dismiss-btn:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}

@media (max-width: 640px) {
  .direct-autoplay-prompt {
    bottom: calc(var(--player-height) + 12px);
    left: 1rem;
    right: 1rem;
    transform: none;
    max-width: none;
    padding: 0.5rem 0.75rem;
  }
  .direct-autoplay-prompt:hover {
    transform: translateY(-2px);
  }
  @keyframes promptSlideUp {
    0% {
      opacity: 0;
      transform: translateY(16px) scale(0.96);
    }
    100% {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
  .autoplay-title {
    max-width: 200px;
  }
}

/* ==========================================================================
   Precision 10-Band Audio Equalizer (Hardware-Accelerated DSP Engine)
   Modern, sleek, hi-fi studio aesthetic with zero bloat
   ========================================================================== */
.player-bar .eq-btn {
  position: relative;
}

.player-bar .eq-btn.active {
  color: #10b981;
}

.eq-active-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

.eq-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: eqFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes eqFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.eq-panel {
  width: 100%;
  max-width: 680px;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: eqPanelPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes eqPanelPop {
  0% {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.eq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: #161b22;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 0.75rem;
  flex-wrap: wrap;
}

.eq-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.eq-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.06em;
}

.eq-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f0f6fc;
  margin: 0;
  letter-spacing: -0.01em;
}

.eq-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  user-select: none;
  margin-left: 0.35rem;
}

.eq-toggle-wrap input[type=checkbox] {
  display: none;
}

.eq-toggle-slider {
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: #30363d;
  position: relative;
  transition: background 0.2s ease;
}

.eq-toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.eq-toggle-wrap input:checked + .eq-toggle-slider {
  background: #10b981;
}

.eq-toggle-wrap input:checked + .eq-toggle-slider::after {
  transform: translateX(14px);
}

.eq-status-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #8b949e;
  transition: color 0.15s ease;
}

.eq-toggle-wrap input:checked ~ .eq-status-label {
  color: #34d399;
  font-weight: 600;
}

.eq-header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.eq-preset-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.eq-preset-label {
  font-size: 0.75rem;
  color: #8b949e;
  font-weight: 500;
}

.eq-select {
  background: #0d1117;
  color: #e6edf3;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  font-size: 0.78rem;
  padding: 0.3rem 0.6rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
  font-family: inherit;
}

.eq-select:hover, .eq-select:focus {
  border-color: rgba(255, 255, 255, 0.25);
}

.eq-tool-btn {
  background: #21262d;
  color: #c9d1d9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.32rem 0.65rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.eq-tool-btn:hover {
  background: #30363d;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.eq-close-btn {
  background: transparent;
  border: none;
  color: #8b949e;
  font-size: 1.1rem;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.eq-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f0f6fc;
}

.eq-body {
  display: flex;
  align-items: center;
  padding: 1.25rem 1rem 1rem;
  background: #0d1117;
  gap: 0.65rem;
  overflow-x: auto;
  position: relative;
}

.eq-col-separator {
  width: 1px;
  height: 160px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  margin: 0 0.25rem;
}

.eq-bands-rack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 440px;
  gap: 0.35rem;
}

.eq-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  min-width: 36px;
  user-select: none;
  position: relative;
}

.eq-col::before {
  content: '';
  position: absolute;
  top: 88px;
  left: 4px;
  right: 4px;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.eq-gain-val {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: #8b949e;
  text-align: center;
  height: 18px;
  line-height: 18px;
  transition: color 0.15s ease;
}

.eq-gain-val.active-gain {
  color: #38bdf8;
}

.eq-slider-slot {
  position: relative;
  height: 140px;
  width: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eq-level-marks {
  position: absolute;
  left: -14px;
  height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: #6e7681;
  pointer-events: none;
}

.eq-slider-input {
  writing-mode: vertical-lr;
  direction: rtl;
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 130px;
  background: transparent;
  cursor: pointer;
  outline: none;
  margin: 0;
}

.eq-slider-input::-webkit-slider-runnable-track {
  width: 4px;
  height: 130px;
  background: #21262d;
  border-radius: 2px;
}

.eq-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 10px;
  border-radius: 2px;
  background: #cbd5e1;
  border: 1px solid #475569;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  cursor: ns-resize;
  margin-left: -8px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.eq-slider-input:focus::-webkit-slider-thumb,
.eq-slider-input:hover::-webkit-slider-thumb {
  background: #10b981;
  border-color: #059669;
}

.eq-slider-input::-moz-range-track {
  width: 4px;
  height: 130px;
  background: #21262d;
  border-radius: 2px;
}

.eq-slider-input::-moz-range-thumb {
  width: 20px;
  height: 10px;
  border-radius: 2px;
  background: #cbd5e1;
  border: 1px solid #475569;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  cursor: ns-resize;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.eq-slider-input:focus::-moz-range-thumb,
.eq-slider-input:hover::-moz-range-thumb {
  background: #10b981;
  border-color: #059669;
}

.eq-freq-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: #7d8590;
  text-align: center;
  margin-top: 0.2rem;
}

.preamp-col .eq-freq-badge {
  color: #e6edf3;
  font-size: 0.64rem;
}

.eq-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.25rem;
  background: #080b0f;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #6e7681;
}

.eq-flac-indicator {
  color: #10b981;
}

/* ==========================================================================
   Spotify-Style Share to Story & Web Card Modal Dialog
   ========================================================================== */

dialog.story-share-dialog {
  border: none;
  padding: 0;
  background: transparent;
  color: var(--text-primary);
  margin: auto;
  max-width: 96vw;
  max-height: 94vh;
  border-radius: var(--radius-lg);
  outline: none;
  overflow: visible;
}

dialog.story-share-dialog::backdrop {
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.story-dialog-box {
  position: relative;
  background: #0f121d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(139, 92, 246, 0.15);
  display: flex;
  flex-direction: column;
  width: 780px;
  max-width: 95vw;
  max-height: 92vh;
  overflow: hidden;
  animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-close-float {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: all 0.15s ease;
}

.story-close-float:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: scale(1.06);
}

.story-dialog-body {
  padding: 1.35rem;
  display: flex;
  gap: 1.35rem;
  overflow-y: auto;
  align-items: flex-start;
}

/* 400x300 Preview Column */
.story-preview-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 400px;
  max-width: 100%;
}

/* Format switch tabs */
.story-format-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.story-format-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  white-space: nowrap;
}

.story-format-tab.active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.story-format-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* 400x300 Frame Constraint */
.story-preview-frame {
  width: 400px;
  height: 300px;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.12);
  position: relative;
  background: #08090d;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.story-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 14, 20, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  transition: opacity 0.2s ease;
}

.story-loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.story-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(139, 92, 246, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}



.story-actions-col {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.story-track-info-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.story-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

.story-meta-artist {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.story-meta-badge {
  font-size: 0.64rem;
  color: #22d3ee;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Multi-Platform Social Grid */
.story-social-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.45rem;
}

.story-social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0.55rem 0.2rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.story-social-btn svg {
  width: 18px;
  height: 18px;
}

.story-social-btn span {
  font-size: 0.62rem;
  font-weight: 600;
  white-space: nowrap;
}

.story-social-btn:hover {
  transform: translateY(-2px);
  color: #ffffff;
}

.story-social-btn.whatsapp:hover {
  background: #25d366;
  border-color: #25d366;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.story-social-btn.telegram:hover {
  background: #229ed9;
  border-color: #229ed9;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(34, 158, 217, 0.35);
}

.story-social-btn.facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.35);
}

.story-social-btn.x-twitter:hover {
  background: #0f1419;
  border-color: #536471;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}

.story-social-btn.reddit:hover {
  background: #ff4500;
  border-color: #ff4500;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 69, 0, 0.35);
}

.story-buttons-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.story-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-btn svg {
  flex-shrink: 0;
}

.story-btn-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.story-btn-text strong {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
}

.story-btn-text small {
  font-size: 0.7rem;
  opacity: 0.75;
  line-height: 1.2;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-primary-btn {
  background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.story-primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.55);
  filter: brightness(1.08);
}

.story-secondary-btn {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.story-secondary-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.story-fb-btn {
  background: #1877f2;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.story-fb-btn:hover {
  background: #166fe5;
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.story-link-btn {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.story-link-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
}

@media (max-width: 768px) {
  .story-dialog-box {
    width: 100%;
    max-width: 95vw;
  }
  .story-dialog-body {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    gap: 1rem;
  }
  .story-preview-col {
    width: 100%;
  }
  .story-preview-frame {
    width: 100%;
    max-width: 380px;
    height: auto;
    aspect-ratio: 4 / 3;
  }
  .story-actions-col {
    width: 100%;
    min-width: 0;
  }
}
