/* DJ & MC Academy — Persistent Bottom Music Player */
:root {
  --djmc-player-h: 0px;
}

#pill {
  bottom: calc(var(--djmc-player-h, 0px) + 16px) !important;
  transition: bottom 0.25s ease;
}

body.djmc-has-player {
  padding-bottom: var(--djmc-player-h, 0px);
}

#djmc-music-root {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 145;
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  color: #f3f1ea;
  pointer-events: none;
  -webkit-font-smoothing: antialiased;
}

#djmc-music-root * {
  box-sizing: border-box;
}

#djmc-music-root button:focus-visible,
#djmc-music-root input:focus-visible {
  outline: 2px solid #46e0ff;
  outline-offset: 2px;
}

/* Slim bottom bar */
.dmp-bar {
  pointer-events: auto;
  width: 100%;
  background: rgba(10, 10, 15, 0.94);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-top: 1px solid rgba(249, 223, 200, 0.16);
  box-shadow: 0 -10px 36px rgba(0, 0, 0, 0.55);
  padding: 8px 18px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.5fr) minmax(170px, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 68px;
}

.dmp-bar.dmp-hidden {
  display: none;
}

/* Left: Track info */
.dmp-track {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dmp-cover-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #171720;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dmp-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.dmp-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dmp-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #f3f1ea;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dmp-artist {
  font-size: 11.5px;
  color: #90909c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* Subtle animated sound waves */
.dmp-waves {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 13px;
  flex-shrink: 0;
  opacity: 0.35;
  transition: opacity 0.2s ease;
}

.dmp-waves span {
  display: block;
  width: 2.5px;
  height: 4px;
  border-radius: 2px;
  background: #46e0ff;
}

.dmp-playing .dmp-waves {
  opacity: 1;
}

.dmp-playing .dmp-waves span:nth-child(1) {
  animation: dmpWave 0.9s ease-in-out infinite;
}
.dmp-playing .dmp-waves span:nth-child(2) {
  animation: dmpWave 0.7s ease-in-out 0.15s infinite;
}
.dmp-playing .dmp-waves span:nth-child(3) {
  animation: dmpWave 1.05s ease-in-out 0.3s infinite;
}
.dmp-playing .dmp-waves span:nth-child(4) {
  animation: dmpWave 0.8s ease-in-out 0.1s infinite;
}

@keyframes dmpWave {
  0%, 100% { height: 3px; }
  50% { height: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .dmp-playing .dmp-waves span {
    animation: none;
    height: 9px;
  }
}

/* Center: Controls + progress */
.dmp-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.dmp-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dmp-btn {
  background: transparent;
  border: none;
  color: #b9b9c2;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.dmp-btn:hover {
  color: #f3f1ea;
  background: rgba(255, 255, 255, 0.08);
}

.dmp-btn.dmp-active {
  color: #46e0ff;
}

.dmp-btn-play {
  width: 36px;
  height: 36px;
  background: #f9dfc8;
  color: #08080b;
}

.dmp-btn-play:hover {
  background: #ffffff;
  color: #08080b;
  transform: scale(1.04);
}

.dmp-progress-row {
  width: 100%;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dmp-time {
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  color: #90909c;
  min-width: 34px;
  text-align: center;
  user-select: none;
}

.dmp-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  outline: none;
}

.dmp-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f9dfc8;
  border: 2px solid #08080b;
  cursor: pointer;
}

.dmp-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f9dfc8;
  border: 2px solid #08080b;
  cursor: pointer;
}

/* Right: Volume + Playlist + Minimise */
.dmp-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.dmp-vol-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dmp-vol-slider {
  width: 74px;
}

.dmp-playlist-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f3f1ea;
  border-radius: 999px;
  padding: 6px 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dmp-playlist-btn:hover,
.dmp-playlist-btn.dmp-active {
  background: rgba(249, 223, 200, 0.14);
  border-color: rgba(249, 223, 200, 0.45);
  color: #f9dfc8;
}

/* Minimised floating pill */
.dmp-mini {
  pointer-events: auto;
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(13, 13, 19, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(249, 223, 200, 0.25);
  border-radius: 999px;
  padding: 6px 10px 6px 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  max-width: calc(100vw - 32px);
}

.dmp-mini.dmp-hidden {
  display: none;
}

.dmp-mini-cover {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.dmp-mini-text {
  max-width: 140px;
  overflow: hidden;
}

.dmp-mini-title {
  font-size: 12px;
  font-weight: 600;
  color: #f3f1ea;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dmp-mini-artist {
  font-size: 10.5px;
  color: #90909c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Expandable Playlist Drawer */
.dmp-drawer {
  pointer-events: auto;
  position: fixed;
  right: 16px;
  bottom: calc(var(--djmc-player-h, 68px) + 10px);
  width: min(440px, calc(100vw - 32px));
  max-height: min(62vh, 480px);
  background: rgba(13, 13, 19, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(249, 223, 200, 0.2);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dmp-drawer.dmp-hidden {
  display: none;
}

.dmp-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dmp-drawer-kicker {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #46e0ff;
  margin-bottom: 2px;
}

.dmp-drawer-title {
  font-family: 'Anton', Impact, sans-serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #f3f1ea;
  margin: 0;
  line-height: 1.05;
}

.dmp-list {
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dmp-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #f3f1ea;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dmp-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.dmp-item.dmp-current {
  background: rgba(249, 223, 200, 0.1);
  border-color: rgba(249, 223, 200, 0.3);
}

.dmp-item-cover {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #171720;
}

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

.dmp-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #f3f1ea;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dmp-item.dmp-current .dmp-item-title {
  color: #f9dfc8;
}

.dmp-badge {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 30, 84, 0.18);
  color: #ff6b8d;
  border: 1px solid rgba(255, 30, 84, 0.35);
  flex-shrink: 0;
}

.dmp-item-sub {
  font-size: 11.5px;
  color: #90909c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.dmp-item-dur {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #90909c;
  flex-shrink: 0;
}

/* Tablet & Mobile responsive */
@media (max-width: 820px) {
  .dmp-bar {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 6px 10px;
    padding: 8px 12px;
    min-height: 78px;
  }
  .dmp-track {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }
  .dmp-right {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
  }
  .dmp-center {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    flex-direction: row;
    gap: 10px;
  }
  .dmp-vol-slider {
    display: none;
  }
  .dmp-playlist-lbl {
    display: none;
  }
  .dmp-playlist-btn {
    padding: 6px 8px;
  }
  .dmp-controls {
    gap: 4px;
  }
  .dmp-btn {
    width: 28px;
    height: 28px;
  }
  .dmp-btn-play {
    width: 32px;
    height: 32px;
  }
}