/* ============================================
   Audio Player — Floating background music control
   ============================================ */

.audio-player {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--color-dark-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  padding: var(--space-xs) var(--space-sm) var(--space-xs) var(--space-xs);
  box-shadow: var(--shadow-lg);
  transition: opacity var(--transition-base), transform var(--transition-base);
  opacity: 0;
  transform: translateY(20px);
}

.audio-player--visible {
  opacity: 1;
  transform: translateY(0);
}

.audio-player__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--color-accent);
  color: var(--color-dark-bg);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  flex-shrink: 0;
}

.audio-player__btn:hover {
  background: var(--color-accent-light);
  transform: scale(1.05);
}

.audio-player__btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.audio-player__info {
  display: flex;
  flex-direction: column;
  padding-right: var(--space-sm);
  max-width: 160px;
}

.audio-player__title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-dark-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-player__artist {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--color-dark-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Equalizer animation when playing */
.audio-player__eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  padding-right: var(--space-xs);
}

.audio-player__eq-bar {
  width: 2px;
  background: var(--color-accent);
  border-radius: 1px;
  animation: eq-bounce 0.8s ease-in-out infinite alternate;
}

.audio-player__eq-bar:nth-child(1) { height: 4px; animation-delay: 0s; }
.audio-player__eq-bar:nth-child(2) { height: 8px; animation-delay: 0.2s; }
.audio-player__eq-bar:nth-child(3) { height: 6px; animation-delay: 0.4s; }

.audio-player--paused .audio-player__eq-bar {
  animation: none;
  height: 3px;
}

@keyframes eq-bounce {
  0% { height: 3px; }
  100% { height: 14px; }
}

/* Mobile: compact layout */
@media (max-width: 480px) {
  .audio-player {
    bottom: var(--space-md);
    right: var(--space-md);
  }

  .audio-player__info {
    max-width: 120px;
  }
}
