/* 吸底播放器样式 */
.sticky-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 12px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sticky-player.active {
    transform: translateY(0);
}

.player-container {
    display: flex;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    gap: 25px;
    height: 60px;
}

/* 左侧控制按钮区域 */
.player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.player-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 18px;
    backdrop-filter: blur(5px);
}

.player-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

.player-btn:active {
    transform: scale(0.95);
}

.player-btn.play {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    font-size: 22px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.player-btn.play:hover {
    background: linear-gradient(135deg, #ee5a52, #ff6b6b);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* 中间歌曲信息和进度条区域 */
/* 中间歌曲信息和进度条区域 */
.player-center {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 300px;
    justify-content: center;
}

.player-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 24px;
    overflow: hidden;
}

.player-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    flex-shrink: 1;
}

.player-artist {
    font-size: 14px;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
    flex-shrink: 0;
}

/* 进度条区域 */
.player-progress {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
    height: 32px;
    align-items: center;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 12px;
    opacity: 0.8;
    color: rgba(255,255,255,0.7);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ffa500);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.time-display {
    font-size: 12px;
    opacity: 0.8;
    min-width: 35px;
    text-align: center;
    color: rgba(255,255,255,0.7);
}

/* 右侧功能按钮区域 */
.player-functions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 8px 12px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.volume-icon {
    font-size: 16px;
    opacity: 0.8;
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: linear-gradient(135deg, #ffa500, #ff6b6b);
}

.function-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    position: relative;
}

.function-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
    transform: scale(1.1);
}

.function-btn:active {
    transform: scale(0.95);
}

.function-btn.active {
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

/* 播放列表弹窗样式 */
.playlist-modal {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-height: 450px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 1001;
    display: none;
    overflow: hidden;
    transition: all 0.3s ease;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
}

.playlist-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
}

.playlist-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.playlist-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
    transform: rotate(90deg);
}

.playlist-content {
    max-height: 350px;
    overflow-y: auto;
    padding: 10px 0;
}

.playlist-content::-webkit-scrollbar {
    width: 6px;
}

.playlist-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}

.playlist-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.playlist-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

.playlist-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    opacity: 0.8;
}



.playlist-item.active .item-title {
    color: #ff6b6b;
    font-weight: 600;
}

.item-title {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.item-category {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 2px;
    opacity: 0.8;
}

.item-type {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
    width: fit-content;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* 功能按钮 */
.function-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
    backdrop-filter: blur(5px);
    position: relative;
}

.function-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

.function-btn.active {
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

/* 循环模式按钮 */
.loop-btn {
    font-size: 18px;
}

/* 播放列表按钮 */
.playlist-btn {
    font-size: 16px;
}

/* 关闭按钮 */
.player-close {
    position: absolute;
    top: 8px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-close:hover {
    opacity: 1;
}

/* 播放列表弹窗 */
.playlist-modal {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 350px;
    max-height: 400px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    display: none;
    z-index: 1001;
    overflow: hidden;
}

.playlist-modal.show {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.playlist-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.playlist-title {
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.playlist-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.playlist-close:hover {
    color: white;
}

.playlist-content {
    max-height: 320px;
    overflow-y: auto;
}

.playlist-item {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}
.playlist-item-number {
    flex-shrink: 0;
    width: 20px;
}
.playlist-item-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;          /* 防止 flex 子项被撑爆 */
}
.playlist-item-duration {
    flex-shrink: 0;
    width: 35px;
    text-align: right;
}

.playlist-item:hover {
    background: rgba(255,255,255,0.05);
}

.playlist-item.active {
    background: rgba(255, 107, 107, 0.2);
    border-left: 3px solid #ff6b6b;
}

.playlist-item-number {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    min-width: 20px;
}

.playlist-item-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.playlist-item-info > * {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    color: rgba(255,255,255,.7);
}

.playlist-item-title {
    font-size: 14px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item-artist {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item-duration {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    min-width: 35px;
    text-align: right;
}

.playlist-empty {
    padding: 40px 20px;
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .player-container {
        flex-wrap: wrap;
        gap: 12px;
        height: auto;
        padding: 10px 0;
    }
    
    .player-center {
        order: 3;
        flex-basis: 100%;
        min-width: auto;
        margin-top: 8px;
        max-width: 100%;
        gap: 6px;
    }
    
    .player-info {
        text-align: left;
        flex-basis: calc(100% - 120px);
        order: 1;
        flex-shrink: 0;
        height: 20px;
        gap: 8px;
    }
    
    .player-controls {
        order: 2;
        flex-basis: auto;
    }
    
    .player-functions {
        order: 4;
        margin-left: auto;
        margin-top: 10px;
        flex-basis: auto;
    }
    
    .player-title {
        font-size: 14px;
    }
    
    .player-artist {
        font-size: 12px;
    }
    
    .player-progress {
        height: 28px;
        gap: 4px;
    }
    
    .playlist-modal {
        width: 320px;
        right: 15px;
        bottom: 85px;
    }
}

@media (max-width: 480px) {
    .sticky-player {
        padding: 10px 15px;
    }
    
    .player-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .player-btn.play {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
    
    .volume-control {
        padding: 6px 8px;
    }
    
    .volume-slider {
        width: 60px;
    }
    
    .time-display {
        font-size: 11px;
        min-width: 30px;
    }
    
    .player-progress {
        min-width: auto;
    }
    
    .function-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .playlist-modal {
        width: 280px;
        right: 10px;
        bottom: 80px;
    }
}