/**
 * Sonora Web Player — Obsidian Glass & Aurora Design System
 * File: website/player.css
 *
 * Architecture:
 * 1. Fonts & CSS Design Tokens (Palette, Surfaces, Typography, Glass, Shadows)
 * 2. Aurora Mesh Background & Visual Profiles (Immersive, Balanced, Classic)
 * 3. Base Reset & Glassmorphic Surfaces
 * 4. Micro-Typography & Tabular Numerics
 * 5. Modern Scrollbars (Standard Baseline + WebKit Fallbacks)
 * 6. TopBar, Sidebar & Spacial Navigation
 * 7. Bento Grid Dashboard System (Discover, Wrapped, Settings, DSP)
 * 8. Player Bar, Scrubber Timeline & Floating Tooltips
 * 9. Skeleton Loaders (Zero CLS) & View Transitions
 * 10. Micro-Interactions (Heart Burst, Click Ripple, Floating Tooltips)
 * 11. Synced Lyrics (LRC Karaoke with Depth Blur & Dual Mask)
 * 12. FFT Audio Visualizer (Neon Bars & Symmetrical Waveform Canvas)
 * 13. Modals & Dialogs (Auth 2FA, Party Sync, Lightbox Vinyl)
 * 14. Responsive Layout Breakpoints
 */

/* =============================================================================
   1. FONTS & CSS DESIGN TOKENS
   ============================================================================= */
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@900,800,700,600,500,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Surface Palette */
  --bg-void: #060608;
  --bg-surface: #0d0e13;
  --bg-surface-elevated: #14151c;
  --bg-surface-high: #1a1b24;
  --bg-recessed: #0a0b0e;

  /* Glassmorphism System */
  --glass-1st: rgba(18, 18, 22, 0.75);
  --glass-1st-border: rgba(255, 255, 255, 0.08);
  --glass-2nd: rgba(255, 255, 255, 0.03);
  --glass-2nd-hover: rgba(255, 255, 255, 0.06);
  --glass-2nd-border: rgba(255, 255, 255, 0.07);
  --glass-2nd-border-hover: rgba(255, 255, 255, 0.16);
  --glass-blur-1: 24px;
  --glass-blur-2: 16px;
  --glass-saturate: 180%;

  /* Sonora Brand Accents */
  --accent-green: #1DB954;
  --accent-green-bright: #1ED760;
  --accent-green-glow: rgba(29, 185, 84, 0.28);
  --accent-green-deep: rgba(29, 185, 84, 0.12);

  --accent-cyan: #06B6D4;
  --accent-cyan-bright: #22D3EE;
  --accent-cyan-glow: rgba(6, 182, 212, 0.28);

  --accent-purple: #A855F7;
  --accent-purple-bright: #C084FC;
  --accent-purple-glow: rgba(168, 85, 247, 0.28);

  --accent-emerald: #10B981;
  --accent-rose: #F43F5E;
  --accent-amber: #F59E0B;

  /* Hierarchical Text Tokens */
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.70);
  --text-muted: rgba(255, 255, 255, 0.40);
  --text-disabled: rgba(255, 255, 255, 0.22);

  /* Typography Font Stack */
  --font-sans: 'Satoshi', 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Dynamic Aurora Colors (Overridden dynamically from cover art via JS) */
  --aurora-c1: rgba(29, 185, 84, 0.22);
  --aurora-c2: rgba(168, 85, 247, 0.18);
  --aurora-c3: rgba(6, 182, 212, 0.14);

  /* Shadows & Depth */
  --shadow-subtle: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-card-hover: 0 16px 40px -4px rgba(0, 0, 0, 0.7), 0 0 24px -4px var(--accent-green-glow);
  --shadow-floating: 0 24px 64px -8px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.12);
  --shadow-neon-green: 0 0 28px rgba(29, 185, 84, 0.35);

  /* Easing Curves */
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Scrollbar Theme Variables */
  --scrollbar-thumb: rgba(255, 255, 255, 0.14);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.28);
  --scrollbar-track: transparent;
}

/* =============================================================================
   2. AURORA MESH BACKGROUND & VISUAL PROFILES
   ============================================================================= */
.aurora-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  contain: strict;
  background-color: var(--bg-void);
  background-image: 
    radial-gradient(1200px 900px at 50% -120px, rgba(20, 24, 35, 0.75) 0%, transparent 70%),
    radial-gradient(1000px 700px at 100% 100%, rgba(12, 13, 18, 0.8) 0%, transparent 60%);
}

.aurora-mesh-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  opacity: 0.85;
  mix-blend-mode: screen;
}

.aurora-orb-1,
.aurora-orb-2,
.aurora-orb-3 {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.aurora-orb-1 {
  width: 680px;
  height: 680px;
  top: -180px;
  left: -120px;
  background: radial-gradient(circle, var(--aurora-c1) 0%, transparent 70%);
}

.aurora-orb-2 {
  width: 760px;
  height: 760px;
  top: 18%;
  right: -180px;
  background: radial-gradient(circle, var(--aurora-c2) 0%, transparent 70%);
}

.aurora-orb-3 {
  width: 640px;
  height: 640px;
  bottom: -150px;
  left: 28%;
  background: radial-gradient(circle, var(--aurora-c3) 0%, transparent 70%);
}

/* Profile 1: Immersivo (Default - Fluid Oscillating Animation) */
[data-theme-profile="immersive"] .aurora-orb-1 {
  animation: auroraFlow1 18s var(--ease-in-out) infinite alternate;
}
[data-theme-profile="immersive"] .aurora-orb-2 {
  animation: auroraFlow2 24s var(--ease-in-out) infinite alternate;
}
[data-theme-profile="immersive"] .aurora-orb-3 {
  animation: auroraFlow3 28s var(--ease-in-out) infinite alternate;
}

@keyframes auroraFlow1 {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.75; }
  50% { transform: translate3d(80px, 60px, 0) scale(1.12); opacity: 0.95; }
  100% { transform: translate3d(-40px, 110px, 0) scale(0.92); opacity: 0.70; }
}

@keyframes auroraFlow2 {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.65; }
  50% { transform: translate3d(-100px, -70px, 0) scale(1.15); opacity: 0.90; }
  100% { transform: translate3d(60px, 90px, 0) scale(0.88); opacity: 0.60; }
}

@keyframes auroraFlow3 {
  0% { transform: translate3d(0, 0, 0) scale(0.95); opacity: 0.55; }
  50% { transform: translate3d(120px, -80px, 0) scale(1.18); opacity: 0.85; }
  100% { transform: translate3d(-90px, 50px, 0) scale(1.02); opacity: 0.60; }
}

/* Profile 2: Bilanciato (Static Smooth Radial Gradient, 0% CPU overhead) */
[data-theme-profile="balanced"] .aurora-orb {
  animation: none !important;
  opacity: 0.60 !important;
  filter: blur(140px) !important;
}

/* Profile 3: Classico (Obsidian Monolith scuro minimale ad alto contrasto) */
[data-theme-profile="classic"] .aurora-orb {
  display: none !important;
}
[data-theme-profile="classic"] .aurora-backdrop {
  background-image: none !important;
  background-color: var(--bg-void) !important;
}

/* =============================================================================
   3. BASE RESET & GLASSMORPHIC SURFACES
   ============================================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  background-color: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background-color: transparent;
  color: #E4E2E0;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}

/* First-Level Glass (Sidebar, TopBar, Bottom Bar, Floating Panels) */
.glass-panel {
  background: var(--glass-1st);
  backdrop-filter: blur(var(--glass-blur-1)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur-1)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-1st-border);
}

/* Secondary Glass (Cards, Modules, Bento Containers) */
.glass-card {
  background: var(--glass-2nd);
  backdrop-filter: blur(var(--glass-blur-2));
  -webkit-backdrop-filter: blur(var(--glass-blur-2));
  border: 1px solid var(--glass-2nd-border);
  box-shadow: var(--shadow-subtle);
  transition: all 0.24s var(--ease-smooth);
}

.glass-card:hover {
  background: var(--glass-2nd-hover);
  border-color: var(--glass-2nd-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.glass-floating {
  background: rgba(18, 19, 25, 0.88);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-floating);
}

/* =============================================================================
   4. MICRO-TIPOGRAFIA & TABULAR NUMERICS
   ============================================================================= */
.tabular-nums,
.font-mono,
#time-current,
#time-total,
.metric-num,
.bitrate-badge,
.eq-gain-label,
.party-code-badge {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

/* Sleek Pill Badges with Positive Tracking */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}

.badge-pro {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25) 0%, rgba(6, 182, 212, 0.25) 100%);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #E9D5FF;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.2);
}

.badge-lossless {
  background: rgba(29, 185, 84, 0.15);
  border: 1px solid rgba(29, 185, 84, 0.35);
  color: var(--accent-green-bright);
}

.badge-live {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #FCA5A5;
}

/* =============================================================================
   5. MODERN SCROLLBARS (Baseline Standard + WebKit Fallbacks)
   ============================================================================= */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 5px;
    height: 5px;
  }
  ::-webkit-scrollbar-track {
    background: transparent;
  }
  ::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 9999px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
  }
}

.no-scrollbar {
  scrollbar-width: none !important;
}
.no-scrollbar::-webkit-scrollbar {
  display: none !important;
}

/* =============================================================================
   6. TOPBAR, SIDEBAR & SPATIAL NAVIGATION
   ============================================================================= */
/* TopBar Navigation */
.header-topbar {
  height: 64px;
  background: var(--glass-1st);
  backdrop-filter: blur(var(--glass-blur-1)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur-1)) saturate(var(--glass-saturate));
  border-bottom: 1px solid var(--glass-1st-border);
  position: relative;
  z-index: 30;
}

/* Centered Search Bar with Shimmer Loading Line */
.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.search-input {
  width: 100%;
  height: 40px;
  padding-left: 2.75rem;
  padding-right: 5.75rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: all 0.2s var(--ease-smooth);
}

.search-input:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.65);
  border-color: rgba(29, 185, 84, 0.5);
  box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.15), 0 0 16px rgba(29, 185, 84, 0.1);
}

.search-clear-btn {
  position: absolute;
  right: 3.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 5;
}

.search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  transform: translateY(-50%) scale(1.08);
}

.search-clear-btn.hidden {
  display: none !important;
}

.search-kbd-badge {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.15rem 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary);
  pointer-events: none;
}

/* Linear Shimmer Loading Indicator below Search Input */
.search-loading-shimmer {
  position: absolute;
  bottom: -2px;
  left: 1.25rem;
  right: 1.25rem;
  height: 2px;
  border-radius: 9999px;
  background: linear-gradient(90deg, transparent, var(--accent-green), var(--accent-cyan), transparent);
  background-size: 200% 100%;
  animation: searchShimmerMove 1.4s ease-in-out infinite;
  display: none;
}
.search-loading-shimmer.active {
  display: block;
}

@keyframes searchShimmerMove {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* User Profile with Glowing Pro Ring */
.profile-avatar-wrapper {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 1.5px;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.2s var(--ease-smooth);
}

.profile-avatar-wrapper.is-pro {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-green));
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.45);
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Sidebar Styling & Nav Items */
.sidebar-wrapper {
  width: 260px;
  background: var(--glass-1st);
  backdrop-filter: blur(var(--glass-blur-1)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur-1)) saturate(var(--glass-saturate));
  border-right: 1px solid var(--glass-1st-border);
}

.nav-link-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.18s var(--ease-smooth);
  position: relative;
  text-align: left;
}

.nav-link-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link-btn.active {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.10);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-link-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
}

/* =============================================================================
   7. BENTO GRID DASHBOARD SYSTEM
   ============================================================================= */
.bento-container {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem;
}

.bento-card {
  border-radius: 20px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  background: var(--glass-2nd);
  backdrop-filter: blur(var(--glass-blur-2));
  -webkit-backdrop-filter: blur(var(--glass-blur-2));
  border: 1px solid var(--glass-2nd-border);
  box-shadow: var(--shadow-card);
  transition: all 0.28s var(--ease-smooth);
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
}

.bento-card:hover {
  background: var(--glass-2nd-hover);
  border-color: var(--glass-2nd-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.bento-col-3 { grid-column: span 3 / span 3; }
.bento-col-4 { grid-column: span 4 / span 4; }
.bento-col-6 { grid-column: span 6 / span 6; }
.bento-col-8 { grid-column: span 8 / span 8; }
.bento-col-9 { grid-column: span 9 / span 9; }
.bento-col-12 { grid-column: span 12 / span 12; }

@media (max-width: 1024px) {
  .bento-col-3, .bento-col-4 { grid-column: span 6 / span 6; }
  .bento-col-8, .bento-col-9 { grid-column: span 12 / span 12; }
}

@media (max-width: 768px) {
  .bento-container { grid-template-columns: 1fr; }
  .bento-col-3, .bento-col-4, .bento-col-6, .bento-col-8, .bento-col-9, .bento-col-12 {
    grid-column: span 1 / span 1;
  }
}

/* Hero Discover Banner */
.hero-glass-banner {
  border-radius: 24px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(29, 185, 84, 0.08) 0%, rgba(6, 182, 212, 0.05) 50%, rgba(168, 85, 247, 0.06) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.hero-glass-banner::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29, 185, 84, 0.25) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

/* Track Card (Charts & Search) */
.track-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.85rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
}

.track-card-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* =============================================================================
   8. PLAYER BAR, SCRUBBER TIMELINE & FLOATING TOOLTIPS
   ============================================================================= */
.master-player-bar {
  height: 94px;
  background: var(--glass-1st);
  backdrop-filter: blur(var(--glass-blur-1)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur-1)) saturate(var(--glass-saturate));
  border-top: 1px solid var(--glass-1st-border);
  position: relative;
  z-index: 50;
}

/* Artwork Box with Dynamic Glow & Expand Trigger */
.player-cover-box {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  box-shadow: 0 8px 24px -4px var(--aurora-c1), 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: all 0.25s var(--ease-smooth);
}

.player-cover-box:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6), 0 0 20px var(--accent-green-glow);
}

.cover-expand-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.player-cover-box:hover .cover-expand-overlay {
  opacity: 1;
}

/* Master Play/Pause Circular Glass Button */
.btn-play-pause-master {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.35), 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.btn-play-pause-master:hover {
  transform: scale(1.08);
  background: #F8FAFC;
  box-shadow: 0 0 32px rgba(255, 255, 255, 0.55), 0 6px 16px rgba(0, 0, 0, 0.6);
}

.btn-play-pause-master:active {
  transform: scale(0.95);
}

/* Controls Active Neon Dot Indicator (Shuffle, Repeat) */
.btn-player-action {
  position: relative;
  padding: 0.5rem;
  color: var(--text-muted);
  border-radius: 50%;
  transition: all 0.18s var(--ease-smooth);
  cursor: pointer;
}

.btn-player-action:hover {
  color: var(--text-primary);
  transform: scale(1.05);
}

.btn-player-action:active {
  transform: scale(0.94);
}

.btn-player-action.active,
.btn-player-action.has-active-dot {
  color: var(--accent-green-bright) !important;
}

.btn-player-action.has-active-dot::after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

/* Scrubber Timeline Container & Expanding Track */
.scrubber-track-container {
  position: relative;
  width: 100%;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.scrubber-track-bg {
  position: relative;
  width: 100%;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  overflow: visible;
  transition: height 0.2s var(--ease-smooth);
}

.scrubber-track-container:hover .scrubber-track-bg {
  height: 6px;
}

/* Audio Pre-buffer Bar */
.scrubber-buffer-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 9999px;
  pointer-events: none;
  transition: width 0.3s ease;
}

/* Audio Playback Current Fill Bar */
.scrubber-fill-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-green) 0%, var(--accent-green-bright) 100%);
  border-radius: 9999px;
  pointer-events: none;
  box-shadow: 0 0 10px var(--accent-green-glow);
}

/* Scrubber Thumb */
.scrubber-thumb-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 0 12px var(--accent-green), 0 2px 6px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  transition: transform 0.16s var(--ease-bounce);
}

.scrubber-track-container:hover .scrubber-thumb-handle,
.scrubber-track-container.dragging .scrubber-thumb-handle {
  transform: translate(-50%, -50%) scale(1.15);
}

/* Floating Exact Timestamp Tooltip */
.scrubber-hover-tooltip {
  position: absolute;
  bottom: 22px;
  transform: translateX(-50%);
  padding: 0.25rem 0.55rem;
  background: rgba(14, 15, 20, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
  z-index: 60;
}

.scrubber-track-container:hover .scrubber-hover-tooltip,
.scrubber-track-container.dragging .scrubber-hover-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Volume Slider Bar */
.volume-slider-container {
  position: relative;
  width: 90px;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.volume-slider-bg {
  position: relative;
  width: 100%;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  overflow: visible;
  transition: height 0.18s ease;
}

.volume-slider-container:hover .volume-slider-bg,
.volume-slider-container.dragging .volume-slider-bg {
  height: 5px;
}

.volume-slider-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--text-primary);
  border-radius: 9999px;
  transition: background-color 0.15s ease;
  pointer-events: none;
}

.volume-slider-container:hover .volume-slider-fill,
.volume-slider-container.dragging .volume-slider-fill {
  background: var(--accent-green-bright);
}

.volume-slider-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 0 8px var(--accent-green), 0 2px 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  transition: transform 0.15s var(--ease-bounce);
}

.volume-slider-container:hover .volume-slider-thumb,
.volume-slider-container.dragging .volume-slider-thumb {
  transform: translate(-50%, -50%) scale(1.1);
}

/* =============================================================================
   9. SKELETON LOADERS (Zero CLS) & VIEW TRANSITIONS
   ============================================================================= */
@keyframes shimmerPulse {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-shimmer {
  background: linear-gradient(
    90deg, 
    rgba(255, 255, 255, 0.03) 0%, 
    rgba(255, 255, 255, 0.08) 50%, 
    rgba(255, 255, 255, 0.03) 100%
  );
  background-size: 200% 100%;
  animation: shimmerPulse 1.8s ease-in-out infinite;
  border-radius: 12px;
}

.skeleton-track-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* Page / View Entrance Smooth Animations */
.view-enter-active {
  animation: viewSlideUp 0.32s var(--ease-smooth) forwards;
}

@keyframes viewSlideUp {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================================================
   10. MICRO-INTERACTIONS & TOOLTIPS
   ============================================================================= */
/* Heart Burst Elastic Pop */
@keyframes heartBurstPop {
  0% { transform: scale(1); }
  35% { transform: scale(0.75); }
  65% { transform: scale(1.35); }
  85% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.heart-burst {
  animation: heartBurstPop 0.42s var(--ease-bounce) forwards;
}

/* Universal Button Click Feedback */
.btn-press:active {
  transform: scale(0.96);
}

/* Studio Tooltip System */
/* Studio Tooltip System (400ms Delay) */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 0.35rem 0.65rem;
  background: rgba(14, 15, 20, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease 0.4s, transform 0.2s ease 0.4s;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
  z-index: 100;
}

[data-tooltip]:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Neon Glow for Liked Heart State */
#bottom-heart-btn.is-liked i,
#bottom-heart-btn svg.fill-emerald-400,
.track-card-row svg.fill-emerald-400 {
  filter: drop-shadow(0 0 8px rgba(29, 185, 84, 0.7));
}

/* Drag & Drop Visual Cue for Queue Reordering */
.draggable-track-item {
  cursor: grab;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
}
.draggable-track-item:active {
  cursor: grabbing;
}
.draggable-track-item.is-dragging {
  opacity: 0.45;
  transform: scale(0.98);
  border: 1px dashed rgba(255, 255, 255, 0.3);
}
.drag-placeholder-drop {
  border: 2px dashed var(--accent-green);
  background: rgba(29, 185, 84, 0.08);
  border-radius: 12px;
  height: 52px;
  margin: 4px 0;
}

/* =============================================================================
   11. SYNCED LYRICS (LRC Karaoke with Depth Blur & Dual Mask)
   ============================================================================= */
.lyrics-stage-container {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  overflow-y: auto;
  max-height: calc(100vh - 210px);
  scroll-behavior: smooth;
  
  /* Baseline Dual Fade Linear Gradient Mask */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

.lyric-row,
.lyric-line {
  padding: 1.15rem 1rem;
  font-size: 1.35rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border-radius: 16px;
  line-height: 1.45;
  
  /* Inactive Lines: progressive depth blur and 30% opacity */
  color: rgba(255, 255, 255, 0.35);
  filter: blur(1.5px);
  transform: scale(0.96);
  transition: all 0.32s var(--ease-smooth);
}

.lyric-row:hover,
.lyric-line:hover {
  color: rgba(255, 255, 255, 0.75);
  filter: blur(0px);
  background: rgba(255, 255, 255, 0.02);
}

/* Active Lyric Line: enlarged, white, ambient neon text glow */
.lyric-row.active,
.lyric-active {
  color: #FFFFFF !important;
  font-size: 1.75rem !important;
  font-weight: 800 !important;
  filter: blur(0px) !important;
  transform: scale(1.04) !important;
  text-shadow: 
    0 0 24px rgba(29, 185, 84, 0.55),
    0 0 48px rgba(29, 185, 84, 0.25);
  background: rgba(255, 255, 255, 0.04);
}

.lyric-row.passed {
  color: rgba(255, 255, 255, 0.22);
  filter: blur(1.8px);
}

/* =============================================================================
   12. FFT AUDIO VISUALIZER (Neon Bars & Symmetrical Waveform Canvas)
   ============================================================================= */
.fft-canvas-card {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.fft-canvas-card canvas {
  width: 100%;
  height: 100%;
  display: block;
  /* Mask gradient for soft edge blend */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.fft-mode-pills {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.fft-mode-btn {
  padding: 4px 10px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 7px;
  color: var(--text-secondary);
  transition: all 0.16s ease;
}

.fft-mode-btn.active {
  background: var(--accent-green);
  color: #000000;
}

/* =============================================================================
   13. MODALS & DIALOGS
   ============================================================================= */
.modal-backdrop-blur {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1rem;
  animation: modalFadeIn 0.22s var(--ease-smooth);
}

.modal-content-glass {
  width: 100%;
  max-width: 440px;
  background: rgba(18, 19, 25, 0.9);
  backdrop-filter: blur(36px) saturate(200%);
  -webkit-backdrop-filter: blur(36px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 2rem;
  box-shadow: var(--shadow-floating);
  animation: modalScaleUp 0.26s var(--ease-bounce);
}

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

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* Profile Dropdown Context Menu (cubic-bezier(0.16, 1, 0.3, 1)) */
.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 250px;
  background: rgba(18, 19, 25, 0.95);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 0.6rem;
  box-shadow: var(--shadow-floating);
  animation: dropdownSlideDown 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: top right;
  z-index: 100;
}

.profile-dropdown-menu.hidden {
  display: none !important;
}

@keyframes dropdownSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.profile-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.16s ease;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
}

.profile-menu-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #FFFFFF;
  transform: translateX(2px);
}

.profile-menu-item.danger:hover {
  background: rgba(244, 63, 94, 0.15);
  color: #FDA4AF;
}

/* Lyrics Empty State */
.lyrics-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-style: italic;
  text-align: center;
}

/* =============================================================================
   14. RESPONSIVE LAYOUT BREAKPOINTS
   ============================================================================= */
@media (max-width: 1024px) {
  .sidebar-wrapper {
    width: 220px;
  }
}

@media (max-width: 768px) {
  .sidebar-wrapper {
    display: none;
  }
  .master-player-bar {
    height: 84px;
    padding: 0 1rem;
  }
  .search-wrapper {
    max-width: 100%;
  }
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .aurora-orb {
    animation: none !important;
  }
}

/* YouTube IFrame Anti-Throttling Container & Responsive Embed */
#yt-player-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 200px;
  height: 200px;
  opacity: 0.001;
  pointer-events: none;
  z-index: -50;
  overflow: hidden;
}

#yt-player-wrapper iframe {
  width: 100% !important;
  height: 100% !important;
}

/* =============================================================================
   15. PARITY EXTENSIONS: SEARCH, DEEZER DETAILS & FULLSCREEN LYRICS
   ============================================================================= */

/* Search Filter Chips */
.search-chip {
  padding: 0.45rem 1.15rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8125rem;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  white-space: nowrap;
}

.search-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.search-chip.active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.25);
}

/* Category Browse Cards (Generi, Moods, Decadi) */
.category-browse-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  padding: 1.15rem;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.category-browse-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.2);
}

.category-browse-card h4 {
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.02em;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.category-browse-card .category-icon {
  position: absolute;
  bottom: -4px;
  right: -4px;
  opacity: 0.25;
  transform: rotate(12deg);
  pointer-events: none;
  transition: all 0.3s ease;
}

.category-browse-card:hover .category-icon {
  transform: rotate(4deg) scale(1.15);
  opacity: 0.45;
}

/* Search Top Result Card */
#search-top-result-card {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#search-top-result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.top-result-play-btn {
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Fullscreen Lyrics Karaoke Modal */
#lyrics-fullscreen-modal {
  animation: lyricsFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lyricsFadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lyrics-stage-scroll {
  scroll-behavior: smooth;
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

#lyrics-fullscreen-lines .lyric-row {
  font-size: var(--lyrics-font-size, 2rem) !important;
  font-weight: 800;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.35);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  padding: 0.75rem 1.25rem;
  border-radius: 1.25rem;
}

#lyrics-fullscreen-lines .lyric-row:hover {
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.04);
}

#lyrics-fullscreen-lines .lyric-row.active {
  color: #ffffff !important;
  font-size: calc(var(--lyrics-font-size, 2rem) * 1.15) !important;
  font-weight: 900 !important;
  transform: scale(1.05);
  filter: blur(0px) !important;
  opacity: 1;
  text-shadow: 
    0 0 24px rgba(255, 255, 255, 0.45),
    0 0 48px rgba(16, 185, 129, 0.3);
  background: rgba(255, 255, 255, 0.06);
}

#lyrics-fullscreen-lines .lyric-row.passed {
  color: rgba(255, 255, 255, 0.22);
  filter: blur(1px);
}
