/* 音乐播放器容器样式 */
.music-player {
    position: fixed;
    /* 固定定位 */
    bottom: 30px;
    /* 距底部距离 */
    right: 30px;
    /* 距右侧距离 */
    z-index: 1000;
    /* 确保在最顶层 */
    background: rgba(255, 255, 255, 0.95);
    /* 半透明白色背景 */
    border-radius: 50px;
    /* 圆角效果 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    /* 阴影效果 */
    padding: 12px;
    /* 内边距 */
    transition: transform 0.3s ease;
    /* 悬停动画 */
}
 
/* 悬停效果 */
.music-player:hover {
    transform: translateY(-5px);
    /* 向上移动5像素 */
}
 
/* 播放/暂停按钮样式 */
#play-pause-btn {
    width: 50px;
    /* 按钮宽度 */
    height: 50px;
    /* 按钮高度 */
    border: none;
    /* 去除边框 */
    background: #2A4365;
    /* 按钮背景色 */
    border-radius: 50%;
    /* 圆形按钮 */
    cursor: pointer;
    /* 鼠标手型 */
    position: relative;
    /* 相对定位 */
    transition: background 0.3s ease;
    /* 背景色过渡动画 */
}
 
/* 按钮悬停状态 */
#play-pause-btn:hover {
    background: #C53030;
    /* 悬停时背景色 */
}
 
/* 图标通用样式 */
.play-icon,
.pause-icon {
    width: 24px;
    /* 图标尺寸 */
    height: 24px;
    fill: white;
    /* 填充颜色 */
    position: absolute;
    /* 绝对定位 */
    left: 50%;
    /* 水平居中 */
    top: 50%;
    /* 垂直居中 */
    transform: translate(-50%, -50%);
    /* 精确居中 */
    opacity: 1;
    /* 默认不透明 */
    transition: opacity 0.3s ease;
    /* 透明度过渡动画 */
}
 
/* 暂停图标初始状态 */
.pause-icon {
    opacity: 0;
    /* 初始隐藏 */
}
 
/* 播放状态下的图标显示 */
.playing .play-icon {
    opacity: 0;
    /* 隐藏播放图标 */
}
 
.playing .pause-icon {
    opacity: 1;
    /* 显示暂停图标 */
}
 
/* 旋转动画 */
@keyframes rotate-disc {
    from {
        transform: rotate(0deg);
    }
 
    /* 起始角度 */
    to {
        transform: rotate(360deg);
    }
 
    /* 结束角度 */
}
 
/* 背景音轨可视化效果 */
.music-player::before {
    content: '';
    /* 伪元素必需属性 */
    position: absolute;
    width: 60px;
    /* 尺寸大于按钮 */
    height: 60px;
    border: 2px solid #2A4365;
    /* 边框样式 */
    border-radius: 50%;
    /* 圆形 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* 居中定位 */
    opacity: 0;
    /* 初始隐藏 */
    transition: opacity 0.3s ease;
    /* 透明度过渡 */
}
 
/* 播放时的可视化效果 */
.playing::before {
    opacity: 0.2;
    /* 显示边框 */
    animation: rotate-disc 8s linear infinite;
    /* 应用旋转动画 */
}