/* =============================================================
   LUNIFY — Premium Music & Podcast Platform
   Comprehensive Stylesheet
   ============================================================= */

/* ----- 1. CUSTOM PROPERTIES / THEMING ----- */
:root {
  /* Brand */
  --primary: #8B5CF6;
  --primary-dark: #7C3AED;
  --primary-light: #A78BFA;
  --accent: #EC4899;
  --accent-dark: #DB2777;

  /* Backgrounds */
  --bg-dark: #0F0B15;
  --bg-card: #1A1425;
  --bg-surface: #241B30;
  --bg-hover: #2D2240;
  --bg-elevated: #302345;

  /* Text */
  --text: #F8F7FF;
  --text-muted: #9CA3AF;
  --text-dim: #6B7280;

  /* Status */
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #3B82F6;

  /* Sizing */
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --header-height: 64px;
  --player-height: 90px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 0.2s var(--ease-out);
  --transition-med: 0.35s var(--ease-out);
  --transition-slow: 0.5s var(--ease-out);

  /* Shadows */
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-elevated: 0 8px 40px rgba(0, 0, 0, 0.6);
}

/* ----- 2. RESET & BASE ----- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--accent); }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
  color: var(--text);
}

img {
  display: block;
  max-width: 100%;
}

ul { list-style: none; }

/* ----- 3. SCROLLBAR ----- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.55);
}

/* ----- 4. ANIMATED BACKGROUND ----- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
  animation: bgShift 20s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes bgShift {
  0%   { opacity: 1; transform: scale(1) translate(0, 0); }
  50%  { opacity: 0.85; transform: scale(1.05) translate(-2%, 2%); }
  100% { opacity: 1; transform: scale(1) translate(2%, -1%); }
}

/* ----- 5. PAGE TRANSITION ----- */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}
.page-transition.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.page-transition__logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: logoPulse 1.4s ease-in-out infinite;
}
.page-transition__logo i {
  font-size: 2.6rem;
  -webkit-text-fill-color: var(--primary);
  animation: logoSpin 2s var(--ease-out) infinite;
}
@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
@keyframes logoSpin {
  0%, 100% { transform: rotate(0deg); }
  25%      { transform: rotate(-10deg); }
  75%      { transform: rotate(10deg); }
}

/* ----- 6. APP LAYOUT ----- */
.app {
  position: relative;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: 1fr var(--player-height);
  height: 100vh;
  width: 100vw;
  z-index: 1;
  transition: grid-template-columns var(--transition-med);
}
.app.sidebar-collapsed {
  grid-template-columns: var(--sidebar-collapsed) 1fr;
}

/* ----- 7. SIDEBAR ----- */
.sidebar {
  grid-row: 1 / -1;
  background: rgba(15, 11, 21, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid rgba(139, 92, 246, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width var(--transition-med);
  z-index: 100;
}

/* Sidebar Header */
.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px;
  min-height: 68px;
}
.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}
.sidebar__logo i {
  font-size: 1.6rem;
  color: var(--primary);
  flex-shrink: 0;
}
.sidebar__brand {
  font-family: 'Poppins', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.sidebar__toggle {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
}
.sidebar__toggle:hover {
  background: var(--bg-hover);
  color: var(--text);
}

/* Collapsed sidebar */
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .sidebar__brand,
.sidebar.collapsed .sidebar__label,
.sidebar.collapsed .sidebar__link span,
.sidebar.collapsed .sidebar__now-playing p {
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
  width: 0;
  overflow: hidden;
}
.sidebar.collapsed .sidebar__header {
  justify-content: center;
  padding: 20px 0;
}
.sidebar.collapsed .sidebar__logo {
  justify-content: center;
}
.sidebar.collapsed .sidebar__link {
  justify-content: center;
  padding: 12px 0;
}
.sidebar.collapsed .sidebar__item.active .sidebar__link::before {
  left: 8px;
}

/* Sidebar Nav */
.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px;
}
.sidebar__section {
  margin-bottom: 28px;
}
.sidebar__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 0 12px 8px;
  white-space: nowrap;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.sidebar__item {
  margin-bottom: 2px;
}
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}
.sidebar__link i {
  font-size: 1.15rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.sidebar__link span {
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.sidebar__link:hover {
  color: var(--text);
  background: var(--bg-hover);
}
.sidebar__item.active .sidebar__link {
  color: var(--text);
  background: rgba(139, 92, 246, 0.15);
}
.sidebar__item.active .sidebar__link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: left var(--transition-fast);
}
.sidebar__item.active .sidebar__link i {
  color: var(--primary);
}

/* Sidebar Now Playing */
.sidebar__now-playing {
  padding: 16px;
  border-top: 1px solid rgba(139, 92, 246, 0.1);
  text-align: center;
}
.sidebar__vinyl {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
}
.sidebar__track-name {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.sidebar__artist-name {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

/* ----- 8. HEADER ----- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  height: var(--header-height);
  background: transparent;
  transition: background var(--transition-med), box-shadow var(--transition-med);
}
.header.scrolled {
  background: rgba(15, 11, 21, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.header__left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header__nav-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}
.header__nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

/* Search Bar */
.header__search {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  padding: 0 16px;
  height: 42px;
  width: 280px;
  max-width: 460px;
  transition: all var(--transition-med);
  overflow: hidden;
}
.header__search.expanded {
  width: 460px;
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15), var(--shadow-glow);
}
.header__search-icon {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-right: 10px;
  flex-shrink: 0;
  transition: color var(--transition-fast);
}
.header__search.expanded .header__search-icon {
  color: var(--primary);
}
.header__search-input {
  flex: 1;
  height: 100%;
  font-size: 0.88rem;
  color: var(--text);
}
.header__search-input::placeholder {
  color: var(--text-dim);
}
.header__search-clear {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--transition-fast);
}
.header__search.expanded .header__search-clear {
  opacity: 1;
  transform: scale(1);
}
.header__search-clear:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

/* Header Right */
.header__right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header__icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.header__icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}
.header__badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--accent);
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

.header__user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 5px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  transition: all var(--transition-fast);
}
.header__user-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.header__avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: white;
}
.header__username {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ----- 9. MAIN CONTENT ----- */
.main {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ----- 10. VIEWS & TRANSITIONS ----- */
.view {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  animation: none;
  padding-bottom: 40px;
}
.view.active {
  display: block;
  animation: viewEnter 0.45s var(--ease-out) forwards;
}
.view.exiting {
  display: block;
  animation: viewExit 0.3s var(--ease-out) forwards;
}
@keyframes viewEnter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes viewExit {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-12px); }
}
.view__title {
  font-size: 2rem;
  padding: 28px 28px 4px;
  background: linear-gradient(135deg, var(--text), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.view__subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 0 28px 24px;
}

/* ----- 11. HERO BANNER ----- */
.hero {
  position: relative;
  height: 380px;
  overflow: hidden;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  margin-bottom: 32px;
}
.hero__slider {
  position: relative;
  width: 100%;
  height: 100%;
}
.hero__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 60px;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.hero__slide.active {
  opacity: 1;
  transform: scale(1);
}
.hero__content {
  position: relative;
  z-index: 3;
  max-width: 560px;
}
.hero__title {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 14px;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
}
.hero__subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 26px;
  line-height: 1.5;
}

/* Hero dots */
.hero__dots {
  position: absolute;
  bottom: 32px;
  left: 60px;
  display: flex;
  gap: 8px;
  z-index: 5;
}
.hero__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  transition: all var(--transition-med);
}
.hero__dot.active {
  width: 32px;
  background: #fff;
}

/* Hero Wave */
.hero__wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  z-index: 4;
  line-height: 0;
}
.hero__wave svg {
  width: 100%;
  height: 50px;
  fill: var(--bg-dark);
}
.hero__wave svg path {
  animation: waveMove 8s ease-in-out infinite alternate;
}
@keyframes waveMove {
  0%   { d: path("M0,64 C360,120 720,0 1080,64 C1260,96 1380,80 1440,64 L1440,120 L0,120 Z"); }
  100% { d: path("M0,80 C280,20 600,100 960,50 C1200,20 1360,90 1440,70 L1440,120 L0,120 Z"); }
}

/* ----- 12. FLOATING PARTICLES ----- */
.hero__particles {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}
.particle {
  position: absolute;
  bottom: -30px;
  animation: particleFloat linear infinite;
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
  user-select: none;
}
@keyframes particleFloat {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-450px) rotate(360deg); opacity: 0; }
}

/* ----- 13. SPARKLES ----- */
.hero__sparkles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.sparkle {
  position: absolute;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  animation: sparkleFlicker ease-in-out infinite;
}
@keyframes sparkleFlicker {
  0%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); }
  50%      { opacity: 1; transform: scale(1.2) rotate(180deg); }
}

/* ----- 14. SECTIONS ----- */
.section {
  margin-bottom: 36px;
  padding: 0 28px;
}
.section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.section__title {
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section__title i {
  color: var(--primary);
  font-size: 1.1rem;
}
.section__see-all {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition-fast);
}
.section__see-all:hover {
  color: var(--primary);
}
.section__see-all i {
  font-size: 0.7rem;
  transition: transform var(--transition-fast);
}
.section__see-all:hover i {
  transform: translateX(4px);
}

/* ----- 15. SCROLL CONTAINERS ----- */
.scroll-container {
  position: relative;
}
.scroll-container__track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 4px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.scroll-container__track::-webkit-scrollbar {
  height: 4px;
}
.scroll-container__track::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-full);
}
.scroll-container__fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50px;
  pointer-events: none;
  z-index: 2;
}
.scroll-container__fade--left {
  left: 0;
  background: linear-gradient(to right, var(--bg-dark), transparent);
}
.scroll-container__fade--right {
  right: 0;
  background: linear-gradient(to left, var(--bg-dark), transparent);
}

/* ----- 16. CARDS ----- */
.card {
  flex-shrink: 0;
  width: 180px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 14px;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  will-change: transform;
  animation: cardEnter 0.4s var(--ease-out) both;
}
@keyframes cardEnter {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.card:hover {
  box-shadow: var(--shadow-glow), var(--shadow-card);
}
.card__img {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  overflow: hidden;
}
.card__img-icon {
  font-size: 2.2rem;
  color: rgba(255, 255, 255, 0.6);
}
.card__play-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--transition-fast);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.5);
}
.card:hover .card__play-btn {
  opacity: 1;
  transform: translateY(0);
}
.card__play-btn:hover {
  transform: scale(1.1) !important;
  background: var(--primary-dark);
}
.card__title {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.card__subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card grid (podcasts, etc.) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
}
.card-grid .card {
  width: auto;
}

/* ----- 17. ARTIST AVATARS ----- */
.artist-avatar {
  flex-shrink: 0;
  text-align: center;
  width: 120px;
  cursor: pointer;
  scroll-snap-align: start;
  animation: cardEnter 0.4s var(--ease-out) both;
}
.artist-avatar__img {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.6);
  transition: transform var(--transition-med), box-shadow var(--transition-med);
  border: 3px solid transparent;
}
.artist-avatar:hover .artist-avatar__img {
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
  border-color: var(--primary);
}
.artist-avatar__name {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scroll-container__track--artists {
  gap: 14px;
}

/* ----- 18. CATEGORY CARDS ----- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.category-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid transparent;
  transition: all var(--transition-med);
  animation: cardEnter 0.4s var(--ease-out) both;
}
.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, var(--cat-color), transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-med);
}
.category-card:hover::before {
  opacity: 1;
}
.category-card:hover {
  background: var(--bg-hover);
  box-shadow: 0 0 28px color-mix(in srgb, var(--cat-color) 25%, transparent);
  transform: translateY(-4px);
}
.category-card__icon {
  display: block;
  font-size: 1.8rem;
  color: var(--cat-color, var(--primary));
  margin-bottom: 10px;
  transition: transform var(--transition-med);
}
.category-card:hover .category-card__icon {
  transform: scale(1.15);
}
.category-card__name {
  font-size: 0.82rem;
  font-weight: 600;
}

/* ----- 19. SKELETON LOADING ----- */
.skeleton-card .skeleton {
  animation: shimmer 1.8s ease-in-out infinite;
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-hover) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-md);
}
.skeleton--img {
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 12px;
}
.skeleton--circle {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  margin: 0 auto 10px;
}
.skeleton--title {
  height: 14px;
  width: 80%;
  margin-bottom: 8px;
}
.skeleton--text {
  height: 10px;
  width: 60%;
}
.skeleton--short {
  width: 50%;
  margin: 0 auto;
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ----- 20. AUDIO PLAYER ----- */
.player {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: rgba(15, 11, 21, 0.92);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-top: 1px solid rgba(139, 92, 246, 0.12);
  z-index: 200;
  height: var(--player-height);
}

/* Track Info */
.player__track-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.player__artwork {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-surface);
}
.player__artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.player__artwork-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.4rem;
}

/* Vinyl overlay on artwork */
.player__vinyl-overlay {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  opacity: 0;
  transition: opacity var(--transition-med);
}
.player__artwork.spinning .player__vinyl-overlay {
  opacity: 1;
}
.vinyl-grooves {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at center,
    transparent 0px,
    transparent 2px,
    rgba(255, 255, 255, 0.04) 2px,
    rgba(255, 255, 255, 0.04) 3px
  );
  animation: vinylSpin 3s linear infinite;
  animation-play-state: paused;
}
.player__artwork.spinning .vinyl-grooves {
  animation-play-state: running;
}
@keyframes vinylSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.player__meta {
  min-width: 0;
}
.player__title {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player__artist {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player__like-btn {
  font-size: 1rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.player__like-btn:hover {
  color: var(--accent);
  transform: scale(1.15);
}
.player__like-btn.liked {
  color: var(--accent);
}

/* Player Controls */
.player__controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.player__buttons {
  display: flex;
  align-items: center;
  gap: 18px;
}
.player__btn {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}
.player__btn:hover {
  color: var(--text);
  transform: scale(1.1);
}
.player__btn.active {
  color: var(--primary);
}

/* Play button */
.player__btn--play {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--text);
  color: var(--bg-dark);
  font-size: 1rem;
  transition: all var(--transition-fast);
}
.player__btn--play:hover {
  transform: scale(1.08);
  color: var(--bg-dark);
}

/* Pulse ring */
.player__pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: var(--radius-full);
  border: 2px solid var(--primary);
  opacity: 0;
  pointer-events: none;
}
.player.playing .player__pulse-ring {
  animation: pulseRing 2s var(--ease-out) infinite;
}
@keyframes pulseRing {
  0%   { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* Progress bar */
.player__progress {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 600px;
}
.player__time {
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 36px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.player__progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  cursor: pointer;
  position: relative;
  transition: height var(--transition-fast);
}
.player__progress-bar:hover {
  height: 6px;
}
.player__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius-full);
  position: relative;
  width: 0%;
  transition: width 0.1s linear;
}
.player__progress-thumb {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 12px;
  height: 12px;
  background: var(--text);
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
  transition: transform var(--transition-fast);
}
.player__progress-bar:hover .player__progress-thumb {
  transform: translateY(-50%) scale(1);
}

/* Player Extra / Volume */
.player__extra {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.player__volume {
  display: flex;
  align-items: center;
  gap: 6px;
}
.player__volume-bar {
  width: 90px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  cursor: pointer;
  position: relative;
  transition: height var(--transition-fast);
}
.player__volume-bar:hover {
  height: 6px;
}
.player__volume-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-full);
  position: relative;
  width: 80%;
}
.player__volume-thumb {
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 10px;
  height: 10px;
  background: var(--text);
  border-radius: var(--radius-full);
  transition: transform var(--transition-fast);
}
.player__volume-bar:hover .player__volume-thumb {
  transform: translateY(-50%) scale(1);
}

/* ----- 21. EQUALIZER BARS ----- */
.player__equalizer {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 20px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.player.playing .player__equalizer {
  opacity: 1;
}
.eq-bar {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--primary);
  animation: eqBounce 0.8s ease-in-out infinite alternate;
  animation-play-state: paused;
}
.player.playing .eq-bar {
  animation-play-state: running;
}
.eq-bar:nth-child(1) { height: 8px;  animation-delay: 0s;    }
.eq-bar:nth-child(2) { height: 14px; animation-delay: 0.15s; }
.eq-bar:nth-child(3) { height: 10px; animation-delay: 0.3s;  }
.eq-bar:nth-child(4) { height: 16px; animation-delay: 0.45s; }
.eq-bar:nth-child(5) { height: 6px;  animation-delay: 0.6s;  }
@keyframes eqBounce {
  0%   { height: 4px; }
  100% { height: 20px; }
}

/* ----- 22. VINYL RECORD (sidebar) ----- */
.vinyl-record {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, var(--bg-dark) 22%, #1a1128 24%, #2a1f3d 45%, #1a1128 46%, #2a1f3d 48%, #1a1128 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: vinylSpin 3s linear infinite;
  animation-play-state: paused;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.player.playing ~ .sidebar .vinyl-record,
.player.playing .vinyl-record {
  animation-play-state: running;
}
.vinyl-record__inner {
  width: 28%;
  height: 28%;
  border-radius: var(--radius-full);
  background: var(--primary);
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.5);
}

/* ----- 23. BUTTONS ----- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  overflow: hidden;
  transition: all var(--transition-fast);
}
.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.35);
}
.btn--primary:hover {
  box-shadow: 0 6px 28px rgba(139, 92, 246, 0.55);
  transform: translateY(-2px);
}
.btn--full {
  width: 100%;
}
.btn--hero {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 14px 32px;
  font-size: 0.95rem;
}
.btn--hero:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
.btn--social {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.15rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.btn--social:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  transform: translateY(-2px);
}

/* Ripple effect */
.ripple {
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-full);
  transform: translate(-50%, -50%) scale(0);
  animation: rippleExpand 0.7s var(--ease-out);
  pointer-events: none;
}
@keyframes rippleExpand {
  to { transform: translate(-50%, -50%) scale(40); opacity: 0; }
}

/* ----- 24. MODAL ----- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-med);
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal {
  position: relative;
  width: 420px;
  max-width: 94vw;
  max-height: 92vh;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(139, 92, 246, 0.15);
  box-shadow: var(--shadow-elevated), 0 0 60px rgba(139, 92, 246, 0.1);
  overflow: hidden;
  transform: translateY(30px) scale(0.95);
  transition: transform var(--transition-med);
}
.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}
.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  z-index: 10;
  transition: all var(--transition-fast);
}
.modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}
.modal__panel {
  display: none;
  padding: 40px 32px;
  animation: modalSlideIn 0.4s var(--ease-out);
}
.modal__panel.active {
  display: block;
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.modal__header {
  text-align: center;
  margin-bottom: 28px;
}
.modal__logo {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
  color: white;
}
.modal__title {
  font-size: 1.5rem;
  margin-bottom: 6px;
}
.modal__subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
}
.modal__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-group {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 0 16px;
  height: 50px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.form-group label {
  color: var(--text-dim);
  font-size: 0.9rem;
}
.form-group input {
  flex: 1;
  height: 100%;
  font-size: 0.9rem;
}
.form-group input::placeholder {
  color: var(--text-dim);
}
.modal__divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0;
}
.modal__divider::before,
.modal__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}
.modal__divider span {
  font-size: 0.76rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.modal__social {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.modal__switch {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
}
.modal__switch a {
  font-weight: 600;
}

/* ----- 25. TOAST NOTIFICATIONS ----- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg-elevated);
  border-left: 3px solid var(--info);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.4s var(--ease-spring);
}
.toast.show {
  transform: translateX(0);
  opacity: 1;
}
.toast--success { border-left-color: var(--success); }
.toast--success i { color: var(--success); }
.toast--error { border-left-color: var(--error); }
.toast--error i { color: var(--error); }
.toast--warning { border-left-color: var(--warning); }
.toast--warning i { color: var(--warning); }
.toast--info i { color: var(--info); }

/* ----- 26. GRADIENT TEXT ANIMATION ----- */
@keyframes textGradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.text-gradient-animated {
  background: linear-gradient(270deg, var(--primary), var(--accent), var(--primary-light), var(--accent));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textGradientShift 6s ease infinite;
}

/* ----- 27. GLASS-MORPHISM UTILITY ----- */
.glass {
  background: rgba(26, 20, 37, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ----- 28. NEON GLOW UTILITY ----- */
.neon-glow {
  transition: box-shadow var(--transition-med);
}
.neon-glow:hover {
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4), 0 0 45px rgba(139, 92, 246, 0.15);
}

/* =============================================================
   29. RESPONSIVE DESIGN
   ============================================================= */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 220px;
  }
  .hero { height: 300px; }
  .hero__title { font-size: 2.4rem; }
  .hero__slide { padding: 0 36px; }
  .hero__dots { left: 36px; }
  .section { padding: 0 20px; }
  .header { padding: 0 20px; }
  .header__search { width: 220px; }
  .header__search.expanded { width: 340px; }
  .player__extra { gap: 6px; }
  .player__volume-bar { width: 70px; }
}

/* Mobile landscape / small tablet */
@media (max-width: 768px) {
  .app {
    grid-template-columns: 1fr;
  }
  .app.sidebar-collapsed {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    z-index: 500;
    transform: translateX(-100%);
    transition: transform var(--transition-med);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar.collapsed {
    width: var(--sidebar-width);
    transform: translateX(-100%);
  }
  .sidebar.collapsed.mobile-open {
    transform: translateX(0);
  }
  .main {
    grid-column: 1;
  }
  .header__search { width: 160px; }
  .header__search.expanded { width: 260px; }
  .header__username { display: none; }
  .hero { height: 260px; }
  .hero__title { font-size: 2rem; }
  .hero__subtitle { font-size: 0.95rem; }
  .hero__slide { padding: 0 24px; }
  .hero__dots { left: 24px; bottom: 24px; }

  /* Player adjustments */
  .player {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    height: auto;
    padding: 10px 14px;
    gap: 8px;
  }
  .player__track-info {
    grid-column: 1;
    grid-row: 1;
  }
  .player__controls {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .player__extra {
    grid-column: 2;
    grid-row: 1;
  }
  .player__progress { max-width: 100%; }
  .player__volume-bar { width: 60px; }
  .player__artwork { width: 44px; height: 44px; }

  .card { width: 155px; }
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 12px;
  }
  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
  }
  .category-card { padding: 18px 12px; }
}

/* Mobile portrait */
@media (max-width: 480px) {
  .header { padding: 0 14px; gap: 10px; }
  .header__nav-btn { display: none; }
  .header__search { width: 120px; }
  .header__search.expanded { width: 200px; }
  .hero { height: 220px; }
  .hero__title { font-size: 1.6rem; }
  .hero__content { max-width: 100%; }
  .btn--hero { padding: 10px 22px; font-size: 0.85rem; }
  .section { padding: 0 14px; margin-bottom: 28px; }
  .section__title { font-size: 1.15rem; }
  .card { width: 140px; padding: 10px; }
  .card__img-icon { font-size: 1.6rem; }
  .card__play-btn { width: 36px; height: 36px; }

  .player {
    grid-template-columns: 1fr auto;
    padding: 8px 10px;
  }
  .player__buttons { gap: 12px; }
  .player__btn--play { width: 36px; height: 36px; font-size: 0.85rem; }
  .player__equalizer { display: none; }
  .player__volume-bar { display: none; }
  #lyricsBtn, #fullscreenBtn { display: none; }

  .artist-avatar { width: 90px; }
  .artist-avatar__img { width: 72px; height: 72px; }
  .modal { border-radius: var(--radius-lg); }
  .modal__panel { padding: 28px 20px; }
}

/* Hover availability */
@media (hover: none) {
  .card__play-btn {
    opacity: 1;
    transform: translateY(0);
  }
  .player__progress-thumb {
    transform: translateY(-50%) scale(1);
  }
  .player__volume-thumb {
    transform: translateY(-50%) scale(1);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
