/* ============================================================
   NaMuTi — Bottom Music Player Bar
   ============================================================ */

.mp-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  height: 64px;
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
  background: var(--bg2, #1a1a2e);
  border-top: 1px solid var(--border, rgba(255,255,255,.08));
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.16,1,.3,1);
}
.mp-bar.visible {
  transform: translateY(0);
}

/* Vinyl record */
.mp-vinyl {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(#1a1a2e, #2a2a3e, #1a1a2e, #2a2a3e, #1a1a2e);
  border: 2px solid #333;
  display: flex; align-items: center; justify-content: center;
  transition: box-shadow .3s;
  cursor: pointer;
}
.mp-vinyl.spinning {
  animation: mp-spin 3s linear infinite;
  box-shadow: 0 0 16px rgba(155,81,224,.3);
}
.mp-vinyl-hole {
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg, #9B51E0, #7B3EC0);
  border: 2px solid #222;
}
@keyframes mp-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Track info */
.mp-info {
  flex: 1; min-width: 0;
  cursor: pointer;
}
.mp-info-title {
  font-size: 13px; font-weight: 700; color: var(--text, #fff);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mp-info-sub {
  font-size: 11px; color: var(--muted, #888);
}

/* Controls */
.mp-ctrls {
  display: flex; align-items: center; gap: 8px;
}
.mp-btn {
  background: none; border: none; color: var(--muted, #888);
  cursor: pointer; font-size: 16px; padding: 6px;
  transition: all .2s; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.mp-btn:hover { color: var(--text, #fff); }
.mp-btn-play {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #9B51E0, #7B3EC0);
  color: #fff; font-size: 16px;
  box-shadow: 0 2px 12px rgba(155,81,224,.3);
}
.mp-btn-play:hover {
  transform: scale(1.08);
  background: linear-gradient(135deg, #A65EF0, #8B4ED0);
}

/* Volume */
.mp-vol {
  display: flex; align-items: center; gap: 6px;
}
.mp-vol-icon {
  font-size: 14px; color: var(--muted, #888); cursor: pointer;
}
.mp-vol-slider {
  -webkit-appearance: none; appearance: none;
  width: 80px; height: 4px; border-radius: 4px;
  background: var(--border, rgba(255,255,255,.1));
  outline: none; cursor: pointer;
}
.mp-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: #9B51E0; cursor: pointer;
  box-shadow: 0 2px 6px rgba(155,81,224,.4);
}

/* Track selector dropdown */
.mp-tracks-btn {
  background: none; border: 1px solid var(--border, rgba(255,255,255,.08));
  color: var(--muted, #888); cursor: pointer;
  font-size: 11px; font-weight: 700; padding: 5px 10px;
  border-radius: 8px; transition: all .2s;
  font-family: 'Nunito', sans-serif;
}
.mp-tracks-btn:hover { border-color: #9B51E0; color: #9B51E0; }

/* Track list popup */
.mp-tracklist {
  position: fixed; bottom: 72px; right: 20px; z-index: 10000;
  width: 280px; border-radius: 14px;
  background: var(--bg2, #1a1a2e);
  border: 1.5px solid var(--border, rgba(255,255,255,.08));
  box-shadow: 0 12px 48px rgba(0,0,0,.5);
  overflow: hidden;
  transform: scale(.95) translateY(8px); opacity: 0;
  pointer-events: none;
  transition: all .25s cubic-bezier(.16,1,.3,1);
}
.mp-tracklist.open {
  transform: scale(1) translateY(0); opacity: 1;
  pointer-events: auto;
}
.mp-tracklist-head {
  padding: 12px 16px 8px;
  font-family: 'Unbounded', sans-serif; font-size: 12px; font-weight: 800;
  background: linear-gradient(135deg, #9B51E0, #E05C9B);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.mp-tl-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; cursor: pointer;
  transition: background .2s;
}
.mp-tl-item:hover { background: rgba(155,81,224,.06); }
.mp-tl-item.active { background: rgba(155,81,224,.1); }
.mp-tl-num {
  font-size: 12px; color: var(--muted, #888); width: 16px; text-align: center; font-weight: 700;
}
.mp-tl-item.active .mp-tl-num { color: #9B51E0; }
.mp-tl-name {
  font-size: 13px; font-weight: 600; color: var(--text, #fff);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1;
}
.mp-tl-item.active .mp-tl-name { color: #9B51E0; }
.mp-tl-eq {
  display: none; gap: 2px; align-items: flex-end; height: 12px;
}
.mp-tl-item.active .mp-tl-eq { display: flex; }
.mp-tl-eq span {
  width: 3px; background: #9B51E0; border-radius: 2px;
  animation: mp-eq 1s ease-in-out infinite;
}
.mp-tl-eq span:nth-child(1) { height: 5px; animation-delay: 0s; }
.mp-tl-eq span:nth-child(2) { height: 9px; animation-delay: .15s; }
.mp-tl-eq span:nth-child(3) { height: 4px; animation-delay: .3s; }
@keyframes mp-eq {
  0%,100% { height: 3px; }
  50% { height: 12px; }
}

/* FAB toggle (when bar is hidden) */
.mp-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 9998;
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(135deg, #9B51E0, #6B30A8);
  border: none; cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(155,81,224,.4);
  transition: all .3s cubic-bezier(.16,1,.3,1);
  font-size: 20px;
}
.mp-fab:hover { transform: scale(1.1); }
.mp-fab.hidden { display: none; }

/* Close btn on bar */
.mp-bar-close {
  background: none; border: none; color: var(--muted, #888);
  cursor: pointer; font-size: 18px; padding: 4px 2px;
  transition: color .2s; margin-left: 4px;
}
.mp-bar-close:hover { color: var(--text, #fff); }

/* Push page content up when bar is visible */
body.mp-active {
  padding-bottom: 64px !important;
}

/* Responsive */
@media (max-width: 600px) {
  .mp-vol { display: none; }
  .mp-bar { padding: 0 12px; gap: 10px; height: 58px; }
  .mp-vinyl { width: 36px; height: 36px; }
  .mp-vinyl-hole { width: 10px; height: 10px; }
  .mp-btn-play { width: 34px; height: 34px; font-size: 14px; }
  .mp-info-title { font-size: 12px; }
  .mp-info-sub { font-size: 10px; }
  .mp-tracklist { right: 12px; left: 12px; width: auto; bottom: 66px; }
  .mp-tracks-btn { font-size: 10px; padding: 4px 8px; }
  .mp-fab { bottom: 16px; right: 16px; width: 44px; height: 44px; font-size: 18px; }
  body.mp-active { padding-bottom: 58px !important; }
}
