/* ============================================================================
   AAMusic — Dark Glassmorphism, Dynamic Ambient Glow & Mobile-First Styles
   ============================================================================ */

:root {
  --bg-deep: #07080d;
  --bg-panel: rgba(16, 18, 28, 0.72);
  --bg-panel-elevated: rgba(25, 29, 44, 0.85);
  --bg-card: rgba(255, 255, 255, 0.042);
  --bg-card-hover: rgba(255, 255, 255, 0.09);
  --border-glass: rgba(255, 255, 255, 0.09);
  --border-highlight: rgba(255, 255, 255, 0.18);

  /* Dynamic Ambient Colors (Updated on Track Change via Canvas Color Extraction) */
  --ambient-1: #6366f1;
  --ambient-2: #ec4899;
  --ambient-3: #06b6d4;
  --accent-primary: #818cf8;
  --accent-glow: rgba(129, 140, 248, 0.45);
  --accent-green: #10b981;
  --accent-rose: #f43f5e;

  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;

  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* ============================================================================
   DYNAMIC AMBIENT GLOW BACKDROP
   ============================================================================ */
.ambient-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(17, 20, 36, 0.9), var(--bg-deep) 80%);
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(115px);
  opacity: 0.42;
  transition: background 1.6s cubic-bezier(0.22, 1, 0.36, 1), transform 8s ease-in-out;
  will-change: background, transform;
}

.orb-1 {
  width: 55vw;
  height: 55vw;
  max-width: 760px;
  max-height: 760px;
  top: -18%;
  left: -10%;
  background: var(--ambient-1);
  animation: floatOrb1 22s infinite alternate ease-in-out;
}

.orb-2 {
  width: 50vw;
  height: 50vw;
  max-width: 680px;
  max-height: 680px;
  bottom: -15%;
  right: -8%;
  background: var(--ambient-2);
  animation: floatOrb2 26s infinite alternate ease-in-out;
}

.orb-3 {
  width: 40vw;
  height: 40vw;
  max-width: 540px;
  max-height: 540px;
  top: 32%;
  left: 36%;
  background: var(--ambient-3);
  opacity: 0.24;
  animation: floatOrb3 30s infinite alternate ease-in-out;
}

@keyframes floatOrb1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 45px) scale(1.12); }
}
@keyframes floatOrb2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-55px, -40px) scale(1.1); }
}
@keyframes floatOrb3 {
  0% { transform: translate(0, 0) scale(0.95); }
  100% { transform: translate(40px, -50px) scale(1.08); }
}

/* ============================================================================
   APP SHELL & GLASS PANELS
   ============================================================================ */
.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid var(--border-glass);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: 245px 1fr 335px;
  gap: 12px;
  padding: 12px 12px 104px 12px;
  width: 100vw;
  height: 100vh;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(4px);
  z-index: 28;
  display: none;
}
.drawer-backdrop.active {
  display: block;
}

/* ============================================================================
   LEFT SIDEBAR
   ============================================================================ */
.sidebar {
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  overflow: hidden;
}

.brand-header {
  padding: 2px 6px 18px 6px;
  border-bottom: 1px solid var(--border-glass);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ambient-1), var(--ambient-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 6px 20px var(--accent-glow);
  transition: background 1.2s ease;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 21px;
  height: 21px;
}

.logo-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}
.logo-icon-sm svg {
  width: 17px;
  height: 17px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 2px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.nav-section {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 10px 6px 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(129, 140, 248, 0.22), rgba(236, 72, 153, 0.1));
  border-color: rgba(129, 140, 248, 0.35);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.18);
}

.nav-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

.playlists-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.nav-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 6px;
}

.btn-icon-tiny {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--border-glass);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-icon-tiny:hover {
  background: var(--bg-card-hover);
  color: #fff;
  border-color: var(--border-highlight);
}
.btn-icon-tiny svg {
  width: 14px;
  height: 14px;
}

.playlist-nav-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 4px;
  padding-right: 2px;
}

.playlist-nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s;
}
.playlist-nav-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}
.playlist-nav-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 600;
}

/* ============================================================================
   CENTER MAIN STAGE
   ============================================================================ */
.main-stage {
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(12, 14, 22, 0.45);
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 13px;
  width: 17px;
  height: 17px;
  color: var(--text-secondary);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 58px 10px 38px;
  border-radius: 999px;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: all 0.22s;
}

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

.search-input:focus {
  background: rgba(255, 255, 255, 0.095);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
}

.search-clear {
  position: absolute;
  right: 34px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 2px 6px;
}
.search-clear:hover {
  color: #fff;
}

.search-kbd {
  position: absolute;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: 5px;
  padding: 1px 6px;
  pointer-events: none;
}

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

.mode-select {
  background: rgba(15, 18, 29, 0.85);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.btn-header-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-header-action svg {
  width: 15px;
  height: 15px;
}
.btn-header-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-highlight);
}

.mobile-only {
  display: none;
}

/* ============================================================================
   STAGE CONTENT & VIEWS
   ============================================================================ */
.stage-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 22px 36px 22px;
  -webkit-overflow-scrolling: touch;
}

.view-section {
  display: none;
  animation: fadeInView 0.25s ease-out;
}
.view-section.active {
  display: block;
}

@keyframes fadeInView {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Banner */
.hero-banner {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 24px 26px;
  margin-bottom: 18px;
  background: linear-gradient(125deg, rgba(99, 102, 241, 0.24), rgba(236, 72, 153, 0.16), rgba(6, 182, 212, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.13);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 50%, var(--ambient-1), transparent 65%);
  opacity: 0.28;
  pointer-events: none;
  transition: background 1.2s ease;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 540px;
}

.hero-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #e0e7ff;
  margin-bottom: 10px;
}

.hero-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 16px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-primary-glow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--ambient-1), var(--ambient-2));
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.38);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn-primary-glow:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.52);
}

.btn-secondary-glass {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-highlight);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}
.btn-secondary-glass:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-danger-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.1);
  color: #fda4af;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}
.btn-danger-outline:hover {
  background: rgba(244, 63, 94, 0.24);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.76rem;
}

.hero-art-stack {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  padding-right: 12px;
}

.hero-stack-img {
  width: 108px;
  height: 108px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
  margin-left: -34px;
  transition: transform 0.3s ease;
  cursor: pointer;
}
.hero-stack-img:first-child {
  margin-left: 0;
  transform: rotate(-6deg);
}
.hero-stack-img:nth-child(2) {
  transform: translateY(-6px) scale(1.06);
  z-index: 2;
}
.hero-stack-img:nth-child(3) {
  transform: rotate(6deg);
}
.hero-stack-img:hover {
  transform: translateY(-10px) scale(1.12) !important;
  z-index: 5;
}

/* Category Pills */
.category-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

.category-pill {
  flex-shrink: 0;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border-glass);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.81rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.category-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}
.category-pill.active {
  background: var(--text-main);
  color: #090b10;
  border-color: #fff;
  font-weight: 700;
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 0.79rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.view-mode-toggle {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 2px;
  flex-shrink: 0;
}

.btn-view-mode {
  width: 30px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.btn-view-mode svg {
  width: 15px;
  height: 15px;
}
.btn-view-mode.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* Quick Search Chips */
.quick-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-right: 4px;
}

.search-chip {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}
.search-chip:hover {
  background: rgba(129, 140, 248, 0.18);
  border-color: var(--accent-primary);
  color: #fff;
}

/* ============================================================================
   TRACK CARDS (GRID & LIST LAYOUTS)
   ============================================================================ */
.tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}

.track-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 11px;
  transition: all 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.track-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

.track-card.playing {
  border-color: var(--accent-primary);
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.09));
}

.card-art-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #131624;
  margin-bottom: 10px;
}

.card-art-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.track-card:hover .card-art-wrap img {
  transform: scale(1.05);
}

.card-play-fab {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--accent-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.22s ease;
  cursor: pointer;
}

.track-card:hover .card-play-fab,
.track-card.playing .card-play-fab {
  opacity: 1;
  transform: translateY(0);
}

.card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

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

.card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-duration {
  font-family: var(--font-mono);
  font-size: 0.69rem;
  color: var(--text-muted);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.btn-card-action {
  background: rgba(255, 255, 255, 0.04);
  border: none;
  color: var(--text-secondary);
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-card-action:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}
.btn-card-action.liked {
  color: var(--accent-rose);
}

/* Track List Row View */
.tracks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.track-row {
  display: grid;
  grid-template-columns: 30px 44px 1fr 160px 54px 88px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s;
}

.track-row:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass);
}

.track-row.playing {
  background: rgba(129, 140, 248, 0.16);
  border-color: rgba(129, 140, 248, 0.42);
}

.row-index {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
}

.row-art {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #141826;
}

.row-meta {
  min-width: 0;
}

.row-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-artist {
  font-size: 0.76rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.row-album {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-duration {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: right;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

/* Collection Banner (Liked / Playlist) */
.collection-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px;
  border-radius: var(--radius-xl);
  margin-bottom: 18px;
  border: 1px solid var(--border-glass);
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.2), rgba(99, 102, 241, 0.15));
}

.playlist-banner {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(99, 102, 241, 0.15));
}

.collection-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-highlight);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  flex-shrink: 0;
}

.collection-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #cbd5e1;
}

.collection-meta h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 4px 0;
}

.collection-meta p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.collection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ============================================================================
   RIGHT INSPECTOR PANEL (LYRICS / QUEUE / EQUALIZER)
   ============================================================================ */
.inspector-panel {
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.inspector-top-bar {
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 6px 16px;
}

.inspector-drawer-title {
  font-size: 0.92rem;
  font-weight: 800;
}

.inspector-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 10px;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(10, 12, 20, 0.4);
}

.inspector-tab {
  padding: 8px 6px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.inspector-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.inspector-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.tab-count {
  background: rgba(129, 140, 248, 0.25);
  color: #c7d2fe;
  font-size: 0.66rem;
  padding: 1px 5px;
  border-radius: 99px;
}

.inspector-body {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  padding: 14px;
  overflow: hidden;
}

.inspector-body.active {
  display: flex;
}

/* Now Playing Mini Card inside Inspector */
.np-mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  margin-bottom: 12px;
}

.np-art-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 10px;
  overflow: hidden;
  background: #131726;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.np-art-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.np-art-placeholder {
  font-size: 1.5rem;
}

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

.np-track-title {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.np-track-album {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Lyrics Box */
.lyrics-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 4px;
}

.lyrics-title-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.lyrics-source-tag {
  font-size: 0.68rem;
  color: var(--accent-primary);
  font-weight: 600;
}

.lyrics-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  border-radius: var(--radius-lg);
  background: rgba(8, 10, 18, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.lyrics-empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 20px;
}

.lyric-line {
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.58);
  transition: all 0.25s ease;
  cursor: pointer;
}

.lyric-line:hover {
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.04);
}

.lyric-line.active {
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 800;
  background: rgba(129, 140, 248, 0.14);
  text-shadow: 0 0 18px var(--accent-glow);
  transform: scale(1.01);
}

/* Queue & Autoplay Tab */
.queue-controls-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 12px;
  margin-bottom: 12px;
}

.autoplay-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.autoplay-title {
  font-size: 0.82rem;
  font-weight: 700;
}

.autoplay-desc {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.25s;
  border-radius: 999px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--accent-primary);
}
input:checked + .slider:before {
  transform: translateX(18px);
}

.queue-actions-row {
  display: flex;
  gap: 8px;
}

.queue-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  -webkit-overflow-scrolling: touch;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.16s;
}
.queue-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.queue-item.active {
  background: rgba(129, 140, 248, 0.18);
  border-color: rgba(129, 140, 248, 0.4);
}
.queue-item img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
}
.queue-item-meta {
  flex: 1;
  min-width: 0;
}
.queue-item-title {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.queue-item-artist {
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.queue-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 5px;
}
.queue-remove-btn:hover {
  color: var(--accent-rose);
}

/* Equalizer Tab */
.eq-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  overflow-y: auto;
}

.eq-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.eq-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.eq-sliders-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  background: rgba(8, 10, 18, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 16px 10px;
  align-items: center;
  justify-items: center;
}

.eq-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.eq-slider {
  -webkit-appearance: slider-vertical;
  appearance: slider-vertical;
  width: 22px;
  height: 115px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.eq-val {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-primary);
  font-weight: 600;
}

.eq-freq {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

.viz-settings-card {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inspector-viz-canvas {
  width: 100%;
  height: 82px;
  border-radius: 10px;
  background: rgba(6, 8, 14, 0.65);
}

/* ============================================================================
   BOTTOM FLOATING PLAYER BAR
   ============================================================================ */
.player-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 82px;
  border-radius: var(--radius-xl);
  z-index: 20;
  display: grid;
  grid-template-columns: 300px 1fr 270px;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  background: rgba(14, 16, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.player-track-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.player-cover-wrapper {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  overflow: hidden;
  background: #16192b;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-glass);
}

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

.cover-expand-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  color: #fff;
}
.player-cover-wrapper:hover .cover-expand-overlay {
  opacity: 1;
}

.player-meta {
  min-width: 0;
  flex: 1;
  cursor: pointer;
}

.player-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.player-title {
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.player-quick-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-icon {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
}
.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.btn-icon.active {
  color: var(--accent-primary);
}
.btn-icon.liked {
  color: var(--accent-rose);
}

.repeat-one-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  font-size: 0.55rem;
  font-weight: 800;
  background: var(--accent-primary);
  color: #fff;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Center Transport */
.player-Transport {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 580px;
  width: 100%;
  margin: 0 auto;
}

.transport-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-play-main {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: #090b10;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-play-main:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 22px rgba(255, 255, 255, 0.4);
}

.play-spinner {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: var(--ambient-1);
  border-right-color: var(--ambient-2);
  animation: spinRing 0.75s linear infinite;
  pointer-events: none;
}

@keyframes spinRing {
  to { transform: rotate(360deg); }
}

.seekbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.time-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  min-width: 34px;
  text-align: center;
}

.seekbar-container {
  flex: 1;
  display: flex;
  align-items: center;
}

.seek-slider,
.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  outline: none;
  cursor: pointer;
}

.seek-slider::-webkit-slider-thumb,
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.15s;
}

.seek-slider:hover::-webkit-slider-thumb,
.volume-slider:hover::-webkit-slider-thumb {
  transform: scale(1.25);
  background: var(--accent-primary);
}

/* Right Controls */
.player-right-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.mini-viz-canvas {
  width: 110px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 125px;
}

/* ============================================================================
   MOBILE BOTTOM NAVIGATION BAR
   ============================================================================ */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62px;
  z-index: 25;
  background: rgba(11, 13, 22, 0.96);
  border-top: 1px solid var(--border-glass);
  border-radius: 0;
  padding: 4px 6px;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s;
}

.mobile-nav-btn svg {
  width: 20px;
  height: 20px;
}

.mobile-nav-btn.active {
  color: #ffffff;
}

.mobile-nav-btn.active svg {
  stroke: var(--accent-primary);
}

/* ============================================================================
   FULLSCREEN IMMERSIVE PLAYER & LYRICS OVERLAY
   ============================================================================ */
.studio-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: radial-gradient(circle at 25% 30%, var(--ambient-1), rgba(8, 10, 18, 0.96) 65%),
              radial-gradient(circle at 80% 80%, var(--ambient-2), rgba(8, 10, 18, 0.98) 65%);
  backdrop-filter: blur(40px);
  display: none;
  flex-direction: column;
  padding: 24px 36px 108px 36px;
  animation: fadeInView 0.28s ease;
}

.studio-overlay.active {
  display: flex;
}

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

.studio-badge {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-highlight);
}

.studio-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: center;
  min-height: 0;
}

.studio-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.studio-cover-frame {
  width: 250px;
  height: 250px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.65);
  border: 2px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 18px;
  background: #131624;
}

.studio-cover-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-track-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.studio-track-artist {
  font-size: 1rem;
  color: #cbd5e1;
  margin-bottom: 18px;
}

.studio-viz-canvas {
  width: 100%;
  max-width: 520px;
  height: 120px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.studio-right {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.studio-lyrics-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.studio-lyrics-scroll .lyric-line {
  font-size: 1.2rem;
  padding: 10px 14px;
}

.studio-lyrics-scroll .lyric-line.active {
  font-size: 1.45rem;
  color: #fff;
}

/* ============================================================================
   MODAL & TOAST NOTIFICATIONS
   ============================================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-xl);
  padding: 20px;
  background: #121523;
}

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

.modal-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  margin-bottom: 12px;
  outline: none;
}
.modal-input:focus {
  border-color: var(--accent-primary);
}

.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(18, 22, 36, 0.95);
  border: 1px solid var(--border-highlight);
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  animation: fadeInView 0.22s ease;
}

/* ============================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ============================================================================ */
@media (max-width: 1150px) {
  .app-shell {
    grid-template-columns: 220px 1fr;
  }
  .inspector-panel {
    position: fixed;
    top: 12px;
    right: 12px;
    bottom: 104px;
    width: 340px;
    max-width: calc(100vw - 24px);
    z-index: 35;
    background: rgba(14, 17, 28, 0.98);
    transform: translateX(110%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .inspector-panel.open {
    transform: translateX(0);
  }
  .mobile-only {
    display: inline-flex;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 0;
    height: 100dvh;
  }

  .sidebar {
    display: none;
  }

  .main-stage {
    border-radius: 0;
    border: none;
    height: 100dvh;
    padding-bottom: 150px; /* Space for floating player + bottom nav */
  }

  .top-header {
    padding: 10px 14px;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(10, 12, 20, 0.88);
    backdrop-filter: blur(20px);
  }

  .mobile-brand {
    display: flex;
  }

  .mobile-brand .brand-title {
    font-size: 1rem;
  }

  .search-input {
    padding: 8px 34px 8px 34px;
    font-size: 0.83rem;
  }

  .search-kbd,
  .hide-on-mobile {
    display: none !important;
  }

  .stage-content {
    padding: 14px 14px 40px 14px;
  }

  .hero-banner {
    padding: 18px;
    border-radius: 16px;
  }

  .hero-title {
    font-size: 1.28rem;
  }

  .hero-subtitle {
    font-size: 0.78rem;
    margin-bottom: 12px;
  }

  .hero-art-stack {
    display: none;
  }

  .tracks-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .track-card {
    padding: 9px;
  }

  .card-play-fab {
    opacity: 1;
    transform: none;
    width: 32px;
    height: 32px;
  }

  .track-row {
    grid-template-columns: 24px 42px 1fr auto;
    padding: 8px 10px;
    gap: 8px;
  }

  .row-album,
  .row-duration {
    display: none;
  }

  /* Inspector Bottom Sheet on Mobile */
  .inspector-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 62px;
    width: 100%;
    max-width: 100%;
    height: 75vh;
    height: 75dvh;
    z-index: 35;
    background: rgba(14, 17, 28, 0.98);
    border-radius: 22px 22px 0 0;
    transform: translateY(110%);
  }

  .inspector-panel.open {
    transform: translateY(0);
  }

  /* Compact Mobile Floating Player Bar */
  .player-bar {
    left: 8px;
    right: 8px;
    bottom: 68px;
    height: auto;
    border-radius: 16px;
    padding: 8px 12px;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 6px 10px;
    background: rgba(16, 19, 32, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  }

  .player-track-info {
    grid-column: 1 / -1;
    grid-row: 1 / 2;
    gap: 8px;
    padding-right: 118px;
  }

  .player-cover-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .player-title {
    font-size: 0.85rem;
  }

  .player-artist {
    font-size: 0.73rem;
  }

  .player-Transport {
    grid-column: 1 / -1;
    grid-row: 2 / 3;
    flex-direction: row;
    gap: 8px;
  }

  .transport-buttons {
    position: absolute;
    top: 12px;
    right: 12px;
    gap: 4px;
  }

  .btn-play-main {
    width: 36px;
    height: 36px;
  }

  .seekbar-row {
    width: 100%;
    gap: 6px;
  }

  .time-label {
    font-size: 0.65rem;
    min-width: 28px;
  }

  .player-right-controls {
    display: none;
  }

  /* Show Mobile Bottom Navigation Bar */
  .mobile-bottom-nav {
    display: grid;
    z-index: 40;
  }

  /* Fullscreen Studio on Mobile */
  .studio-overlay {
    padding: 16px 16px 150px 16px;
    overflow-y: auto;
  }

  .studio-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    align-items: stretch;
    gap: 16px;
  }

  .studio-cover-frame {
    width: 160px;
    height: 160px;
    margin-bottom: 10px;
  }

  .studio-track-title {
    font-size: 1.2rem;
  }

  .studio-track-artist {
    font-size: 0.88rem;
    margin-bottom: 10px;
  }

  .studio-viz-canvas {
    height: 70px;
  }

  .studio-right {
    min-height: 200px;
  }

  .studio-lyrics-scroll {
    max-height: 38dvh;
    min-height: 180px;
    padding: 14px;
  }

  .studio-lyrics-scroll .lyric-line {
    font-size: 0.98rem;
    padding: 7px 10px;
  }

  .studio-lyrics-scroll .lyric-line.active {
    font-size: 1.12rem;
  }
}

/* ============================================================================
   OUTSIDE LOGIN GATE SCREEN & GOOGLE LOGO BUTTON
   ============================================================================ */
.login-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at 50% 20%, rgba(99, 102, 241, 0.22), rgba(7, 8, 13, 0.96) 72%);
  backdrop-filter: blur(28px);
}

.login-gate-card {
  width: 100%;
  max-width: 410px;
  border-radius: 26px;
  padding: 38px 30px 30px 30px;
  text-align: center;
  background: rgba(16, 19, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65);
  animation: fadeInView 0.3s ease-out;
}

.login-gate-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}

.login-gate-logo {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  margin-bottom: 14px;
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45);
}

.login-gate-logo svg {
  width: 34px;
  height: 34px;
}

.login-gate-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-gate-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.login-gate-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}

.login-gate-prompt {
  font-size: 0.84rem;
  color: #cbd5e1;
  font-weight: 500;
}

.btn-google-logo-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  font-family: inherit;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-google-logo-gate:hover {
  transform: translateY(-3px) scale(1.04);
}

.btn-google-logo-gate:active {
  transform: scale(0.97);
}

.google-logo-circle {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 6px rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.2s ease;
}

.btn-google-logo-gate:hover .google-logo-circle {
  box-shadow: 0 16px 38px rgba(66, 133, 244, 0.45), 0 0 0 8px rgba(255, 255, 255, 0.14);
}

.google-logo-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 7px 18px;
  border-radius: 999px;
}

.login-gate-footer {
  font-size: 0.74rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-glass);
  padding-top: 16px;
  line-height: 1.4;
}

/* ============================================================================
   MULTI-USER GOOGLE / GMAIL AUTH & ACCOUNT SWITCHER STYLES
   ============================================================================ */
.sidebar-user-card {
  margin-top: 12px;
  padding: 10px 11px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.045);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-user-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-highlight);
}

.sidebar-user-card.logged-in {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(99, 102, 241, 0.08));
}

.user-avatar-wrap {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.user-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-meta-text {
  min-width: 0;
  flex: 1;
}

.user-name-label {
  font-size: 0.81rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email-label {
  font-size: 0.69rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.btn-google-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-family: inherit;
  font-size: 0.79rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  max-width: 195px;
}

.btn-google-header:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-google-header.logged-in {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.14);
}

.header-auth-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.header-auth-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-auth-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-modal-card {
  max-width: 440px;
}

.auth-modal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-helper-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.auth-field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 5px;
}

.btn-google-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  margin-top: 4px;
}

.btn-google-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(255, 255, 255, 0.2);
}

.auth-active-user-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
}

.auth-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.auth-modal-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.auth-user-details {
  min-width: 0;
  flex: 1;
}

.auth-user-name {
  font-size: 0.96rem;
  font-weight: 800;
  color: #fff;
}

.auth-user-email {
  font-size: 0.78rem;
  color: #cbd5e1;
  margin-bottom: 4px;
}

.auth-sync-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 8px;
  border-radius: 999px;
}

.auth-user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.saved-accounts-section {
  margin-bottom: 16px;
}

.auth-section-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.saved-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 165px;
  overflow-y: auto;
}

.saved-account-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.18s;
}

.saved-account-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-highlight);
}

.saved-account-item.active-account {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.1);
}

.saved-account-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.saved-account-info {
  min-width: 0;
  flex: 1;
}

.saved-account-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-account-email {
  font-size: 0.71rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-account-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
}

.saved-account-remove:hover {
  color: #fda4af;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 12px 0;
  color: var(--text-muted);
  font-size: 0.73rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-glass);
}

.auth-divider span {
  padding: 0 10px;
}

.oauth-config-details {
  margin-top: 14px;
  border-top: 1px solid var(--border-glass);
  padding-top: 10px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.oauth-config-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-muted);
  user-select: none;
}

.oauth-config-details summary:hover {
  color: #cbd5e1;
}

.oauth-config-body {
  margin-top: 8px;
}

.oauth-config-body p {
  margin-bottom: 8px;
  line-height: 1.4;
}

.oauth-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

@media (max-width: 820px) {
  .btn-google-header {
    padding: 5px 10px 5px 6px;
    max-width: 135px;
    font-size: 0.73rem;
  }
  .header-auth-icon {
    width: 22px;
    height: 22px;
  }
}

/* ============================================================================
   AUDIO | VIDEO SEGMENTED TOGGLE & MUSIC VIDEO (MV) PLAYER (OPSI 1)
   ============================================================================ */
.av-mode-switch-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.av-segmented-control {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(8, 10, 18, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
  width: 100%;
  max-width: 240px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
}

.studio-av-control {
  max-width: 240px;
}

.av-seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.av-seg-btn:hover {
  color: #fff;
}

.av-seg-btn.active {
  background: linear-gradient(135deg, var(--accent-primary), #6366f1);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
}

.av-mv-badge {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.28);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.45);
  letter-spacing: 0.04em;
}

.av-seg-btn.active .av-mv-badge {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* Inline 16:9 Music Video Card inside Inspector */
.mv-player-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: rgba(10, 13, 24, 0.85);
  border: 1px solid rgba(129, 140, 248, 0.28);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.48);
  flex-shrink: 0;
}

.mv-stage-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #05070d;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mv-video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #05070d;
}

.mv-overlay-status {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 16, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  text-align: center;
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 600;
  z-index: 3;
  transition: opacity 0.25s ease;
}

.mv-overlay-status.hidden {
  opacity: 0;
  pointer-events: none;
}

.mv-spinner {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2.5px solid rgba(129, 140, 248, 0.25);
  border-top-color: #818cf8;
  animation: mvSpin 0.8s linear infinite;
}

@keyframes mvSpin {
  to {
    transform: rotate(360deg);
  }
}

.mv-top-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  display: flex;
  gap: 6px;
  pointer-events: none;
}

.mv-source-pill {
  background: rgba(8, 10, 18, 0.76);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e2e8f0;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.mv-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.mv-meta-mini {
  min-width: 0;
  flex: 1;
}

.mv-title-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mv-sub-text {
  font-size: 0.68rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mv-action-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mv-quality-select {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.4);
  background: rgba(99, 102, 241, 0.16);
  color: #e0e7ff;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  outline: none;
  transition: all 0.18s ease;
}

.mv-quality-select:hover,
.mv-quality-select:focus {
  background: rgba(99, 102, 241, 0.28);
  border-color: rgba(129, 140, 248, 0.75);
  color: #ffffff;
}

.mv-quality-select option {
  background: #111524;
  color: #f8fafc;
  font-weight: 700;
}

.btn-mv-action {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

.btn-mv-action:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.btn-mv-action.mv-sound-active {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

.btn-mv-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
}

.btn-mv-icon:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* Player Bar Quick Video Toggle Button */
.btn-player-mv-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-player-mv-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.26);
}

.btn-player-mv-toggle.active {
  background: linear-gradient(135deg, var(--accent-primary), #6366f1);
  border-color: rgba(129, 140, 248, 0.7);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

/* Fullscreen Studio Video Frame */
.studio-video-frame {
  width: 100%;
  max-width: 540px;
  border-radius: 20px;
  overflow: hidden;
  background: #05070d;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.studio-video-mount {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #05070d;
  overflow: hidden;
}

.studio-video-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 14px;
  background: rgba(15, 18, 30, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
