* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ac1f18;
    --secondary-color: #5a1f1b;
    --accent-color: #5c1e19;
    --background-color: #482522;
    --text-color: #483332;
    --card-bg: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background-color) 0%, #0a4b63 100%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

.music-player {
    width: 100%;
    max-width: 1200px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.player-container {
    display: flex;
    height: 600px;
}

/* 左侧播放器区域 */
.player-main {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.player-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--primary-color) 0%, transparent 70%);
    opacity: 0.1;
    z-index: -1;
}

.album-art {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.vinyl {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: linear-gradient(45deg, #333 0%, #000 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    position: relative;
    animation: rotate 20s linear infinite;
    animation-play-state: paused;
}

.vinyl.playing {
    animation-play-state: running;
}

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

.vinyl::before {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    z-index: 2;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.vinyl-inner {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.album-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: var(--transition);
}

.song-info {
    text-align: center;
    margin-bottom: 30px;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.song-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
    transition: var(--transition);
}

.song-artist {
    font-size: 18px;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.song-album {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.progress-container {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.time {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    width: 50px;
}

.current-time {
    text-align: right;
}

.total-time {
    text-align: left;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin: 0 15px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--accent-color);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.progress-handle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-color);
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: var(--transition);
    box-shadow: 0 0 10px rgba(6, 214, 160, 0.7);
}

.progress-bar:hover .progress-handle {
    opacity: 1;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    border: none;
    color: var(--text-color);
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.control-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.control-btn:active {
    transform: scale(0.95);
}

.play-pause {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    font-size: 22px;
}

.volume-container {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.volume-slider {
    width: 0;
    overflow: hidden;
    transition: var(--transition);
    margin-left: 10px;
}

.volume-container:hover .volume-slider {
    width: 100px;
}

.volume-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.volume-level {
    height: 100%;
    background: var(--secondary-color);
    border-radius: 3px;
    width: 80%;
}

.volume-handle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--secondary-color);
    position: absolute;
    top: 50%;
    right: 20%;
    transform: translate(50%, -50%);
    opacity: 0;
    transition: var(--transition);
}

.volume-bar:hover .volume-handle {
    opacity: 1;
}

.play-mode {
    margin-left: 20px;
}

.mode-btn.active {
    background: var(--accent-color);
}

/* 右侧歌单区域 */
.playlist-sidebar {
    width: 350px;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.playlist-header h2 {
    font-size: 24px;
    font-weight: 700;
}

.refresh-playlists-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    border: none;
    color: var(--text-color);
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.refresh-playlists-btn:hover {
    transform: rotate(180deg);
}

.refresh-playlists-btn.rotating {
    animation: rotate 1s linear infinite;
}

.playlist-tabs {
    margin-bottom: 20px;
}

.playlist-tab {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.05);
}

.playlist-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.playlist-tab.active {
    background: rgba(255, 255, 255, 0.15);
    border-left: 3px solid var(--primary-color);
}

.playlist-tab img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
}

.playlist-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.playlist-info p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.songs-list h3 {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.songs {
    list-style: none;
}

.song-item {
    display: flex;
    align-items: center;
    padding: 12px 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.05);
}

.song-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.song-item.playing {
    background: rgba(255, 107, 107, 0.2);
    border-left: 3px solid var(--primary-color);
}

.song-number {
    width: 30px;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.song-cover {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    overflow: hidden;
    margin-right: 15px;
}

.song-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.song-details {
    flex: 1;
}

.song-details h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.song-details p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.song-duration {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-right: 10px;
}

.song-local {
    font-size: 12px;
    color: var(--secondary-color);
}

.no-songs {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

.no-songs i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-songs p {
    font-size: 16px;
    margin-bottom: 10px;
}

.help-text {
    font-size: 12px !important;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.4) !important;
}

/* 响应式设计 */
@media (max-width: 900px) {
    .player-container {
        flex-direction: column;
        height: auto;
    }
    
    .playlist-sidebar {
        width: 100%;
        height: 400px;
    }
    
    .album-art {
        margin-bottom: 20px;
    }
    
    .vinyl {
        width: 200px;
        height: 200px;
    }
    
    .vinyl-inner {
        width: 160px;
        height: 160px;
    }
    
    .playlist-header h2 {
        font-size: 20px;
    }
    
    .playlist-tab img {
        width: 40px;
        height: 40px;
    }
    
    .playlist-info h3 {
        font-size: 14px;
    }
    
    .playlist-info p {
        font-size: 11px;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.5s ease;
}

/* 歌曲时长加载动画 */
.song-duration:empty::after {
    content: '--:--';
}