/* ==========================================
   Karaoke Lover — Premium Dark Theme
   ========================================== */

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

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

:root {
  --bg:         #07070e;
  --glass:      rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.08);
  --glass-hover:  rgba(255,255,255,0.07);
  --p1:         #9333EA;
  --p2:         #EC4899;
  --p3:         #06B6D4;
  --grad:       linear-gradient(135deg, #9333EA, #EC4899);
  --grad-h:     linear-gradient(135deg, #7E22CE, #DB2777);
  --grad-3:     linear-gradient(135deg, #9333EA, #EC4899, #06B6D4);
  --text:       #eeeef8;
  --muted:      #7878a0;
  --border:     rgba(255,255,255,0.07);
  --radius:     16px;
  --radius-sm:  10px;
  --shadow:     0 8px 32px rgba(0,0,0,0.6);
  --glow:       0 0 40px rgba(147,51,234,0.2);
  --glow-hot:   0 0 60px rgba(147,51,234,0.4);
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* everything sits above the background layers */
header, section, footer, .loading-overlay,
.empty-state, .error-state, .results-section { position: relative; z-index: 1; }

.section-wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(147,51,234,0.4); border-radius: 4px; }

/* ==========================================
   ANIMATED BACKGROUND
   ========================================== */

.bg-orbs {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orb-float 18s ease-in-out infinite alternate;
}

.orb1 {
  width: 700px; height: 500px;
  background: radial-gradient(circle, rgba(147,51,234,0.12), transparent 70%);
  top: -150px; left: -100px;
  animation-duration: 20s;
}
.orb2 {
  width: 500px; height: 600px;
  background: radial-gradient(circle, rgba(236,72,153,0.09), transparent 70%);
  top: 30%; right: -150px;
  animation-duration: 15s; animation-delay: -5s;
}
.orb3 {
  width: 600px; height: 400px;
  background: radial-gradient(circle, rgba(6,182,212,0.07), transparent 70%);
  bottom: 0; left: 30%;
  animation-duration: 25s; animation-delay: -10s;
}

@keyframes orb-float {
  0%   { transform: translate(0,0) scale(1); }
  33%  { transform: translate(-30px, 20px) scale(1.05); }
  66%  { transform: translate(20px, -30px) scale(0.95); }
  100% { transform: translate(-10px, 15px) scale(1.02); }
}

.bg-grid {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(147,51,234,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147,51,234,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ==========================================
   FLOATING PARTICLES
   ========================================== */

.particles {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}

.particle {
  position: absolute;
  bottom: -60px;
  animation: particle-rise linear infinite;
  user-select: none;
  font-style: normal;
}

@keyframes particle-rise {
  0%   { transform: translateY(0) rotate(0deg) scale(0.8); opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { transform: translateY(-110vh) rotate(540deg) scale(1.2); opacity: 0; }
}

/* ==========================================
   HEADER
   ========================================== */

.header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(7,7,14,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.header-inner {
  max-width: 1120px; margin: 0 auto;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

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

.logo-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 10px rgba(147,51,234,0.8));
  animation: mic-pulse 3s ease-in-out infinite;
}

@keyframes mic-pulse {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(147,51,234,0.8)); }
  50%       { filter: drop-shadow(0 0 20px rgba(236,72,153,1)); }
}

.logo-words { display: flex; flex-direction: column; line-height: 1; }

.logo-text {
  font-size: 20px; font-weight: 800; letter-spacing: -0.5px;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}

.logo-sub {
  font-size: 10px; font-weight: 500; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted); margin-top: 2px;
}

/* Keyboard hints */
.kbd-hints {
  font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 4px;
}

.kbd {
  display: inline-block;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 11px; font-family: inherit;
  color: var(--text);
}

/* Equalizer */
.equalizer {
  display: none; align-items: flex-end; gap: 3px; height: 26px;
}
.equalizer.playing { display: flex; }

.eq-bar {
  width: 4px; border-radius: 2px;
  background: var(--grad);
  animation: eq-dance 0.7s ease-in-out infinite alternate;
  transform-origin: bottom;
}
.eq-bar:nth-child(1) { height: 8px;  animation-duration: 0.55s; animation-delay: 0s; }
.eq-bar:nth-child(2) { height: 18px; animation-duration: 0.80s; animation-delay: 0.1s; }
.eq-bar:nth-child(3) { height: 24px; animation-duration: 0.60s; animation-delay: 0.2s; }
.eq-bar:nth-child(4) { height: 14px; animation-duration: 0.95s; animation-delay: 0.05s; }
.eq-bar:nth-child(5) { height: 20px; animation-duration: 0.70s; animation-delay: 0.15s; }
.eq-bar:nth-child(6) { height: 10px; animation-duration: 0.85s; animation-delay: 0.25s; }
.eq-bar:nth-child(7) { height: 16px; animation-duration: 0.65s; animation-delay: 0.08s; }

@keyframes eq-dance {
  from { transform: scaleY(0.2); }
  to   { transform: scaleY(1); }
}

/* ==========================================
   HERO
   ========================================== */

.hero {
  text-align: center;
  padding: 80px 24px 64px;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 80%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(147,51,234,0.3), transparent);
}

.hero-badge {
  display: inline-block;
  background: rgba(147,51,234,0.12);
  border: 1px solid rgba(147,51,234,0.35);
  color: #d8b4fe;
  font-size: 12px; font-weight: 600; letter-spacing: 0.8px;
  padding: 7px 18px; border-radius: 20px;
  margin-bottom: 24px;
  box-shadow: 0 0 20px rgba(147,51,234,0.15);
  animation: badge-glow 3s ease-in-out infinite;
}
@keyframes badge-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(147,51,234,0.15); }
  50%       { box-shadow: 0 0 30px rgba(236,72,153,0.25); }
}

.hero-title {
  font-size: clamp(32px, 6vw, 60px);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 8px;
}

.hero-title-accent {
  background: var(--grad-3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 17px; font-weight: 400;
  color: var(--muted);
  margin-bottom: 40px;
}

/* ---- Search Bar ---- */

.search-form { max-width: 700px; margin: 0 auto 24px; }

.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1.5px solid var(--glass-border);
  border-radius: 60px;
  padding: 6px 6px 6px 22px;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.05);
}

.search-bar:focus-within {
  border-color: rgba(147,51,234,0.6);
  box-shadow: var(--shadow), var(--glow), inset 0 1px 0 rgba(255,255,255,0.05);
}

.search-icon { font-size: 18px; opacity: 0.5; flex-shrink: 0; }

/* Search input wrapper (relative anchor for dropdown) */
.search-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 16px; font-family: 'Outfit', sans-serif;
  font-weight: 500; padding: 12px 0;
}
.search-input::placeholder { color: var(--muted); font-weight: 400; }

/* ---- Search history dropdown ---- */
.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: -52px; /* align to search-bar left edge (accounts for icon width) */
  right: -120px; /* extend past the search-btn area */
  background: rgba(8, 5, 20, 0.95);
  backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(147,51,234,0.3);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.7), 0 0 0 1px rgba(147,51,234,0.1);
  z-index: 200;
  overflow: hidden;
  animation: sd-in 0.18s cubic-bezier(0.34,1.4,0.64,1);
}
.search-dropdown.open { display: block; }
/* Hide filter bar + popular section when search history dropdown is open */
.search-form.dropdown-open ~ .filter-bar,
.search-form.dropdown-open ~ .quick-picks {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}
.filter-bar, .quick-picks {
  transition: opacity 0.15s ease, visibility 0.15s ease;
  visibility: visible;
}
@keyframes sd-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.sd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.045);
}
.sd-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(120deg, rgba(167,139,250,0.8), rgba(236,72,153,0.65));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sd-clear {
  background: none;
  border: none;
  color: rgba(147,51,234,0.45);
  font-size: 11px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.sd-clear:hover { color: #EC4899; background: rgba(236,72,153,0.08); }
.sd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.sd-item:hover { background: rgba(147,51,234,0.1); }
.sd-item:last-child { border-radius: 0 0 16px 16px; }
.sd-item-icon {
  font-size: 12px;
  opacity: 0.4;
  flex-shrink: 0;
}
.sd-item-text {
  font-size: 13px;
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  color: rgba(180,165,220,0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}
.sd-item:hover .sd-item-text { color: #e9d5ff; }
@media (max-width: 640px) {
  .search-dropdown { left: -36px; right: 0; }
}

.search-btn {
  background: var(--grad);
  color: #fff; border: none; border-radius: 50px;
  padding: 13px 28px;
  font-size: 15px; font-weight: 700; font-family: 'Outfit', sans-serif;
  cursor: pointer; display: flex; align-items: center; gap: 7px; flex-shrink: 0;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(147,51,234,0.4);
}
.search-btn:hover  { background: var(--grad-h); transform: translateY(-1px); box-shadow: 0 6px 28px rgba(147,51,234,0.5); }
.search-btn:active { transform: translateY(0); }
.search-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---- Popular / Quick picks ---- */

.quick-picks {
  max-width: 700px;
  margin: 4px auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qp-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.qp-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(147,51,234,0.35), transparent);
}

.qp-chip {
  flex-shrink: 0;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
  color: rgba(180,165,220,0.62);
  font-size: 12.5px;
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
  padding: 7px 16px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.15s, box-shadow 0.18s;
}
.qp-chip:hover {
  background: rgba(147,51,234,0.15);
  border-color: rgba(147,51,234,0.45);
  color: #ddd6fe;
  transform: translateY(-1px);
  box-shadow: 0 3px 14px rgba(147,51,234,0.2);
}

/* ==========================================
   CONTINUE SINGING (History)
   ========================================== */

/* Resume banner */
.resume-banner {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 0; padding: 11px 16px;
  background: rgba(139,92,246,0.15); border: 1px solid rgba(139,92,246,0.4);
  border-radius: 14px; backdrop-filter: blur(12px);
  animation: fade-up 0.3s ease;
}
.resume-banner-icon { font-size: 16px; }
.resume-banner-text { flex: 1; font-size: 13px; color: rgba(255,255,255,0.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resume-banner-btn {
  padding: 6px 14px; border-radius: 20px; border: none; cursor: pointer;
  background: linear-gradient(135deg,#a855f7,#ec4899); color: #fff;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.resume-banner-dismiss {
  background: none; border: none; color: rgba(255,255,255,0.4);
  font-size: 14px; cursor: pointer; padding: 2px 4px; line-height: 1;
}
.resume-banner-dismiss:hover { color: #fff; }

.history-section { padding: 16px 0 36px; animation: fade-up 0.3s ease; }

.strip-heading {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.8px; color: var(--muted); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.strip-heading::after {
  content: '';
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.history-strip {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px;
}

.history-card {
  flex-shrink: 0; width: 140px; cursor: pointer;
  border-radius: 12px; overflow: hidden;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.history-card:hover {
  transform: translateY(-4px);
  border-color: rgba(147,51,234,0.5);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 16px rgba(147,51,234,0.15);
}
.history-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.history-card-title {
  font-size: 11px; padding: 8px 9px; line-height: 1.4; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ==========================================
   PLAYER SECTION
   ========================================== */

.player-section { padding: 32px 0 0; animation: fade-up 0.35s ease; }

.player-container {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid; grid-template-columns: 1fr 300px;
  box-shadow: var(--shadow), var(--glow-hot);
  position: relative;
}

/* animated gradient border on playing */
.player-container::before {
  content: '';
  position: absolute; inset: -1px;
  background: var(--grad-3);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.player-container.playing::before { opacity: 1; }
.player-container.playing { border-color: transparent; }

.player-wrap {
  position: relative; width: 100%; padding-top: 56.25%; background: #000;
}
.player-wrap iframe,
.player-wrap #ytPlayer {
  position: absolute; top: 0; left: 0;
  width: 100% !important; height: 100% !important;
}

.player-info {
  padding: 28px 24px;
  display: flex; flex-direction: column; gap: 14px;
  border-left: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
}

.now-playing-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(147,51,234,0.15);
  border: 1px solid rgba(147,51,234,0.35);
  color: #c084fc;
  font-size: 10px; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase; padding: 6px 12px; border-radius: 20px;
  width: fit-content;
}

.npb-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #c084fc;
  animation: npb-blink 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes npb-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

.player-title {
  font-size: 15px; font-weight: 700; line-height: 1.45; color: var(--text);
}
.player-channel { font-size: 13px; color: var(--muted); }

.player-nav {
  display: flex; gap: 8px; align-items: center;
}

.player-nav-btn {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--muted); font-size: 16px;
  width: 38px; height: 38px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.player-nav-btn:hover {
  background: rgba(147,51,234,0.2);
  border-color: rgba(147,51,234,0.5);
  color: #c084fc;
}
.player-nav-btn.shuffle-active { color: #c084fc; border-color: rgba(147,51,234,0.4); }

.player-actions { margin-top: auto; }

.close-player-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted); border-radius: var(--radius-sm);
  padding: 8px 14px; font-size: 13px; font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.close-player-btn:hover { border-color: #EC4899; color: #EC4899; }

/* ==========================================
   LYRICS SECTION
   ========================================== */

.lyrics-section { padding: 20px 0 32px; animation: fade-up 0.4s ease; }

.lyrics-card {
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(147,51,234,0.2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 50px rgba(147,51,234,0.08);
}

.lyrics-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(147,51,234,0.08), rgba(236,72,153,0.05));
}

.lyrics-header-left { display: flex; align-items: center; gap: 14px; }

.lyrics-icon {
  font-size: 26px;
  filter: drop-shadow(0 0 8px rgba(147,51,234,0.7));
}

.lyrics-title {
  font-size: 16px; font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.lyrics-artist { font-size: 13px; color: var(--muted); margin-top: 2px; }

.lyrics-expand-btn {
  background: rgba(147,51,234,0.12);
  border: 1px solid rgba(147,51,234,0.3);
  color: #c084fc; font-size: 12px; font-weight: 700;
  font-family: 'Outfit', sans-serif;
  padding: 7px 14px; border-radius: 20px; cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
  letter-spacing: 0.3px;
}
.lyrics-expand-btn:hover {
  background: rgba(147,51,234,0.25);
  box-shadow: 0 0 16px rgba(147,51,234,0.3);
}

.lyrics-body {
  max-height: 380px; overflow-y: auto;
  padding: 24px; position: relative;
}
.lyrics-body::after {
  content: '';
  position: sticky; bottom: 0; left: 0; display: block;
  height: 56px; margin-top: -56px;
  background: linear-gradient(to bottom, transparent, rgba(12,12,20,0.95));
  pointer-events: none;
}

/* Skeleton */
.lyrics-skeleton {
  height: 13px;
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(147,51,234,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  border-radius: 6px; margin-bottom: 11px;
  animation: shimmer 1.4s infinite;
}
.lyrics-skeleton.short  { width: 50%; }
.lyrics-skeleton.medium { width: 72%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Lyrics text */
.lyrics-text {
  font-size: 15px; line-height: 2; letter-spacing: 0.1px;
  color: #cccce8; white-space: pre-wrap; word-break: break-word;
  font-weight: 400;
}
.chorus-line {
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  font-weight: 700; font-size: 16px;
}
.lyrics-not-found {
  text-align: center; padding: 40px 0; color: var(--muted);
}
.lyrics-not-found span { display: block; font-size: 40px; margin-bottom: 12px; opacity: 0.4; }

/* ==========================================
   SING MODE (fullscreen)
   ========================================== */

.sing-mode {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(5, 5, 12, 0.97);
  backdrop-filter: blur(30px);
  display: flex; flex-direction: column;
  overflow: hidden;
}

.sing-close {
  position: absolute; top: 20px; right: 24px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--glass-border);
  color: var(--muted); font-size: 16px;
  width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: color var(--transition), background var(--transition);
  z-index: 10;
}
.sing-close:hover { background: rgba(236,72,153,0.2); color: #EC4899; }

.sing-header {
  padding: 28px 64px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
  flex-shrink: 0;
}
.sing-title {
  font-size: 22px; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.sing-artist { font-size: 14px; color: var(--muted); }

.sing-body {
  flex: 1; overflow-y: auto;
  padding: 40px 64px 80px;
  font-size: clamp(18px, 2.5vw, 24px);
  line-height: 2.2; color: #ddddf0;
  white-space: pre-wrap; font-weight: 400;
  letter-spacing: 0.2px;
}
.sing-body .chorus-line {
  font-size: clamp(20px, 2.8vw, 28px);
  background: var(--grad-3);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  font-weight: 800;
}

/* ==========================================
   RESULTS & TABS
   ========================================== */

.results-section { padding: 12px 0 80px; flex: 1; }

.results-controls {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  flex-wrap: wrap; gap: 12px;
}

.tabs-bar { display: flex; gap: 4px; }

.tab {
  background: transparent; border: none;
  color: var(--muted); font-size: 14px; font-weight: 600; font-family: 'Outfit', sans-serif;
  padding: 12px 18px 14px; cursor: pointer;
  border-bottom: 2px solid transparent; position: relative; top: 1px;
  transition: color var(--transition), border-color var(--transition);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--p1); }

.fav-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(236,72,153,0.18); color: #f472b6;
  border-radius: 10px; font-size: 11px; padding: 1px 7px; margin-left: 4px;
}

.shuffle-all-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  color: var(--muted); font-size: 13px; font-weight: 600;
  font-family: 'Outfit', sans-serif;
  padding: 8px 16px; border-radius: 20px; cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  align-self: center; margin-bottom: 2px;
}
.shuffle-all-btn:hover {
  background: rgba(147,51,234,0.15);
  border-color: rgba(147,51,234,0.4); color: #c084fc;
}

.results-header { margin: 16px 0; }
.results-title { font-size: 17px; font-weight: 700; color: var(--muted); }
.results-title span { color: var(--text); }

/* ---- Results Grid ---- */

.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ---- Card ---- */

.card {
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column;
  position: relative;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  animation: fade-up 0.3s ease both;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(147,51,234,0.6);
  box-shadow: 0 16px 48px rgba(0,0,0,0.6), 0 0 32px rgba(147,51,234,0.22), 0 0 0 1px rgba(147,51,234,0.1);
}
.card.active {
  border-color: var(--p1);
  box-shadow: 0 0 0 2px rgba(147,51,234,0.3), var(--glow-hot);
}

/* Track number badge */
.card-num {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  color: rgba(255,255,255,0.55);
  font-size: 10px; font-weight: 700;
  padding: 3px 7px; border-radius: 6px;
}

/* Heart button */
.heart-btn {
  position: absolute; top: 8px; right: 8px; z-index: 10;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  border: none; border-radius: 50%;
  width: 32px; height: 32px; font-size: 15px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  pointer-events: auto;
  opacity: 0.35; transition: opacity var(--transition), transform var(--transition);
}
.heart-btn:hover  { opacity: 1; transform: scale(1.2); }
.heart-btn.active { opacity: 1; }
.card:hover .heart-btn { opacity: 1; }

/* Thumbnail */
.card-thumb-wrap {
  position: relative; width: 100%; padding-top: 56.25%;
  overflow: hidden; background: #000;
}
.card-thumb {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.35s ease;
}
.card:hover .card-thumb { transform: scale(1.06); }

/* Play overlay */
.card-play-overlay {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  background: rgba(147,51,234,0.88);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  opacity: 0; transition: opacity var(--transition);
  font-size: 20px; color: #fff;
}
.card:hover .card-play-overlay { opacity: 1; }

/* NOW SINGING overlay */
.card.active .card-play-overlay {
  opacity: 1;
  background: rgba(147,51,234,0.92);
  font-size: 9px; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Card body */
.card-body {
  padding: 12px 14px 14px; flex: 1;
  display: flex; flex-direction: column; gap: 5px;
}
.card-title {
  font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-channel { font-size: 11.5px; color: var(--muted); margin-top: auto; }

/* staggered animation */
.card:nth-child(1)  { animation-delay: 0.03s; }
.card:nth-child(2)  { animation-delay: 0.06s; }
.card:nth-child(3)  { animation-delay: 0.09s; }
.card:nth-child(4)  { animation-delay: 0.12s; }
.card:nth-child(5)  { animation-delay: 0.15s; }
.card:nth-child(6)  { animation-delay: 0.18s; }
.card:nth-child(7)  { animation-delay: 0.21s; }
.card:nth-child(8)  { animation-delay: 0.24s; }
.card:nth-child(9)  { animation-delay: 0.27s; }
.card:nth-child(10) { animation-delay: 0.30s; }
.card:nth-child(11) { animation-delay: 0.33s; }
.card:nth-child(12) { animation-delay: 0.36s; }
.card:nth-child(13) { animation-delay: 0.39s; }
.card:nth-child(14) { animation-delay: 0.42s; }
.card:nth-child(15) { animation-delay: 0.45s; }
.card:nth-child(16) { animation-delay: 0.48s; }
.card:nth-child(17) { animation-delay: 0.51s; }
.card:nth-child(18) { animation-delay: 0.54s; }
.card:nth-child(19) { animation-delay: 0.57s; }
.card:nth-child(20) { animation-delay: 0.60s; }

/* ==========================================
   LOADING
   ========================================== */

.loading-overlay {
  text-align: center; padding: 100px 24px;
  position: relative; z-index: 1;
}

.loading-visual { display: inline-flex; flex-direction: column; align-items: center; gap: 20px; }

.loading-bars {
  display: flex; align-items: flex-end; gap: 5px; height: 48px;
}
.loading-bars span {
  display: block; width: 6px; border-radius: 3px;
  background: var(--grad);
  animation: eq-dance 0.7s ease-in-out infinite alternate;
}
.loading-bars span:nth-child(1) { height: 20px; animation-duration: 0.6s; animation-delay: 0s; }
.loading-bars span:nth-child(2) { height: 36px; animation-duration: 0.8s; animation-delay: 0.1s; }
.loading-bars span:nth-child(3) { height: 48px; animation-duration: 0.5s; animation-delay: 0.2s; }
.loading-bars span:nth-child(4) { height: 28px; animation-duration: 0.9s; animation-delay: 0.05s; }
.loading-bars span:nth-child(5) { height: 40px; animation-duration: 0.7s; animation-delay: 0.15s; }

.loading-text { color: var(--muted); font-size: 15px; font-weight: 500; }

/* ==========================================
   EMPTY / ERROR
   ========================================== */

.empty-state, .error-state {
  text-align: center; padding: 90px 24px;
  position: relative; z-index: 1;
  animation: fade-up 0.3s ease;
}
.empty-icon, .error-icon { display: block; font-size: 56px; margin-bottom: 18px; opacity: 0.45; }
.empty-state p {
  color: var(--muted); font-size: 16px; font-weight: 500;
}
.error-state p {
  color: #fca5a5; font-size: 15px; font-weight: 500;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  display: inline-block; padding: 10px 20px; border-radius: 10px; margin-top: 4px;
}

/* ==========================================
   MINI PLAYER
   ========================================== */

.mini-player {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
  background: rgba(9, 9, 20, 0.9);
  backdrop-filter: blur(28px) saturate(200%);
  border-top: 1px solid var(--border);
  padding: 10px 24px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.6);
  animation: mini-slide-in 0.3s ease;
}

@keyframes mini-slide-in {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* gradient top border */
.mini-player::before {
  content: '';
  position: absolute; top: -1px; left: 0; right: 0; height: 2px;
  background: var(--grad);
  opacity: 0.7;
}

.mini-thumb {
  width: 50px; height: 50px; border-radius: 8px;
  object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--glass-border);
}

.mini-info { flex: 1; min-width: 0; }
.mini-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-channel { font-size: 11px; color: var(--muted); margin-top: 2px; }

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

.mini-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--glass-border);
  color: var(--muted); font-size: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.mini-btn:hover { background: rgba(147,51,234,0.2); color: #c084fc; }
.mini-btn.mini-play { background: var(--grad); color: #fff; border-color: transparent; font-size: 18px; }
.mini-btn.mini-play:hover { opacity: 0.85; }

.mini-back-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--muted); font-size: 12px; font-weight: 600;
  font-family: 'Outfit', sans-serif;
  padding: 7px 14px; border-radius: 20px; cursor: pointer; flex-shrink: 0;
  transition: color var(--transition), border-color var(--transition);
}
.mini-back-btn:hover { color: #c084fc; border-color: rgba(147,51,234,0.4); }

/* ==========================================
   TOASTS — premium bottom-center snackbar
   ========================================== */

.toast-container {
  position: fixed;
  bottom: 92px; /* above mini player */
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  display: flex;
  flex-direction: column-reverse; /* newest toast appears above */
  gap: 10px;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}

.toast-container.no-mini {
  bottom: 36px;
}

.toast {
  pointer-events: auto;
  background: rgba(18, 10, 36, 0.96);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(147, 51, 234, 0.35);
  border-radius: 100px; /* pill */
  padding: 13px 28px;
  font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap;
  box-shadow:
    0 8px 40px rgba(0,0,0,0.55),
    0 0 0 1px rgba(147,51,234,0.08),
    0 0 28px rgba(147,51,234,0.18);
  animation: toast-rise 0.32s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.toast.fav {
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow:
    0 8px 40px rgba(0,0,0,0.55),
    0 0 0 1px rgba(236,72,153,0.1),
    0 0 32px rgba(236,72,153,0.22);
}
.toast.upnext {
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow:
    0 8px 40px rgba(0,0,0,0.55),
    0 0 0 1px rgba(6,182,212,0.1),
    0 0 32px rgba(6,182,212,0.22);
}
.toast.success {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow:
    0 8px 40px rgba(0,0,0,0.55),
    0 0 0 1px rgba(16,185,129,0.1),
    0 0 32px rgba(16,185,129,0.22);
}

@keyframes toast-rise {
  from { opacity: 0; transform: translateY(18px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}
@keyframes toast-fall {
  from { opacity: 1; transform: translateY(0)   scale(1);    }
  to   { opacity: 0; transform: translateY(8px) scale(0.94); }
}
.toast.dismissing { animation: toast-fall 0.24s ease-in forwards; }

/* ==========================================
   FOOTER
   ========================================== */

.footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center; font-size: 12px; color: var(--muted);
  margin-bottom: 0; position: relative; z-index: 1;
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 960px) {
  .results-grid { grid-template-columns: repeat(3, 1fr); }
  .player-container { grid-template-columns: 1fr; }
  .player-info { border-left: none; border-top: 1px solid var(--border); }
}

@media (max-width: 640px) {
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .kbd-hints { display: none; }
  .hero { padding: 56px 16px 48px; }
  .section-wrap { padding: 0 16px; }
  .mini-back-btn { display: none; }
  .sing-body, .sing-header { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 400px) {
  .results-grid { grid-template-columns: 1fr; }
}

/* ==========================================
   TRENDING CHIPS (dynamic quick-picks)
   ========================================== */

.qp-chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 3px 28px 4px 0;
  -webkit-mask-image: linear-gradient(to right, black 88%, transparent 100%);
  mask-image: linear-gradient(to right, black 88%, transparent 100%);
}
.qp-chips::-webkit-scrollbar { display: none; }

/* ==========================================
   RECOMMENDATIONS
   ========================================== */

.rec-section { padding: 0 0 8px; animation: fade-up 0.3s ease; }

.rec-loading {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0 12px;
}

.rec-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--grad);
  animation: rec-bounce 1s ease-in-out infinite;
}
.rec-dot:nth-child(2) { animation-delay: 0.15s; }
.rec-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes rec-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50%       { transform: translateY(-6px); opacity: 1; }
}

.rec-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rec-chip {
  position: relative;
  background: rgba(147,51,234,0.1);
  border: 1px solid rgba(147,51,234,0.3);
  color: #d8b4fe;
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.14s, box-shadow 0.18s;
  font-family: inherit;
  letter-spacing: 0.1px;
}

.rec-chip:hover {
  background: rgba(147,51,234,0.24);
  border-color: rgba(147,51,234,0.65);
  color: #ede9fe;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(147,51,234,0.25);
}

/* ==========================================
   AI BADGE
   ========================================== */

.ai-badge {
  display: inline-block;
  margin-left: 8px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 999px;
  vertical-align: middle;
  box-shadow: 0 0 10px rgba(147,51,234,0.4);
}

/* ==========================================
   CONCERT STAGE — spotlights, curtains, rig
   ========================================== */

.stage-scene {
  position: fixed; inset: 0;
  pointer-events: none; overflow: hidden;
  z-index: 0;
}

/* ---- Sweeping spotlight beams ---- */

.spot {
  position: absolute;
  top: 0;
  transform-origin: 50% 0;
  will-change: transform, opacity;
}

/* Left purple beam */
.spot1 {
  left: -4%;
  width: 440px; height: 95vh;
  background: linear-gradient(180deg,
    rgba(147,51,234,0.22) 0%,
    rgba(147,51,234,0.07) 40%,
    transparent 78%);
  clip-path: polygon(44% 0, 56% 0, 100% 100%, 0% 100%);
  animation: spot-sway1 13s ease-in-out infinite alternate;
}

/* Center-left golden beam */
.spot2 {
  left: 27%;
  width: 360px; height: 88vh;
  background: linear-gradient(180deg,
    rgba(245,196,66,0.16) 0%,
    rgba(245,196,66,0.04) 45%,
    transparent 82%);
  clip-path: polygon(38% 0, 62% 0, 96% 100%, 4% 100%);
  animation: spot-sway2 10s ease-in-out infinite alternate;
  animation-delay: -4s;
}

/* Right pink beam */
.spot3 {
  right: -4%;
  width: 440px; height: 95vh;
  background: linear-gradient(180deg,
    rgba(236,72,153,0.18) 0%,
    rgba(236,72,153,0.05) 40%,
    transparent 78%);
  clip-path: polygon(44% 0, 56% 0, 100% 100%, 0% 100%);
  animation: spot-sway3 15s ease-in-out infinite alternate;
  animation-delay: -8s;
}

/* Center white/cool beam */
.spot4 {
  left: 50%;
  width: 320px; height: 82vh;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.045) 0%,
    rgba(190,170,255,0.02) 55%,
    transparent 82%);
  clip-path: polygon(40% 0, 60% 0, 86% 100%, 14% 100%);
  transform: translateX(-50%);
  animation: spot-center 19s ease-in-out infinite alternate;
  animation-delay: -13s;
}

@keyframes spot-sway1 {
  0%   { transform: rotate(-15deg); opacity: 0.5; }
  40%  { opacity: 0.9; }
  100% { transform: rotate(7deg);   opacity: 0.65; }
}
@keyframes spot-sway2 {
  0%   { transform: rotate(11deg);  opacity: 0.55; }
  60%  { opacity: 1; }
  100% { transform: rotate(-9deg);  opacity: 0.75; }
}
@keyframes spot-sway3 {
  0%   { transform: rotate(13deg);  opacity: 0.45; }
  100% { transform: rotate(-11deg); opacity: 0.7; }
}
@keyframes spot-center {
  0%   { transform: translateX(-50%) rotate(-4deg); opacity: 0.4; }
  50%  { opacity: 0.85; }
  100% { transform: translateX(-50%) rotate(4deg);  opacity: 0.5; }
}

/* ---- Velvet curtain edges ---- */

.curtain {
  position: fixed; top: 0; bottom: 0;
  pointer-events: none; z-index: 1;
}
.curtain-l {
  left: 0; width: 72px;
  background: linear-gradient(90deg,
    rgba(3,0,10,0.97) 0%,
    rgba(8,0,22,0.78) 50%,
    transparent 100%);
}
.curtain-r {
  right: 0; width: 72px;
  background: linear-gradient(270deg,
    rgba(3,0,10,0.97) 0%,
    rgba(8,0,22,0.78) 50%,
    transparent 100%);
}
/* Subtle fold-highlight on each curtain */
.curtain-l::before, .curtain-r::before {
  content: '';
  position: absolute; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(147,51,234,0.22) 25%,
    rgba(236,72,153,0.18) 65%,
    transparent 100%);
}
.curtain-l::before { left: 24px; }
.curtain-r::before { right: 24px; }

/* ---- Stage haze / floor glow ---- */

.stage-haze {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 240px;
  background: linear-gradient(to top,
    rgba(25,0,50,0.18) 0%,
    rgba(147,51,234,0.05) 45%,
    transparent 100%);
  animation: haze-breathe 7s ease-in-out infinite alternate;
}
@keyframes haze-breathe {
  from { opacity: 0.65; }
  to   { opacity: 1; }
}

/* ---- Lighting rig bar ---- */

.stage-rig-bar {
  position: fixed;
  top: 64px; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(147,51,234,0.45) 18%,
    rgba(255,255,255,0.12) 50%,
    rgba(236,72,153,0.4) 82%,
    transparent 100%);
  box-shadow:
    0 0 14px rgba(147,51,234,0.35),
    0 0 40px rgba(147,51,234,0.12);
  z-index: 150;
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 0 8%;
}

/* PAR-can fixture icons hanging from the rig */
.rig-fixture {
  display: block;
  width: 10px; height: 18px;
  background: linear-gradient(180deg, #140828 0%, #07030e 100%);
  border-radius: 0 0 4px 4px;
  border: 1px solid rgba(147,51,234,0.15);
  border-top: none;
  position: relative;
  flex-shrink: 0;
}
.rig-fixture::after {
  content: '';
  position: absolute;
  bottom: 3px; left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  animation: fixture-glow 4s ease-in-out infinite;
}
/* Alternate lens colors */
.rf1::after, .rf5::after { background: radial-gradient(circle, rgba(255,255,255,0.9), rgba(147,51,234,0.8)); }
.rf2::after, .rf6::after { background: radial-gradient(circle, rgba(255,255,255,0.9), rgba(245,196,66,0.85)); animation-delay: -1s; }
.rf3::after, .rf7::after { background: radial-gradient(circle, rgba(255,255,255,0.9), rgba(236,72,153,0.8)); animation-delay: -2s; }
.rf4::after, .rf8::after { background: radial-gradient(circle, rgba(255,255,255,0.9), rgba(6,182,212,0.8));   animation-delay: -3s; }

@keyframes fixture-glow {
  0%,  90%, 100% { opacity: 0.75; box-shadow: 0 0 6px currentColor; }
  92% { opacity: 0.3; }
  95% { opacity: 0.9; }
  97% { opacity: 0.5; }
}

/* ---- Hero center spotlight pool ---- */

.hero-center-light {
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 1100px; height: 800px;
  background: radial-gradient(ellipse 55% 45% at 50% 0%,
    rgba(255,248,225,0.065) 0%,
    rgba(147,51,234,0.035) 35%,
    transparent 68%);
  pointer-events: none; z-index: 0;
}

/* ---- Hero badge — VIP shimmer pass ---- */

.hero-badge {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg,
    rgba(147,51,234,0.2) 0%,
    rgba(236,72,153,0.13) 100%);
  border-color: rgba(147,51,234,0.5);
  border-radius: 6px;
  letter-spacing: 1px;
  box-shadow:
    0 0 28px rgba(147,51,234,0.22),
    inset 0 1px 0 rgba(255,255,255,0.1);
}
/* Travelling shimmer */
.hero-badge::after {
  content: '';
  position: absolute;
  top: -60%; left: -90%;
  width: 55%; height: 220%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255,255,255,0.18),
    transparent);
  transform: skewX(-20deg);
  animation: badge-sweep 5s ease-in-out infinite;
  animation-delay: 1s;
}
@keyframes badge-sweep {
  0%, 65%, 100% { left: -90%; }
  38% { left: 140%; }
}

/* ---- Header neon underline upgrade ---- */

.header {
  border-bottom-color: rgba(147,51,234,0.22);
  box-shadow: 0 1px 0 rgba(147,51,234,0.1), 0 4px 24px rgba(0,0,0,0.55);
}

/* ---- NOW PLAYING badge — LED display feel ---- */

.now-playing-badge {
  background: rgba(147,51,234,0.2);
  border-color: rgba(147,51,234,0.5);
  letter-spacing: 2.5px;
  box-shadow: 0 0 14px rgba(147,51,234,0.25), inset 0 0 8px rgba(147,51,234,0.1);
}
.npb-dot {
  box-shadow: 0 0 8px rgba(192,132,252,0.8);
}

/* ---- Card — concert ticket upgrade ---- */

.card::after {
  content: '';
  position: absolute;
  bottom: 44px; left: 0; right: 0;
  height: 1px;
  background: repeating-linear-gradient(90deg,
    rgba(255,255,255,0.06) 0px,
    rgba(255,255,255,0.06) 5px,
    transparent 5px,
    transparent 9px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
}
.card:hover::after { opacity: 1; }

/* Stronger hover glow + golden top accent */
.card:hover {
  box-shadow:
    0 18px 56px rgba(0,0,0,0.65),
    0 0 36px rgba(147,51,234,0.28),
    0 0 0 1px rgba(147,51,234,0.15);
}
.card:hover .card-thumb { transform: scale(1.08); }

/* Gold spotlight flash on play overlay */
.card-play-overlay {
  background: rgba(120,40,220,0.9);
  box-shadow: 0 0 24px rgba(147,51,234,0.6), 0 0 60px rgba(147,51,234,0.2);
  transition: opacity 0.2s, background 0.2s;
}
.card:hover .card-play-overlay {
  background: rgba(147,51,234,0.92);
}

/* ---- Sing mode — concert stage feel ---- */

.sing-stage-light {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 70vh;
  background: radial-gradient(ellipse 50% 55% at 50% 0%,
    rgba(255,248,220,0.07) 0%,
    rgba(147,51,234,0.04) 35%,
    transparent 65%);
  pointer-events: none;
  z-index: 0;
  animation: sing-light-breathe 4s ease-in-out infinite alternate;
}
@keyframes sing-light-breathe {
  from { opacity: 0.7; }
  to   { opacity: 1; }
}

.sing-mode {
  background:
    radial-gradient(ellipse 80% 40% at 50% -5%, rgba(60,0,90,0.35) 0%, transparent 70%),
    rgba(5,5,12,0.97);
}

/* Side rim lighting in sing mode */
.sing-mode::before, .sing-mode::after {
  content: '';
  position: absolute; top: 0; bottom: 0;
  width: 3px;
  pointer-events: none; z-index: 1;
  animation: rim-pulse 3s ease-in-out infinite alternate;
}
.sing-mode::before {
  left: 0;
  background: linear-gradient(180deg,
    transparent 0%, rgba(147,51,234,0.6) 30%, rgba(147,51,234,0.6) 70%, transparent 100%);
}
.sing-mode::after {
  right: 0;
  background: linear-gradient(180deg,
    transparent 0%, rgba(236,72,153,0.6) 30%, rgba(236,72,153,0.6) 70%, transparent 100%);
  animation-delay: -1.5s;
}
@keyframes rim-pulse {
  from { opacity: 0.4; }
  to   { opacity: 0.9; }
}

/* Keep sing body/header above the light overlay */
.sing-stage-light, .sing-close { z-index: 2; }
.sing-header, .sing-body { position: relative; z-index: 2; }

/* ---- Concert-live body state (music playing) ---- */

body.concert-live .spot1 { animation-duration: 7s; }
body.concert-live .spot2 { animation-duration: 5.5s; }
body.concert-live .spot3 { animation-duration: 8.5s; }
body.concert-live .spot4 { animation-duration: 10s; }

body.concert-live .stage-haze {
  background: linear-gradient(to top,
    rgba(40,0,70,0.22) 0%,
    rgba(147,51,234,0.08) 40%,
    transparent 100%);
  animation-duration: 4s;
}

body.concert-live .stage-rig-bar {
  box-shadow:
    0 0 22px rgba(147,51,234,0.55),
    0 0 70px rgba(147,51,234,0.2);
}

body.concert-live .rig-fixture::after {
  animation-duration: 2s;
}

body.concert-live .player-container {
  box-shadow: var(--shadow), 0 0 80px rgba(147,51,234,0.35);
}

/* ---- Player section top neon accent ---- */

.player-section {
  position: relative;
}
.player-section::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 70%; height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(147,51,234,0.5) 30%,
    rgba(236,72,153,0.5) 70%,
    transparent 100%);
  box-shadow: 0 0 16px rgba(147,51,234,0.3);
}

/* ---- Search bar — warm spotlight on focus ---- */

.search-bar:focus-within {
  border-color: rgba(167,81,244,0.7);
  box-shadow:
    var(--shadow),
    0 0 50px rgba(147,51,234,0.18),
    0 0 90px rgba(245,196,66,0.05),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

/* ============================================================
   AUTH — Header button, avatar, dropdown, modal
   ============================================================ */

/* Header auth container */
.header-auth {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* "Sign In" button in header */
.auth-signin-btn {
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 0 18px;
  height: 34px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .2s;
  white-space: nowrap;
}
.auth-signin-btn:hover { opacity: .85; transform: translateY(-1px); }

/* User avatar wrapper (shown when logged in) */
.user-avatar-wrap {
  position: relative;
  animation: authPopIn .3s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes authPopIn {
  from { opacity: 0; transform: scale(.6); }
  to   { opacity: 1; transform: scale(1); }
}

/* Circular avatar button */
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(147,51,234,0.6);
  background: rgba(147,51,234,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color .2s, box-shadow .2s;
}
.user-avatar:hover {
  border-color: var(--p1);
  box-shadow: 0 0 12px rgba(147,51,234,0.5);
}
.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none; /* shown by JS when photoURL exists */
}
.user-avatar .user-initials {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  pointer-events: none;
}

/* Dropdown menu */
.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: rgba(12,8,24,0.96);
  border: 1px solid rgba(147,51,234,0.25);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  backdrop-filter: blur(20px);
  padding: 6px 0;
  z-index: 250;
  animation: fade-up .15s ease;
}
.user-dropdown-info {
  padding: 14px 18px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-dropdown-info strong {
  font-size: .9rem;
  color: var(--text);
  font-weight: 600;
}
.user-dropdown-info span {
  font-size: .75rem;
  color: var(--muted);
}
.dropdown-divider {
  border: none;
  border-top: 1px solid rgba(120,120,160,0.18);
  margin: 4px 0;
}
#signOutBtn {
  width: 100%;
  background: none;
  border: none;
  padding: 10px 18px;
  text-align: left;
  font-size: .85rem;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, background .2s;
  border-radius: 0 0 16px 16px;
}
#signOutBtn:hover {
  color: #f87171;
  background: rgba(248,113,113,0.08);
}

/* ---- Auth Modal ---- */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: auth-overlay-in .2s ease;
}
@keyframes auth-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.auth-modal-card {
  background: rgba(12,8,28,0.97);
  border: 1px solid rgba(147,51,234,0.3);
  border-radius: 24px;
  padding: 40px 32px 32px;
  width: min(420px, 92vw);
  position: relative;
  animation: auth-card-in .22s ease;
}
@keyframes auth-card-in {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

.auth-modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 24px;
}

/* Close button */
.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
}
.auth-modal-close:hover { background: rgba(255,255,255,0.12); color: var(--text); }

/* Google sign-in button */
.google-signin-btn {
  width: 100%;
  height: 48px;
  background: #fff;
  color: #1f1f1f;
  border: none;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.google-signin-btn:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,0.45);
  transform: translateY(-1px);
}
.google-signin-btn img {
  width: 20px;
  height: 20px;
}

/* "or" divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(120,120,160,0.25);
}
.auth-divider span {
  font-size: .75rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Auth form inputs */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-input {
  width: 100%;
  height: 48px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(147,51,234,0.25);
  border-radius: 12px;
  padding: 0 16px;
  color: var(--text);
  font-size: .9rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.auth-input:focus {
  border-color: rgba(147,51,234,0.7);
  box-shadow: 0 0 0 3px rgba(147,51,234,0.12);
}
.auth-input::placeholder { color: var(--muted); }

/* Submit button */
.auth-submit-btn {
  width: 100%;
  height: 48px;
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity .2s, transform .2s;
}
.auth-submit-btn:hover { opacity: .88; transform: translateY(-1px); }
.auth-submit-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Toggle sign-in / sign-up */
.auth-toggle {
  text-align: center;
  font-size: .82rem;
  color: var(--muted);
  margin: 16px 0 0;
}
.auth-toggle-btn {
  background: none;
  border: none;
  color: var(--p1);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0 2px;
  transition: color .2s;
}
.auth-toggle-btn:hover { color: var(--p2); }

/* Error message */
.auth-error {
  color: #f87171;
  font-size: .8rem;
  text-align: center;
  margin: 10px 0 0;
  min-height: 18px;
}

/* ==========================================
   WELCOME BANNER (slides in below header on sign-in)
   ========================================== */
.welcome-banner {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(12, 8, 28, 0.96);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(147, 51, 234, 0.55);
  border-radius: 22px;
  padding: 14px 22px 14px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 800;
  box-shadow: 0 12px 48px rgba(147, 51, 234, 0.4), 0 0 0 1px rgba(236, 72, 153, 0.12);
  animation: wbIn .5s cubic-bezier(.34,1.56,.64,1) both, wbOut .4s ease-in 4s both;
  pointer-events: none;
  min-width: 280px;
  max-width: 90vw;
}
@keyframes wbIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-28px) scale(.92); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0)     scale(1);   }
}
@keyframes wbOut {
  from { opacity: 1; transform: translateX(-50%) scale(1); }
  to   { opacity: 0; transform: translateX(-50%) scale(.94); }
}
.wb-avatar-img {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px solid rgba(147, 51, 234, 0.7);
  flex-shrink: 0;
  object-fit: cover;
}
.wb-avatar-initial {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.wb-text { flex: 1; min-width: 0; }
.wb-title {
  font-size: 1rem; font-weight: 700; color: #eeeef8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wb-sub {
  font-size: .73rem; color: var(--muted); margin-top: 3px;
}
.wb-check {
  font-size: 1.1rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

/* ==========================================
/* ==========================================
   SMART DISCOVERY FILTERS — CLEAN
   ========================================== */

.filter-bar {
  max-width: 700px;
  margin: 0 auto 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Primary row: genre chips + more button */
.filter-primary-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-primary-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
  flex: 1;
  -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
  mask-image: linear-gradient(to right, black 80%, transparent 100%);
}
.filter-primary-chips::-webkit-scrollbar { display: none; }

/* "⊕ Filters" toggle button */
.filter-more-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  color: rgba(167,139,250,0.65);
  font-size: 12px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  padding: 6px 13px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  user-select: none;
}
.filter-more-btn:hover {
  background: rgba(147,51,234,0.13);
  border-color: rgba(147,51,234,0.48);
  color: #ddd6fe;
}
.filter-more-btn.active {
  background: linear-gradient(135deg, rgba(147,51,234,0.22), rgba(236,72,153,0.15));
  border-color: rgba(167,139,250,0.55);
  color: #f3e8ff;
}
.filter-more-count {
  background: var(--grad);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.5;
}

/* Expanded section (Era + Lang + Mood) */
.filter-expanded {
  display: none;
  flex-direction: column;
  gap: 1px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 8px;
  animation: expand-in 0.2s ease;
}
.filter-expanded.open { display: flex; }
@keyframes expand-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.filter-row-wrap {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}

.filter-row-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  text-align: right;
  background: linear-gradient(120deg, rgba(167,139,250,0.8), rgba(236,72,153,0.65));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
  line-height: 1;
}

.filter-chips-wrap {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 28px 4px 0;
  -webkit-mask-image: linear-gradient(to right, black 88%, transparent 100%);
  mask-image: linear-gradient(to right, black 88%, transparent 100%);
}
.filter-chips-wrap::-webkit-scrollbar { display: none; }

.filter-chip {
  position: relative;
  flex-shrink: 0;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(180,165,220,0.65);
  font-size: 12px;
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.15s, box-shadow 0.18s;
  white-space: nowrap;
  user-select: none;
  letter-spacing: 0.15px;
}
.filter-chip:hover {
  background: rgba(147,51,234,0.13);
  border-color: rgba(147,51,234,0.48);
  color: #ddd6fe;
  transform: translateY(-1px);
  box-shadow: 0 3px 14px rgba(147,51,234,0.22);
}
.filter-chip.active {
  background: linear-gradient(135deg, rgba(147,51,234,0.3), rgba(236,72,153,0.22));
  border-color: rgba(167,139,250,0.65);
  color: #f3e8ff;
  font-weight: 700;
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(147,51,234,0.3),
    0 4px 18px rgba(147,51,234,0.25);
}
.filter-chip.active::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(255,255,255,0.1), transparent 55%);
  pointer-events: none;
}

.filter-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0 2px;
  border-top: 1px solid rgba(255,255,255,0.04);
  margin-top: 8px;
  animation: badge-pop 0.2s ease;
}

.filter-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  flex: 1;
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(147,51,234,0.14);
  border: 1px solid rgba(147,51,234,0.38);
  color: #c4b5fd;
  font-size: 11.5px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  padding: 4px 9px 4px 12px;
  border-radius: 20px;
  animation: badge-pop 0.18s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes badge-pop {
  from { opacity: 0; transform: scale(0.78); }
  to   { opacity: 1; transform: scale(1); }
}

.filter-badge-remove {
  background: none;
  border: none;
  color: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 0 1px;
  opacity: 0.5;
  transition: opacity 0.15s, color 0.15s;
  font-family: inherit;
}
.filter-badge-remove:hover { opacity: 1; color: #f472b6; }

.filter-clear-all {
  background: none;
  border: none;
  color: rgba(147,51,234,0.5);
  font-size: 11px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 10px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.filter-clear-all:hover {
  color: #EC4899;
  background: rgba(236,72,153,0.08);
}

@media (max-width: 640px) {
  .filter-row-wrap { grid-template-columns: 38px 1fr; gap: 8px; }
  .filter-row-label { font-size: 8px; letter-spacing: 1.2px; }
  .filter-chip { font-size: 11.5px; padding: 5px 12px; }
}
