* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 基础样式 - 确保全屏居中容器 */
html, body {
    height: 100%;
    width: 100%;
    overflow: hidden; /* 防止滚动条 */
}

body {
    /* 背景图片与模糊效果 */
    background-image: url('./background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin: 0;
    /* 背景模糊处理 */
    position: relative;
    /* 居中容器 */
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center;     /* 垂直居中 */
    padding: 20px;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -1;
}

.music-player {
    display: flex;
    width: 100%;
    max-width: 1200px;
    height: 80vh;
    max-height: 600px; /* 限制最大高度，确保在大屏幕上也不会过大 */
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* 左侧控制面板样式 - 深色毛玻璃效果 */
.player-controls {
    flex: 0 0 35%;
    max-width: 400px;
    padding: 30px;
    /* 深色毛玻璃效果 */
    background: rgba(44, 62, 80, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* 内部元素垂直居中 */
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.album-cover {
    position: relative;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border: 4px solid rgba(255, 255, 255, 0.15);
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-pause-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 24px;
    color: #2c3e50;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.play-pause-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: white;
}

.song-info {
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    width: 100%; /* 确保文本区域宽度合适 */
}

.song-info h2 {
    font-size: 24px;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.song-info p {
    font-size: 16px;
    color: #bdc3c7;
}

.progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.progress-container span {
    font-size: 14px;
    width: 50px;
    text-align: center;
}

#progressBar {
    flex-grow: 1;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    outline: none;
}

#progressBar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ecf0f1;
    cursor: pointer;
    transition: all 0.2s ease;
}

#progressBar::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #3498db;
}

.volume-control {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

#volumeSlider {
    flex-grow: 1;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    outline: none;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ecf0f1;
    cursor: pointer;
    transition: all 0.2s ease;
}

#volumeSlider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #3498db;
}

/* 右侧歌词容器 - 高斯模糊毛玻璃样式 */
.lyrics-container {
    flex: 0 0 65%;
    padding: 30px;
    overflow: hidden;
    position: relative;
    /* 歌词区域毛玻璃效果 */
    background: rgba(255, 255, 255, 0.01);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.lyrics-wrapper {
    position: absolute;
    width: calc(100% - 60px);
    transition: transform 0.3s ease-out;
}

.lyric-line {
    padding: 10px 0;
    text-align: center; /* 歌词文本水平居中 */
    font-size: 18px;
    color: #2c3e50;
    transition: all 0.3s ease;
    line-height: 1.6;
}

.lyric-line.active {
    color: #2980b9;
    font-size: 22px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .music-player {
        flex-direction: column;
        height: auto;
        max-height: 90vh;
        min-height: 500px;
    }
    
    .player-controls, .lyrics-container {
        flex: none;
        width: 100%;
        max-width: none;
    }
    
    .player-controls {
        padding: 20px;
        height: 45%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .album-cover {
        width: 140px;
        height: 140px;
        margin-bottom: 15px;
    }
    
    .lyrics-container {
        height: 55%;
    }
    
    .song-info {
        margin-bottom: 20px;
    }
    
    .progress-container {
        margin-bottom: 20px;
    }
}

/* 专辑封面封面旋转动画 */
.album-cover {
    position: relative;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border: 4px solid rgba(255, 255, 255, 0.15);
}

/* 旋转动画定义 */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 播放时应用旋转动画 */
.album-cover.playing img {
    animation: rotate 20s linear infinite;
}