body {
    font-family: sans-serif;
    background-image: url('background.jpg'); /* 替换为你的图片路径 */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* 固定背景 */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0; /* 移除默认 margin */
    color: #333; /* 设置默认文字颜色 */
}

.player-container {
    background-color: rgba(255, 255, 255, 0.9); /* 半透明白色背景 */
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    padding: 20px;
    width: 80%; /* 宽度改为百分比 */
    max-width: 500px; /* 限制最大宽度 */
    text-align: center;
}

#audio-player {
    width: 100%;
    margin-bottom: 10px;
}

#song-info {
    margin-bottom: 15px;
}

#song-title {
    font-size: 1.4em; /* 增大字体 */
    margin-bottom: 5px;
    font-weight: bold; /* 加粗 */
}

#artist-name {
    color: #555; /* 更深的灰色 */
    margin-bottom: 15px;
    font-style: italic; /* 斜体 */
}

/* 新增封面样式 */
#song-cover {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    border-radius: 50%; /* 圆形封面 */
    overflow: hidden; /* 裁剪超出部分 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#song-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 填充并裁剪 */
}

#progress-container {
    background-color: #eee;
    height: 10px; /* 稍高一点 */
    width: 100%;
    border-radius: 5px; /* 更圆润 */
    cursor: pointer;
    margin-bottom: 10px;
}

#progress-bar {
    background-color: #007bff;
    height: 100%;
    width: 0%;
    border-radius: 5px;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.controls button {
    padding: 10px 20px;
    margin: 0 8px; /* 增加左右间距 */
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 6px; /* 更圆润 */
    cursor: pointer;
    transition: background-color 0.3s ease; /* 添加过渡效果 */
}

.controls button:hover {
    background-color: #0056b3;
}

#volume-control {
    width: 80%;
}

#playlist-container {
    margin-top: 20px;
    text-align: left;
    height: 350px; /* 设置一个固定高度 */
    overflow-y: auto; /* 启用垂直滚动条 */
    border: 1px solid #ccc; /* 可选：添加边框 */
    padding: 5px; /* 可选：添加内边距 */
}

/* 隐藏滚动条（可选，但可能会影响用户体验） */
#playlist-container::-webkit-scrollbar {
    width: 0;
}


#playlist {
    list-style: none;
    padding: 0;
}

#playlist li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#playlist li:hover {
    background-color: #f5f5f5;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .player-container {
        width: 95%; /* 更窄的屏幕上占据更多宽度 */
        padding: 15px;
    }

    .controls button {
        padding: 8px 16px; /* 缩小按钮 */
        margin: 0 4px;
        font-size: 0.9em; /* 缩小字体 */
    }

    #song-title {
        font-size: 1.2em;
    }

    #artist-name {
        font-size: 0.9em;
    }
}
