/* =========================================================================
   VAULT — Premium Music Streaming Platform
   Complete Design System & UI Framework
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=JetBrains+Mono:wght@400;500;600;700&family=Outfit:wght@200;300;400;500;600;700;800;900&display=swap');

/* ===== ROOT DESIGN TOKENS ===== */
:root {
  /* Core palette */
  --bg-primary: #0a0a0b;
  --bg-secondary: #111113;
  --bg-tertiary: #18181b;
  --bg-card: #151517;
  --bg-elevated: #1c1c1f;
  --bg-hover: #222225;
  --bg-active: #2a2a2e;
  --bg-input: #0e0e10;
  --bg-glass: rgba(17, 17, 19, 0.75);
  --bg-glass-heavy: rgba(10, 10, 11, 0.88);

  /* Accent system */
  --accent: #e8571f;
  --accent-hover: #ff6b35;
  --accent-light: #ff8855;
  --accent-dark: #c44a18;
  --accent-glow: rgba(232, 87, 31, 0.35);
  --accent-subtle: rgba(232, 87, 31, 0.08);
  --accent-muted: rgba(232, 87, 31, 0.15);
  --accent-gradient: linear-gradient(135deg, #e8571f 0%, #ff8855 100%);
  --accent-gradient-reverse: linear-gradient(135deg, #ff8855 0%, #e8571f 100%);

  /* Text hierarchy */
  --text-primary: #f0ece4;
  --text-secondary: #8a8580;
  --text-tertiary: #6a6560;
  --text-muted: #4a4540;
  --text-ghost: #2a2520;
  --text-inverse: #0a0a0b;

  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-accent: rgba(232, 87, 31, 0.3);

  /* Semantic colors */
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.1);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.1);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.1);
  --info: #60a5fa;
  --info-bg: rgba(96, 165, 250, 0.1);

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 60px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 4px 30px var(--accent-glow);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 6px 16px rgba(0, 0, 0, 0.2);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.4), 0 12px 28px rgba(0, 0, 0, 0.3);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s var(--ease-smooth);
  --transition: 0.25s var(--ease-smooth);
  --transition-slow: 0.4s var(--ease-out);
  --transition-spring: 0.5s var(--ease-spring);

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Z-index system */
  --z-base: 1;
  --z-dropdown: 50;
  --z-sticky: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-toast: 400;
  --z-tooltip: 500;

  /* Player height */
  --player-height: 88px;
  --sidebar-width: 240px;
  --right-sidebar-width: 320px;
}


/* ===== RESET & BASE ===== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  font-size: inherit;
  transition: var(--transition);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input,
select,
textarea {
  font-family: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

::selection {
  background: var(--accent);
  color: white;
}


/* ===== SCROLLBAR ===== */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-active);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-active) transparent;
}


/* ===== UTILITY CLASSES ===== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-accent {
  color: var(--accent);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
}

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

.font-serif {
  font-family: 'Syne', sans-serif;
}


/* ===== NOISE TEXTURE (applied globally) ===== */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}


/* =========================================================================
   BUTTONS
   ========================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
  transition: all 0.2s var(--ease-smooth);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
  z-index: -1;
}

.btn:hover::before {
  opacity: 1;
}

.btn:active {
  transform: scale(0.97);
}

/* Primary */
.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 8px rgba(232, 87, 31, 0.25);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

/* Ghost */
.btn-ghost {
  color: var(--text-secondary);
  background: transparent;
}

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

/* Outline */
.btn-outline {
  border: 1.5px solid var(--border-medium);
  color: var(--text-primary);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

/* Glass */
.btn-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-glass:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
}

/* Danger */
.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.2);
}

/* Sizes */
.btn-xs {
  padding: 4px 10px;
  font-size: 0.72rem;
  border-radius: var(--radius-sm);
  gap: 4px;
}

.btn-sm {
  padding: 7px 16px;
  font-size: 0.8rem;
  gap: 6px;
}

.btn-lg {
  padding: 14px 36px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-xl {
  padding: 18px 48px;
  font-size: 1.1rem;
  border-radius: var(--radius-xl);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-icon.sm {
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
}

.btn-icon.xs {
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}

.btn-icon.lg {
  width: 52px;
  height: 52px;
  font-size: 1.2rem;
}

.btn-block {
  width: 100%;
}

/* Button group */
.btn-group {
  display: inline-flex;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.btn-group .btn {
  border-radius: 0;
  border-right: 1px solid var(--border);
}

.btn-group .btn:last-child {
  border-right: none;
}


/* =========================================================================
   FORM ELEMENTS
   ========================================================================= */

.form-group {
  margin-bottom: 22px;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: var(--transition);
}

.form-group:focus-within label {
  color: var(--accent);
}

.form-input {
  width: 100%;
  padding: 13px 18px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: all 0.2s var(--ease-smooth);
  outline: none;
}

.form-input:hover {
  border-color: var(--border-light);
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle), 0 0 20px rgba(232, 87, 31, 0.08);
  background: var(--bg-primary);
}

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

.form-input-icon {
  position: relative;
}

.form-input-icon .icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--transition);
}

.form-input-icon input {
  padding-left: 44px;
}

.form-input-icon:focus-within .icon {
  color: var(--accent);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.form-error-text {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 6px;
}

/* Checkbox */
.form-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.form-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-xs);
  transition: var(--transition);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.form-checkbox input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.form-checkbox input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.65rem;
  font-weight: 900;
}


/* =========================================================================
   LANDING PAGE — Background (shared with Auth pages)
   ========================================================================= */

/* Animated background */
.landing-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 800px 600px at 15% 15%, rgba(232, 87, 31, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 600px 400px at 85% 75%, rgba(232, 87, 31, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 50% 50%, rgba(232, 87, 31, 0.02) 0%, transparent 70%),
    var(--bg-primary);
}

.landing-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 256px;
  opacity: 0.8;
}

.landing-bg::after {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 87, 31, 0.03) 0%, transparent 70%);
  animation: float-orb 20s ease-in-out infinite alternate;
}

@keyframes float-orb {
  0% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(-50px, 80px) scale(1.1);
  }

  66% {
    transform: translate(30px, -40px) scale(0.95);
  }

  100% {
    transform: translate(-20px, 60px) scale(1.05);
  }
}


/* =========================================================================
   AUTH PAGES (Login / Register)
   ========================================================================= */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  position: relative;
  padding: 24px;
}

.auth-page .landing-bg {
  position: fixed;
}

.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
}

.auth-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 52px 44px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s var(--ease-out);
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
}

.auth-header {
  text-align: center;
  margin-bottom: 40px;
}

.auth-header .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.auth-header .logo .logo-icon {
  width: 34px;
  height: 34px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: white;
  box-shadow: 0 2px 12px rgba(232, 87, 31, 0.25);
}

.auth-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.auth-card .btn-primary {
  width: 100%;
  padding: 14px;
  margin-top: 12px;
  font-size: 0.95rem;
  font-weight: 700;
}

.auth-footer {
  text-align: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.auth-footer a {
  color: var(--accent);
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-error {
  background: var(--danger-bg);
  border: 1px solid rgba(248, 113, 113, 0.2);
  color: var(--danger);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 22px;
  display: none;
  animation: shake 0.4s var(--ease-spring);
  font-weight: 500;
}

.auth-error.show {
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-6px);
  }

  75% {
    transform: translateX(6px);
  }
}

/* Separator */
.auth-separator {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-separator::before,
.auth-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}


/* =========================================================================
   DASHBOARD LAYOUT
   ========================================================================= */

.dashboard {
  min-height: 100vh;
  background: var(--bg-primary);
  position: relative;
}


/* ========== LEFT SIDEBAR ========== */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 28px 0 calc(var(--player-height) + 16px);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: var(--z-sticky);
}

.sidebar::-webkit-scrollbar {
  width: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  margin-bottom: 32px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-primary);
}

.sidebar-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: white;
  box-shadow: 0 2px 10px rgba(232, 87, 31, 0.25);
  flex-shrink: 0;
}

.sidebar-section {
  margin-bottom: 6px;
  padding: 0 10px;
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  margin-bottom: 8px;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.sidebar-section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  margin: 2px 0;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.25s var(--ease-out);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  position: relative;
  border-radius: 12px;
}

.sidebar-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 50%;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-light));
  opacity: 0;
  transition: all 0.3s var(--ease-out);
}

.sidebar-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-link.active {
  color: var(--text-primary);
  background: var(--accent-subtle);
  font-weight: 600;
}

.sidebar-link.active::before {
  opacity: 1;
  transform: translateY(-50%) scaleY(1);
}

/* Icon bubbles */
.sidebar-link-bubble {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.3s var(--ease-out);
  flex-shrink: 0;
}

.sidebar-link-bubble .icon {
  font-size: 0.78rem;
  transition: all 0.25s;
  width: auto;
  text-align: center;
}

.sidebar-link:hover .sidebar-link-bubble {
  background: var(--accent-subtle);
  border-color: rgba(232, 87, 31, 0.12);
}

.sidebar-link:hover .sidebar-link-bubble .icon {
  color: var(--accent);
  transform: scale(1.08);
}

.sidebar-link.active .sidebar-link-bubble {
  background: var(--accent-muted);
  border-color: rgba(232, 87, 31, 0.18);
  box-shadow: 0 2px 10px rgba(232, 87, 31, 0.1);
}

.sidebar-link.active .sidebar-link-bubble .icon {
  color: var(--accent);
}

/* Heart bubble special color */
.sidebar-link-bubble.heart .icon {
  color: var(--text-secondary);
}

.sidebar-link:hover .sidebar-link-bubble.heart {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.12);
}

.sidebar-link:hover .sidebar-link-bubble.heart .icon {
  color: #f87171;
}

.sidebar-link.active .sidebar-link-bubble.heart {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.18);
  box-shadow: 0 2px 10px rgba(248, 113, 113, 0.1);
}

.sidebar-link.active .sidebar-link-bubble.heart .icon {
  color: #f87171;
}

/* Legacy icon style (fallback) */
.sidebar-link .icon {
  width: 22px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.sidebar-link:hover .icon {
  transform: scale(1.08);
}

.sidebar-spacer {
  flex: 1;
}

/* ── Sidebar Now Playing Mini ── */
.sidebar-np {
  position: relative;
  z-index: 1;
  margin: 0 10px 12px;
  padding: 12px 14px;
  background: rgba(232, 87, 31, 0.04);
  border: 1px solid rgba(232, 87, 31, 0.08);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: default;
  transition: all 0.3s;
}

.sidebar-np:hover {
  background: rgba(232, 87, 31, 0.06);
  border-color: rgba(232, 87, 31, 0.14);
}

.sidebar-np-indicator {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
  flex-shrink: 0;
}

.sidebar-np-bar {
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  animation: sidebarNpBar 1.2s ease-in-out infinite;
}

.sidebar-np-bar:nth-child(1) { height: 60%; animation-delay: 0s; }
.sidebar-np-bar:nth-child(2) { height: 100%; animation-delay: 0.2s; }
.sidebar-np-bar:nth-child(3) { height: 40%; animation-delay: 0.4s; }

@keyframes sidebarNpBar {
  0%, 100% { height: 30%; }
  50% { height: 100%; }
}

.sidebar-np-info {
  flex: 1;
  min-width: 0;
}

.sidebar-np-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-np-artist {
  font-size: 0.62rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* ── Sidebar User Card ── */
.sidebar-user {
  padding: 14px;
  margin: 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
}

.sidebar-user::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(232, 87, 31, 0.15), transparent 50%, rgba(232, 87, 31, 0.08));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}

.sidebar-user:hover {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.06);
}

.sidebar-user:hover::before {
  opacity: 1;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(232, 87, 31, 0.2);
  transition: all 0.3s;
}

.sidebar-user:hover .sidebar-user-avatar {
  transform: scale(1.06);
  box-shadow: 0 4px 18px rgba(232, 87, 31, 0.3);
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.58rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}


/* ========== MAIN CONTENT AREA ========== */

.main-content {
  margin-left: var(--sidebar-width);
  margin-right: var(--right-sidebar-width);
  overflow-y: auto;
  min-height: 100vh;
  padding-top: 80px;
  padding-bottom: calc(var(--player-height) + 40px);
  position: relative;
}

/* Main header / Top bar — floating pill navbar */
.main-header {
  position: fixed;
  top: 14px;
  left: calc(var(--sidebar-width) + 14px);
  right: calc(var(--right-sidebar-width) + 14px);
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 22px;
  background: rgba(10, 10, 12, 0.6);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  height: 54px;
  gap: 10px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-header.scrolled {
  background: rgba(10, 10, 12, 0.88);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.main-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.nav-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.nav-breadcrumb .separator {
  color: var(--text-muted);
}

.nav-breadcrumb .current {
  color: var(--text-primary);
  font-weight: 600;
}

/* Search Bar */
.search-bar {
  position: relative;
  flex: 1;
  max-width: 420px;
  min-width: 140px;
}

.search-bar input {
  width: 100%;
  padding: 8px 72px 8px 36px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  outline: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-bar input:focus {
  border-color: rgba(232, 87, 31, 0.35);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: 0 0 0 3px rgba(232, 87, 31, 0.07);
}

.search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 400;
}

.search-bar .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.72rem;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-bar:focus-within .search-icon {
  color: var(--accent);
}

/* Search clear button */
.search-clear {
  position: absolute;
  right: 44px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.07);
  border: none;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.55rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
}

.search-clear.visible {
  opacity: 1;
  pointer-events: auto;
}

.search-clear:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.main-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-link {
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.header-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.header-link.active {
  color: var(--accent);
  background: var(--accent-subtle);
}

/* User menu button */
.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid transparent;
  margin-left: 2px;
}

.user-menu-btn:hover {
  border-color: rgba(232, 87, 31, 0.3);
}

.user-menu-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.72rem;
  color: white;
}

.user-menu-name {
  font-size: 0.85rem;
  font-weight: 500;
}


/* ========== HERO BANNER (Dashboard) ========== */

.hero-banner {
  position: relative;
  margin: 28px 32px 0;
  height: 320px;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: linear-gradient(135deg, #141416 0%, #1f1510 40%, #1a1210 100%);
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.6s var(--ease-out);
}

.hero-banner-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(232, 87, 31, 0.12) 0%, transparent 50%),
    linear-gradient(to right, rgba(10, 10, 11, 0.6) 30%, transparent 70%);
  z-index: 1;
}

.hero-banner-content {
  position: relative;
  z-index: 2;
  padding: 44px 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  max-width: 55%;
}

.hero-banner-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 3.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-banner-label::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease infinite;
}

.hero-banner-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 16px;
  letter-spacing: -1.5px;
}

.hero-banner-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 24px;
}

.hero-banner-stats {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.hero-banner-stats .accent-text {
  color: var(--accent);
  font-weight: 700;
}

.hero-banner-stats .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}

.hero-banner-image {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 48%;
  z-index: 0;
}

.hero-banner-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(20, 20, 22, 1) 0%, rgba(20, 20, 22, 0.4) 40%, transparent 70%);
  z-index: 1;
}

.hero-banner-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* ========== CONTENT SECTIONS ========== */

.content-section {
  padding: 40px 36px 0;
  animation: fadeInUp 0.5s var(--ease-out);
}

.content-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.content-section-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.content-section-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}


/* ========== ALBUM / TRACK GRID ========== */

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 22px;
}

.album-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: all 0.35s var(--ease-out);
  cursor: pointer;
  position: relative;
}

.album-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent) 0%, transparent 50%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s;
  padding: 1px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.album-card:hover {
  background: var(--bg-elevated);
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover), 0 20px 40px -12px rgba(0, 0, 0, 0.35);
}

.album-card:hover::after {
  opacity: 0.5;
}

/* Staggered card entrance animations */
.album-grid .album-card {
  animation: fadeInUp 0.4s var(--ease-out) both;
}

.album-grid .album-card:nth-child(1) {
  animation-delay: 0.03s;
}

.album-grid .album-card:nth-child(2) {
  animation-delay: 0.06s;
}

.album-grid .album-card:nth-child(3) {
  animation-delay: 0.09s;
}

.album-grid .album-card:nth-child(4) {
  animation-delay: 0.12s;
}

.album-grid .album-card:nth-child(5) {
  animation-delay: 0.15s;
}

.album-grid .album-card:nth-child(6) {
  animation-delay: 0.18s;
}

.album-cover {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-tertiary);
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.album-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out);
}

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

.album-cover .play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s var(--ease-smooth);
}

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

.play-overlay .play-btn {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
  box-shadow: 0 6px 20px rgba(232, 87, 31, 0.4);
  transform: scale(0.7) translateY(8px);
  transition: all 0.3s var(--ease-spring);
}

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

.album-cover .no-art {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  color: var(--text-muted);
  background: linear-gradient(135deg, var(--bg-tertiary), rgba(232, 87, 31, 0.04));
}

.album-title {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.album-artist {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ========== TRACK LIST ========== */

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

.track-list-header {
  display: grid;
  grid-template-columns: 42px 48px 1fr 1fr 80px 60px 60px 44px;
  align-items: center;
  gap: 14px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.track-list-header span {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.track-item {
  display: grid;
  grid-template-columns: 42px 48px 1fr 1fr 80px 60px 60px 44px;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  transition: all 0.2s var(--ease-smooth);
  cursor: pointer;
  position: relative;
}

.track-item:nth-child(even) {
  background: rgba(255, 255, 255, 0.01);
}

.track-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: transparent;
  transition: background 0.2s;
}

.track-item:hover {
  background: var(--bg-hover);
}

.track-item:hover::before {
  background: linear-gradient(90deg, var(--accent-subtle) 0%, transparent 60%);
}

.track-item.playing {
  background: var(--accent-subtle);
  border-left: 3px solid var(--accent);
  box-shadow: inset 4px 0 12px -4px rgba(232, 87, 31, 0.15);
}

.track-item.playing::before {
  background: linear-gradient(90deg, rgba(232, 87, 31, 0.12) 0%, transparent 50%);
}

.track-number {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  position: relative;
  transition: var(--transition);
}

.track-item:hover .track-number {
  color: transparent;
}

.track-item:hover .track-number::after {
  content: '▶';
  color: var(--accent);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
}

.track-item.playing .track-number {
  color: transparent;
}

.track-item.playing .track-number::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='4' height='16' rx='1' fill='%23e8571f'%3E%3Canimate attributeName='height' values='16;8;16' dur='0.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='y' values='4;8;4' dur='0.8s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='10' y='4' width='4' height='16' rx='1' fill='%23e8571f'%3E%3Canimate attributeName='height' values='8;16;8' dur='0.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='y' values='8;4;8' dur='0.8s' repeatCount='indefinite'/%3E%3C/rect%3E%3Crect x='17' y='4' width='4' height='16' rx='1' fill='%23e8571f'%3E%3Canimate attributeName='height' values='12;8;12' dur='0.8s' repeatCount='indefinite'/%3E%3Canimate attributeName='y' values='6;8;6' dur='0.8s' repeatCount='indefinite'/%3E%3C/rect%3E%3C/svg%3E");
  background-size: contain;
}

.track-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-tertiary);
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.track-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-thumb .no-art {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-muted);
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
}

.track-info {
  min-width: 0;
}

.track-title-text {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.track-item.playing .track-title-text {
  color: var(--accent);
}

.track-artist-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-album-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.track-plays {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  text-align: right;
}

.track-duration {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  text-align: right;
}

.track-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.2s;
}

.track-item:hover .track-actions {
  opacity: 1;
}

.track-action-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.track-action-btn:hover {
  color: var(--accent);
  background: var(--accent-subtle);
}

.track-action-btn.favorited {
  color: var(--accent);
}


/* ========== RIGHT SIDEBAR ========== */

.right-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--right-sidebar-width);
  background: linear-gradient(180deg, #0e0e10 0%, #0a0a0c 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.04);
  padding: 20px;
  overflow-y: auto;
  padding-bottom: calc(var(--player-height) + 24px);
  z-index: var(--z-sticky);
}

.right-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.right-sidebar-header h3 {
  font-family: 'Syne', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.right-sidebar-header .more-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.right-sidebar-header .more-btn:hover {
  color: var(--accent);
  background: var(--accent-subtle);
}

/* ── Now Playing Card (v2) ── */
.now-playing-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 20px;
  background: linear-gradient(180deg, rgba(28, 28, 32, 0.5) 0%, rgba(14, 14, 16, 0.3) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.now-playing-card:hover {
  border-color: rgba(232, 87, 31, 0.15);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

/* Ambient glow behind art */
.np-glow {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(232, 87, 31, 0.1) 0%, transparent 70%);
  background-size: cover;
  background-position: center;
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.now-playing-card.has-track .np-glow {
  opacity: 1;
}

.now-playing-art {
  position: relative;
  z-index: 1;
  width: calc(100% - 28px);
  margin: 14px auto 0;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.now-playing-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.now-playing-card:hover .now-playing-art img {
  transform: scale(1.04);
}

.now-playing-art .no-art {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.015);
}

.now-playing-info {
  position: relative;
  z-index: 1;
  padding: 16px 18px 18px;
  text-align: center;
}

.now-playing-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.now-playing-artist {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 14px;
}

/* Now playing action buttons row */
.np-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.np-action-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.np-action-btn:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.06);
}

.np-action-btn.favorited {
  color: #e8571f;
}

.np-action-btn.favorited:hover {
  color: #ff8855;
  background: rgba(232, 87, 31, 0.08);
}

.np-action-btn.expand {
  color: rgba(255, 255, 255, 0.25);
}

.np-action-btn.expand:hover {
  color: var(--accent);
  background: rgba(232, 87, 31, 0.08);
}

/* ── Queue/Recent Tabs (v2) ── */
.playlist-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 12px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.playlist-tab {
  flex: 1;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 7px 0;
  border-radius: 10px;
  border: none;
  background: none;
  position: relative;
}

.playlist-tab:hover {
  color: rgba(255, 255, 255, 0.55);
}

.playlist-tab.active {
  background: rgba(232, 87, 31, 0.1);
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.playlist-tab .tab-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  margin-left: 4px;
  opacity: 0.5;
}

/* ── Queue Items (v2) ── */
.qi {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 2px;
  position: relative;
  user-select: none;
}

.qi:hover {
  background: rgba(255, 255, 255, 0.035);
}

/* Active / current track */
.qi.qi-active {
  background: rgba(232, 87, 31, 0.08);
  border: 1px solid rgba(232, 87, 31, 0.12);
}

.qi.qi-active:hover {
  background: rgba(232, 87, 31, 0.12);
}

/* Left accent bar for active */
.qi.qi-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

/* Drag handle */
.qi-handle {
  opacity: 0;
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.65rem;
  cursor: grab;
  transition: opacity 0.2s;
  flex-shrink: 0;
  padding: 2px;
}

.qi:hover .qi-handle {
  opacity: 1;
}

/* Art thumbnail */
.qi-art {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.025);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

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

.qi-art .qi-noart {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.08);
}

/* Play overlay on art hover */
.qi-art-play {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: 8px;
}

.qi:hover .qi-art-play {
  opacity: 1;
}

.qi-art-play i {
  color: white;
  font-size: 0.7rem;
}

/* Info text */
.qi-info {
  flex: 1;
  min-width: 0;
}

.qi-title {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.15px;
  color: var(--text-primary);
  transition: color 0.2s;
}

.qi.qi-active .qi-title {
  color: var(--accent);
}

.qi-artist {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Duration */
.qi-dur {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

/* Equalizer animation for active track */
.qi-eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  flex-shrink: 0;
}

.qi-eq-bar {
  width: 2.5px;
  background: var(--accent);
  border-radius: 1px;
  animation: eqBounce 0.8s ease-in-out infinite alternate;
}

.qi-eq-bar:nth-child(1) { height: 40%; animation-delay: 0s; }
.qi-eq-bar:nth-child(2) { height: 70%; animation-delay: 0.15s; }
.qi-eq-bar:nth-child(3) { height: 50%; animation-delay: 0.3s; }

@keyframes eqBounce {
  0% { height: 30%; }
  100% { height: 100%; }
}

/* Drag states */
.qi.dragging {
  opacity: 0.4;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.qi.drag-over {
  border-top: 2px solid var(--accent);
}

/* ── Queue empty state ── */
.queue-empty {
  text-align: center;
  padding: 48px 16px;
}

.queue-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.08);
}

.queue-empty h3 {
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 4px;
}

.queue-empty p {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.15);
  line-height: 1.5;
}

/* Playlist items (keep for backwards compat) */
.playlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 2px;
}

.playlist-item:hover {
  background: var(--bg-hover);
}

.playlist-item-art {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-tertiary);
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.playlist-item-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playlist-item-art .no-art {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-muted);
}

.playlist-item-info {
  flex: 1;
  min-width: 0;
}

.playlist-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.playlist-item-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}


/* =========================================================================
   BOTTOM PLAYER BAR
   ========================================================================= */

/* ── Bottom Player Bar ── */
.bottom-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-overlay);
  height: var(--player-height);
  background: linear-gradient(180deg, rgba(14, 14, 16, 0.94) 0%, rgba(10, 10, 11, 0.98) 100%);
  backdrop-filter: blur(40px) saturate(1.8);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  display: grid;
  grid-template-columns: minmax(200px, 320px) 1fr minmax(160px, 320px);
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.35), 0 -2px 12px rgba(0, 0, 0, 0.2);
}

/* Top highlight line — accent gradient glow */
.bottom-player::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(232, 87, 31, 0.2) 35%, rgba(232, 87, 31, 0.2) 65%, transparent 95%);
  z-index: 1;
}

/* Ambient accent glow behind the play button area */
.bottom-player::after {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 80px;
  background: radial-gradient(ellipse, rgba(232, 87, 31, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Track Info (left) ── */
.player-track-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.player-track-art {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-tertiary);
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: all 0.35s var(--ease-out);
  position: relative;
}

.player-track-art::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.player-track-art:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  transform: scale(1.06);
}

.player-track-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-track-art .no-art {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-muted);
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-elevated));
}

.player-track-details {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-track-title {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  transition: color 0.2s;
}

.player-track-title:hover {
  color: var(--accent);
}

.player-track-artist {
  font-size: 0.76rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}

.player-track-artist:hover {
  color: var(--text-primary);
}

/* ── Player Controls (center) ── */
.player-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}

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

.player-btn {
  color: var(--text-secondary);
  font-size: 0.92rem;
  transition: all 0.2s var(--ease-out);
  padding: 8px;
  border-radius: var(--radius-full);
  position: relative;
}

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

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

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

/* Play/pause — hero button */
.player-btn.play-pause {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(232, 87, 31, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  padding: 0;
  transition: all 0.25s var(--ease-out);
  position: relative;
}

.player-btn.play-pause::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1.5px solid rgba(232, 87, 31, 0);
  transition: all 0.35s var(--ease-out);
}

.player-btn.play-pause:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(232, 87, 31, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.player-btn.play-pause:hover::before {
  border-color: rgba(232, 87, 31, 0.2);
}

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

/* Skip buttons — slightly larger hit area */
.player-btn.skip {
  font-size: 1rem;
  padding: 8px;
}

.player-btn.skip:hover {
  color: var(--text-primary);
}

/* ── Progress Bar ── */
.player-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 560px;
}

.player-time {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  min-width: 40px;
  text-align: center;
  letter-spacing: 0.5px;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  cursor: pointer;
  position: relative;
  transition: height 0.2s var(--ease-out);
}

.progress-bar:hover {
  height: 6px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
  border-radius: var(--radius-full);
  position: relative;
  transition: width 0.15s linear;
}

/* Glow trail on progress fill */
.progress-fill::before {
  content: '';
  position: absolute;
  right: 0;
  top: -4px;
  bottom: -4px;
  width: 40px;
  background: linear-gradient(90deg, transparent, rgba(232, 87, 31, 0.12));
  border-radius: var(--radius-full);
  pointer-events: none;
}

/* Scrub handle */
.progress-fill::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  background: white;
  box-shadow: 0 0 0 3px rgba(232, 87, 31, 0.25), 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s var(--ease-spring);
}

.progress-bar:hover .progress-fill::after {
  transform: translateY(-50%) scale(1);
}

/* ── Extra Controls (right) ── */
.player-extra {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  transition: background 0.2s;
}

.volume-control:hover {
  background: rgba(255, 255, 255, 0.03);
}

.volume-slider {
  width: 88px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.volume-slider:hover {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  background: white;
  box-shadow: 0 0 0 2px rgba(232, 87, 31, 0.15), 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 3px rgba(232, 87, 31, 0.25), 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* Firefox slider thumb */
.volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  background: white;
  border: none;
  box-shadow: 0 0 0 2px rgba(232, 87, 31, 0.15), 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}


/* =========================================================================
   FULLSCREEN PLAYER — Immersive cinematic overlay
   ========================================================================= */

/* ── Overlay shell ── */
.fs-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-primary);
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.fs-overlay.open {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.fs-overlay.closing {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition-duration: 0.3s;
}

/* ── Blurred background ── */
.fs-bg {
  position: absolute;
  inset: -60px;
  z-index: 0;
  overflow: hidden;
}
.fs-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(100px) brightness(0.22) saturate(1.8);
  transform: scale(1.4);
  transition: opacity 0.8s ease;
}
.fs-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(10, 10, 11, 0.25) 0%, transparent 70%),
    radial-gradient(ellipse at 50% 100%, rgba(10, 10, 11, 0.95) 0%, transparent 70%),
    rgba(10, 10, 11, 0.55);
}
/* Noise texture */
.fs-bg-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 200px;
  opacity: 0.5;
  pointer-events: none;
}

/* ── Top bar ── */
.fs-topbar {
  position: relative;
  z-index: 10;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  flex-shrink: 0;
}
.fs-close-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
}
.fs-close-btn:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}
.fs-close-btn i {
  font-size: 0.72rem;
  transition: transform 0.25s ease;
}
.fs-close-btn:hover i {
  transform: translateY(2px);
}
.fs-topbar-source {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Main content ── */
.fs-main {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 520px;
  padding: 0 32px 32px;
  gap: 0;
  overflow: hidden;
}

/* ── Album art ── */
.fs-art-wrapper {
  position: relative;
  margin-bottom: 36px;
  flex-shrink: 0;
}
.fs-art {
  width: 340px;
  height: 340px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.55),
    0 8px 32px rgba(0, 0, 0, 0.3);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.6s ease;
  position: relative;
}
.fs-art.playing {
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.55),
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 80px rgba(232, 87, 31, 0.08);
}
.fs-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease, transform 0.6s ease;
}
.fs-art .fs-no-art {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(30, 30, 34, 1), rgba(20, 20, 22, 1));
}
/* Ambient glow behind art */
.fs-art-glow {
  position: absolute;
  inset: 10%;
  z-index: -1;
  border-radius: 20px;
  filter: blur(60px) brightness(0.6) saturate(2);
  opacity: 0.5;
  transition: opacity 0.8s ease;
  overflow: hidden;
}
.fs-art-glow img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fs-overlay.open .fs-art-glow {
  opacity: 0.55;
}

/* ── Track info ── */
.fs-info {
  text-align: center;
  width: 100%;
  margin-bottom: 28px;
  min-height: 80px;
}
.fs-title {
  font-family: 'Syne', 'DM Sans', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: #fff;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  transition: opacity 0.3s ease;
}
.fs-artist {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  margin-bottom: 3px;
  transition: opacity 0.3s ease;
}
.fs-album {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.28);
  font-weight: 400;
  transition: opacity 0.3s ease;
}

/* ── Progress bar ── */
.fs-progress-container {
  width: 100%;
  margin-bottom: 20px;
  padding: 0;
}
.fs-progress-track {
  position: relative;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  cursor: pointer;
  transition: height 0.2s ease;
  margin-bottom: 10px;
}
.fs-progress-track:hover {
  height: 6px;
}
.fs-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #e8571f, #ff7a45);
  border-radius: 100px;
  width: 0%;
  position: relative;
  transition: width 0.1s linear;
}
.fs-progress-fill::after {
  content: '';
  position: absolute;
  right: -7px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px rgba(232, 87, 31, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fs-progress-track:hover .fs-progress-fill::after {
  transform: translateY(-50%) scale(1);
}
.fs-progress-track.dragging {
  height: 6px;
}
.fs-progress-track.dragging .fs-progress-fill::after {
  transform: translateY(-50%) scale(1.15);
}
.fs-progress-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
}

/* ── Transport controls ── */
.fs-transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
  width: 100%;
}
.fs-ctrl-btn {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.15rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 10px;
  border-radius: 50%;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.fs-ctrl-btn:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
  transform: scale(1.1);
}
.fs-ctrl-btn:active {
  transform: scale(0.95);
}
.fs-ctrl-btn.active {
  color: var(--accent);
}
.fs-ctrl-btn.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}
.fs-ctrl-btn.skip {
  font-size: 1.35rem;
  color: rgba(255, 255, 255, 0.7);
}
.fs-ctrl-btn.skip:hover {
  color: #fff;
}

/* Play/Pause hero button */
.fs-play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8571f, #d44a15);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 4px 24px rgba(232, 87, 31, 0.35),
    0 0 0 0 rgba(232, 87, 31, 0);
  flex-shrink: 0;
}
.fs-play-btn:hover {
  transform: scale(1.08);
  box-shadow:
    0 8px 36px rgba(232, 87, 31, 0.45),
    0 0 0 6px rgba(232, 87, 31, 0.08);
}
.fs-play-btn:active {
  transform: scale(0.95);
}

/* ── Bottom actions row ── */
.fs-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

/* Favorite button */
.fs-fav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
}
.fs-fav-btn:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}
.fs-fav-btn.active {
  color: #ff4d6a;
  background: rgba(255, 77, 106, 0.1);
  border-color: rgba(255, 77, 106, 0.25);
}
.fs-fav-btn.active:hover {
  background: rgba(255, 77, 106, 0.18);
}
/* Heart pop animation */
@keyframes fsHeartPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.35); }
  60% { transform: scale(0.92); }
  100% { transform: scale(1); }
}
.fs-fav-btn.pop {
  animation: fsHeartPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Volume control ── */
.fs-volume {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fs-vol-btn {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
  transition: color 0.2s ease;
}
.fs-vol-btn:hover {
  color: rgba(255, 255, 255, 0.8);
}
.fs-vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  outline: none;
  cursor: pointer;
  transition: height 0.15s ease;
}
.fs-vol-slider:hover {
  height: 5px;
}
.fs-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.fs-vol-slider:hover::-webkit-slider-thumb {
  transform: scale(1.2);
}
.fs-vol-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
}

/* ── Keyboard hint ── */
.fs-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.12);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

/* ── Animations ── */
@keyframes fsArtIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes fsInfoIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fs-overlay.open .fs-art-wrapper {
  animation: fsArtIn 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}
.fs-overlay.open .fs-info {
  animation: fsInfoIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}
.fs-overlay.open .fs-progress-container {
  animation: fsInfoIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}
.fs-overlay.open .fs-transport {
  animation: fsInfoIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}
.fs-overlay.open .fs-actions-row {
  animation: fsInfoIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}


/* =========================================================================
   FULLSCREEN PLAYER — RESPONSIVE
   ========================================================================= */

/* Large screens — bigger art */
@media (min-height: 820px) and (min-width: 768px) {
  .fs-art {
    width: 380px;
    height: 380px;
  }
  .fs-main {
    max-width: 560px;
  }
  .fs-title {
    font-size: 2rem;
  }
}

/* Extra tall screens */
@media (min-height: 960px) and (min-width: 1024px) {
  .fs-art {
    width: 420px;
    height: 420px;
    border-radius: 24px;
  }
  .fs-art-glow {
    border-radius: 24px;
  }
  .fs-main {
    max-width: 600px;
  }
  .fs-art-wrapper {
    margin-bottom: 44px;
  }
  .fs-title {
    font-size: 2.2rem;
  }
}


/* =========================================================================
   UPLOAD PAGE
   ========================================================================= */

.upload-page {
  min-height: 100vh;
  background: var(--bg-primary);
  padding: 32px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.upload-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.upload-header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.upload-zone {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-2xl);
  padding: 80px 48px;
  text-align: center;
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
  margin-bottom: 40px;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.upload-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, var(--accent-subtle) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.35s;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(232, 87, 31, 0.04);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.upload-zone:hover::before,
.upload-zone.dragover::before {
  opacity: 1;
}

.upload-zone .upload-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  color: var(--text-muted);
  transition: var(--transition);
}

.upload-zone:hover .upload-icon {
  transform: scale(1.1);
}

.upload-zone h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
  position: relative;
}

.upload-zone p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  position: relative;
}

.upload-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  animation: fadeInUp 0.3s var(--ease-out);
}

.upload-item:hover {
  background: var(--bg-elevated);
}

.upload-item .file-icon {
  font-size: 1.6rem;
  color: var(--accent);
}

.upload-item-info {
  flex: 1;
}

.upload-item-name {
  font-size: 0.92rem;
  font-weight: 600;
}

.upload-item-size {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.upload-item-progress {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.upload-item-progress .fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width 0.4s var(--ease-out);
}

.upload-item .status {
  font-size: 0.82rem;
  font-weight: 600;
  min-width: 60px;
  text-align: right;
}

.upload-item .status.success {
  color: var(--success);
}

.upload-item .status.error {
  color: var(--danger);
}


/* =========================================================================
   VIEW TABS
   ========================================================================= */

.view-tabs {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 100px;
  padding: 3px;
  border: none;
}

.view-tab {
  padding: 5px 14px;
  font-size: 0.74rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  border-radius: 100px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border: none;
  background: none;
}

.view-tab:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
}

.view-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}


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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes breathe {

  0%,
  100% {
    box-shadow: 0 0 20px var(--accent-glow);
  }

  50% {
    box-shadow: 0 0 40px var(--accent-glow);
  }
}


/* =========================================================================
   TOAST NOTIFICATIONS
   ========================================================================= */

.toast {
  position: fixed;
  bottom: calc(var(--player-height) + 20px);
  right: 24px;
  z-index: var(--z-toast);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 22px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.35s var(--ease-spring);
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(16px);
  max-width: 360px;
}

.toast::before {
  content: '';
  width: 4px;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 4px 0 0 4px;
  background: var(--success);
}

.toast.success::before {
  background: var(--success);
}

.toast.error::before {
  background: var(--danger);
}

.toast.warning::before {
  background: var(--warning);
}


/* =========================================================================
   EMPTY STATES
   ========================================================================= */

.empty-state {
  text-align: center;
  padding: 80px 32px;
  color: var(--text-muted);
  animation: fadeIn 0.5s var(--ease-out);
}

.empty-state .empty-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  display: inline-block;
  animation: pulse 3s ease infinite;
}

.empty-state h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-weight: 600;
}

.empty-state p {
  font-size: 0.88rem;
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.6;
}


/* =========================================================================
   LOADING & SPINNER
   ========================================================================= */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.06);
  border-top-color: var(--accent);
  border-radius: var(--radius-full);
  animation: spin 0.7s linear infinite;
}


/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 37%, var(--bg-tertiary) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: var(--radius-sm);
}


/* =========================================================================
   MOBILE NAVIGATION
   ========================================================================= */

.mobile-nav {
  display: none;
  position: fixed;
  bottom: var(--player-height);
  left: 0;
  right: 0;
  z-index: var(--z-overlay);
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  padding: 8px 0;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 16px;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  border-radius: var(--radius-md);
}

.mobile-nav-item .icon {
  font-size: 1.25rem;
  transition: var(--transition);
}

.mobile-nav-item.active {
  color: var(--accent);
}

.mobile-nav-item.active .icon {
  transform: scale(1.1);
}


/* =========================================================================
   CONTEXT MENU / DROPDOWN
   ========================================================================= */

.context-menu {
  position: fixed;
  z-index: var(--z-modal);
  min-width: 200px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 6px;
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.15s var(--ease-out);
  transform-origin: top left;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.context-menu-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.context-menu-item.danger {
  color: var(--danger);
}

.context-menu-item.danger:hover {
  background: var(--danger-bg);
}

.context-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}


/* =========================================================================
   MODAL / DIALOG
   ========================================================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s var(--ease-smooth);
  padding: 24px;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl);
  padding: 32px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.3s var(--ease-spring);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  margin-bottom: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}


/* =========================================================================
   BADGE / TAG
   ========================================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid rgba(232, 87, 31, 0.15);
}

.badge.success {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(52, 211, 153, 0.15);
}

.badge.danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.15);
}

.badge.info {
  background: var(--info-bg);
  color: var(--info);
  border-color: rgba(96, 165, 250, 0.15);
}


/* =========================================================================
   TOOLTIP
   ========================================================================= */

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.15s var(--ease-smooth);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  z-index: var(--z-tooltip);
}

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


/* =========================================================================
   TABLES
   ========================================================================= */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table thead th {
  padding: 12px 16px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-primary);
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

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

.data-table tbody td {
  padding: 14px 16px;
}


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

@media (max-width: 1280px) {
  :root {
    --right-sidebar-width: 280px;
  }
}

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

  .sidebar {
    display: none;
  }

  .right-sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
    margin-right: 0;
    padding-bottom: calc(var(--player-height) + 80px);
  }

  .mobile-nav {
    display: flex;
    justify-content: space-around;
  }

  .main-header {
    left: 12px;
    right: 12px;
    top: 12px;
    padding: 0 8px 0 18px;
    height: 50px;
    gap: 8px;
  }

  .search-bar {
    max-width: 100%;
  }

  .view-tabs {
    display: none;
  }

  .hero-banner {
    margin: 12px 16px 0;
    height: 220px;
  }

  .hero-banner-title {
    font-size: 1.8rem;
  }

  .content-section {
    padding: 20px 16px 0;
  }

  .bottom-player {
    grid-template-columns: 1fr auto 1fr;
    padding: 0 16px;
    height: 72px;
  }

  .player-track-details .player-track-artist {
    display: none;
  }

  .player-extra {
    gap: 4px;
  }
}

/* =========================================================================
   MOBILE — PHONES (768px and below)
   Complete mobile-first layout overhaul
   ========================================================================= */
@media (max-width: 768px) {
  /* ── Global scaling ── */
  :root {
    --player-height: 64px;
  }

  /* ── Main header — compact floating pill ── */
  .main-header {
    left: 10px;
    right: 10px;
    top: 10px;
    height: 46px;
    padding: 0 6px 0 16px;
    gap: 6px;
  }

  .user-menu-btn {
    padding: 2px;
  }

  .user-menu-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.62rem;
  }

  /* ── Search bar — full width, thinner ── */
  .search-bar {
    max-width: 100%;
  }

  .search-bar input {
    padding: 7px 60px 7px 32px;
    font-size: 0.78rem;
    border-radius: 100px;
  }

  .search-bar .search-icon {
    left: 11px;
    font-size: 0.7rem;
  }

  .search-clear {
    right: 40px;
    width: 16px;
    height: 16px;
    font-size: 0.48rem;
  }

  /* ── Hero banner — shorter, tighter ── */
  .hero-banner {
    height: 160px;
    margin: 10px 12px 0;
    border-radius: var(--radius-xl);
  }

  .hero-banner-content {
    padding: 20px 22px;
    max-width: 100%;
  }

  .hero-banner-title {
    font-size: 1.35rem;
  }

  .hero-banner-desc {
    display: none;
  }

  .hero-banner-image {
    width: 35%;
    opacity: 0.5;
  }

  .hero-banner-actions .btn {
    font-size: 0.72rem;
    padding: 8px 14px;
  }

  /* ── Content sections — tighter padding ── */
  .content-section {
    padding: 16px 12px 0;
  }

  .section-header {
    margin-bottom: 12px;
  }

  .section-title {
    font-size: 1rem;
  }

  /* ── Album/artist grids — smaller cards ── */
  .album-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }

  .album-card {
    padding: 8px;
    border-radius: 12px;
  }

  .album-art {
    border-radius: 8px;
  }

  .album-name {
    font-size: 0.82rem;
    margin-top: 8px;
  }

  .album-info {
    font-size: 0.68rem;
  }

  .artist-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .artist-card {
    padding: 8px;
  }

  .artist-avatar {
    width: 56px;
    height: 56px;
  }

  .artist-name {
    font-size: 0.78rem;
  }

  /* ── Track list — compact rows ── */
  .track-item {
    grid-template-columns: 28px 36px 1fr 54px 32px;
    gap: 8px;
    padding: 7px 10px;
    font-size: 0.8rem;
  }

  .track-list-header {
    grid-template-columns: 28px 36px 1fr 54px 32px;
    gap: 8px;
    padding: 6px 10px;
  }

  .track-art {
    width: 36px;
    height: 36px;
    border-radius: 6px;
  }

  .track-album-text,
  .track-genre,
  .track-plays,
  .track-list-header span:nth-child(4),
  .track-list-header span:nth-child(5),
  .track-list-header span:nth-child(6) {
    display: none;
  }

  .track-title {
    font-size: 0.82rem;
  }

  .track-artist {
    font-size: 0.7rem;
  }

  /* ── Bottom player — mobile compact ── */
  .bottom-player {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    height: 64px;
    padding: 0 10px;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
  }

  .player-track-info {
    gap: 10px;
  }

  .player-track-art {
    width: 42px;
    height: 42px;
    border-radius: 8px;
  }

  .player-track-details {
    max-width: 120px;
  }

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

  .player-track-artist {
    font-size: 0.68rem;
    display: none;
  }

  .player-track-info .btn-icon {
    display: none;
  }

  .player-controls {
    gap: 2px;
  }

  .player-buttons {
    gap: 10px;
  }

  .player-btn {
    font-size: 0.85rem;
    padding: 4px;
  }

  .player-btn.play-pause {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  #shuffleBtn,
  #repeatBtn {
    display: none;
  }

  .player-progress {
    display: none;
  }

  .player-extra .volume-control {
    display: none;
  }

  .player-extra {
    gap: 2px;
  }

  #queueToggle {
    display: none;
  }

  /* ── Mobile nav — larger touch targets ── */
  .mobile-nav {
    padding: 6px 0 env(safe-area-inset-bottom, 8px);
  }

  .mobile-nav-item {
    padding: 6px 14px;
    font-size: 0.58rem;
  }

  .mobile-nav-item .icon {
    font-size: 1.15rem;
  }

  /* ── Fullscreen player — mobile optimized ── */
  .fs-topbar {
    padding: 14px 18px;
  }
  .fs-main {
    padding: 0 24px 24px;
    max-width: 100%;
  }
  .fs-art {
    width: 260px;
    height: 260px;
    border-radius: 16px;
  }
  .fs-art-glow {
    border-radius: 16px;
  }
  .fs-art-wrapper {
    margin-bottom: 28px;
  }
  .fs-title {
    font-size: 1.35rem;
  }
  .fs-artist {
    font-size: 0.9rem;
  }
  .fs-transport {
    gap: 18px;
  }
  .fs-play-btn {
    width: 56px;
    height: 56px;
    font-size: 1.2rem;
  }
  .fs-vol-slider {
    width: 80px;
  }
  .fs-hint {
    display: none;
  }

  /* ── Upload page ── */
  .upload-page {
    padding: 16px;
  }

  .upload-zone {
    padding: 36px 20px;
  }

  /* ── Auth pages ── */
  .auth-card {
    padding: 32px 24px;
  }

  /* ── Command palette mobile ── */
  .cmd-palette {
    max-width: 94vw;
    border-radius: 16px;
  }
}

/* =========================================================================
   MOBILE — SMALL PHONES (480px and below)
   ========================================================================= */
@media (max-width: 480px) {
  .album-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .album-card {
    padding: 7px;
  }

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

  .hero-banner {
    height: 140px;
    margin: 8px;
    border-radius: 14px;
  }

  .hero-banner-title {
    font-size: 1.15rem;
  }

  .hero-banner-label {
    font-size: 0.55rem;
  }

  .content-section {
    padding: 12px 10px 0;
  }

  .section-title {
    font-size: 0.92rem;
  }

  .fs-art {
    width: 220px;
    height: 220px;
  }

  .fs-title {
    font-size: 1.2rem;
  }

  .fs-play-btn {
    width: 52px;
    height: 52px;
    font-size: 1.1rem;
  }

  .fs-transport {
    gap: 14px;
  }

  .track-item {
    grid-template-columns: 28px 32px 1fr 48px;
    gap: 6px;
    padding: 6px 8px;
  }

  .track-list-header {
    grid-template-columns: 28px 32px 1fr 48px;
    gap: 6px;
    padding: 6px 8px;
  }

  .track-art {
    width: 32px;
    height: 32px;
  }

  .track-more-btn {
    display: none;
  }

  .bottom-player {
    padding: 0 8px;
    height: 60px;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
  }

  .player-track-art {
    width: 38px;
    height: 38px;
  }

  .player-track-details {
    max-width: 90px;
  }

  .player-btn.play-pause {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
  }

  .main-header {
    left: 8px;
    right: 8px;
    top: 8px;
    height: 44px;
    padding: 0 5px 0 14px;
  }

  .search-bar input {
    padding: 6px 54px 6px 28px;
    font-size: 0.76rem;
    border-radius: 100px;
  }

  .search-bar .search-icon {
    left: 10px;
    font-size: 0.68rem;
  }

  .mobile-nav-item {
    padding: 5px 10px;
    font-size: 0.52rem;
  }

  .mobile-nav-item .icon {
    font-size: 1.05rem;
  }
}


/* =========================================================================
   PRINT STYLES
   ========================================================================= */

@media print {

  .sidebar,
  .right-sidebar,
  .bottom-player,
  .mobile-nav {
    display: none !important;
  }

  .main-content {
    margin: 0;
  }

  body {
    background: white;
    color: black;
  }
}


/* =========================================================================
   ACCESSIBILITY: REDUCED MOTION
   ========================================================================= */

@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;
  }
}


/* =========================================================================
   HIGH CONTRAST MODE
   ========================================================================= */

@media (prefers-contrast: high) {
  :root {
    --border: rgba(255, 255, 255, 0.2);
    --border-light: rgba(255, 255, 255, 0.3);
    --text-secondary: #b0aca6;
    --text-muted: #7a756f;
  }
}