body {
  background: #0f0f0f;
  -webkit-tap-highlight-color: transparent;
}
#progress-bar {
  transition: width 0.5s linear;
}
#progress-bar.is-live {
  width: 100% !important;
  transition: none;
  animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
.queue-item:hover .queue-actions {
  opacity: 1;
}
.queue-actions {
  opacity: 0;
  transition: opacity 0.15s;
}
#search-results::-webkit-scrollbar,
#queue-list::-webkit-scrollbar,
#history-list::-webkit-scrollbar {
  width: 4px;
}
#search-results::-webkit-scrollbar-thumb,
#queue-list::-webkit-scrollbar-thumb,
#history-list::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 9999px;
}

/* ─ Volume slider ─ */
.volume-slider {
  height: 6px;
}
@media (max-width: 767px) {
  .volume-slider {
    height: 20px; /* big finger friendly */
    border-radius: 9999px;
  }
  /* Grow the thumb on mobile */
  .volume-slider::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
  }
  .volume-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
  }
}

/* ─ Background slideshow ─ */
#bg-a,
#bg-b {
  position: fixed;
  inset: -40px;
  z-index: -1;
  background-size: cover;
  background-position: center;
  filter: blur(9px) brightness(0.35) saturate(1.3);
  transition: opacity 2s ease-in-out;
  pointer-events: none;
}
#bg-b {
  opacity: 0;
}
/* ─ FilePond dark theme overrides ─ */
.filepond--root {
  font-family: inherit;
}
.filepond--panel-root {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.filepond--drop-label {
  color: #9ca3af;
}
.filepond--drop-label label {
  cursor: pointer;
}
.filepond--label-action {
  color: #e11d48;
  text-decoration-color: #e11d48;
}
.filepond--item-panel {
  background: rgba(255, 255, 255, 0.1);
}
.filepond--file-action-button {
  background: rgba(255, 255, 255, 0.15);
}
.filepond--file {
  color: #fff;
}
[data-filepond-item-state="processing-complete"] .filepond--item-panel {
  background: #166534;
}
[data-filepond-item-state*="error"] .filepond--item-panel {
  background: #7f1d1d;
}

/* ─ Mobile queue drawer ─ */
#queue-aside {
  display: flex;
}

@media (max-width: 767px) {
  #queue-aside {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100% !important;  /* override Tailwind w-72 */
    z-index: 35;
    height: 75dvh;
    border-radius: 1rem 1rem 0 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-left: none;
    border-right: none;
    background: #111113;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
    padding-bottom: env(safe-area-inset-bottom);
  }
  #queue-aside.queue-open {
    display: flex;
    transform: translateY(0);
  }
  /* Drag handle */
  #queue-aside::before {
    content: '';
    display: block;
    width: 2.5rem;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 9999px;
    margin: 0.6rem auto 0;
    flex-shrink: 0;
  }
}

/* ─ Safe-area insets (notched phones) ─ */
main {
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}
@media (max-width: 767px) {
  main {
    padding-bottom: max(6rem, env(safe-area-inset-bottom));
  }
  #queue-fab {
    bottom: max(1.25rem, env(safe-area-inset-bottom));
    right: max(1.25rem, env(safe-area-inset-right));
  }
}
