/* 迷你播放器样式 - 底部固定 */
.bottom-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 76px;
    background: rgba(24, 24, 24, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

/* 播放状态下的视觉效果 */
.bottom-player.playing {
    background: rgba(29, 185, 84, 0.05);
    box-shadow: 0 -2px 10px rgba(29, 185, 84, 0.1);
}

/* 歌曲信息区域 */
.player-info {
    display: flex;
    align-items: center;
    min-width: 250px;
    gap: 12px;
}

/* 专辑封面 */
.mini-player-cover {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

/* 封面旋转动画 */
.mini-player-cover.cover-rotate {
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 歌曲标题和艺术家信息 */
.track-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mini-player-title {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.mini-player-artist {
    font-size: 12px;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* 收藏按钮 */
#favorite-btn {
    background: transparent;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 8px;
    margin-left: 8px;
    transition: color 0.2s ease, transform 0.2s ease;
}

#favorite-btn:hover {
    color: #ffffff;
    transform: scale(1.1);
}

#favorite-btn.active {
    color: #1db954;
}

#favorite-btn.animating {
    animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

/* 播放控制区域 */
.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 500px;
}

/* 播放按钮组 */
.controls-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.control-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn.active {
    color: #1db954;
}

/* 播放/暂停按钮样式更突出 */
#play-pause-btn {
    width: 36px;
    height: 36px;
    background-color: #ffffff;
    color: #000000;
}

#play-pause-btn:hover {
    background-color: #ffffff;
    transform: scale(1.05);
}

/* 进度条区域 */
.progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

#progress-bar {
    flex: 1;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease;
}

#progress-bar:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

#progress-fill {
    height: 100%;
    background-color: #1db954;
    border-radius: 2px;
    position: relative;
    transition: width 0.1s ease;
}

#progress-fill::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: #ffffff;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#progress-bar:hover #progress-fill::after {
    opacity: 1;
}

/* 时间显示 */
#current-time,
#total-time {
    font-size: 11px;
    color: #b3b3b3;
    font-family: 'Inter', sans-serif;
    min-width: 35px;
    text-align: center;
}

/* 音量控制区域 */
.player-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
}

#volume-slider {
    width: 70px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    appearance: none;
    transition: background-color 0.2s ease;
}

#volume-slider:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

#volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background-color: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#volume-slider:hover::-webkit-slider-thumb {
    opacity: 1;
}

#volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background-color: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#volume-slider:hover::-moz-range-thumb {
    opacity: 1;
}

/* 播放列表按钮 */
#playlist-toggle-btn {
    margin-left: 8px;
}

/* 播放列表面板 */
#playlist-panel {
    position: fixed;
    bottom: 76px;
    left: 0;
    right: 0;
    max-height: 0;
    background: rgba(24, 24, 24, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px 16px 0 0;
    z-index: 999;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    display: flex;
    flex-direction: column;
}

#playlist-panel.active {
    max-height: 70vh;
    padding: 16px;
}

/* 播放列表头部 */
.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.playlist-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

#close-playlist {
    background: transparent;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: color 0.2s ease, background-color 0.2s ease;
}

#close-playlist:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* 播放列表容器 */
#playlist-items {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

/* 自定义滚动条 */
#playlist-items::-webkit-scrollbar {
    width: 6px;
}

#playlist-items::-webkit-scrollbar-track {
    background: transparent;
}

#playlist-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

#playlist-items::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 播放列表项目 */
.playlist-item {
    display: flex;
    align-items: center;
    padding: 12px;
    gap: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

.playlist-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.playlist-item.active {
    background-color: rgba(29, 185, 84, 0.1);
}

/* 序号/播放图标 */
.playlist-item-number {
    width: 24px;
    text-align: center;
    font-size: 14px;
    color: #b3b3b3;
}

.playlist-item.active .playlist-item-number {
    color: #1db954;
}

/* 播放列表封面 */
.playlist-item-cover {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.playlist-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 播放列表信息 */
.playlist-item-info {
    flex: 1;
    min-width: 0;
}

.playlist-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.playlist-item-artist {
    font-size: 12px;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 播放列表时长 */
.playlist-item-duration {
    font-size: 12px;
    color: #b3b3b3;
    margin-right: 8px;
    flex-shrink: 0;
}

/* 播放列表收藏按钮 */
.playlist-item-favorite {
    color: #b3b3b3;
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.playlist-item-favorite:hover {
    color: #ffffff;
}

.playlist-item-favorite i.active {
    color: #1db954;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .bottom-player {
        height: 64px;
        padding: 0 12px;
    }
    
    .player-info {
        min-width: auto;
        flex: 1;
    }
    
    .mini-player-cover {
        width: 48px;
        height: 48px;
    }
    
    .track-details {
        max-width: 150px;
    }
    
    .mini-player-title,
    .mini-player-artist {
        max-width: 100%;
    }
    
    #favorite-btn {
        margin-left: 4px;
        padding: 6px;
    }
    
    .player-controls {
        flex: 0 0 180px;
        max-width: 180px;
    }
    
    .controls-buttons {
        gap: 8px;
    }
    
    #play-pause-btn {
        width: 32px;
        height: 32px;
    }
    
    .player-volume {
        display: none;
    }
    
    #playlist-panel {
        bottom: 64px;
    }
    
    #playlist-panel.active {
        max-height: 80vh;
    }
    
    .playlist-item {
        padding: 10px;
    }
    
    .playlist-item-cover {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .player-info {
        gap: 8px;
    }
    
    .track-details {
        max-width: 120px;
    }
    
    .mini-player-title {
        font-size: 13px;
    }
    
    .mini-player-artist {
        font-size: 11px;
    }
    
    .player-controls {
        flex: 0 0 160px;
        max-width: 160px;
    }
    
    .progress-container {
        gap: 4px;
    }
    
    #current-time,
    #total-time {
        font-size: 10px;
        min-width: 30px;
    }
}

/* 深色/浅色主题适配 */
:root[data-theme="light"] .bottom-player,
:root[data-theme="light"] #playlist-panel {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .mini-player-title,
:root[data-theme="light"] .playlist-header h3,
:root[data-theme="light"] .playlist-item-title {
    color: #121212;
}

:root[data-theme="light"] .mini-player-artist,
:root[data-theme="light"] #current-time,
:root[data-theme="light"] #total-time,
:root[data-theme="light"] .playlist-item-artist,
:root[data-theme="light"] .playlist-item-duration,
:root[data-theme="light"] .playlist-item-number {
    color: #727272;
}

:root[data-theme="light"] .control-btn,
:root[data-theme="light"] #close-playlist,
:root[data-theme="light"] .playlist-item-favorite {
    color: #121212;
}

:root[data-theme="light"] .playlist-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

:root[data-theme="light"] #play-pause-btn {
    background-color: #121212;
    color: #ffffff;
}

:root[data-theme="light"] #progress-fill::after,
:root[data-theme="light"] #volume-slider::-webkit-slider-thumb,
:root[data-theme="light"] #volume-slider::-moz-range-thumb {
    background-color: #121212;
}