body {
    margin: 0;
    overflow: hidden;
    background: #1a1a1a;
}

/* 专辑容器 */
.album-container {
    position: relative;
    width: 100%;
    height: 100vh; /* 使用视窗高度 */
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    overflow: hidden;
}

/* 修改专辑包装器样式 */
.albums-wrapper {
    display: flex;
    align-items: center; /* 垂直居中 */
    transition: transform 0.3s ease;
    height: 100%; /* 继承父容器高度 */
}

/* 修改专辑项样式 */
.album-item {
    flex: 0 0 20%; /* 每个专辑占20%宽度 */
    min-width: 200px; /* 设置最小宽度 */
    padding: 0 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 修改滚动区域定位 */
.scroll-area {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100px;
    height: 80%;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.1); /* 降低不透明度 */
    cursor: pointer;
}

.left-scroll {
    left: -10;
}

.right-scroll {
    right: 10;
}

/* 确保专辑项居中 */
.albums-wrapper {
    display: flex;
    justify-content: center;
    transition: transform 0.3s ease;
}

.albums-wrapper {
    display: flex;
    transition: transform 0.3s ease;
    will-change: transform;
}

.album-item {
    flex: 0 0 20%; /* 每个专辑占20%宽度，一屏显示5个 */
    padding: 0 10px;
    box-sizing: border-box;
}

.scroll-area {
    position: absolute;
    top: 0;
    width: 15%;
    height: 100%;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
}

.scroll-area:hover {
    opacity: 1;
}

.left-scroll::after, .right-scroll::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 2px solid white;
    border-width: 2px 2px 0 0;
}

.left-scroll::after {
    transform: rotate(-135deg);
    margin-right: 10px;
}

.right-scroll::after {
    transform: rotate(45deg);
    margin-left: 10px;
}

/* 专辑项 */
.album-item {
    flex: 0 0 300px;
    margin: 0 20px;
    cursor: pointer;
    transition: transform 0.3s;
}

.album-item img {
    width: 280px; /* 固定宽度 */
    height: 280px; /* 固定高度 */
    object-fit: cover;
    border-radius: 10px;
    display: block; /* 确保图片居中 */
    margin: 0 auto; /* 水平居中 */
}

/* 左右滚动感应区 */
/* 修改专辑容器 */
.album-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible; /* 改为visible */
}

/* 修改专辑包装器 */
.albums-wrapper {
    display: flex;
    transition: transform 0.3s ease;
    height: 100%;
    width: 100%;
}

/* 修改滚动区域 */
.scroll-area {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 80px;
    z-index: 10;
    opacity: 0.5;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
}

.left-scroll {
    left: calc(10% - 60px); /* 调整到专辑容器左侧 */
}

.right-scroll {
    right: calc(10% - 60px); /* 调整到专辑容器右侧 */
}

.scroll-area:hover {
    opacity: 1;
}

/* 修改箭头样式 */
.left-scroll::after, .right-scroll::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 2px solid white;
    border-width: 2px 2px 0 0;
}

.left-scroll::after {
    transform: rotate(-135deg);
}

.right-scroll::after {
    transform: rotate(45deg);
}

.scroll-area:hover {
    opacity: 0.3;
}

/* 播放栏样式 */
.player-bar {
    position: fixed;
    bottom: -60px;
    width: 100%;
    height: 80px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    transition: bottom 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.player-bar:hover {
    bottom: 0;
}

/* 专辑封面悬停效果 */
.album-item img {
    transition: opacity 0.3s;
    opacity: 0.8;
}

.album-item:hover img {
    opacity: 1;
}

/* 背景样式 */
body {
    background: url('background.jpg') center/cover fixed;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    filter: blur(10px);
    z-index: -1;
}

/* 隐藏下载按钮 */
audio::-webkit-media-controls-enclosure {
    overflow: hidden;
}

audio::-webkit-media-controls-panel {
    width: calc(100% + 30px);
}

.left-scroll { left: 0; }
.right-scroll { right: 0; }

.scroll-area:hover {
    opacity: 0.2;
    background: #fff;
}

/* 播放控件 */
.player-controls {
    position: fixed;
    bottom: -50px;
    width: 100%;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    padding: 10px 0;
    background: transparent; /* 修改为透明 */
}

body:hover .player-controls {
    transform: translateY(0);
    background: transparent; /* 修改为透明 */
}

#main-audio {
    width: 80%;
    margin: 0 auto;
    display: block;
}

/* 加载动画 */
.loading {
    text-align: center;
    color: #fff;
    padding: 50px;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误提示 */
.error {
    color: #ff4444;
    text-align: center;
    padding: 30px;
}


/* 播放条按钮样式 */
.player-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

#prev-btn, #next-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    transition: opacity 0.3s;
}

#prev-btn:hover, #next-btn:hover {
    opacity: 0.7;
}

/* 专辑封面透明度增强 */
.album-item img {
    transition: opacity 0.3s;
    opacity: 0.6; /* 增加透明度效果 */
}

.album-item:hover img {
    opacity: 1;
}

/* 原生audio元素容器 */
.audio-container {
    position: relative;
    width: 80%;
    margin: 0 auto;
}

/* 自定义按钮样式 */
.audio-control-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    z-index: 10;
}

#prev-btn {
    left: calc(50% - 60px); /* 在播放按钮左侧 */
}

#next-btn {
    left: calc(50% + 36px); /* 在播放按钮右侧 */
}

/* 原生audio元素样式 */
#main-audio {
    width: 100%;
    position: relative;
    z-index: 1;
}

/* 隐藏原生下载按钮 */
audio::-webkit-media-controls-enclosure {
    overflow: hidden;
}

/* 自定义音频控制栏样式 */
.custom-audio-controls {
    display: flex;
    align-items: center;
    width: 80%;
    margin: 0 auto;
    padding: 10px 20px;
    background: rgba(0,0,0,0.7);
    border-radius: 50px;
}

/* 播放器控制栏样式 */
.player-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.8);
    padding: 10px 0;
    z-index: 100;
}

.custom-player {
    display: flex;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    margin: 0 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:hover {
    color: white;
}

/* 进度条样式 */
.progress-container {
    flex-grow: 1;
    height: 30px;
    margin: 0 20px;
    position: relative;
}

.progress-bar {
    height: 4px;
    background: #555;
    border-radius: 2px;
    margin-top: 13px;
    position: relative;
}

/* 确保进度条圆点为白色 (player.css) */
.progress-bar::after {
    background: white !important; /* 强制白色 */
    box-shadow: 0 0 2px rgba(0,0,0,0.5); /* 添加阴影增强可见性 */
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background: #1db954;
    border-radius: 50%;
    transform: translateX(50%);
    opacity: 0;
    transition: opacity 0.2s;
}

.progress-container:hover .progress-bar::after {
    opacity: 1;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #aaa;
    margin-top: 5px;
}

/* 音量控制 */
.volume-control {
    display: flex;
    align-items: center;
    min-width: 120px;
}

.volume-icon {
    color: white;
    margin-right: 10px;
    font-size: 16px;
}

.volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    background: #555;
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}