.music-player {
    width: 70%;
    margin: 20px auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #ddd;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

/* 深色模式样式 */
[data-theme="dark"] .music-player {
    background-color: rgba(44, 44, 44, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

.music-controls {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 20px;
}

.music-controls button {
    background: transparent;
    border: none;
    color: black;
    font-size: 1.8em;
    cursor: pointer;
    transition: transform 0.2s;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.music-controls button:hover {
    transform: scale(1.1);
}

.music-controls button i {
    font-size: 26px;
}

.album-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: -10px auto 0; /* 修正：将底部边距改为负值，使专辑封面居中 */
}

.album {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.rotate {
    animation: spin 10s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slideOutLeft {
    from { left: 0; opacity: 1; }
    to { left: -100%; opacity: 0; }
}

@keyframes slideInRight {
    from { left: 100%; opacity: 0; }
    to { left: 0; opacity: 1; }
}

@keyframes slideOutRight {
    from { left: 0; opacity: 1; }
    to { left: 100%; opacity: 0; }
}

@keyframes slideInLeft {
    from { left: -100%; opacity: 0; }
    to { left: 0; opacity: 1; }
}

.slideOutLeft {
    animation: slideOutLeft 1s forwards;
}

.slideOutRight {
    animation: slideOutRight 1s forwards;
}

.slideInLeft {
    animation: slideInLeft 1s forwards;
}

.slideInRight {
    animation: slideInRight 1s forwards;
}

.play-pause {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-pause .play-icon,
.play-pause .pause-icon {
    position: absolute;
    font-size: 30px;
    transition: opacity 0.2s ease;
}

/* 单独调整播放图标，因为 Font Awesome 的播放图标本身偏小 */
.play-pause .play-icon {
    font-size: 27px;
    transform: translateX(2px); /* 稍微向右偏移以视觉居中 */
}

.play-pause .pause-icon {
    opacity: 0;
}

.play-pause.playing .play-icon {
    opacity: 0;
}

.play-pause.playing .pause-icon {
    opacity: 1;
}

/* 深色模式样式 */
[data-theme="dark"] .music-controls button {
    color: #e1e1e1;
}