/**
 * 网易云音乐风格播放器
 */

.music-player-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Microsoft YaHei', sans-serif;
}

.music-player-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ec4141;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(236, 65, 65, 0.5);
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
    padding: 0;
    position: relative;
}


/* 网易云音乐Logo样式 */

.netease-cloud-logo {
    width: 60%;
    height: 60%;
    fill: #ffffff;
    transition: all 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.music-player-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(236, 65, 65, 0.6);
}

.music-player-toggle:hover .netease-cloud-logo {
    transform: translate(-50%, -50%) scale(1.1);
}


/* 添加内部阴影效果模拟网易云音乐图标立体感 */

.music-player-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2), transparent 70%);
    pointer-events: none;
    border-radius: 50%;
    opacity: 0.8;
}

.music-player-toggle::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent 70%);
    pointer-events: none;
}

.music-player-panel {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 320px;
    background: #252525;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: none;
    transition: all 0.3s ease;
    transform-origin: bottom right;
    transform: scale(0.95);
    opacity: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 10000;
}

.music-player-container.show-panel .music-player-panel {
    display: block;
    transform: scale(1);
    opacity: 1;
}

.music-info {
    padding: 16px;
    display: flex;
    align-items: center;
    background: #2d2d2d;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #333;
}

.music-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ec4141;
}

.song-info {
    flex: 1;
    position: relative;
}

.song-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
    letter-spacing: 0.3px;
}

.song-artist {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
}

.music-controls {
    padding: 12px 16px;
    background: #252525;
}

.progress-bar {
    height: 2px;
    background-color: #555;
    border-radius: 1px;
    margin: 10px 0 15px;
    position: relative;
    cursor: pointer;
}

.progress-bar:hover {
    height: 4px;
    margin: 9px 0 14px;
}

.progress {
    height: 100%;
    background: #ec4141;
    border-radius: 1px;
    width: 0;
    position: relative;
    transition: width 0.1s linear;
}

.control-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.playback-controls {
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-buttons span {
    cursor: pointer;
    font-size: 16px;
    color: #ddd;
    transition: all 0.2s ease;
    margin: 0 12px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-buttons span:hover {
    color: #ec4141;
}

.play-btn {
    font-size: 28px !important;
    width: 40px !important;
    height: 40px !important;
    color: #fff !important;
    background: rgba(236, 65, 65, 0.1);
    border-radius: 50%;
}

.play-btn:hover {
    color: #ec4141 !important;
    background: rgba(236, 65, 65, 0.2);
}


/* 音量控制区域 */

.volume-control-container {
    display: flex;
    align-items: center;
    position: relative;
    margin-top: 5px;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}

.volume-header {
    display: flex;
    align-items: center;
    width: 25%;
}

.volume-label {
    font-size: 12px;
    color: #999;
    margin-left: 8px;
}

.volume-btn {
    cursor: pointer;
    color: #ddd;
    font-size: 14px;
    transition: all 0.2s ease;
}

.volume-btn:hover {
    color: #ec4141;
}

.volume-slider {
    position: relative;
    padding: 0 5px;
    width: 75%;
    display: flex;
    align-items: center;
}

.volume-value {
    margin-left: 8px;
    font-size: 12px;
    color: #999;
    min-width: 28px;
    text-align: right;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: #555;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ec4141;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ec4141;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
}

.playlist-container {
    max-height: 230px;
    overflow-y: auto;
    border-top: 1px solid #333;
    scrollbar-width: thin;
    scrollbar-color: #ec4141 #333;
}

.playlist-container::-webkit-scrollbar {
    width: 4px;
}

.playlist-container::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.playlist-container::-webkit-scrollbar-thumb {
    background-color: #ec4141;
    border-radius: 4px;
}

.playlist-title {
    padding: 10px 16px;
    font-weight: 600;
    background: #2d2d2d;
    color: #ddd;
    font-size: 13px;
    position: relative;
    display: flex;
    align-items: center;
}

.playlist-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 13px;
    background: #ec4141;
    margin-right: 8px;
    border-radius: 1px;
}

.playlist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.playlist li {
    padding: 10px 16px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
    font-size: 12px;
    color: #999;
    position: relative;
    padding-left: 25px;
}

.playlist li::before {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    background: #666;
    border-radius: 50%;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.playlist li:hover {
    background-color: #333;
    color: #fff;
}

.playlist li:hover::before {
    background: #ec4141;
}

.playlist li.playing {
    color: #ec4141;
    background-color: #2d2d2d;
}

.playlist li.playing::before {
    background: #ec4141;
    width: 4px;
    height: 4px;
}


/* 动画效果 */

@keyframes loading-animation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.progress.loading {
    background: linear-gradient(90deg, #ec4141, #ff7070, #ec4141);
    background-size: 200% 200%;
    animation: loading-animation 1.5s infinite;
}


/* 响应式调整 */

@media screen and (max-width: 768px) {
    .music-player-panel {
        width: 280px;
    }
    .control-buttons span {
        margin: 0 8px;
    }
}