/**
 * 水仙十字之谜 - 音乐播放器样式
 */

/* 播放器容器 */
.music-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: var(--font-body);
}

/* 悬浮按钮 */
.player-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(13, 115, 119, 0.9), rgba(20, 145, 155, 0.9));
    border: 2px solid rgba(212, 175, 55, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 20px rgba(13, 115, 119, 0.3);
}

.player-toggle:hover {
    transform: scale(1.1);
    border-color: var(--color-accent, #d4af37);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 30px rgba(212, 175, 55, 0.4);
}

.player-toggle i {
    font-size: 1.2rem;
    color: #fff;
    transition: all 0.3s ease;
}

.player-toggle.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.9), rgba(180, 140, 30, 0.9));
}

.player-toggle.playing i {
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* 播放器面板 */
.player-panel {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 280px;
    background: linear-gradient(135deg, 
        rgba(15, 28, 46, 0.98) 0%, 
        rgba(26, 39, 68, 0.98) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(13, 115, 119, 0.2);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.player-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* 播放器头部 */
.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(90deg, 
        rgba(212, 175, 55, 0.15) 0%, 
        rgba(212, 175, 55, 0.05) 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.player-title {
    font-size: 0.9rem;
    color: var(--color-accent, #d4af37);
    font-weight: 600;
}

.player-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.player-close:hover {
    color: #fff;
}

/* 曲目信息 */
.player-track-info {
    padding: 15px 15px 10px;
    text-align: center;
}

.track-name {
    font-size: 1rem;
    color: #fff;
    font-weight: 600;
    display: block;
}

/* 进度条 */
.player-progress {
    padding: 0 15px 10px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-cyan, #7dd3fc), var(--color-accent, #d4af37));
    border-radius: 2px;
    width: 0;
    transition: width 0.1s linear;
}

.time-display {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* 播放控制 */
.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: rgba(212, 175, 55, 0.5);
    transform: scale(1.1);
}

.control-btn.play-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(13, 115, 119, 0.8), rgba(20, 145, 155, 0.8));
    border-color: rgba(212, 175, 55, 0.5);
}

.control-btn.play-btn:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.8), rgba(180, 140, 30, 0.8));
}

/* 音量控制 */
.player-volume {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.player-volume i {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    width: 20px;
}

#volumeSlider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--color-accent, #d4af37);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

#volumeSlider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

#volumeSlider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--color-accent, #d4af37);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* 播放列表 */
.player-playlist {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 0;
}

.playlist-title {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    padding: 0 15px 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.playlist-items {
    max-height: 150px;
    overflow-y: auto;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

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

.playlist-item.active {
    background: rgba(212, 175, 55, 0.15);
    color: var(--color-accent, #d4af37);
}

.playlist-item i {
    font-size: 0.8rem;
    opacity: 0.6;
}

.playlist-item.active i {
    opacity: 1;
    animation: pulse 1s ease-in-out infinite;
}

/* 滚动条样式 */
.playlist-items::-webkit-scrollbar {
    width: 4px;
}

.playlist-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.playlist-items::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 2px;
}

/* 响应式 */
@media (max-width: 480px) {
    .music-player {
        bottom: 15px;
        right: 15px;
    }
    
    .player-toggle {
        width: 45px;
        height: 45px;
    }
    
    .player-toggle i {
        font-size: 1rem;
    }
    
    .player-panel {
        width: 260px;
        right: -5px;
        bottom: 55px;
    }
    
    .player-track-info {
        padding: 12px 12px 8px;
    }
    
    .track-name {
        font-size: 0.9rem;
    }
    
    .control-btn {
        width: 36px;
        height: 36px;
    }
    
    .control-btn.play-btn {
        width: 44px;
        height: 44px;
    }
    
    .playlist-item {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .player-panel {
        width: 240px;
    }
    
    .player-controls {
        gap: 10px;
    }
}
