/* 底部播放器样式 */
.music-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: transform 0.3s ease;
    border-top: 1px solid #eee;
}

.music-player .container {
    padding: 0;
}

.player-controls {
    display: flex;
    align-items: center;
    padding: 10px 20px;
}

.control-buttons {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.control-buttons .btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    margin: 0 5px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    color: #333;
}

.control-buttons .btn:hover {
    background-color: #f1f3f4;
}

.song-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.song-cover {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    overflow: hidden;
    margin-right: 15px;
}

.song-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.song-details {
    min-width: 0;
}

.song-details h4 {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
    color: #333;
}

.song-details p {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-container {
    display: flex;
    align-items: center;
    flex: 2;
    max-width: 500px;
    margin: 0 20px;
}

.current-time,
.duration {
    font-size: 14px;
    color: #666;
    width: 40px;
}

.progress-bar {
    flex: 1;
    height: 5px;
    background-color: #ddd;
    border-radius: 3px;
    margin: 0 10px;
    cursor: pointer;
    position: relative;
}

.progress {
    height: 100%;
    background-color: #ff6b35;
    border-radius: 3px;
    width: 0%;
}

.volume-controls {
    display: flex;
    align-items: center;
}

.volume-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    margin-right: 10px;
    color: #333;
}

.volume-slider {
    width: 100px;
    height: 5px;
    background-color: #ddd;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.volume-progress {
    height: 100%;
    background-color: #ff6b35;
    border-radius: 3px;
    width: 100%;
}

.favorite-controls {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.favorite-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #333;
}

.favorite-btn:hover {
    background-color: #f1f3f4;
}

.favorite-btn.favorited {
    color: #ff6b35;
}

.playlist-controls {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.playlist-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    color: #333;
}

.playlist-btn:hover {
    background-color: #f1f3f4;
}

/* 播放列表弹窗样式 */
.playlist-modal {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 500px;
    min-height: 60vh;
    max-height: 70vh;
    background-color: #fff;
    z-index: 2000;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid #eee;
}

.playlist-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.playlist-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background-color: #fafafa;
    border-radius: 12px 12px 0 0;
}

.playlist-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.close-btn:hover {
    background-color: #f1f3f4;
    color: #333;
}

.playlist-modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0;
}

.playlist-items {
    list-style: none;
    margin: 0;
    padding: 0;
    height: 57vh;
}

.playlist-item-row {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.playlist-item-row:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.playlist-item-row.active {
    background-color: rgba(255, 107, 53, 0.1);
    border-left: 3px solid #ff6b35;
}

.playlist-item-row .cover {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.playlist-item-row .cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-item-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.playlist-item-info h4 {
    font-size: 16px;
    margin: 0 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
    font-weight: 500;
}

.playlist-item-info p {
    font-size: 14px;
    color: #666;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item-actions {
    display: flex;
    align-items: center;
}

.playlist-item-actions .remove-btn {
    background: none;
    border: none;
    color: #ff6b35;
    font-size: 18px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    margin-left: 10px;
    font-weight: bold;
}

.playlist-item-actions .remove-btn:hover {
    background-color: rgba(255, 107, 53, 0.2);
    transform: scale(1.1);
}

.empty-playlist {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

/* 播放器在小屏幕上的样式 */
@media (max-width: 768px) {
    .player-controls {
        flex-wrap: wrap;
    }
    
    .song-info {
        order: -1;
        width: 100%;
        margin-bottom: 10px;
        justify-content: center;
    }
    
    .progress-container {
        order: -1;
        width: 100%;
        margin: 10px 0;
        max-width: none;
    }
    
    .control-buttons {
        margin-right: 10px;
    }
    
    .playlist-controls {
        margin-left: 10px;
    }
    
    /* 小屏幕上的播放列表 */
    .playlist-modal {
        width: 90%;
        right: 5%;
        min-height: 60vh;
    }
    
    .playlist-item-row {
        max-width: 100%;
    }
}