/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.music-player {
    background-color: white;
    width: 100%;
    max-width: 500px;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 头部样式 */
.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

#home-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

#refresh-library {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 专辑封面 */
.album-cover-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#album-cover {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

#album-cover.playing {
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 歌曲信息 */
.song-info {
    text-align: center;
    margin-bottom: 20px;
}

#song-title {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

#song-artist {
    color: #666;
    font-size: 1rem;
}

/* 进度条 */
.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.progress-bar {
    flex-grow: 1;
    height: 5px;
    background-color: #eee;
    border-radius: 5px;
    cursor: pointer;
}

.progress {
    height: 100%;
    background-color: #4CAF50;
    border-radius: 5px;
    width: 0%;
}

/* 可视化效果 */
.visualizer-container {
    height: 100px;
    margin-bottom: 20px;
}

#audio-visualizer {
    width: 100%;
    height: 100%;
}

/* 控制按钮 */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.control-btn {
    background: none;
    border: none;
    color: #333;
    font-size: 1.5rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.control-btn:hover {
    background-color: #f0f0f0;
}

.play-btn {
    background-color: #4CAF50;
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 音量控制 */
.volume-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

#volume-slider {
    width: 100px;
}

/* 播放列表 */
.playlist-container {
    max-height: 200px;
    overflow-y: auto;
}

#playlist {
    list-style: none;
    margin-top: 10px;
}

#playlist li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

#playlist li:hover {
    background-color: #f9f9f9;
}

#playlist li.active {
    background-color: #f0f0f0;
    font-weight: bold;
}

.song-duration {
    float: right;
    color: #999;
}