/* Raagam v5 — Full Spotify-inspired Design */
:root {
  --bg: #0a0a0a;
  --bg-card: #161616;
  --bg-elevated: #1e1e1e;
  --bg-hover: #282828;
  --accent: #e8a838;
  --accent-glow: rgba(232, 168, 56, 0.3);
  --accent-soft: rgba(232, 168, 56, 0.12);
  --text: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-muted: #666;
  --success: #1ed760;
  --heart: #ff4b6e;
  --radius: 12px;
  --radius-sm: 8px;
  --nav-height: 64px;
  --npb-height: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html, body { height:100%; overflow:hidden; }
body { font-family: var(--font); background: var(--bg); color: var(--text); user-select:none; -webkit-user-select:none; }

/* ── Buttons ── */
.btn-primary {
  padding: 14px 32px; background: linear-gradient(135deg, var(--accent), #d4922e);
  border: none; border-radius: 50px; color: #000; font-size: 16px; font-weight: 700;
  font-family: var(--font); cursor: pointer; transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:active { transform: scale(0.97); }
.btn-ghost {
  padding: 14px 32px; background: transparent; border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50px; color: var(--text); font-size: 16px; font-weight: 600;
  font-family: var(--font); cursor: pointer; transition: border-color 0.2s;
}
.btn-ghost:hover { border-color: var(--accent); }
.btn-lg { padding: 16px 36px; font-size: 17px; }
.btn-full { width: 100%; }
.btn-outline-sm {
  margin-top: 12px; padding: 8px 24px;
  background: transparent; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px; color: var(--text-secondary);
  font-family: var(--font); font-size: 13px; cursor: pointer;
}
.btn-outline-sm:hover { border-color: var(--heart); color: var(--heart); }
.hidden { display: none !important; }

/* ═══ LANDING PAGE ═══ */
.landing {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 300; background: var(--bg); overflow: hidden;
}
.landing-scroll {
  height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.hero {
  text-align: center; padding: 80px 24px 48px; position: relative; overflow: hidden;
}
.hero-glow {
  position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(60px); opacity: 0.5; pointer-events: none;
}
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: 20px;
  background: var(--accent-soft); border: 1px solid rgba(232,168,56,0.2);
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px; color: var(--accent);
  margin-bottom: 20px; position: relative;
}
.hero-title {
  font-size: 56px; font-weight: 800; letter-spacing: 4px;
  background: linear-gradient(135deg, var(--accent), #f0c674, #fff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  position: relative; margin-bottom: 8px;
}
.hero-tagline { font-size: 18px; color: var(--text-secondary); margin-bottom: 12px; position: relative; }
.hero-desc { font-size: 15px; color: var(--text-muted); max-width: 380px; margin: 0 auto 32px; line-height: 1.6; position: relative; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }

.features-section { padding: 48px 20px; }
.section-title { text-align: center; font-size: 22px; font-weight: 700; margin-bottom: 24px; }
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 480px; margin: 0 auto; }
.feature-card {
  background: var(--bg-card); border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius); padding: 20px 16px; text-align: center;
  transition: border-color 0.2s;
}
.feature-card:hover { border-color: rgba(232,168,56,0.2); }
.feature-icon { font-size: 32px; margin-bottom: 10px; }
.feature-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.feature-card p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.eras-section { padding: 32px 20px; text-align: center; }
.eras-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.era-pill {
  padding: 10px 18px; background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 20px;
  font-size: 13px; color: var(--text-secondary);
}

.cta-section {
  text-align: center; padding: 48px 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(232,168,56,0.05) 100%);
}
.cta-section h2 { font-size: 24px; margin-bottom: 8px; }
.cta-section p { color: var(--text-muted); margin-bottom: 24px; }

.landing-footer { text-align: center; padding: 24px; font-size: 12px; color: var(--text-muted); }

/* ═══ AUTH PAGE ═══ */
.auth-page {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 310; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.auth-container {
  width: min(90vw, 380px); padding: 40px 24px; text-align: center;
}
.auth-back {
  position: absolute; top: 20px; left: 20px;
  background: none; border: none; color: var(--text-secondary);
  font-family: var(--font); font-size: 15px; cursor: pointer;
}
.auth-logo { font-size: 48px; margin-bottom: 16px; }
.auth-title { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.auth-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.auth-input {
  width: 100%; padding: 15px 16px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 15px; font-family: var(--font);
  margin-bottom: 10px; outline: none; transition: border-color 0.2s;
}
.auth-input:focus { border-color: var(--accent); }
.auth-input::placeholder { color: var(--text-muted); }
.auth-error {
  background: rgba(255,75,110,0.1); border: 1px solid rgba(255,75,110,0.3);
  border-radius: var(--radius-sm); padding: 10px;
  color: var(--heart); font-size: 13px; margin-bottom: 12px;
}
.auth-divider {
  margin: 20px 0; display: flex; align-items: center; gap: 12px;
  color: var(--text-muted); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.08);
}
.auth-switch { font-size: 14px; color: var(--text-muted); }
.auth-link {
  background: none; border: none; color: var(--accent);
  font-family: var(--font); font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: underline;
}

/* ═══ APP CONTAINER ═══ */
.app-container { position: fixed; top: 0; left: 0; right: 0; bottom: 0; }

/* ── Pages ── */
.page {
  display: none; position: fixed;
  top: 0; left: 0; right: 0;
  bottom: calc(var(--nav-height) + var(--safe-bottom));
  overflow: hidden;
  transition: opacity 0.2s ease;
}
.page.active { display: flex; flex-direction: column; }
.page-scroll {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 16px 16px calc(var(--npb-height) + 16px);
}

/* ── Nav ── */
.nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: linear-gradient(to top, rgba(0,0,0,0.98), rgba(0,0,0,0.9));
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: flex; justify-content: space-around; align-items: center;
  z-index: 100; border-top: 1px solid rgba(255,255,255,0.06);
}
.nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: none; color: var(--text-muted);
  font-size: 11px; font-family: var(--font); padding: 10px 16px; cursor: pointer; transition: color 0.2s;
  min-width: 56px;
}
.nav-btn .nav-icon { font-size: 26px; line-height: 1; }
.nav-btn.active { color: var(--accent); }
.nav-btn.active .nav-icon { transform: scale(1.1); }

/* ── Now Playing Bar ── */
.now-playing-bar {
  position: fixed; bottom: calc(var(--nav-height) + var(--safe-bottom));
  left: 8px; right: 8px; height: var(--npb-height);
  background: rgba(30,30,30,0.85);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-radius: 10px; display: flex; align-items: center;
  justify-content: space-between; padding: 0 12px; z-index: 90;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.now-playing-bar.hidden { transform: translateY(80px); opacity: 0; pointer-events: none; }
.npb-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.npb-art { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; }
.npb-info { min-width: 0; }
.npb-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.npb-artist { font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.npb-controls { display: flex; gap: 8px; align-items: center; }
.npb-btn { background: none; border: none; color: var(--text); font-size: 18px; padding: 8px; cursor: pointer; }
.npb-play { font-size: 22px; }

/* ── Player ── */
#page-player { overflow: hidden; }
.player-bg {
  position: absolute; top: -50px; left: -50px; right: -50px; bottom: -50px;
  background-size: cover; background-position: center;
  filter: blur(80px) brightness(0.25) saturate(1.8); z-index: 0;
  transition: background-image 1s ease;
}
.player-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(10,10,10,0.3) 0%, rgba(10,10,10,0.1) 30%,
    rgba(10,10,10,0.5) 70%, rgba(10,10,10,0.9) 100%);
}
.player-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  height: 100%; padding: 12px 20px 24px; justify-content: space-evenly;
}
.player-top-actions { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; width: 100%; padding: 4px 0; }
.player-top-label { font-size: 11px; letter-spacing: 2px; color: var(--text-secondary); font-weight: 600; }
.icon-btn { background: none; border: none; color: var(--text); font-size: 28px; padding: 10px; cursor: pointer; opacity: 0.85; transition: opacity 0.2s; }
.top-action-group { display: inline-flex; align-items: center; gap: 6px; }
.voice-mode-btn { position: relative; }
.voice-mode-btn.active { color: var(--accent); opacity: 1; }
.voice-mode-btn.engine-alt { color: #00b894; }
.voice-mode-btn.engine-center { color: #fdcb6e; }
.voice-mode-btn::after {
  content: attr(title);
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: rgba(0,0,0,0.7);
  color: var(--text);
  font-size: 10px;
  letter-spacing: 0.4px;
  padding: 2px 7px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  white-space: nowrap;
}
.voice-mode-btn:hover::after,
.voice-mode-btn:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}
.media-switch {
  width: 100%; max-width: 340px; margin-bottom: 10px;
  display: flex; background: rgba(0,0,0,0.32);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px; padding: 4px;
}
.media-switch-btn {
  flex: 1; border: none; background: transparent; color: var(--text-secondary);
  border-radius: 999px; padding: 8px 0; font-size: 12px; font-weight: 700;
  letter-spacing: 0.4px; cursor: pointer; font-family: var(--font);
  transition: all 0.2s ease;
}
.media-switch-btn.active {
  background: linear-gradient(135deg, rgba(232,168,56,0.9), rgba(199,140,36,0.95));
  color: #111; box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.media-stage {
  width: min(90vw, 380px); height: min(90vw, 380px);
  position: relative; border-radius: 16px; overflow: hidden;
}
.album-art-container {
  width: 100%; height: 100%;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 16px 50px rgba(0,0,0,0.5);
  transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94), box-shadow 0.5s ease;
  flex-shrink: 0; position: absolute; inset: 0;
}
.album-art-container.playing { box-shadow: 0 16px 60px var(--accent-glow); }
.album-art-container .album-art { width: 100%; height: 100%; object-fit: cover; display: block; }
.song-video-container {
  position: absolute; inset: 0; border-radius: 16px; overflow: hidden;
  box-shadow: 0 16px 60px rgba(0,0,0,0.55);
}
.song-video-container::before,
.song-video-container::after {
  content: ''; position: absolute; left: 0; right: 0; z-index: 4; pointer-events: none;
}
.song-video-container::before {
  top: 0; height: 16%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
}
.song-video-container::after {
  bottom: 0; height: 20%;
  background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
}
.song-video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  background: #000;
}
.song-video.hidden { display: none !important; }
.yt-iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; background: #000 center/cover no-repeat; border-radius: 16px;
  z-index: 2; /* above visualizer, below badge */
  pointer-events: none;
  transform: scale(1.28);
  transform-origin: center;
  clip-path: inset(2% 1% 8% 1%);
}
.yt-iframe.hidden { display: none !important; }
.video-mode-badge {
  position: absolute; top: 10px; right: 10px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(0,0,0,0.58); border: 1px solid rgba(255,255,255,0.22);
  font-size: 10px; letter-spacing: 1px; color: #fff; z-index: 5;
  text-transform: uppercase; font-weight: 700;
}

/* Spotify Canvas-style visualizer */
.song-visualizer {
  position: absolute; inset: 0; border-radius: 16px; overflow: hidden;
  background: #0a0a0a;
}
.song-visualizer.hidden { display: none; }
.visualizer-bg {
  position: absolute; inset: -30px;
  background-size: cover; background-position: center;
  filter: blur(28px) brightness(0.45) saturate(1.8);
  transform: scale(1.15);
  transition: background-image 0.4s ease;
}
.visualizer-art {
  position: absolute;
  width: 72%; height: 72%;
  top: 14%; left: 14%;
  object-fit: cover; border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.72);
  animation: ken-burns-viz 26s ease-in-out infinite alternate;
}
@keyframes ken-burns-viz {
  0%   { transform: scale(1.0) translate(0%, 0%); }
  25%  { transform: scale(1.045) translate(-1.2%, 0.8%); }
  50%  { transform: scale(1.06) translate(0.8%, -1.2%); }
  75%  { transform: scale(1.03) translate(-0.4%, 0.5%); }
  100% { transform: scale(1.0) translate(0.3%, -0.3%); }
}
.visualizer-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 25% 25%, rgba(232,168,56,0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 75%, rgba(100,80,220,0.07) 0%, transparent 55%);
  animation: viz-overlay-pulse 9s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes viz-overlay-pulse {
  from { opacity: 0.55; }
  to   { opacity: 1.0; }
}
.album-art-placeholder {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  font-size: 64px; color: var(--accent);
}
.lyrics-panel {
  position: absolute; top: 60px; left: 16px; right: 16px; bottom: 200px;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(20px);
  border-radius: var(--radius); overflow-y: auto; z-index: 5;
  transition: opacity 0.3s ease, transform 0.3s ease; padding: 24px;
}
.lyrics-panel.hidden { opacity: 0; transform: translateY(20px); pointer-events: none; }
.lyrics-content { font-size: 18px; line-height: 1.8; color: var(--text-secondary); text-align: center; white-space: pre-wrap; user-select: text; -webkit-user-select: text; }
.lyrics-placeholder { color: var(--text-muted); font-style: italic; }
.song-info { text-align: center; width: 100%; padding: 0 8px; }
.song-title { font-size: 20px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.song-artist { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
.song-album { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.progress-container { width: 100%; padding: 0 4px; }
.progress-bar { width: 100%; height: 5px; background: rgba(255,255,255,0.15); border-radius: 4px; cursor: pointer; position: relative; transition: height 0.15s; touch-action: none; }
.progress-bar:hover, .progress-bar:active { height: 8px; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 4px; width: 0; transition: width 0.1s linear; pointer-events: none; position: relative; }
.progress-fill::after { content: ''; position: absolute; right: -10px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,0.5); transition: width 0.15s, height 0.15s; }
.progress-bar:hover .progress-fill::after, .progress-bar.dragging .progress-fill::after { width: 24px; height: 24px; right: -12px; }
.progress-knob { display: none; }
.progress-times { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-top: 8px; font-variant-numeric: tabular-nums; }
.era-lock-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft); border: 1px solid var(--accent);
  border-radius: 20px; padding: 4px 12px 4px 14px;
  font-size: 13px; color: var(--accent); font-weight: 600;
  margin-bottom: 4px; animation: fadeIn 0.2s ease;
}
.era-lock-badge.hidden { display: none; }
.era-lock-clear {
  background: none; border: none; color: var(--accent); font-size: 16px;
  cursor: pointer; padding: 0 2px; opacity: 0.7; line-height: 1;
}
.era-lock-clear:hover { opacity: 1; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

.controls {
  display: grid; grid-template-columns: 1fr 1fr auto 1fr 1fr;
  align-items: center; justify-items: center; gap: 6px;
  width: 100%; max-width: 360px; padding: 12px 16px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.08);
}
.ctrl-btn { background: none; border: none; color: var(--text); font-size: 28px; padding: 12px; cursor: pointer; transition: transform 0.15s, opacity 0.2s; opacity: 0.9; min-width: 48px; min-height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.ctrl-btn:active { transform: scale(0.88); }
.play-btn { width: 72px; height: 72px; background: var(--accent) !important; border-radius: 50%; font-size: 30px; color: #000 !important; display: flex; align-items: center; justify-content: center; opacity: 1 !important; box-shadow: 0 4px 24px var(--accent-glow); flex-shrink: 0; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.play-btn:hover { transform: scale(1.05); box-shadow: 0 6px 32px rgba(232,168,56,0.5); }
.heart-btn-main { font-size: 26px; }
.heart-btn-main.liked { color: var(--heart); animation: heartPop 0.3s ease; }
.heart-btn-main.liked .heart-icon { fill: var(--heart); stroke: var(--heart); }
@keyframes heartPop { 0%{transform:scale(1)} 50%{transform:scale(1.3)} 100%{transform:scale(1)} }
.download-btn {
  font-size: 18px; opacity: 0.82;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.12);
}
.loading { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.spinner { width: 24px; height: 24px; border: 3px solid rgba(255,255,255,0.1); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Home ── */
.home-header { text-align: center; padding: 24px 0 16px; }
.home-greeting { font-size: 14px; color: var(--text-muted); margin-bottom: 4px; }
.home-logo { font-size: 28px; font-weight: 700; background: linear-gradient(135deg, var(--accent), #f0c674); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: 3px; }
.mega-queue-status {
  font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 4px;
  letter-spacing: 0.5px; transition: opacity 0.3s;
}
.mega-queue-status.hidden { display: none; }
.release-marker {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: middle;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  color: #111;
  background: #f0c674;
  -webkit-text-fill-color: #111;
}
.home-section { margin-bottom: 28px; }
.home-section h3 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 16px; background: var(--bg-elevated); border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; color: var(--text); font-size: 13px; font-family: var(--font); cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.chip:hover { background: var(--bg-hover); border-color: var(--accent); }
.big-play-btn { width: 100%; padding: 18px; background: linear-gradient(135deg, var(--accent), #d4922e); border: none; border-radius: var(--radius); color: #000; font-family: var(--font); font-size: 16px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 12px; box-shadow: 0 4px 20px var(--accent-glow); }
.big-play-icon { font-size: 22px; }
.recent-grid { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.recent-card { flex-shrink: 0; width: 120px; cursor: pointer; position: relative; }
.recent-card .thumb-wrap { position: relative; width: 120px; height: 120px; border-radius: var(--radius-sm); overflow: hidden; }
.recent-card .thumb-wrap img { width: 120px; height: 120px; object-fit: cover; display: block; transition: transform 0.45s ease; }
.recent-card .recent-title { font-size: 12px; font-weight: 500; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-card .recent-artist { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Hover zoom only on fine-pointer devices (desktop) */
@media (hover: hover) and (pointer: fine) {
  .recent-card:hover .thumb-wrap img { transform: scale(1.1); }
  .thumb-hover-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.32); display: flex; align-items: center; justify-content: center; opacity: 0; border-radius: inherit; transition: opacity 0.25s ease; pointer-events: none; }
  .recent-card:hover .thumb-hover-overlay { opacity: 1; }
  .thumb-play-icon { width: 40px; height: 40px; background: rgba(255,255,255,0.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #111; transform: scale(0.75); transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1); }
  .recent-card:hover .thumb-play-icon { transform: scale(1); }
}
.mini-stat { font-size: 14px; color: var(--text-secondary); }
.mini-stat-num { color: var(--accent); font-weight: 700; }
.home-shelf-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.home-song-card {
  display: flex; gap: 10px; align-items: center;
  padding: 10px; border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
}
.home-song-card:active { transform: scale(0.985); }
.home-song-art {
  width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0;
  background: rgba(255,255,255,0.06);
}
.home-song-meta { min-width: 0; flex: 1; }
.home-song-name {
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.home-song-sub {
  font-size: 11px; color: var(--text-muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.home-collection-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.home-collection-card {
  display: flex; gap: 14px; align-items: center;
  border-radius: 14px; padding: 14px;
  background: linear-gradient(135deg, rgba(232,168,56,0.18), rgba(108,92,231,0.14));
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.home-collection-card:active { transform: scale(0.97); }
.collection-cover {
  width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0;
  background: rgba(255,255,255,0.08);
}
.collection-cover-placeholder {
  background: linear-gradient(135deg, rgba(232,168,56,0.3), rgba(108,92,231,0.25));
}
.collection-text { min-width: 0; flex: 1; }
.home-collection-title { font-size: 15px; font-weight: 700; }
.home-collection-sub { font-size: 12px; color: rgba(255,255,255,0.7); margin-top: 3px; }
.home-collection-count { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 7px; }

/* ── Library ── */
.library-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.library-header h2 { font-size: 24px; font-weight: 700; }
.library-count { font-size: 13px; color: var(--text-muted); }
.library-grid { display: flex; flex-direction: column; gap: 2px; }
.library-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer; transition: background 0.15s; }
.library-item:hover { background: var(--bg-hover); }
.library-thumb { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.library-info { min-width: 0; flex: 1; }
.library-info h4 { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-info p { font-size: 12px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }

/* ── Profile ── */
.profile-hero {
  text-align: center; padding: 40px 20px 28px; position: relative; overflow: hidden;
  border-radius: 0 0 24px 24px; margin-bottom: 16px;
}
.profile-hero-glow {
  position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,168,56,0.4) 0%, transparent 70%);
  filter: blur(50px); opacity: 0.6; pointer-events: none; transition: background 0.5s ease;
}
.profile-avatar-ring { width: 100px; height: 100px; margin: 0 auto 14px; border-radius: 50%; padding: 3px; position: relative; z-index: 1; transition: background 0.5s ease; background: linear-gradient(135deg, var(--accent), #f0c674); }
.profile-avatar { width: 100%; height: 100%; background: var(--bg); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 44px; }
.profile-name { font-size: 24px; font-weight: 800; position: relative; z-index: 1; }
.profile-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; position: relative; z-index: 1; }
.profile-personality {
  display: inline-block; margin-top: 12px; padding: 8px 20px;
  border-radius: 24px; font-size: 15px; font-weight: 700;
  background: rgba(255,255,255,0.08); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12); position: relative; z-index: 1;
  animation: personalityPop 0.6s ease 0.3s both;
}
@keyframes personalityPop { 0%{transform:scale(0.8);opacity:0} 60%{transform:scale(1.05)} 100%{transform:scale(1);opacity:1} }

.profile-card { background: var(--bg-card); border-radius: var(--radius); padding: 20px; margin: 0 0 12px; border: 1px solid rgba(255,255,255,0.05); }
.profile-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-card { text-align: center; padding: 16px 8px; background: var(--bg-elevated); border-radius: var(--radius-sm); }
.stat-num { font-size: 26px; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* DNA Bar */
.dna-card { overflow: hidden; }
.dna-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; }
.dna-segment { height: 100%; border-radius: 7px; transition: width 1s ease; min-width: 4px; }
.dna-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dna-legend-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-secondary); }
.dna-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Rank list */
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: var(--bg-elevated); border-radius: var(--radius-sm);
  transition: transform 0.2s;
}
.rank-item:hover { transform: translateX(4px); }
.rank-badge { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; }
.rank-name { flex: 1; font-size: 14px; font-weight: 500; }
.rank-count { font-size: 12px; color: var(--text-muted); background: rgba(255,255,255,0.06); padding: 3px 10px; border-radius: 12px; }

/* Genre badge */
.genre-badge-container { text-align: center; padding: 12px 0; }
.genre-badge {
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 32px; border-radius: 20px; position: relative;
}
.genre-badge-icon { font-size: 36px; }
.genre-badge-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.7); font-weight: 600; }
.genre-badge-name { font-size: 22px; font-weight: 800; color: #fff; text-transform: capitalize; }

/* Decades timeline */
.decades-timeline { display: flex; align-items: flex-end; gap: 6px; height: 100px; padding-top: 8px; }
.decade-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.decade-bar {
  width: 100%; border-radius: 6px 6px 0 0; min-height: 4px;
  background: var(--accent); transition: height 1s ease; position: relative;
}
.decade-bar-count { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--text-muted); font-weight: 600; }
.decade-label { font-size: 10px; color: var(--text-muted); white-space: nowrap; }

/* Recent likes row */
.recent-likes-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.recent-like-card { flex-shrink: 0; width: 80px; text-align: center; }
.recent-like-art { width: 80px; height: 80px; border-radius: 10px; object-fit: cover; }
.recent-like-name { font-size: 11px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }

/* Share card */
.share-card { background: linear-gradient(135deg, rgba(232,168,56,0.1), rgba(232,168,56,0.02)); border: 1px solid rgba(232,168,56,0.2); }
.share-inner { display: flex; align-items: center; gap: 14px; }
.share-icon { font-size: 32px; }
.share-title { font-size: 15px; font-weight: 700; color: var(--accent); }
.share-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Tag list (still used) */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 6px 14px; background: var(--accent-soft); border: 1px solid rgba(232,168,56,0.2); border-radius: 20px; font-size: 13px; color: var(--accent); font-weight: 500; }
.insight-item { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 14px; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.insight-item:last-child { border-bottom: none; }
.sync-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--success); }

/* Profile empty state */
.profile-empty { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.profile-empty .icon { font-size: 48px; margin-bottom: 12px; }

@keyframes dnaGrow { 0% { width: 0; } }

/* ── Synced Lyrics ── */
.lyric-line { font-size: 18px; line-height: 2.2; color: rgba(255,255,255,0.25); transition: color 0.3s ease, transform 0.3s ease, font-size 0.3s ease, opacity 0.2s ease; padding: 2px 0; cursor: pointer; user-select: text; -webkit-user-select: text; }
.lyric-line:hover { opacity: 0.92; }
.lyric-line.lyric-active { color: #fff; font-size: 22px; font-weight: 600; transform: scale(1.02); }
.lyric-line.lyric-past { color: rgba(255,255,255,0.4); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

@media (max-width: 480px) {
  .media-stage { width: min(88vw, 340px); height: min(88vw, 340px); }
  .controls { padding: 10px 12px; }
  .home-song-art { width: 50px; height: 50px; }
  .collection-cover { width: 56px; height: 56px; }
}
@media (max-width: 380px) {
  .hero-title { font-size: 42px; }
  .media-stage { width: 78vw; height: 78vw; }
  .features-grid { grid-template-columns: 1fr; }
  .home-shelf-grid { grid-template-columns: 1fr; }
  .controls { padding: 8px 10px; border-radius: 18px; }
}

/* Mobile: always show progress knob (no hover needed on touch) */
@media (hover: none) and (pointer: coarse) {
  .progress-fill::after { width: 22px; height: 22px; right: -11px; }
  .progress-bar { height: 6px; }
  .progress-bar:active { height: 10px; }
}

/* ═══ SEARCH PAGE ═══ */
.search-header { padding: 20px 16px 8px; }
.search-header h2 { font-size: 24px; font-weight: 700; margin: 0; }
.search-subtitle { color: rgba(255,255,255,0.5); font-size: 13px; margin-top: 4px; }

.search-bar-container {
  position: sticky; top: 0; z-index: 10;
  padding: 12px 16px; display: flex; align-items: center; gap: 8px;
  background: rgba(15,12,30,0.95); backdrop-filter: blur(20px);
}
.search-input {
  flex: 1; padding: 14px 18px; border-radius: 16px;
  border: 1.5px solid rgba(108,92,231,0.3);
  background: rgba(108,92,231,0.08);
  color: #fff; font-size: 16px; font-family: inherit;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input:focus {
  border-color: #6c5ce7;
  box-shadow: 0 0 0 3px rgba(108,92,231,0.15);
}
.search-input::placeholder { color: rgba(255,255,255,0.35); }
.search-clear-btn {
  position: absolute; right: 28px; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.1); border: none; color: #fff;
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
}

.search-results { padding: 8px 16px 100px; }

.search-result-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 12px; cursor: pointer; transition: background 0.15s, transform 0.1s;
  border: 1px solid transparent;
}
.search-result-item:active { background: rgba(108,92,231,0.15); transform: scale(0.98); }
.search-result-item:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.06); }
.search-thumb {
  width: 54px; height: 54px; border-radius: 10px; object-fit: cover;
  background: rgba(108,92,231,0.1); flex-shrink: 0;
}
.search-info { flex: 1; min-width: 0; }
.search-info h4 {
  font-size: 15px; font-weight: 600; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-info p {
  font-size: 12px; color: rgba(255,255,255,0.5); margin: 2px 0 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-lang {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  background: rgba(108,92,231,0.2); color: #a29bfe; font-size: 10px;
  margin-left: 6px; vertical-align: middle;
}
.search-lang.api { background: rgba(0,184,148,0.2); color: #00b894; }
.search-album-tag {
  display: inline-block; padding: 1px 5px; border-radius: 3px;
  background: rgba(253,203,110,0.15); color: rgba(253,203,110,0.7); font-size: 10px;
  margin-left: 4px; vertical-align: middle; max-width: 120px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Movie/Album cards in search */
.search-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  color: rgba(255,255,255,0.35); padding: 12px 12px 4px; letter-spacing: 1px;
}
.search-movie-card {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 12px; cursor: pointer; transition: background 0.15s;
  border: 1px solid rgba(108,92,231,0.15); background: rgba(108,92,231,0.06);
  margin: 4px 0;
}
.search-movie-card:hover { background: rgba(108,92,231,0.12); }
.search-movie-card:active { transform: scale(0.98); }
.search-movie-thumb {
  width: 48px; height: 48px; border-radius: 8px; object-fit: cover;
  background: rgba(108,92,231,0.1); flex-shrink: 0;
}
.search-movie-info { flex: 1; min-width: 0; }
.search-movie-info h4 {
  font-size: 15px; font-weight: 600; margin: 0; color: #a29bfe;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-movie-info p {
  font-size: 12px; color: rgba(255,255,255,0.45); margin: 2px 0 0;
}
.search-movie-arrow {
  color: rgba(255,255,255,0.4); font-size: 18px; flex-shrink: 0;
  transition: transform 0.2s;
}
.search-movie-songs {
  padding-left: 16px; border-left: 2px solid rgba(108,92,231,0.2);
  margin-left: 24px; margin-bottom: 8px;
}
.search-movie-songs.hidden { display: none; }

.search-empty-state { text-align: center; padding: 60px 20px; color: rgba(255,255,255,0.5); }
.search-empty-icon { font-size: 48px; margin-bottom: 12px; }
.search-hint { font-size: 13px; color: rgba(255,255,255,0.3); margin-top: 8px; }

/* ═══ NAV 5-ITEM ═══ */
.nav { grid-template-columns: repeat(5, 1fr); }

/* Home search shortcut */
.home-search-shortcut {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 16px;
  background: rgba(108,92,231,0.08);
  border: 1.5px solid rgba(108,92,231,0.2);
  cursor: pointer; transition: all 0.2s;
}
.home-search-shortcut:active { background: rgba(108,92,231,0.15); border-color: #6c5ce7; }
.home-search-icon { font-size: 18px; }
.home-search-text { color: rgba(255,255,255,0.4); font-size: 15px; }

/* Bollywood Category Cards */
.bw-categories-grid { display: flex; flex-direction: column; gap: 12px; }
.bw-category-card {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  border-radius: 16px; cursor: pointer; position: relative; overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.bw-category-card::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,0.25); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.bw-category-card:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.4); }
.bw-category-card:active { transform: scale(0.98); }
.bw-cat-emoji { font-size: 36px; position: relative; z-index: 1; flex-shrink: 0; }
.bw-cat-info { flex: 1; position: relative; z-index: 1; min-width: 0; }
.bw-cat-name { font-size: 16px; font-weight: 700; color: #fff; }
.bw-cat-desc { font-size: 12px; color: rgba(255,255,255,0.7); margin-top: 2px; }
.bw-cat-count { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 4px; font-weight: 600; }
.bw-cat-play {
  position: relative; z-index: 1; flex-shrink: 0;
  padding: 8px 14px; border-radius: 20px; border: none;
  background: rgba(255,255,255,0.2); backdrop-filter: blur(4px);
  color: #fff; font-size: 12px; font-weight: 700; font-family: var(--font);
  cursor: pointer; transition: background 0.2s;
}
.bw-cat-play:hover { background: rgba(255,255,255,0.35); }

/* Toast */
/* ═══ DOWNLOAD / OFFLINE ═══ */
.download-btn { font-size: 18px; opacity: 0.7; }
.dl-badge {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  background: rgba(30,215,96,0.15); color: var(--success); font-size: 10px;
  font-weight: 600; vertical-align: middle; margin-left: 4px;
}
.dl-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.2); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
.lib-dl-btn, .search-dl-btn {
  background: rgba(255,255,255,0.08); border: none; color: var(--text-secondary);
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  font-size: 16px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.2s;
}
.lib-dl-btn:hover, .search-dl-btn:hover { background: rgba(255,255,255,0.15); color: var(--accent); }
.lib-dl-btn.downloaded, .search-dl-btn.downloaded { color: var(--success); }
.lib-remove-btn {
  background: none; border: none; color: var(--text-muted); font-size: 16px;
  padding: 8px; cursor: pointer; flex-shrink: 0; opacity: 0.5; transition: opacity 0.2s;
}
.lib-remove-btn:hover { opacity: 1; color: var(--heart); }
.library-section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 16px 0 8px; padding: 0 4px;
}
.library-section-header h3 { font-size: 16px; font-weight: 600; margin: 0; }
.library-section-count { font-size: 12px; color: var(--text-muted); }

.toast-msg {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(30,30,30,0.95); color: #fff; padding: 12px 24px; border-radius: 12px;
  font-size: 14px; font-family: var(--font); z-index: 9999; opacity: 0;
  transition: opacity 0.3s, transform 0.3s; pointer-events: none;
  backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1);
}
.toast-msg.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══ SPOTIFY-LIKE SONG PREVIEW (hover floating card) ═══ */
.song-preview-card {
  position: fixed; z-index: 8900;
  border-radius: 16px; overflow: hidden;
  pointer-events: none; user-select: none;
  opacity: 0; transform: scale(0.8) translateY(10px);
  transition: opacity 0.22s ease, transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 24px 64px rgba(0,0,0,0.82), 0 0 0 1px rgba(255,255,255,0.07);
  width: 188px; background: #111;
  will-change: transform, opacity;
}
.song-preview-card.visible { opacity: 1; transform: scale(1) translateY(0); }

.song-preview-art {
  width: 100%; height: 156px; overflow: hidden; position: relative;
}
.song-preview-art img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform-origin: center;
  animation: spKenBurns 10s ease-in-out infinite alternate;
}
@keyframes spKenBurns {
  0%   { transform: scale(1)    translate(0%,     0%); }
  30%  { transform: scale(1.13) translate(-3.5%, -2%); }
  65%  { transform: scale(1.09) translate( 2%,   -3%); }
  100% { transform: scale(1.16) translate(-1.5%,  2%); }
}

.preview-bars {
  position: absolute; bottom: 10px; right: 10px;
  display: flex; align-items: flex-end; gap: 3px; height: 20px;
}
.preview-bar {
  width: 3px; border-radius: 3px; min-height: 3px;
  background: var(--accent);
  animation: spBarPulse 0.65s ease-in-out infinite alternate;
}
.preview-bar:nth-child(1) { animation-duration: 0.55s; }
.preview-bar:nth-child(2) { animation-duration: 0.75s; animation-delay: 0.10s; }
.preview-bar:nth-child(3) { animation-duration: 0.50s; animation-delay: 0.22s; }
.preview-bar:nth-child(4) { animation-duration: 0.80s; animation-delay: 0.05s; }
.preview-bar:nth-child(5) { animation-duration: 0.62s; animation-delay: 0.17s; }
@keyframes spBarPulse {
  0%   { height: 3px; }
  100% { height: 18px; }
}

.song-preview-info { padding: 10px 12px 13px; background: linear-gradient(180deg, #1c1c1c 0%, #111 100%); }
.song-preview-name  { font-size: 13px; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.4; }
.song-preview-artist { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; }

/* ═══ SONG CLIPS ═══ */
.clips-subtitle { font-size: 12px; color: var(--text-muted); margin: -6px 0 12px; }
.clips-row {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.clips-row::-webkit-scrollbar { display: none; }

.clip-card {
  flex: 0 0 120px; width: 120px; border-radius: 14px; overflow: hidden;
  position: relative; cursor: pointer; background: #1a1a2e;
  aspect-ratio: 9 / 16; /* phone/reel ratio */
  box-shadow: 0 4px 16px rgba(0,0,0,.45);
  transition: transform .2s, box-shadow .2s;
}
.clip-card:hover, .clip-card:focus { transform: scale(1.04); box-shadow: 0 8px 24px rgba(108,92,231,.4); outline: none; }
.clip-card-art {
  width: 100%; height: 100%; object-fit: cover;
  display: block; transition: transform 6s ease;
}
.clip-card:hover .clip-card-art { transform: scale(1.08); }
.clip-card-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.1) 50%, transparent 100%);
}
.clip-card-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 8px 8px 10px;
}
.clip-card-name {
  font-size: 11px; font-weight: 700; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3;
}
.clip-card-artist {
  font-size: 10px; color: rgba(255,255,255,.7);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px;
}
.clip-card-play-badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(108,92,231,.85);
  color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .5px;
  padding: 2px 6px; border-radius: 10px;
}
.clip-card-eq {
  position: absolute; bottom: 38px; right: 8px;
  display: flex; align-items: flex-end; gap: 2px; height: 16px;
  opacity: 0; transition: opacity .3s;
}
.clip-card:hover .clip-card-eq, .clip-card.playing .clip-card-eq { opacity: 1; }
.clip-card-eq-bar {
  width: 3px; border-radius: 2px; background: var(--accent);
  animation: clipCardBarPulse .55s ease-in-out infinite alternate;
  min-height: 2px;
}
.clip-card-eq-bar:nth-child(2) { animation-duration: .8s; animation-delay: .1s; }
.clip-card-eq-bar:nth-child(3) { animation-duration: .45s; animation-delay: .25s; }
.clip-card-eq-bar:nth-child(4) { animation-duration: .7s; animation-delay: .05s; }
@keyframes clipCardBarPulse {
  0%   { height: 2px; }
  100% { height: 14px; }
}

/* ── Full-screen clip overlay ── */
.clip-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #000;
}
.clip-overlay.hidden { display: none; }

.clip-overlay-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: blur(28px) brightness(.35) saturate(1.4);
  transform: scale(1.1);
  transition: background-image .4s;
}

.clip-visual-wrap {
  position: relative; width: min(320px, 80vw);
  aspect-ratio: 9 / 16; border-radius: 20px; overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,.7);
  z-index: 1;
}
.clip-art {
  width: 100%; height: 100%; object-fit: cover; display: block;
  animation: clipArtKenBurns 8s ease-in-out infinite alternate;
}
@keyframes clipArtKenBurns {
  0%   { transform: scale(1)    translateX(0)    translateY(0); }
  25%  { transform: scale(1.06) translateX(-2%)  translateY(-1%); }
  50%  { transform: scale(1.1)  translateX(2%)   translateY(1%); }
  75%  { transform: scale(1.07) translateX(-1%)  translateY(2%); }
  100% { transform: scale(1.04) translateX(1%)   translateY(-2%); }
}
.clip-equalizer {
  position: absolute; bottom: 72px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: flex-end; gap: 4px; height: 32px;
}
.clip-eq-bar {
  width: 4px; border-radius: 3px;
  background: linear-gradient(to top, var(--accent), #a29bfe);
  animation: clipEqPulse .6s ease-in-out infinite alternate;
  min-height: 3px;
}
.clip-eq-bar:nth-child(1) { animation-duration: .52s; }
.clip-eq-bar:nth-child(2) { animation-duration: .78s; animation-delay: .08s; }
.clip-eq-bar:nth-child(3) { animation-duration: .44s; animation-delay: .20s; }
.clip-eq-bar:nth-child(4) { animation-duration: .88s; animation-delay: .04s; }
.clip-eq-bar:nth-child(5) { animation-duration: .60s; animation-delay: .15s; }
.clip-eq-bar:nth-child(6) { animation-duration: .70s; animation-delay: .10s; }
.clip-eq-bar:nth-child(7) { animation-duration: .50s; animation-delay: .22s; }
.clip-eq-bar:nth-child(8) { animation-duration: .66s; animation-delay: .18s; }
@keyframes clipEqPulse {
  0%   { height: 3px; }
  100% { height: 28px; }
}
.clip-overlay.paused .clip-eq-bar { animation-play-state: paused; }
.clip-overlay.paused .clip-art     { animation-play-state: paused; }

.clip-play-ring {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .25s;
}
.clip-overlay.paused .clip-play-ring { opacity: 1; }
.clip-play-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(108,92,231,.75); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff; padding-left: 4px;
  box-shadow: 0 4px 20px rgba(108,92,231,.5);
}

.clip-info-bar {
  position: absolute; bottom: 24px; left: 0; right: 0;
  z-index: 2; padding: 0 24px;
  text-align: center;
}
.clip-song-name {
  font-size: 17px; font-weight: 700; color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.clip-song-artist {
  font-size: 13px; color: rgba(255,255,255,.75);
  margin: 4px 0 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.clip-full-play-btn {
  background: var(--accent); color: #fff; border: none;
  padding: 9px 22px; border-radius: 24px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  box-shadow: 0 4px 16px rgba(108,92,231,.5);
  transition: background .2s, transform .15s;
}
.clip-full-play-btn:hover { background: #5a4bd1; transform: scale(1.04); }

.clip-top-bar {
  position: absolute; top: 0; left: 0; right: 0;
  z-index: 3; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent);
}
.clip-close-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: none; color: #fff;
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.clip-close-btn:hover { background: rgba(255,255,255,.22); }
.clip-title-label { font-size: 14px; font-weight: 600; color: #fff; letter-spacing: .5px; }
.clip-counter {
  min-width: 36px; text-align: right;
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,.7);
  letter-spacing: .3px;
}

.clip-nav {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  z-index: 3; display: flex; flex-direction: column; gap: 12px;
}
.clip-nav-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: none; color: #fff;
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .15s;
}
.clip-nav-btn:hover { background: rgba(108,92,231,.5); transform: scale(1.1); }

.clip-progress-wrap {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 3;
  padding: 0 0 4px;
}
.clip-progress-bar {
  height: 3px; background: rgba(255,255,255,.2);
  border-radius: 2px; overflow: hidden;
}
.clip-progress-fill {
  height: 100%; width: 0%; background: var(--accent);
  border-radius: 2px; transition: width .5s linear;
}

/* tap-to-toggle overlay */
.clip-tap-zone {
  position: absolute; inset: 0; z-index: 2; cursor: pointer;
}

/* ═══ SPLASH SCREEN ═══ */
.splash-screen {
  position: fixed; inset: 0; z-index: 99999;
  background: linear-gradient(135deg, #1a1030 0%, #6c5ce7 50%, #a29bfe 100%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s ease;
}
.splash-screen.hidden { display: none; }
.splash-screen.splash-fade-out { opacity: 0; pointer-events: none; }
.splash-inner { text-align: center; padding: 2rem; }
.splash-logo {
  font-size: 3rem; font-weight: 800; color: #fff;
  letter-spacing: -1px; margin-bottom: 0.5rem;
  animation: splashPulse 2s ease-in-out infinite;
}
.splash-sub { color: rgba(255,255,255,0.7); font-size: 0.95rem; margin-bottom: 2rem; }
.splash-progress-wrap { width: 280px; margin: 0 auto; }
.splash-bar {
  width: 100%; height: 6px; background: rgba(255,255,255,0.15);
  border-radius: 3px; overflow: hidden;
}
.splash-fill {
  height: 100%; width: 0%; background: #fff;
  border-radius: 3px; transition: width 0.3s ease;
}
.splash-text {
  color: rgba(255,255,255,0.6); font-size: 0.8rem;
  margin-top: 0.75rem;
}
@keyframes splashPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.85; }
}

/* ═══ MOVIE BROWSE PAGE ═══ */
.movie-hero {
  position: relative; padding: 1.5rem; display: flex; gap: 1rem; align-items: flex-end;
  min-height: 180px; border-radius: 0 0 16px 16px; overflow: hidden;
  background: var(--bg-card);
}
.movie-hero::before {
  content: ''; position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: blur(30px) brightness(0.4); z-index: 0;
}
.movie-hero > * { position: relative; z-index: 1; }
.movie-poster {
  width: 120px; height: 120px; border-radius: 8px;
  object-fit: cover; box-shadow: 0 4px 20px rgba(0,0,0,0.5); flex-shrink: 0;
}
.movie-meta { flex: 1; }
.movie-meta h2 { font-size: 1.3rem; font-weight: 700; color: #fff; margin: 0 0 0.3rem; }
.movie-meta p { color: rgba(255,255,255,0.6); font-size: 0.85rem; margin: 0; }
.movie-actions { display: flex; gap: 0.75rem; padding: 1rem 1.5rem; }
.movie-play-btn, .movie-shuffle-btn {
  padding: 0.6rem 1.5rem; border-radius: 50px; border: none; cursor: pointer;
  font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 0.4rem;
}
.movie-play-btn { background: var(--accent); color: #fff; }
.movie-shuffle-btn { background: var(--bg-elevated); color: var(--text); }
.movie-songs-list { padding: 0 1rem 6rem; }
.movie-song-item {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--border); cursor: pointer; border-radius: 8px;
}
.movie-song-item:active { background: var(--bg-elevated); }
.movie-song-num { width: 24px; text-align: center; color: var(--text-sub); font-size: 0.85rem; }
.movie-song-info { flex: 1; min-width: 0; }
.movie-song-info h4 { font-size: 0.9rem; color: var(--text); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movie-song-info p { font-size: 0.78rem; color: var(--text-sub); margin: 0.15rem 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movie-song-dur { color: var(--text-sub); font-size: 0.78rem; }

/* Enhanced search movie cards */
.search-movie-card {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem;
  background: var(--bg-elevated); border-radius: 10px; margin-bottom: 0.5rem; cursor: pointer;
}
.search-movie-card:active { background: var(--bg-card); }
.search-movie-thumb { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; }
.search-movie-info { flex: 1; }
.search-movie-info h4 { font-size: 0.95rem; color: var(--text); margin: 0; }
.search-movie-info p { font-size: 0.78rem; color: var(--text-sub); margin: 0.15rem 0 0; }
.search-movie-browse { color: var(--accent); font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
