/* Klownhole Audio Player - Persistent player bar + queue panel */

#player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #1a1a1a;
  border-top: 2px solid #ff6600;
  z-index: 1000;
  display: none;
  align-items: center;
  padding: 0 1rem;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #e0e0e0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
}

#player-bar.active {
  display: flex;
}

/* Transport controls */
#player-bar button {
  background: none;
  border: 1px solid #555;
  color: #e0e0e0;
  border-radius: 4px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

#player-bar button:hover {
  background: #ff6600;
  color: #1a1a1a;
  border-color: #ff6600;
}

#player-play {
  font-size: 1.1rem;
  min-width: 36px;
}

/* Track info */
#player-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 200px;
  overflow: hidden;
}

#player-title {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#player-artist {
  font-size: 0.8rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#player-version {
  font-size: 0.75rem;
  color: #666;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Seek bar */
#player-seek-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #888;
  flex: 1 1 180px;
  min-width: 0;
}

#player-seek {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #444;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

#player-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff6600;
  cursor: pointer;
}

#player-seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff6600;
  cursor: pointer;
  border: none;
}

/* Volume */
#player-volume-wrap {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex: 0 0 auto;
}

#player-volume {
  width: 60px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #444;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

#player-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e0e0e0;
  cursor: pointer;
}

#player-volume::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e0e0e0;
  cursor: pointer;
  border: none;
}

#player-mute {
  font-size: 0.85rem;
  padding: 0.25rem 0.4rem;
  min-width: 28px;
}

#player-queue-toggle {
  font-size: 1rem;
}

/* Queue Panel */
#queue-panel {
  position: fixed;
  bottom: 64px;
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background: #222;
  border-top: 1px solid #333;
  border-bottom: 2px solid #ff6600;
  z-index: 999;
  display: none;
}

#queue-panel.open {
  display: block;
}

#queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #333;
  color: #ff6600;
  flex-wrap: wrap;
  gap: 0.3rem;
}

#queue-header div {
  display: flex;
  gap: 0.4rem;
}

#queue-clear,
#queue-clear-all {
  background: none;
  border: 1px solid #555;
  color: #888;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  font-size: 0.8rem;
}

#queue-clear:hover {
  border-color: #ff6600;
  color: #ff6600;
}

#queue-clear-all:hover {
  border-color: #cc3300;
  color: #cc3300;
}

#queue-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#queue-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 1rem;
  border-bottom: 1px solid #2a2a2a;
  cursor: pointer;
  transition: background 0.1s;
}

#queue-list li:hover {
  background: #2a2a2a;
}

#queue-list li.current {
  background: #2a2a2a;
  border-left: 3px solid #ff6600;
  color: #ff8833;
}

#queue-list li .queue-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

#queue-list li .queue-title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#queue-list li .queue-meta {
  font-size: 0.8rem;
  color: #888;
}

#queue-list li .queue-remove {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem 0.4rem;
  flex-shrink: 0;
}

#queue-list li .queue-remove:hover {
  color: #ff6600;
}

#queue-empty {
  text-align: center;
  color: #666;
  padding: 1.5rem;
  margin: 0;
  font-size: 0.9rem;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  #player-bar {
    gap: 0.4rem;
    padding: 0 0.5rem;
    font-size: 0.85rem;
  }

  #player-info {
    flex: 1 1 80px;
  }

  #player-seek-wrap {
    display: none;
  }

  #player-volume-wrap {
    display: none;
  }

  #player-bar button {
    padding: 0.3rem 0.45rem;
    min-width: 28px;
    min-height: 28px;
  }
}