/* ========== 全局音频播放器（mini bar） ========== */

.audio-player {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  display: none;
  align-items: center;
  gap: 12px;
  padding: 8px 18px 8px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  min-width: 380px;
  max-width: 480px;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.audio-player.active {
  display: inline-flex;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.ap-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(184, 114, 63, 0.3);
  transition: all 0.2s ease;
  padding: 0;
}

.ap-play-btn:hover {
  background: var(--brand-hover);
  transform: scale(1.05);
}

.ap-play-btn.playing {
  background: var(--bg-elevated);
  color: var(--brand);
  border: 1px solid var(--brand);
  box-shadow: none;
}

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

.ap-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 5px;
  line-height: 1.2;
}

.ap-progress {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.ap-progress-fill {
  height: 100%;
  background: var(--brand);
  width: 0%;
  border-radius: 2px;
  transition: width 0.1s linear;
}

.ap-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .audio-player {
    min-width: 0;
    width: calc(100% - 32px);
    max-width: none;
  }
}

/* 播放按钮的播放状态视觉反馈 */
.work-play.playing,
.voice-play.playing {
  background: var(--brand);
  color: #fff;
}
