*{
    /* 初始化 */
    margin: 0;
    padding: 0;
}
.music-body{
	float: left; /* 设置元素靠左浮动 */
	margin-top: 100px;
    height: 100px;
	width: 300px;
	z-index: 10;
}
.container{
    width: 300px;
    height: 70px;
}
/* 模糊背景图 */
.bg{
    /* 固定定位 */
    position: fixed;
    top: -40px;
    right: -40px;
    bottom: -40px;
    left: -40px;
    background: url(/mp3/cover/红模仿.jpg) no-repeat;
    background-size: cover;
    background-position: center;
    /* 模糊滤镜 */
    filter: blur(40px);
    z-index: 2;
}
/* 半透明白色遮罩层 */
.bg-mask{
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(255,255,255,0.5);
    z-index: 3;
}
.player { /* 针对所有类名为'player'的元素 */
    position: relative; /* 设置元素的定位方式为相对定位，相对于其正常文档流的位置进行偏移 */
    z-index: 3; /* 设置元素的层叠顺序（z轴顺序），值越高，元素在堆叠上下文中的层级越靠上，这意味着".player"类的元素将会覆盖在其下方且z-index值较小的所有元素 */
    width: 100%; /* 设置元素的宽度等于其父容器的宽度 */
    height: 100%; /* 设置元素的高度等于其父容器的高度 */
}
/* 歌曲信息轨道区域 */
.player-track { /* 针对类名为'player-track'的元素 */
    position: absolute; /* 设置元素的定位方式为绝对定位，相对于最近的非 static 定位祖先元素进行位置偏移 */
    top: -50px; /* 设置元素顶部距离其定位父元素的距离为零像素，使其紧贴父容器顶部 */
    right: 15px; /* 设置元素右侧距离其定位父元素的距离为15像素 */
    bottom: 0; /* 设置元素底部距离其定位父元素的距离为零像素，使其紧贴父容器底部 */
    left: 15px; /* 设置元素左侧距离其定位父元素的距离为15像素 */
    padding: 13px 22px 10px 80px; /* 设置元素内部内容与边框之间的内填充，上内填充为13像素，右内填充为22像素，下内填充为10像素，左内填充为184像素 */
    background-color: rgba(255, 255, 255, 0.8); /* 设置元素背景颜色为半透明白色，rgba(255, 255, 255, 0.8) 表示红色、绿色、蓝色均为最大值（即白色），透明度为0.8 */
    border-radius: 15px 15px 0 0; /* 设置元素的边框圆角，分别为左上角、右上角、右下角、左下角的圆角大小。此处表示元素的上边角有圆角效果，大小为15像素，而下边角无圆角 */
    transition: top 0.3s ease;/* 添加过渡效果：当元素的top属性发生变化时，将在0.3秒内平滑过渡变化，采用ease缓动函数 */
}
/* 歌曲信息轨道区域活动态 */
.player-track.active{
    /* 上移 */
    top: -100px;
}
.album-name{
    color: #333;
    font-size: 17px;
    font-weight: bold;
}
.track-name{
    color: #888;
    font-size: 13px;
    margin: 3px 0 12px 0;
}
.track-time { /* 针对类名为'track-time'的元素 */
    height: 12px; /* 设置元素的高度为12像素 */
    line-height: 12px; /* 设置元素内文本行高为12像素 */
    margin-bottom: 4px; /* 设置元素底部外边距为4像素，即该元素下方与其相邻元素之间会有4像素的空间 */
    overflow: hidden; /* 当元素内容超出其定义高度和宽度时，隐藏溢出的内容，不显示滚动条 */
}
.current-time,
.total-time{
    color: #ff668f;
    font-size: 11px;
    transition: 0.3s ease;
}
.current-time{
    float: left;
}
.total-time{
    float: right;
}
/* 播放进度区域 */
.progress-box { /* 针对类名为'progress-box'的元素 */
    position: relative; /*设置元素的定位方式为相对定位，相对于其正常文档流的位置进行偏移或作为绝对/固定定位子元素的参照物*/
    height: 4px; /* 设置元素的高度为4像素 */
    background-color: #ead2d7; /* 设置元素的背景颜色为淡紫色 (#ead2d7) */
    border-radius: 4px; /* 设置元素的边框圆角为4像素，使元素四角呈现圆角效果 */
    cursor: pointer; /* 当鼠标悬停在元素上时，光标形状变为手形（通常用于表示该元素可以被点击） */
}
/* 悬停进度条显示时间 */
.hover-time {
    position: absolute; /* 设置元素的定位方式为绝对定位，相对于最近的非 static 定位祖先元素进行位置偏移 */
    top: -30px; /* 设置元素顶部距离其定位父元素的距离为负5像素，使其向上偏移5像素 */
    background-color: rgba(0, 0, 0, 0.8); /* 设置元素背景颜色为半透明黑色，rgba(0, 0, 0, 0.8) 表示红色、绿色、蓝色均为0（即黑色），透明度为0.8 */
    color: #fff; /* 设置元素内文本颜色为白色 (#fff) */
    font-size: 12px; /* 设置元素内文本的字体大小为12像素 */
    padding: 5px 6px; /* 设置元素内部内容与边框之间的内填充，水平方向为6像素，垂直方向为5像素 */
    border-radius: 4px; /* 设置元素的边框圆角为4像素，使元素四角呈现圆角效果 */
    display: none; /* 初始状态下隐藏该元素，不显示在页面上 */
}
/* 悬停进度条颜色 */
.hover-bar{
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0,0,0,0.12);
    border-radius: 4px;
    z-index: 2;
}
/* 已播放的进度条颜色 */
.progress-bar{
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: #fd6d94;
    border-radius: 4px;
    z-index: 1;
    width: 0;
    /* 改变width时的过渡效果 */
    transition: width 0.2s ease;
}
.player-content {
    position: relative; /* 设置元素的定位方式为相对定位，相对于其正常文档流的位置进行偏移或作为绝对/固定定位子元素的参照物 */
    height: 100%; /* 设置元素的高度为父容器的高度的100%，确保元素高度与父容器高度一致 */
    background-color: #fff; /* 设置元素的背景颜色为白色 (#fff) */
    border-radius: 15px; /* 设置元素的边框圆角为15像素，使其四角呈现圆角效果 */
    z-index: 2; /* 设置元素的层叠顺序（z轴堆叠顺序），值越高，元素在z轴方向上越靠前，覆盖在其下的其他具有较低z-index值的元素 */
    box-shadow: 0 30px 80px #656565; /* 为元素添加阴影效果，阴影位于元素下方，水平偏移量为0像素，垂直偏移量为30像素，模糊半径为80像素，阴影颜色为深灰色 (#656565) */
}
/* 封面 */
.album-cover{
    width: 50px;
    height: 50px;
    border-radius: 50%;
    position: absolute;
    top: -5px;
    left: 30px;
    box-shadow: 0 0 0 10px #fff;
    overflow: hidden;
    transition: 0.3s ease;
}
/* 唱片中间的小圆点 */
.album-cover::before{
    content: "";
    width: 25px;
    height: 25px;
    background-color: #d6dee6;
    position: absolute;
    top: 50%;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: 50%;
    margin: -10px auto auto auto;
    box-shadow: inset 0 0 0 2px #fff;
    z-index: 1;
}
/* 封面活动态 */
.album-cover.active{
    top: -60px;
    box-shadow: 0 0 0 4px #fff7f7,
    0 30px 50px -15px #afb7c1;
}
.album-cover img{
    display: block;
    width: 100%;
    height: 0%;
    object-fit: cover;
    opacity: 0;
}
.album-cover img.active{
    height: 100%;
    opacity: 1;
}
/* 播放时封面旋转 */
.album-cover.active img.active{
    /* 执行动画：动画名 时长 线性的 无限次播放 */
    animation: rotateAlbumCover 3s linear infinite;
}
/* 控制区 */
.play-controls{
    width: 200px;
    height: 100%;
    float: right;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding-right: 2px;
}
.control{
    flex: 1;
}
.control .button{
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s ease;
}
.control .button i{
    color: #d6dee6;
    font-size: 30px;
    transition: 0.2s ease;
}
.control .button:hover{
    background-color: #d6d6de;
}
.control .button:hover i{
    color: #fff;
}

/* 定义动画 */
@keyframes rotateAlbumCover {
    0%{
        transform: rotateZ(0);
    }
    100%{
        transform: rotateZ(360deg);
    }
}