/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.player-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 1200px;
    overflow: hidden;
    padding: 20px;
}

.player-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 15px;
}

.player-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 主内容区域 */
.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

/* 专辑封面 */
.album-cover {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    margin: 0 auto;
}

.album-cover img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.album-cover img:hover {
    transform: scale(1.05);
}

/* 播放器信息 */
.player-info {
    flex: 2;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.song-details h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: #fff;
}

.song-details p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

/* 进度条 */
.progress-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

#current-time, #duration {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    width: 45px;
}

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

.progress {
    height: 100%;
    background: #1db954;
    width: 0%;
    border-radius: 3px;
    transition: width 0.1s linear;
}

/* 控制按钮 */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0 10px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.play-btn {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    background: #1db954;
}

.play-btn:hover {
    background: #1ed760;
}

/* 滑动循环开关样式 */
.loop-switch-container {
    display: flex;
    align-items: center;
    margin-left: 15px;
}
.loop-label {
    font-size: 1rem;
    margin-right: 8px;
    color: #fff;
    user-select: none;
}
.loop-switch {
    width: 46px;
    height: 24px;
    background: rgba(255,255,255,0.3);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
    box-sizing: border-box;
}
.loop-switch.active {
    background: #1db954;
}
.loop-slider {
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: left 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.loop-switch.active .loop-slider {
    left: 24px;
}
/* 音量控制 */
.volume-container {
    display: flex;
    align-items: center;
}

#volume-icon {
    margin-right: 10px;
    cursor: pointer;
}

.volume-slider {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2.5px;
    position: relative;
    cursor: pointer;
    max-width: 150px;
}

.volume-progress {
    height: 100%;
    background: #1db954;
    width: 80%;
    border-radius: 2.5px;
}

/* 歌词容器 */
.lyrics-container {
    flex: 1;
    min-width: 250px;
    max-height: 300px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 15px;
}

.lyrics-container h3 {
    margin-bottom: 10px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}

.lyrics-content {
    text-align: center;
    line-height: 1.8;
}

.lyrics-content p {
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.lyrics-content p.active {
    color: #1db954;
    font-size: 1.1em;
    font-weight: bold;
}

/* 播放列表 */
.playlist-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
}

.playlist-container h3 {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
}

.playlist {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
}

.playlist li {
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.playlist li:hover {
    background: rgba(255, 255, 255, 0.2);
}

.playlist li.active {
    background: rgba(29, 185, 84, 0.3);
    border-left: 3px solid #1db954;
}

.playlist .song-info {
    flex: 1;
}

.playlist .song-title {
    font-weight: bold;
    margin-bottom: 3px;
}

.playlist .song-artist {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
}

.playlist .song-duration {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .album-cover {
        margin-bottom: 20px;
    }
    
    .player-info {
        margin-bottom: 20px;
    }
}