/* ========================================
   通用播放组件样式 - 统一设计
   用于配乐和歌曲播放器
   ======================================== */

/* ========================================
   通用播放按钮样式 - 统一设计
   ======================================== */
.audio-play-btn,
.song-play-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-line);
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    font-size: 1rem;
    padding: 0;
    position: relative;
    overflow: hidden;
}

/* 播放按钮的微妙光晕效果 */
.audio-play-btn::before,
.song-play-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-full);
    background: radial-gradient(circle, var(--color-accent-gold), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: -1;
}

.audio-play-btn:hover,
.song-play-btn:hover {
    border-color: var(--color-accent-gold);
    background: rgba(201, 169, 97, 0.1);
    transform: scale(1.05);
}

.audio-play-btn:hover::before,
.song-play-btn:hover::before {
    opacity: 0.15;
}

.audio-play-btn.playing,
.song-play-btn.playing {
    border-color: var(--color-accent-gold);
    background: rgba(201, 169, 97, 0.15);
    color: var(--color-accent-gold);
}

/* 亮色主题下的播放按钮增强 */
.theme-light .audio-play-btn,
.theme-light .song-play-btn {
    background: var(--color-bg-elevated);
    border-color: var(--color-line);
}

.theme-light .audio-play-btn:hover,
.theme-light .song-play-btn:hover {
    border-color: var(--color-accent-gold);
    background: rgba(166, 124, 61, 0.15);
}

.theme-light .audio-play-btn.playing,
.theme-light .song-play-btn.playing {
    border-color: var(--color-accent-gold);
    background: rgba(166, 124, 61, 0.25);
    color: var(--color-accent-gold);
}

/* 播放/暂停图标切换 */
.audio-play-btn .pause-icon,
.song-play-btn .pause-icon {
    display: none;
}

.audio-play-btn.playing .play-icon,
.song-play-btn.playing .play-icon {
    display: none;
}

.audio-play-btn.playing .pause-icon,
.song-play-btn.playing .pause-icon {
    display: block;
}

/* ========================================
   通用时间显示样式 - 统一设计
   ======================================== */
.audio-time,
.song-duration {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
    font-family: var(--font-mono, monospace);
    flex-shrink: 0;
}

.audio-time {
    min-width: 80px;
    text-align: right;
}

/* 在进度条容器中，时间显示更紧凑 */
.audio-progress-container .audio-time {
    min-width: auto;
    text-align: right;
    width: 100%;
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.audio-controls:hover .audio-progress-container .audio-time {
    opacity: 1;
}

.song-duration {
    min-width: 60px;
    text-align: right;
}

.time-separator {
    color: var(--color-text-muted);
    opacity: 0.5;
}

.current-time {
    color: var(--color-text-primary);
}

/* ========================================
   通用进度条样式 - 统一设计
   ======================================== */
.audio-progress,
.song-progress {
    flex: 1 1 0;
    min-width: 60px;
    height: 4px;
    background: var(--color-line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    display: block;
    opacity: 1;
    margin: 0;
    padding: 0;
}

.audio-progress.dragging,
.song-progress .progress-bar.dragging {
    cursor: grabbing;
}

.audio-progress:hover,
.song-progress:hover .progress-bar {
    cursor: grab;
}


.progress-bar {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: var(--radius-sm);
    margin: 0;
    padding: 0;
}

/* ========================================
   通用进度条填充样式 - 统一设计
   ======================================== */
.progress-fill {
    height: 100%;
    background: linear-gradient(
        90deg,
        var(--color-accent-gold) 0%,
        rgba(201, 169, 97, 0.8) 50%,
        rgba(201, 169, 97, 0.6) 100%
    );
    border-radius: var(--radius-sm);
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
    box-shadow: 0 0 8px rgba(201, 169, 97, 0.3);
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--color-accent-gold);
    border-radius: var(--radius-full);
    opacity: 0;
    transition: opacity var(--transition-fast);
    box-shadow: 0 0 12px rgba(201, 169, 97, 0.6);
    border: 2px solid var(--color-bg-primary);
}

/* 悬停效果 - 统一 */
.audio-progress:hover .progress-fill,
.song-progress:hover .progress-fill {
    box-shadow: 0 0 12px rgba(201, 169, 97, 0.5);
}

.audio-progress:hover .progress-fill::after,
.song-progress:hover .progress-fill::after {
    opacity: 1;
}

/* 播放状态 - 统一 */
.song-card.playing .progress-fill {
    box-shadow: 0 0 10px rgba(201, 169, 97, 0.4);
}

.song-card.playing .progress-fill::after {
    opacity: 0.8;
}

/* ========================================
   通用音频控制容器
   ======================================== */
.audio-player {
    display: none;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    width: 100%;
    position: relative;
    padding: 0;
    min-height: 60px;
    box-sizing: border-box;
}

.audio-controls .audio-play-btn {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    transition: all var(--transition-fast);
    align-self: center;
}

.audio-controls .audio-play-btn:hover {
    transform: scale(1.05);
}

/* 进度条和时间显示的容器 - 优雅的垂直布局 */
.audio-controls .audio-progress-container {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
    justify-content: center;
    min-height: 48px;
    padding: 0;
    margin: 0;
}

.audio-controls .audio-progress-container .audio-progress {
    width: 100%;
    height: 4px;
    flex: none;
    min-width: 0;
    margin: 0;
    padding: 0;
    cursor: pointer;
    align-self: stretch;
}

.audio-controls .audio-progress-container .audio-time {
    align-self: flex-end;
    margin: 0;
    padding: 0;
    font-size: 0.7rem;
    min-width: auto;
    text-align: right;
    line-height: 1.2;
    letter-spacing: 0.05em;
    height: auto;
}

