/*
   Clash Musics — Final Premium Design System
    */

:root {
  --bg-void:       #050508;
  --bg-primary:    #0a0a12;
  --bg-elevated:   #111118;
  --bg-card:       rgba(255, 255, 255, 0.025);
  --bg-card-hover: rgba(255, 255, 255, 0.058);
  --bg-glass:      rgba(12, 12, 20, 0.65);
  --bg-player:     rgba(8, 8, 14, 0.70);

  --text-primary:   #f0f0f5;
  --text-secondary: #85879c;
  --text-muted:     #42445a;

  --accent:        #8b6cff;
  --accent-soft:   #a990ff;
  --accent-glow:   rgba(139, 108, 255, 0.25);
  --pink:          #ff6b9d;
  --sky:           #3ec6ff;
  --amber:         #f5a623;
  --green:         #34d399;

  --gradient-main:  linear-gradient(135deg, #8b6cff, #ff6b9d 60%, #3ec6ff);
  --gradient-card:  linear-gradient(160deg, rgba(139,108,255,0.05) 0%, transparent 50%);

  --border-subtle:  rgba(255, 255, 255, 0.05);
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:      0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow:    0 0 40px rgba(139, 108, 255, 0.12);

  --font-display:   'Outfit', sans-serif;
  --font-body:      'Inter', sans-serif;

  --topbar-h:  60px;
  --player-h:  86px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --r-full:    9999px;

  --ease:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease2: cubic-bezier(0.33, 1, 0.68, 1);
}

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

html {
  font-size: 16px; scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none; /* Prevents pull-to-refresh on mobile for a native app feel */
}

body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text-primary);
  min-height: 100vh; overflow-x: hidden;
  touch-action: manipulation; /* Removes 300ms tap delay on mobile */
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 10px; }

/* 
   CUSTOM CURSOR
    */
.cursor-dot {
  position: fixed;
  width: 6px; height: 6px;
  background: #fff; border-radius: 50%;
  pointer-events: none; z-index: 99999;
  transform: translate(-50%, -50%);
  transition: transform 0.08s, width 0.2s, height 0.2s, background 0.3s;
}

.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  pointer-events: none; z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.35s var(--ease), height 0.35s var(--ease),
              border-color 0.3s, background 0.3s;
}

body.cursor-hover .cursor-dot {
  width: 10px; height: 10px;
  background: var(--accent);
}

body.cursor-hover .cursor-ring {
  width: 48px; height: 48px;
  border-color: var(--accent);
  background: rgba(139, 108, 255, 0.06);
}

/* Hide custom cursor on touch / small screens */
@media (hover: none), (max-width: 768px) {
  .cursor-dot, .cursor-ring { display: none !important; }
  body { cursor: auto; }
}

/* 
   BACKGROUND
  */
.bg-mesh {
  position: fixed; inset: 0; z-index: -4;
  background:
    radial-gradient(ellipse 120% 80% at 10% 80%, rgba(139,108,255,0.06) 0%, transparent 50%),
    radial-gradient(ellipse 80% 100% at 90% 10%, rgba(255,107,157,0.04) 0%, transparent 50%),
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(62,198,255,0.03) 0%, transparent 50%),
    var(--bg-void);
}

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

.orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.20; transition: background 2s ease-in-out; }
.orb--1 { width: 500px; height: 500px; background: var(--accent); top: -15%; left: -8%; animation: orbDrift 28s ease-in-out infinite; }
.orb--2 { width: 400px; height: 400px; background: var(--pink); bottom: 5%; right: -10%; animation: orbDrift 22s ease-in-out infinite reverse; }
.orb--3 { width: 350px; height: 350px; background: var(--sky); top: 50%; left: 45%; animation: orbDrift 30s ease-in-out infinite; animation-delay: -10s; }

@keyframes orbDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(60px, -40px) scale(1.08); }
  66%      { transform: translate(-40px, 50px) scale(0.94); }
}

.bg-noise {
  position: fixed; inset: 0; z-index: -1; opacity: 0.018; pointer-events: none;
  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.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.ambient-glow {
  position: fixed; inset: 0; z-index: -2;
  opacity: 0; transition: opacity 2s, background 2.5s;
  pointer-events: none; filter: blur(120px) saturate(1.5);
}
.ambient-glow.active { opacity: 0.1; }

/* 
   ANIMATIONS
   */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.hidden { display: none !important; }

/* Ripple */
.ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transform: scale(0); animation: rippleAnim 0.6s linear;
  pointer-events: none;
}
@keyframes rippleAnim { to { transform: scale(4); opacity: 0; } }

/* 
   TOP BAR
   */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 0 24px;
  background: var(--bg-glass);
  backdrop-filter: blur(40px) saturate(1.8);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 900;
}

.topbar__brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; cursor: pointer; }

.brand-logo {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  background: var(--gradient-main); display: grid; place-items: center;
  box-shadow: 0 2px 12px var(--accent-glow);
  transition: transform 0.3s var(--ease);
}
.brand-logo:hover { transform: rotate(-10deg) scale(1.05); }
.brand-logo i { font-size: 18px; color: #fff; }

.topbar__title {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.2rem; letter-spacing: -0.3px;
}

.topbar__search { flex: 1; max-width: 440px; position: relative; display: flex; align-items: center; }
.topbar__search > i { position: absolute; left: 14px; font-size: 16px; color: var(--text-muted); pointer-events: none; transition: color 0.3s; }
.topbar__search:focus-within > i { color: var(--accent-soft); }

#search-input {
  width: 100%; padding: 9px 40px;
  border: 1px solid var(--border-subtle); border-radius: var(--r-full);
  background: rgba(255,255,255,0.035);
  color: var(--text-primary); font-size: 0.85rem;
  font-family: var(--font-body); outline: none;
  transition: all 0.3s var(--ease);
}
#search-input::placeholder { color: var(--text-muted); }
#search-input:focus {
  border-color: rgba(139,108,255,0.4);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px rgba(139,108,255,0.12);
}

.search-kbd {
  position: absolute; right: 12px;
  padding: 2px 7px; border-radius: 5px;
  font-size: 0.68rem; color: var(--text-muted);
  border: 1px solid var(--border-subtle); background: rgba(255,255,255,0.03);
  pointer-events: none;
}

.topbar__nav { display: flex; gap: 3px; flex-shrink: 0; }

.nav-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: none; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-secondary);
  font-size: 19px; cursor: pointer; position: relative; overflow: hidden;
  transition: all 0.2s var(--ease);
}
@media (hover: hover) {
  .nav-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
}
.nav-btn.active { color: var(--accent-soft); background: rgba(139,108,255,0.1); }

/* 
   MAIN CONTENT
   */
.main-content {
  padding-top: calc(var(--topbar-h) + 16px);
  padding-bottom: calc(var(--player-h) + 50px);
  min-height: 100vh;
}

.hero { padding: 28px 28px 12px; }
.hero__greeting {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800; letter-spacing: -0.5px;
}
.hero__subtitle { margin-top: 4px; font-size: 0.92rem; color: var(--text-secondary); }

/* Category */
.category-section { padding: 0 28px; margin-bottom: 28px; }
.category-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.category-label { display: flex; align-items: center; gap: 8px; }
.category-label i { font-size: 1.15rem; color: var(--accent-soft); }
.category-label h2 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; letter-spacing: -0.2px; }

.category-section--featured {
  background: var(--gradient-card); border-radius: var(--radius-lg);
  padding: 20px 24px !important; margin-left: 28px; margin-right: 28px;
  border: 1px solid rgba(139,108,255,0.08);
}
.category-section--featured .category-label i { color: var(--amber); }

.category-tag {
  font-size: 0.68rem; padding: 3px 10px; border-radius: var(--r-full);
  background: rgba(245,166,35,0.1); border: 1px solid rgba(245,166,35,0.15);
  color: var(--amber); font-weight: 500;
}

.scroll-row {
  display: flex; gap: 14px;
  overflow-x: auto; overflow-y: hidden;
  padding-bottom: 6px; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain; /* Prevents horizontal scroll from swiping entire page */
}
.scroll-row::-webkit-scrollbar { height: 0; }

/* Skeleton */
.skeleton-loader { display: flex; gap: 14px; min-width: 100%; }
.skeleton-loader::before, .skeleton-loader::after {
  content: ''; min-width: 164px; height: 220px; border-radius: var(--radius-md);
  background: linear-gradient(110deg, rgba(255,255,255,0.02) 30%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 70%);
  background-size: 200% 100%; animation: shimmer 1.8s infinite ease-in-out;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* 
   SONG CARD — 3D Tilt
  */
.song-card {
  flex: 0 0 164px; scroll-snap-align: start;
  background: var(--bg-card); border: 1px solid transparent;
  border-radius: var(--radius-md); overflow: hidden;
  cursor: pointer; position: relative;
  transition: border-color 0.4s, box-shadow 0.4s, background 0.4s;
  transform-style: preserve-3d; perspective: 600px;
  will-change: transform, box-shadow; /* GPU acceleration for buttery smoothness */
}

@media (hover: hover) {
  .song-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(139,108,255,0.12);
    box-shadow: var(--shadow-glow);
  }
}

.song-card__img-wrap {
  position: relative; width: 100%; aspect-ratio: 1;
  overflow: hidden; background: var(--bg-elevated);
}

.song-card__img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.4s;
}
.song-card:hover .song-card__img { transform: scale(1.08); filter: brightness(0.65); }

.song-card__img-wrap::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.55) 0%, transparent 50%);
  z-index: 1; opacity: 0; transition: opacity 0.3s;
}
.song-card:hover .song-card__img-wrap::before { opacity: 1; }

/* Duration badge */
.song-card__duration {
  position: absolute; bottom: 6px; right: 6px;
  padding: 2px 7px; border-radius: 4px;
  background: rgba(0,0,0,0.7); font-size: 0.62rem;
  color: rgba(255,255,255,0.8); z-index: 3;
  font-variant-numeric: tabular-nums;
  opacity: 0; transition: opacity 0.3s;
}
.song-card:hover .song-card__duration { opacity: 1; }

/* Play */
.song-card__overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  z-index: 2; opacity: 0; transition: opacity 0.3s;
}
.song-card:hover .song-card__overlay { opacity: 1; }

.song-card__play-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: var(--accent); color: #fff;
  font-size: 20px; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: scale(0.5) translateY(8px); opacity: 0;
  transition: all 0.35s var(--ease);
}
.song-card:hover .song-card__play-btn { transform: scale(1) translateY(0); opacity: 1; }
.song-card__play-btn:hover { background: var(--accent-soft); transform: scale(1.08) translateY(0) !important; }

/* Like / Download */
.song-card__like-btn, .song-card__dl-btn {
  position: absolute; width: 28px; height: 28px;
  border-radius: 50%; border: none;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(6px);
  color: rgba(255,255,255,0.6); font-size: 13px;
  display: grid; place-items: center; cursor: pointer;
  opacity: 0; transform: scale(0.7);
  transition: all 0.25s var(--ease); z-index: 5;
}
.song-card__like-btn { top: 7px; right: 7px; }
.song-card__dl-btn   { bottom: 7px; left: 7px; }

.song-card:hover .song-card__like-btn,
.song-card:hover .song-card__dl-btn { opacity: 1; transform: scale(1); }

.song-card__like-btn:hover { color: var(--pink); background: rgba(255,107,157,0.2); }
.song-card__dl-btn:hover   { color: var(--sky);  background: rgba(62,198,255,0.2); }

.song-card__like-btn.liked { color: var(--pink); opacity: 1; transform: scale(1); }
.song-card__like-btn.liked i { animation: heartPop 0.35s var(--ease); }
.song-card__dl-btn.downloading { opacity: 1; transform: scale(1); color: var(--sky); pointer-events: none; }
.song-card__dl-btn.downloading i { animation: spin 0.8s linear infinite; }

@keyframes heartPop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

.song-card__info { padding: 10px 11px 12px; }
.song-card__title {
  font-size: 0.8rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.3s;
}
.song-card__artist {
  font-size: 0.7rem; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px;
}

/* Playing state */
.song-card.is-playing { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(139,108,255,0.3), 0 0 30px rgba(139,108,255,0.08); }
.song-card.is-playing .song-card__title { color: var(--accent-soft); }

.song-card.is-playing .song-card__img-wrap::after {
  content: ''; position: absolute; bottom: 6px; right: 6px; z-index: 10;
  width: 18px; height: 14px;
  background:
    linear-gradient(var(--accent-soft),var(--accent-soft)) 0px 100%/3px 50%,
    linear-gradient(var(--accent-soft),var(--accent-soft)) 5px 100%/3px 100%,
    linear-gradient(var(--accent-soft),var(--accent-soft)) 10px 100%/3px 35%,
    linear-gradient(var(--accent-soft),var(--accent-soft)) 15px 100%/3px 75%;
  background-repeat: no-repeat;
  animation: eq 0.9s ease-in-out infinite alternate;
}

@keyframes eq {
  0%  { background-size: 3px 35%,3px 100%,3px 55%,3px 25%; }
  25% { background-size: 3px 75%,3px 45%,3px 100%,3px 55%; }
  50% { background-size: 3px 45%,3px 65%,3px 25%,3px 100%; }
  75% { background-size: 3px 100%,3px 35%,3px 75%,3px 45%; }
  100%{ background-size: 3px 55%,3px 85%,3px 45%,3px 65%; }
}

/* 
   LIST VIEWS
    */
.view-header { padding: 20px 28px 6px; }
.view-title {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
  display: flex; align-items: center; gap: 10px; padding: 16px 28px 4px;
}
.view-title i { color: var(--pink); }
.view-subtitle { color: var(--text-secondary); font-size: 0.85rem; padding-left: 28px; }

.search-results-grid, .liked-songs-grid, .history-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(164px, 1fr));
  gap: 14px; padding: 16px 28px;
}
.search-results-grid .song-card, .liked-songs-grid .song-card, .history-grid .song-card { flex: none; width: 100%; }

.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 80px 20px; text-align: center; color: var(--text-muted);
}
.empty-state i { font-size: 48px; margin-bottom: 14px; opacity: 0.35; }
.empty-state p { font-size: 1.1rem; font-weight: 600; color: var(--text-secondary); }
.empty-state span { font-size: 0.85rem; margin-top: 4px; }

/* 
   MULTI-LANE SEARCH VIEWS
   */
.search-section { display: flex; flex-direction: column; gap: 12px; }
.search-section-title { font-size: 1.25rem; font-weight: 700; color: #fff; padding: 0 28px; }
.search-h-scroll { display: flex; gap: 16px; overflow-x: auto; padding: 0 28px 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.search-h-scroll::-webkit-scrollbar { display: none; }
.search-h-scroll > * { flex-shrink: 0; width: 160px; scroll-snap-align: start; }

.artist-card, .album-card { background: var(--bg-surface); border-radius: var(--radius-lg); padding: 12px; text-align: center; cursor: pointer; transition: all 0.2s; border: 1px solid var(--border-light); }
.artist-card:hover, .album-card:hover { transform: translateY(-4px); background: var(--bg-hover); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.artist-card__img-wrap { width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; margin-bottom: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.album-card__img-wrap { width: 100%; aspect-ratio: 1; border-radius: var(--radius-md); overflow: hidden; margin-bottom: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.artist-card img, .album-card img { width: 100%; height: 100%; object-fit: cover; }
.artist-card__name, .album-card__title { font-weight: 600; font-size: 0.95rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.album-card__artist { font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Global interactive spans */
.artist-link, .album-link { cursor: pointer; pointer-events: auto; }
.artist-link:hover, .album-link:hover { text-decoration: underline; color: var(--text-secondary); filter: brightness(1.2); }

/* 
   DETAIL VIEWS (Artist / Album)
   */
.detail-header { position: relative; padding: 60px 28px 24px; border-bottom: 1px solid var(--border-subtle); background: var(--gradient-card); border-radius: 0 0 var(--radius-xl) var(--radius-xl); margin-bottom: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.detail-back-btn { width: 36px; height: 36px; border: none; border-radius: 50%; background: var(--bg-glass); backdrop-filter: blur(12px); color: var(--text-primary); font-size: 18px; display: grid; place-items: center; cursor: pointer; transition: all 0.2s; position: absolute; top: 16px; left: 28px; z-index: 10; }
.detail-back-btn:hover { background: rgba(255,255,255,0.1); transform: translateX(-2px); }
.detail-header-content { display: flex; align-items: flex-end; gap: 24px; margin-top: 24px; }
.detail-art-wrap { width: 180px; height: 180px; flex-shrink: 0; box-shadow: 0 8px 30px rgba(0,0,0,0.5); border-radius: var(--radius-lg); overflow: hidden; }
.detail-art { width: 100%; height: 100%; object-fit: cover; }
.detail-info { flex: 1; min-width: 0; padding-bottom: 6px; }
.detail-type { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-secondary); font-weight: 600; margin-bottom: 6px; display: block; }
.detail-title { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 4rem); font-weight: 800; line-height: 1.1; letter-spacing: -1px; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.detail-subtitle { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 18px; }
.detail-play-all { background: var(--accent); color: #fff; border-radius: 30px; padding: 0 24px; height: 44px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9rem; width: auto; cursor: pointer; }
.detail-play-all:hover { background: var(--accent-soft); color: var(--bg-void); transform: scale(1.05); }
.detail-play-all i { font-size: 1.2rem; }

/* Make song card text clickable */
.song-card__title.clickable { cursor: pointer; pointer-events: auto; }
.song-card__title.clickable:hover { text-decoration: underline; color: var(--text-primary); }

/* 
   NOW PLAYING OVERLAY
   */
.np-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: var(--bg-void);
  animation: npIn 0.5s var(--ease);
}

@keyframes npIn {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: translateY(0); }
}

.np-close {
  position: absolute; top: 20px; left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.08); border: none;
  width: 40px; height: 28px; border-radius: 14px;
  color: var(--text-secondary); font-size: 18px;
  cursor: pointer; display: grid; place-items: center;
  transition: all 0.2s;
}
.np-close:hover { color: #fff; background: rgba(255,255,255,0.14); }

.np-bg {
  position: absolute; inset: 0;
  filter: blur(100px) saturate(1.8); opacity: 0.2;
  background-size: cover; background-position: center;
}

.np-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: 28px; padding: 40px; max-width: 400px; width: 100%;
}

.np-art-wrap {
  position: relative; width: 260px; height: 260px;
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: npArtFloat 3s ease-in-out infinite;
}

@keyframes npArtFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.np-art { width: 100%; height: 100%; object-fit: cover; }
.np-vinyl {
  position: absolute; inset: 0;
  border: 3px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
}

.np-info { text-align: center; width: 100%; max-width: 100%; padding: 0 10px; }
.np-title {
  font-family: var(--font-display); font-size: 1.4rem;
  font-weight: 700; letter-spacing: -0.3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.np-artist { 
  font-size: 0.9rem; color: var(--text-secondary); margin-top: 4px; 
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.np-progress { width: 100%; }
.np-seek {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 4px;
  background: rgba(255,255,255,0.1); outline: none; cursor: pointer;
}
.np-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; cursor: pointer;
  box-shadow: 0 0 8px rgba(255,255,255,0.2);
}
.np-times {
  display: flex; justify-content: space-between;
  font-size: 0.72rem; color: var(--text-muted); margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.np-controls-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}
.np-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.np-controls-row--primary {
  gap: 12px;
}
.np-controls-row--secondary {
  gap: 24px;
}
@media (max-width: 400px) {
  .np-controls-row--primary {
    gap: 8px;
  }
  .np-btn {
    width: 38px !important;
    height: 38px !important;
    font-size: 18px !important;
  }
  .np-btn--play {
    width: 50px !important;
    height: 50px !important;
    font-size: 22px !important;
  }
}

.np-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: transparent; color: var(--text-primary);
  font-size: 20px; display: grid; place-items: center; cursor: pointer;
  transition: all 0.2s var(--ease);
}
.np-btn:hover { background: rgba(255,255,255,0.08); transform: scale(1.08); }

.np-btn--play {
  width: 60px; height: 60px; background: #fff; color: var(--bg-void);
  font-size: 24px; box-shadow: 0 4px 20px rgba(255,255,255,0.12);
}
.np-btn--play:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(255,255,255,0.18); }

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

/* 
   QUEUE PANEL
    */
.queue-panel {
  position: fixed; right: 0; top: var(--topbar-h); bottom: var(--player-h);
  width: 320px; z-index: 850;
  background: var(--bg-glass); backdrop-filter: blur(24px);
  border-left: 1px solid var(--border-subtle);
  animation: slideLeft 0.3s var(--ease);
  overflow-y: auto;
}
@keyframes slideLeft { from { transform: translateX(100%); } to { transform: translateX(0); } }

.queue-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border-subtle);
}
.queue-header h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; }
.queue-close {
  width: 30px; height: 30px; border: none; border-radius: 50%;
  background: rgba(255,255,255,0.06); color: var(--text-secondary);
  display: grid; place-items: center; cursor: pointer;
  transition: all 0.2s;
}
.queue-close:hover { background: rgba(255,255,255,0.12); color: #fff; }

.queue-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; transition: background 0.2s; cursor: pointer;
}
.queue-item:hover { background: rgba(255,255,255,0.04); }
.queue-item.active { background: rgba(139,108,255,0.08); }
.queue-item__art { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
.queue-item__text { min-width: 0; flex: 1; }
.queue-item__title { font-size: 0.8rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-item__artist { font-size: 0.68rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-item__num { font-size: 0.7rem; color: var(--text-muted); width: 20px; text-align: center; }

/* 
   MODAL (Shortcuts)
   */
.modal-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  display: grid; place-items: center;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 0;
  width: 380px; max-width: 90vw; max-height: 80vh;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: modalPop 0.3s var(--ease);
  display: flex; flex-direction: column;
  overflow: hidden;
}
@keyframes modalPop { from { transform: scale(0.95) translateY(10px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border-subtle);
}
.modal-header h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.modal-header h3 i { color: var(--accent-soft); }
.modal-close {
  width: 30px; height: 30px; border: none; border-radius: 50%;
  background: rgba(255,255,255,0.06); color: var(--text-secondary);
  display: grid; place-items: center; cursor: pointer; transition: all 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.12); color: #fff; }

.modal-body { padding: 14px 22px 20px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }

.shortcut-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.03);
}
.shortcut-row:last-child { border-bottom: none; }

.shortcut-row kbd {
  display: inline-block; padding: 3px 10px;
  border-radius: 6px; font-size: 0.72rem;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border-subtle);
  color: var(--text-primary); font-family: var(--font-body);
  min-width: 28px; text-align: center;
}
.shortcut-row span { font-size: 0.8rem; color: var(--text-secondary); }

/* 
   PLAYER MORE MENU (MOBILE)
   */
.player-more-menu {
  position: fixed;
  bottom: calc(var(--player-h) + 12px);
  right: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px 0;
  display: flex;
  flex-direction: column;
  z-index: 1001;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  min-width: 150px;
  transform-origin: bottom right;
  animation: menuScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes menuScaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.player-more-menu .menu-item {
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 9px 16px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  width: 100%;
  font-family: var(--font-body);
  transition: background 0.2s, color 0.2s;
}
.player-more-menu .menu-item:hover {
  background: rgba(255,255,255,0.06);
}
.player-more-menu .menu-item i {
  font-size: 1.05rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.player-more-menu .menu-item:hover i {
  color: var(--text-primary);
}

.player-bar__more-btn { display: none !important; }

/*
   PLAYER BAR
  */
.player-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--player-h); background: var(--bg-player);
  backdrop-filter: blur(40px) saturate(2);
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -4px 40px rgba(0,0,0,0.5);
  z-index: 1000; display: flex; flex-direction: column;
}

.player-bar__progress-wrap {
  position: relative; width: 100%; height: 3px;
  background: rgba(255,255,255,0.05);
  cursor: pointer; flex-shrink: 0; transition: height 0.15s;
}
.player-bar__progress {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%;
  background: var(--gradient-main); border-radius: 0 2px 2px 0;
  transition: width 0.12s linear; pointer-events: none; z-index: 2;
}
.player-bar__buffered {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%;
  background: rgba(255,255,255,0.06); pointer-events: none; z-index: 1;
}
.player-bar__seek {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; -webkit-appearance: none; appearance: none; margin: 0; z-index: 3;
}
.player-bar__progress-wrap:hover { height: 5px; }
.player-bar__progress-wrap:hover .player-bar__progress { box-shadow: 0 0 12px var(--accent-glow); }

.player-bar__inner {
  flex: 1; display: flex; align-items: center;
  justify-content: space-between; padding: 0 20px; gap: 12px;
}

.player-bar__info { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }

.player-bar__art-wrap {
  position: relative; width: 48px; height: 48px;
  flex-shrink: 0; border-radius: 50%; cursor: pointer;
}
.player-bar__art {
  width: 48px; height: 48px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--bg-elevated);
  transition: transform 0.6s;
}
.vinyl-ring {
  position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--accent); opacity: 0; transition: opacity 0.4s;
}
.player-bar__art-wrap.spinning .player-bar__art { animation: spin 3.5s linear infinite; }
.player-bar__art-wrap.spinning .vinyl-ring { opacity: 0.4; animation: pulseRing 2s ease-in-out infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseRing { 0%,100% { transform: scale(1); opacity: 0.35; } 50% { transform: scale(1.06); opacity: 0.6; } }

.player-bar__text { display: flex; flex-direction: column; min-width: 0; }
.player-bar__song {
  font-weight: 600; font-size: 0.85rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-bar__artist {
  font-size: 0.72rem; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.player-bar__action-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: transparent; color: var(--text-muted);
  font-size: 17px; display: grid; place-items: center; cursor: pointer;
  transition: all 0.25s var(--ease); flex-shrink: 0;
}
.player-bar__action-btn:hover { color: var(--text-primary); transform: scale(1.12); }

#player-like-btn.liked { color: var(--pink); }
#player-like-btn.liked i { animation: heartPop 0.35s var(--ease); }
#player-like-btn:hover { color: var(--pink); }
#player-dl-btn:hover { color: var(--sky); }
#player-dl-btn.downloading { color: var(--sky); pointer-events: none; }
#player-dl-btn.downloading i { animation: spin 0.8s linear infinite; }

.player-bar__controls { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.ctrl-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: transparent; color: var(--text-primary);
  font-size: 17px; display: grid; place-items: center; cursor: pointer;
  transition: all 0.2s var(--ease); position: relative; overflow: hidden;
}
.ctrl-btn:hover { background: rgba(255,255,255,0.07); transform: scale(1.08); }

.ctrl-btn--sm { width: 32px; height: 32px; font-size: 15px; color: var(--text-secondary); }
.ctrl-btn--sm:hover { color: var(--text-primary); }
.ctrl-btn--sm.active { color: var(--accent-soft); }

.ctrl-btn--play {
  width: 46px; height: 46px;
  background: #fff; color: var(--bg-void); font-size: 19px;
  box-shadow: 0 2px 14px rgba(255,255,255,0.1);
}
.ctrl-btn--play:hover { transform: scale(1.1); box-shadow: 0 4px 24px rgba(255,255,255,0.15); }

.player-bar__right {
  display: flex; align-items: center; gap: 8px;
  flex: 1; justify-content: flex-end; min-width: 0;
}
.player-bar__time {
  font-size: 0.72rem; color: var(--text-muted);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.player-bar__volume { display: flex; align-items: center; gap: 5px; }
.ctrl-btn--vol { width: 30px; height: 30px; font-size: 15px; }

.volume-slider {
  -webkit-appearance: none; appearance: none;
  width: 80px; height: 3px; border-radius: 3px;
  background: rgba(255,255,255,0.08); outline: none; cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; cursor: pointer; box-shadow: 0 0 6px rgba(255,255,255,0.15);
  transition: transform 0.2s;
}
.volume-slider::-webkit-slider-thumb:hover { transform: scale(1.3); }
.volume-slider::-moz-range-thumb { width: 12px; height: 12px; border:none; border-radius:50%; background:#fff; cursor:none; }

/* 
   CREDIT & SCROLL-TOP
    */
.credit-badge {
  position: fixed; bottom: calc(var(--player-h) + 10px); right: 18px;
  padding: 6px 14px; border-radius: var(--r-full);
  background: rgba(255,255,255,0.03); backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  font-size: 0.7rem; color: var(--text-muted); z-index: 800;
  transition: all 0.3s var(--ease);
}
.credit-badge strong {
  background: var(--gradient-main);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; font-weight: 700;
}
.credit-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(139,108,255,0.3); box-shadow: var(--shadow-glow);
}

.scroll-top {
  position: fixed; bottom: calc(var(--player-h) + 14px); left: 18px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border-subtle); background: var(--bg-glass);
  backdrop-filter: blur(12px); color: var(--text-secondary);
  font-size: 18px; display: grid; place-items: center; cursor: pointer;
  z-index: 800; transition: all 0.3s var(--ease);
}
.scroll-top:hover { color: #fff; border-color: var(--accent); transform: translateY(-2px); }

/*
   TOASTS
   */
.toast-container {
  position: fixed; top: calc(var(--topbar-h) + 10px); right: 18px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9999; pointer-events: none;
}

.toast {
  padding: 9px 16px; border-radius: var(--radius-md);
  background: var(--bg-glass); backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary); font-size: 0.8rem;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-md); animation: toastSlide 0.35s var(--ease);
  pointer-events: auto;
}
.toast i { font-size: 15px; color: var(--accent-soft); }
.toast.toast--removing { animation: toastOut 0.3s var(--ease) forwards; }

@keyframes toastSlide {
  from { opacity: 0; transform: translateX(50px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut { to { opacity: 0; transform: translateX(50px) scale(0.95); } }

/* 
   RESPONSIVE
   */
@media (max-width: 768px) {
  .topbar { padding: 0 14px; gap: 8px; }
  .topbar__title { display: none; }
  .search-kbd { display: none; }
  .topbar__search { max-width: none; flex: 1; }
  .category-section { padding: 0 14px; }
  .category-section--featured { margin-left: 14px; margin-right: 14px; padding: 16px 14px !important; }
  .player-bar__inner { padding: 0 10px; }
  
  .hide-mobile { display: none !important; }
  .player-bar__more-btn { display: grid !important; }
  .player-bar__info .player-bar__action-btn { display: none; } /* Hide Like, Share, Download */
  .player-bar__right #btn-queue, .player-bar__right #btn-expand { display: none; }
  
  .player-bar__time, .player-bar__volume { display: none; }
  .hero { padding: 20px 14px 8px; }
  .song-card { flex: 0 0 148px; }
  .credit-badge { right: 10px; font-size: 0.65rem; }
  .queue-panel { width: 260px; }
  .orb--1 { width: 280px; height: 280px; }
  .orb--2 { width: 220px; height: 220px; }
  .orb--3 { width: 200px; height: 200px; }
  .search-results-grid, .liked-songs-grid, .history-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); padding: 14px; }
}

@media (max-width: 480px) {
  .topbar__nav { gap: 1px; }
  .nav-btn { width: 34px; height: 34px; font-size: 17px; }
  #search-input { padding: 8px 34px; font-size: 0.8rem; }
  .player-bar__controls #btn-shuffle, .player-bar__controls #btn-repeat { display: none; }
  .ctrl-btn { width: 34px; height: 34px; font-size: 15px; }
  .ctrl-btn--play { width: 40px; height: 40px; font-size: 17px; }
  .player-bar__art-wrap { width: 40px; height: 40px; }
  .player-bar__art { width: 40px; height: 40px; }
  .player-bar__song { font-size: 0.78rem; }
  .song-card { flex: 0 0 136px; }
  .search-results-grid, .liked-songs-grid, .history-grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 10px; }
}

/*
   PREMIUM FEATURES ADD-ONS
   */

/* Search Spinner */
.search-spinner {
  text-align: center; color: var(--text-secondary);
  padding: 30px; font-size: 0.85rem; display: flex;
  align-items: center; justify-content: center; gap: 8px;
}
.spin-anim { animation: spin 1s linear infinite; font-size: 1.2rem; }

/* Add to Playlist Card Button */
.song-card__playlist-btn {
  position: absolute; right: 7px; top: 40px; /* Below the like button */
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(6px);
  color: rgba(255,255,255,0.6); font-size: 13px;
  display: grid; place-items: center; cursor: pointer;
  opacity: 0; transform: scale(0.7); z-index: 5;
  transition: all 0.25s var(--ease);
}
.song-card__playlist-btn:hover { color: var(--accent); background: rgba(139,108,255,0.2); }
.song-card:hover .song-card__playlist-btn { opacity: 1; transform: scale(1); }

/* Share Card Button */
.song-card__share-btn {
  position: absolute; right: 7px; top: 73px; /* Below the playlist button */
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(6px);
  color: rgba(255,255,255,0.6); font-size: 13px;
  display: grid; place-items: center; cursor: pointer;
  opacity: 0; transform: scale(0.7); z-index: 5;
  transition: all 0.25s var(--ease);
}
.song-card__share-btn:hover { color: var(--accent); background: rgba(139,108,255,0.2); }
.song-card:hover .song-card__share-btn { opacity: 1; transform: scale(1); }

/* Playlists Modal Additions */
.playlist-create {
  display: flex; gap: 8px; margin-bottom: 16px;
}
#playlist-new-input {
  flex: 1; padding: 8px 14px; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); background: rgba(255,255,255,0.035);
  color: #fff; font-family: var(--font-body); outline: none;
}
#playlist-new-input:focus { border-color: rgba(139,108,255,0.4); }
#playlist-new-btn {
  width: 40px; border-radius: var(--radius-sm); border: none;
  background: var(--accent); color: #fff; cursor: pointer;
  transition: transform 0.2s;
}
#playlist-new-btn:hover { background: var(--accent-soft); transform: scale(1.05); }

.playlist-list {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 250px; overflow-y: auto;
}
.playlist-rowItem {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: background 0.2s;
}
.playlist-rowItem:hover { background: rgba(255,255,255,0.05); }

/* NP Lyrics Overlay */
.np-lyrics-panel {
  position: absolute; inset: 0; background: rgba(5,5,8,0.7);
  backdrop-filter: blur(28px); z-index: 10;
  display: flex; flex-direction: column; align-items: center;
  padding: 80px 20px 40px; transition: transform 0.4s var(--ease), opacity 0.4s;
  overflow-y: auto; text-align: center;
}
.np-lyrics-panel.hidden { transform: translateY(100%); opacity: 0; pointer-events: none; }

.np-lyrics-close {
  position: absolute; top: 30px; right: 30px; width: 44px; height: 44px;
  border-radius: 50%; background: rgba(255,255,255,0.1); border: none;
  color: #fff; font-size: 20px; display: grid; place-items: center;
  cursor: pointer; transition: background 0.2s;
}
.np-lyrics-close:hover { background: rgba(255,255,255,0.2); }

.np-lyrics-content {
  font-size: 1.25rem; line-height: 2; font-weight: 500;
  color: var(--text-primary); max-width: 600px;
  white-space: pre-wrap; font-family: var(--font-body);
}

/* ── Bulk Download / Spinner ── */
@keyframes spinAnim {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.downloading {
  pointer-events: none;
  opacity: 0.7;
}

.downloading i.ph-spinner {
  display: inline-block;
  animation: spinAnim 0.8s linear infinite;
}

.playlist-dl-all-btn:active {
  transform: scale(0.96);
}

/*
   THEME SYSTEM
    */
body.theme-amoled   { --bg-void:#000; --bg-primary:#000; --bg-elevated:#0a0a0a; --bg-glass:rgba(0,0,0,0.85); --bg-player:rgba(0,0,0,0.9); }
body.theme-midnight { --bg-void:#0d1b2a; --bg-primary:#0f1f30; --bg-elevated:#132a3e; --bg-glass:rgba(13,27,42,0.8); --bg-player:rgba(10,20,35,0.85); --accent:#4cc9f0; --accent-soft:#72d8f5; --accent-glow:rgba(76,201,240,0.25); }
body.theme-purple   { --bg-void:#1a0a2e; --bg-primary:#1e0e35; --bg-elevated:#2a1545; --bg-glass:rgba(26,10,46,0.8); --bg-player:rgba(20,8,40,0.85); --accent:#bf5af2; --accent-soft:#d68ff7; --accent-glow:rgba(191,90,242,0.25); }
body.theme-sunset   { --bg-void:#1a1008; --bg-primary:#1f150c; --bg-elevated:#2a1e14; --bg-glass:rgba(26,16,8,0.8); --bg-player:rgba(20,12,6,0.85); --accent:#f5a623; --accent-soft:#f7b84e; --accent-glow:rgba(245,166,35,0.25); --pink:#ff6b6b; --sky:#ffd93d; }

/* 
   LIBRARY DROPDOWN
  */
.nav-dropdown-wrap { position: relative; }
.library-dropdown {
  position: absolute; top: 44px; right: 0; min-width: 180px;
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 6px 0; z-index: 950;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  animation: menuScaleIn 0.2s var(--ease);
}
.lib-item {
  width: 100%; padding: 11px 18px; display: flex; align-items: center; gap: 10px;
  background: none; border: none; color: var(--text-primary); cursor: pointer;
  font-size: 0.88rem; font-family: var(--font-body); transition: background 0.2s;
}
.lib-item:hover { background: rgba(255,255,255,0.06); }
.lib-item i { font-size: 1.1rem; color: var(--text-secondary); }


   /* RECENT SEARCHES*/ 
   
.recent-searches {
  position: fixed; top: var(--topbar-h); left: 0; right: 0;
  padding: 10px 20px 14px; z-index: 899;
  background: var(--bg-glass); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}
.recent-searches__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.recent-searches__header span { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.recent-clear { background: none; border: none; color: var(--accent-soft); font-size: 0.72rem; cursor: pointer; font-family: var(--font-body); }
.recent-clear:hover { text-decoration: underline; }
.recent-searches__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.recent-chip {
  padding: 5px 14px; border-radius: var(--r-full); font-size: 0.78rem;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border-subtle);
  color: var(--text-secondary); cursor: pointer; transition: all 0.2s;
  font-family: var(--font-body);
}
.recent-chip:hover { background: rgba(139,108,255,0.12); color: var(--text-primary); border-color: rgba(139,108,255,0.3); }


   /*SETTINGS PANEL*/
  
.settings-panel {
  position: fixed; left: 0; top: var(--topbar-h); bottom: var(--player-h);
  width: 340px; max-width: 85vw; z-index: 860;
  background: var(--bg-glass); backdrop-filter: blur(28px);
  border-right: 1px solid var(--border-subtle);
  animation: slideRight 0.3s var(--ease);
  overflow-y: auto; display: flex; flex-direction: column;
}
@keyframes slideRight { from { transform: translateX(-100%); } to { transform: translateX(0); } }

.settings-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border-subtle); flex-shrink: 0;
}
.settings-header h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.settings-header h3 i { color: var(--accent-soft); }
.settings-close {
  width: 30px; height: 30px; border: none; border-radius: 50%;
  background: rgba(255,255,255,0.06); color: var(--text-secondary);
  display: grid; place-items: center; cursor: pointer; transition: all 0.2s;
}
.settings-close:hover { background: rgba(255,255,255,0.12); color: #fff; }

.settings-body { padding: 12px 20px 30px; flex: 1; }

.settings-section { margin-bottom: 22px; }
.settings-label {
  font-size: 0.82rem; font-weight: 600; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.settings-label i { color: var(--accent-soft); font-size: 1.1rem; }

.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; font-size: 0.82rem; color: var(--text-secondary);
}

/* Toggle Switch */
.toggle-switch { position: relative; width: 42px; height: 22px; display: inline-block; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; border-radius: 22px; cursor: pointer;
  background: rgba(255,255,255,0.1); transition: background 0.3s;
}
.toggle-slider::before {
  content: ''; position: absolute; width: 16px; height: 16px;
  left: 3px; bottom: 3px; border-radius: 50%; background: #fff;
  transition: transform 0.3s var(--ease);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Custom Select — Glassmorphism Dropdown */
.custom-select {
  position: relative; min-width: 120px; user-select: none;
}
.custom-select__trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 12px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06); border: 1px solid var(--border-subtle);
  color: var(--text-primary); font-size: 0.78rem; font-family: var(--font-body);
  cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s;
}
.custom-select__trigger i {
  font-size: 12px; color: var(--text-muted); transition: transform 0.25s var(--ease);
}
.custom-select.open .custom-select__trigger {
  border-color: var(--accent); box-shadow: 0 0 0 2px rgba(139,108,255,0.15);
}
.custom-select.open .custom-select__trigger i { transform: rotate(180deg); }

.custom-select__options {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  z-index: 999; max-height: 220px; overflow-y: auto;
  background: rgba(18,18,30,0.92); backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 1px rgba(255,255,255,0.05);
  padding: 4px 0;
  animation: menuScaleIn 0.2s var(--ease);
}
.custom-select.open .custom-select__options { display: block; }

.custom-select__option {
  padding: 9px 14px; font-size: 0.78rem; color: var(--text-secondary);
  cursor: pointer; transition: all 0.15s; font-family: var(--font-body);
}
.custom-select__option:hover {
  background: rgba(139,108,255,0.12); color: var(--text-primary);
}
.custom-select__option.active {
  color: var(--accent-soft); font-weight: 600;
  background: rgba(139,108,255,0.08);
}

/* Scrollbar for options */
.custom-select__options::-webkit-scrollbar { width: 4px; }
.custom-select__options::-webkit-scrollbar-track { background: transparent; }
.custom-select__options::-webkit-scrollbar-thumb { background: rgba(139,108,255,0.3); border-radius: 4px; }

/* Range with value */
.range-with-val { display: flex; align-items: center; gap: 8px; }
.settings-range {
  width: 100px; -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 4px; background: rgba(255,255,255,0.08);
  outline: none; cursor: pointer;
}
.settings-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px;
  border-radius: 50%; background: var(--accent); cursor: pointer;
  box-shadow: 0 0 8px rgba(139,108,255,0.4);
  transition: box-shadow 0.2s;
}
.settings-range::-webkit-slider-thumb:hover { box-shadow: 0 0 14px rgba(139,108,255,0.6); }
.settings-range::-moz-range-thumb {
  width: 16px; height: 16px; border: none;
  border-radius: 50%; background: var(--accent); cursor: pointer;
  box-shadow: 0 0 8px rgba(139,108,255,0.4);
}
.settings-range::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,0.08); border: none; }
.range-with-val span { font-size: 0.75rem; color: var(--accent-soft); min-width: 24px; text-align: right; }

/* Theme Grid */
.theme-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-btn {
  display: flex; align-items: center; gap: 6px; padding: 7px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.03); color: var(--text-secondary);
  font-size: 0.75rem; cursor: pointer; transition: all 0.2s; font-family: var(--font-body);
}
.theme-btn:hover { border-color: rgba(255,255,255,0.15); color: var(--text-primary); }
.theme-btn.active { border-color: var(--accent); color: var(--accent-soft); background: rgba(139,108,255,0.08); }
.theme-swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.15); flex-shrink: 0; }

/* EQ Sliders — Fully Custom Themed */
.eq-sliders {
  display: flex; justify-content: space-around; align-items: center;
  gap: 4px; padding: 16px 12px; margin-top: 8px;
  background: rgba(255,255,255,0.02); border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.eq-band {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.eq-band label { font-size: 0.6rem; color: var(--text-muted); font-weight: 600; letter-spacing: 0.3px; }
.eq-val { font-size: 0.62rem; color: var(--accent-soft); font-weight: 700; min-width: 24px; text-align: center; }

/* Custom vertical slider — fully styled */
.eq-range {
  -webkit-appearance: none; appearance: none;
  width: 6px; height: 90px; border-radius: 6px;
  background: linear-gradient(to top, rgba(139,108,255,0.15), rgba(255,255,255,0.06));
  outline: none; cursor: pointer; border: none;
  writing-mode: vertical-lr; direction: rtl;
}
.eq-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px;
  border-radius: 50%; border: 2px solid var(--accent);
  background: var(--bg-elevated);
  box-shadow: 0 0 10px rgba(139,108,255,0.5), inset 0 0 4px rgba(139,108,255,0.3);
  cursor: pointer; transition: box-shadow 0.2s, transform 0.15s;
}
.eq-range::-webkit-slider-thumb:hover {
  box-shadow: 0 0 18px rgba(139,108,255,0.7), inset 0 0 6px rgba(139,108,255,0.4);
  transform: scale(1.15);
}
.eq-range::-moz-range-thumb {
  width: 16px; height: 16px; border: 2px solid var(--accent);
  border-radius: 50%; background: var(--bg-elevated);
  box-shadow: 0 0 10px rgba(139,108,255,0.5); cursor: pointer;
}
.eq-range::-moz-range-track {
  width: 6px; border-radius: 6px; border: none;
  background: linear-gradient(to top, rgba(139,108,255,0.15), rgba(255,255,255,0.06));
}

/*
   VISUALIZER CANVAS
    */
.np-visualizer {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; pointer-events: none; opacity: 0.6;
}

/* 
   SLEEP TIMER (in more menu)
    */
.menu-divider { height: 1px; background: var(--border-subtle); margin: 4px 0; }
.menu-label { padding: 4px 16px; font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.menu-sleep-row { display: flex; gap: 6px; padding: 6px 12px; flex-wrap: wrap; }
.sleep-chip {
  padding: 4px 10px; border-radius: var(--r-full); font-size: 0.7rem;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border-subtle);
  color: var(--text-secondary); cursor: pointer; transition: all 0.2s; font-family: var(--font-body);
}
.sleep-chip:hover { background: rgba(139,108,255,0.15); color: var(--accent-soft); border-color: rgba(139,108,255,0.3); }
.sleep-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.sleep-chip--off { background: rgba(255,80,80,0.12); border-color: rgba(255,80,80,0.2); color: #ff5050; }
.sleep-chip--off:hover { background: rgba(255,80,80,0.25); }
.sleep-status { display: block; padding: 4px 20px 8px; font-size: 0.68rem; color: var(--accent-soft); }

/* 
   DRAG & DROP QUEUE
  */
.queue-item { position: relative; }
.queue-item__drag {
  width: 20px; font-size: 14px; color: var(--text-muted); cursor: grab;
  display: grid; place-items: center; flex-shrink: 0; touch-action: none;
}
.queue-item__drag:active { cursor: grabbing; }
.queue-item.dragging { opacity: 0.4; background: rgba(139,108,255,0.08); }
.queue-item.drag-over { border-top: 2px solid var(--accent); }

/* 
   RESPONSIVE — NEW ELEMENTS
   */
@media (max-width: 768px) {
  .settings-panel { width: 100%; max-width: 100%; }
  .eq-range { height: 60px; }
  .library-dropdown { right: -40px; }

  /* Import modal — full screen on mobile */
  .import-modal {
    width: 100% !important; max-width: 100vw !important;
    max-height: 100vh !important; height: 100vh;
    border-radius: 0 !important;
    margin: 0;
  }
  .import-modal .modal-body {
    padding: 12px 16px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .import-modal .modal-header { padding: 14px 16px; }
  .import-tabs { gap: 2px; }
  .import-tab { padding: 6px 8px; font-size: 0.72rem; }
  .import-textarea { font-size: 0.72rem; min-height: 100px; }
  .import-example { font-size: 0.6rem; padding: 6px 10px; }
  .import-hint { font-size: 0.7rem; }
  .import-csv-drop { padding: 24px 14px; }
  .import-csv-drop i { font-size: 1.6rem; }
  .import-csv-drop p { font-size: 0.75rem; }
  .import-help-toggle { font-size: 0.72rem; padding: 8px 12px; }
  .import-help-body { padding: 10px 12px 14px; }
  .import-help-method li { font-size: 0.68rem; }
  .import-script { font-size: 0.55rem; padding: 8px 34px 8px 10px; max-height: 70px; }
  .import-btn { padding: 10px 18px; font-size: 0.78rem; width: 100%; justify-content: center; }
  .import-actions { margin-top: 12px; }
  .import-name-row input { padding: 9px 12px; font-size: 0.8rem; }
  .import-trigger-btn { padding: 6px 12px; font-size: 0.72rem; }

  /* Playlist header — wrap buttons on small screens */
  .view--playlists .view-header { flex-wrap: wrap; padding: 16px 16px 10px; }
}

/* 
   IMPORT PLAYLIST
   */
.import-trigger-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--r-full);
  border: 1px solid rgba(139,108,255,0.3);
  background: linear-gradient(135deg, rgba(139,108,255,0.15), rgba(139,108,255,0.05));
  color: var(--accent-soft); font-size: 0.8rem; font-weight: 600;
  font-family: var(--font-body); cursor: pointer;
  transition: all 0.25s var(--ease);
  margin-left: auto;
}
.import-trigger-btn:hover {
  background: linear-gradient(135deg, rgba(139,108,255,0.25), rgba(139,108,255,0.1));
  border-color: rgba(139,108,255,0.5); transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(139,108,255,0.15);
}
.import-trigger-btn i { font-size: 1rem; }

.import-modal { width: 460px; max-width: 92vw; max-height: 85vh; }

.import-name-row { margin-bottom: 14px; }
.import-name-row input {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04); color: var(--text-primary);
  font-size: 0.85rem; font-family: var(--font-body); outline: none;
  transition: all 0.2s var(--ease);
}
.import-name-row input:focus {
  border-color: rgba(139,108,255,0.4);
  box-shadow: 0 0 0 3px rgba(139,108,255,0.1);
}

.import-tabs {
  display: flex; gap: 4px; margin-bottom: 14px;
  background: rgba(255,255,255,0.03); border-radius: var(--radius-sm);
  padding: 3px;
}
.import-tab {
  flex: 1; padding: 7px 14px; border: none; border-radius: 6px;
  background: transparent; color: var(--text-muted); font-size: 0.78rem;
  font-weight: 500; font-family: var(--font-body); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all 0.2s var(--ease);
}
.import-tab:hover { color: var(--text-secondary); }
.import-tab.active {
  background: rgba(139,108,255,0.15); color: var(--accent-soft);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.import-tab i { font-size: 0.9rem; }

.import-hint {
  font-size: 0.75rem; color: var(--text-muted); margin-bottom: 8px; line-height: 1.4;
}
.import-hint code {
  background: rgba(255,255,255,0.06); padding: 1px 5px; border-radius: 3px;
  font-size: 0.72rem; color: var(--text-secondary);
}
.import-example {
  font-size: 0.68rem; color: var(--accent-soft);
  background: rgba(139,108,255,0.06); border: 1px solid rgba(139,108,255,0.1);
  border-radius: 6px; padding: 8px 12px; margin-bottom: 10px;
  overflow-x: auto; white-space: nowrap;
  font-family: 'Consolas', 'Monaco', monospace;
}

.import-textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03); color: var(--text-primary);
  font-size: 0.78rem; font-family: 'Consolas', 'Monaco', monospace;
  line-height: 1.5; resize: vertical; outline: none;
  transition: all 0.2s var(--ease); min-height: 120px;
}
.import-textarea::placeholder { color: var(--text-muted); }
.import-textarea:focus {
  border-color: rgba(139,108,255,0.4);
  box-shadow: 0 0 0 3px rgba(139,108,255,0.1);
  background: rgba(255,255,255,0.05);
}

.import-progress { margin-top: 14px; }
.import-progress-bar {
  width: 100%; height: 6px; border-radius: 3px;
  background: rgba(255,255,255,0.06); overflow: hidden;
}
.import-progress-fill {
  height: 100%; width: 0%;
  background: var(--gradient-main); border-radius: 3px;
  transition: width 0.3s var(--ease);
}
.import-progress-text {
  display: block; font-size: 0.7rem; color: var(--text-secondary);
  margin-top: 6px; text-align: center;
}

.import-actions { margin-top: 16px; display: flex; justify-content: flex-end; }
.import-btn {
  padding: 10px 22px; border: none; border-radius: var(--r-full);
  background: var(--accent); color: #fff;
  font-size: 0.82rem; font-weight: 600; font-family: var(--font-body);
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  transition: all 0.25s var(--ease);
}
.import-btn:hover {
  background: var(--accent-soft); transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}
.import-btn:disabled {
  opacity: 0.5; cursor: not-allowed; transform: none;
  box-shadow: none;
}
.import-btn i { font-size: 1rem; }

/* CSV Drop Zone */
.import-csv-drop {
  border: 2px dashed rgba(139,108,255,0.25);
  border-radius: var(--radius-md);
  padding: 32px 20px; text-align: center;
  cursor: pointer; transition: all 0.25s var(--ease);
  background: rgba(139,108,255,0.03);
}
.import-csv-drop:hover, .import-csv-drop.drag-over {
  border-color: var(--accent-soft);
  background: rgba(139,108,255,0.08);
}
.import-csv-drop i { font-size: 2rem; color: var(--accent-soft); margin-bottom: 8px; display: block; }
.import-csv-drop p { font-size: 0.8rem; color: var(--text-secondary); margin: 0; }
.import-csv-drop span { font-size: 0.72rem; color: var(--accent-soft); font-weight: 500; margin-top: 6px; display: block; }

/* Help Guide */
.import-help {
  margin-top: 14px; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); overflow: hidden;
}
.import-help-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; cursor: pointer;
  font-size: 0.78rem; font-weight: 500; color: var(--text-secondary);
  background: rgba(255,255,255,0.02); transition: all 0.2s;
  list-style: none;
}
.import-help-toggle::-webkit-details-marker { display: none; }
.import-help-toggle::before {
  content: '\25B6'; font-size: 0.55rem; color: var(--text-muted);
  transition: transform 0.2s;
}
.import-help[open] .import-help-toggle::before { transform: rotate(90deg); }
.import-help-toggle:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.import-help-toggle i { color: var(--accent-soft); font-size: 1rem; }

.import-help-body { padding: 12px 16px 16px; }
.import-help-method { margin-bottom: 8px; }
.import-help-method h4 {
  font-size: 0.78rem; font-weight: 600; color: var(--text-primary);
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
}
.import-help-method h4 i { color: var(--accent-soft); }
.import-help-method ol { padding-left: 18px; margin: 0; }
.import-help-method li {
  font-size: 0.72rem; color: var(--text-secondary); line-height: 1.6;
}
.import-help-method a { color: var(--accent-soft); text-decoration: none; }
.import-help-method a:hover { text-decoration: underline; }
.import-help-method kbd {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  font-size: 0.65rem; background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-subtle); color: var(--text-primary);
  font-family: var(--font-body);
}
.import-help-divider {
  height: 1px; background: var(--border-subtle); margin: 12px 0;
}
.import-help-note {
  font-size: 0.68rem; color: var(--green); margin-top: 8px; font-weight: 500;
}

/* Script Copy Block */
.import-script-wrap {
  position: relative; margin-top: 8px;
}
.import-script {
  font-size: 0.6rem; color: var(--accent-soft);
  background: rgba(0,0,0,0.3); border: 1px solid var(--border-subtle);
  border-radius: 6px; padding: 10px 40px 10px 12px;
  overflow-x: auto; white-space: pre-wrap; word-break: break-all;
  font-family: 'Consolas', 'Monaco', monospace; line-height: 1.4;
  max-height: 80px;
}
.import-copy-btn {
  position: absolute; top: 6px; right: 6px;
  width: 28px; height: 28px; border-radius: 6px;
  border: none; background: rgba(255,255,255,0.08);
  color: var(--text-secondary); cursor: pointer;
  display: grid; place-items: center; font-size: 14px;
  transition: all 0.2s;
}
.import-copy-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* Custom Confirm Dialog */
.confirm-dialog {
  text-align: center;
  padding: 28px 24px 22px;
  max-width: 340px;
}
.confirm-dialog__icon {
  font-size: 2.4rem;
  color: #ff5050;
  margin-bottom: 10px;
  animation: confirmShake 0.4s var(--ease);
}
@keyframes confirmShake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}
.confirm-dialog__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.confirm-dialog__message {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 22px;
  line-height: 1.5;
}
.confirm-dialog__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.confirm-dialog__btn {
  padding: 9px 24px;
  border-radius: var(--r-full);
  border: none;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.confirm-dialog__btn--cancel {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.confirm-dialog__btn--cancel:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}
.confirm-dialog__btn--confirm {
  background: linear-gradient(135deg, #ff5050, #ff3333);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255,80,80,0.25);
}
.confirm-dialog__btn--confirm:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 22px rgba(255,80,80,0.35);
}

/* 
   HI-FI & SPATIAL AUDIO STYLES
   */
.settings-badge {
  font-size: 0.6rem; padding: 2px 6px; border-radius: 4px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  background: rgba(139,108,255,0.15); color: var(--accent-soft);
  margin-left: 6px; display: inline-block; vertical-align: middle;
}
.hifi-badge { background: rgba(255,107,157,0.15); color: var(--pink); }
.warm-badge { background: rgba(255,167,38,0.15); color: #ffa726; }

.hifi-server-input {
  flex: 1; margin-left: 10px; max-width: 140px; padding: 6px 10px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.04); color: var(--text-primary);
  font-size: 0.75rem; font-family: var(--font-body);
}
.hifi-server-input:focus { border-color: var(--pink); outline: none; }

/* Spatial Button Animation */
.spatial-active i {
  color: var(--accent-soft); text-shadow: 0 0 10px rgba(139,108,255,0.6);
  animation: pulse-spatial 2s infinite ease-in-out;
}
@keyframes pulse-spatial {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* TG Mini App Adjustments */
body.tg-miniapp {
  /* Minimal UI tweaks for Telegram */
  --topbar-h: 50px;
}
body.tg-miniapp .topbar {
  background: rgba(0,0,0,0.4);
}
body.tg-miniapp .credit-badge { display: none !important; }
body.tg-miniapp .scroll-top { display: none !important; }
body.tg-miniapp .player-bar {
  border-radius: 0; padding-bottom: env(safe-area-inset-bottom);
}

/* Global Mobile Safe Area & Buttery Smooth Overrides */
@media (max-width: 768px) {
  .player-bar {
    padding-bottom: env(safe-area-inset-bottom);
    border-radius: 0;
  }
  .main-content {
    padding-bottom: calc(var(--player-h) + env(safe-area-inset-bottom) + 50px);
  }
}

