/* 音乐播放器 - 毛玻璃金属质感设计 */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

:root {
    --metal-gradient-1: linear-gradient(135deg, #2d3436 0%, #636e72 50%, #2d3436 100%);
    --metal-gradient-2: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --shadow-metal: 0 8px 32px rgba(0, 0, 0, 0.4), 
                    inset 0 1px 0 rgba(255, 255, 255, 0.1),
                    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent-cyan: #00d9ff;
    --accent-gold: #ffd700;
}

* {
    box-sizing: border-box;
}

.music-player {
    max-width: 1100px;
    margin: 40px auto;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    border-radius: 24px;
    padding: 0;
    position: relative;
    overflow: hidden;
    font-family: 'Rajdhani', sans-serif;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6),
                0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.music-player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 217, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.music-player > * {
    position: relative;
    z-index: 1;
}

/* 主播放器区域 */
.player-main {
    display: flex;
    gap: 40px;
    padding: 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    position: relative;
}

.player-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

/* 专辑封面 - 金属边框 */
.album-art {
    flex-shrink: 0;
    position: relative;
}

.album-art::before {
    content: '';
    position: absolute;
    inset: -8px;
    background: var(--metal-gradient-1);
    border-radius: 16px;
    z-index: -1;
    box-shadow: var(--shadow-metal);
}

.album-art::after {
    content: '';
    position: absolute;
    inset: -4px;
    background: var(--metal-gradient-2);
    border-radius: 14px;
    z-index: -1;
}

.album-art img {
    width: 240px;
    height: 240px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.album-art img.playing {
    animation: metalRotate 30s linear infinite;
}

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

/* 播放器控制区 */
.player-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--text-primary);
}

.song-info {
    margin-bottom: 20px;
}

.song-info h3 {
    margin: 0 0 8px 0;
    font-size: 32px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #fff, var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 217, 255, 0.3);
}

.song-info p {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

/* 进度条 - 金属轨道 */
.progress-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
}

.progress-bar span {
    font-size: 15px;
    font-weight: 600;
    font-family: 'Orbitron', monospace;
    min-width: 50px;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.progress-container {
    flex: 1;
    height: 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    overflow: visible;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6),
                inset 0 -1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #00d9ff, #0099ff);
    border-radius: 10px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.6),
                0 0 40px rgba(0, 217, 255, 0.3);
}

.progress::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: radial-gradient(circle, #fff 0%, var(--accent-cyan) 100%);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-cyan),
                0 0 20px rgba(0, 217, 255, 0.5),
                inset 0 1px 2px rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* 控制按钮 - 金属质感 */
.controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-btn {
    background: var(--metal-gradient-1);
    border: none;
    color: white;
    padding: 14px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-metal),
                0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--metal-gradient-2);
    border-radius: 50%;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.control-btn svg {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.control-btn:hover {
    transform: translateY(-3px) scale(1.05);
    background: linear-gradient(135deg, #00f0ff, var(--accent-cyan));
    box-shadow: 0 8px 40px rgba(0, 217, 255, 0.6),
                0 0 60px rgba(0, 217, 255, 0.3);
}

.control-btn:hover::before {
    opacity: 0;
}

.control-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.play-btn {
    background: linear-gradient(135deg, var(--accent-cyan), #0099cc);
    padding: 18px;
    box-shadow: 0 8px 32px rgba(0, 217, 255, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.3),
                inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.play-btn:hover {
    background: linear-gradient(135deg, #00f0ff, var(--accent-cyan));
    box-shadow: 0 8px 40px rgba(0, 217, 255, 0.6),
                0 0 60px rgba(0, 217, 255, 0.3);
}

.volume-slider {
    width: 120px;
    height: 6px;
    background: rgba(0, 0, 0, 0.4);
    outline: none;
    border-radius: 6px;
    -webkit-appearance: none;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: radial-gradient(circle, #fff, var(--accent-cyan));
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-cyan),
                0 2px 8px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: radial-gradient(circle, #fff, var(--accent-cyan));
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 10px var(--accent-cyan);
}

/* 底部区域 - 毛玻璃分栏 */
.player-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.playlist-section,
.lyrics-section {
    background: var(--glass-bg);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    padding: 30px;
    color: var(--text-primary);
    position: relative;
}

.playlist-section {
    border-right: 1px solid var(--glass-border);
}

.playlist-section h4,
.lyrics-section h4 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff, var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    padding-bottom: 12px;
}

.playlist-section h4::after,
.lyrics-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), transparent);
    box-shadow: 0 0 10px var(--accent-cyan);
}

/* 播放列表 */
.playlist {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 340px;
    overflow-y: auto;
}

.playlist::-webkit-scrollbar {
    width: 8px;
}

.playlist::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.playlist::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-cyan), #0099cc);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.playlist li {
    padding: 15px 18px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.playlist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, var(--accent-cyan), transparent);
    transition: width 0.3s ease;
}

.playlist li:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(8px);
    border-color: rgba(0, 217, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.2);
}

.playlist li:hover::before {
    width: 4px;
}

.playlist li.active {
    background: rgba(0, 217, 255, 0.15);
    border-color: var(--accent-cyan);
    box-shadow: 0 4px 25px rgba(0, 217, 255, 0.3),
                inset 0 0 20px rgba(0, 217, 255, 0.1);
}

.playlist li.active::before {
    width: 4px;
}

.playlist li .song-number {
    font-size: 16px;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    opacity: 0.5;
    min-width: 30px;
    text-align: center;
}

.playlist li.active .song-number {
    color: var(--accent-cyan);
    opacity: 1;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.8);
}

.playlist li .song-details {
    flex: 1;
}

.playlist li .song-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.playlist li .song-artist {
    font-size: 14px;
    opacity: 0.7;
    font-weight: 400;
}

/* 歌词区域 */
.lyrics-container {
    max-height: 340px;
    overflow-y: auto;
    line-height: 2;
    font-size: 16px;
    font-weight: 400;
    padding-right: 10px;
}

.lyrics-container::-webkit-scrollbar {
    width: 8px;
}

.lyrics-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.lyrics-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-cyan), #0099cc);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.lyrics-container p {
    margin: 10px 0;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0.4;
    position: relative;
    border-left: 2px solid transparent;
    transform-origin: bottom center;
    transform: perspective(600px) rotateX(0deg);
}

.lyrics-container p.active {
    opacity: 1;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.15), rgba(0, 153, 255, 0.1));
    transform: perspective(600px) rotateX(0deg) scale(1.05) translateX(8px);
    font-weight: 600;
    font-size: 18px;
    color: var(--accent-cyan);
    text-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
    border-left-color: var(--accent-cyan);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.3);
    animation: lyricsFlipUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lyricsFlipUp {
    0% {
        opacity: 0.4;
        transform: perspective(600px) rotateX(90deg) scale(0.8) translateY(20px);
    }
    50% {
        opacity: 0.7;
        transform: perspective(600px) rotateX(-5deg) scale(1.02) translateX(4px);
    }
    100% {
        opacity: 1;
        transform: perspective(600px) rotateX(0deg) scale(1.05) translateX(8px);
    }
}

.lyrics-container .no-lyrics {
    text-align: center;
    opacity: 0.4;
    font-style: italic;
    padding: 40px 20px;
}

/* 响应式设计 */
@media (max-width: 968px) {
    .music-player {
        margin: 20px;
        border-radius: 20px;
    }
    
    .player-main {
        flex-direction: column;
        align-items: center;
        padding: 30px 20px;
    }
    
    .album-art img {
        width: 200px;
        height: 200px;
    }
    
    .player-bottom {
        grid-template-columns: 1fr;
    }
    
    .playlist-section {
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }
    
    .song-info h3 {
        font-size: 26px;
        text-align: center;
    }
    
    .song-info p {
        text-align: center;
    }
    
    .controls {
        justify-content: center;
    }
}

/* 金属质感动画效果 */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.control-btn:hover {
    animation: shimmer 2s infinite linear;
    background-image: linear-gradient(
        90deg,
        var(--metal-gradient-1),
        rgba(255, 255, 255, 0.2),
        var(--metal-gradient-1)
    );
    background-size: 1000px 100%;
}

/* 模式提示动画 */
@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}
