* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  user-select: none;
  padding: auto;
  position: relative; /* 添加相对定位 */
  min-height: 100vh; /* 确保 body 高度至少为视口高度 */
  overflow: hidden; /* 隐藏溢出内容 */
}

#background-contain {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  user-select: none;
  position: relative; /* 添加相对定位 */
  z-index: 1; /* 设置 z-index 确保播放器内容在背景之上 */
}

h1 {
  margin-bottom: 50px;
}


/* 添加背景图片样式 */
#background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(../img/山间阶梯-晴空.png);
  background-size: cover;
  background-position: center;
  filter: blur(0px); /* 背景模糊效果 */
  z-index: 0; /* 设置 z-index 确保背景在播放器内容之下 */
}

/* 原有样式保持不变，新增以下优化部分 */

#song-place {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: white;
  opacity: 0.8;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  max-width: 800px;
  width: 90%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#song-place:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* 歌曲信息区域优化 */
#song-info {
  width: 100%;
  text-align: center;
  margin-bottom: 30px;
}

#song-title {
  font-size: 28px;
  margin-bottom: 10px;
  color: #333;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#song-artist {
  font-size: 18px;
  color: #666;
  margin-bottom: 25px;
}

/* 歌词容器优化 */
.lyrics-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  padding: 15px;
  background: rgba(245, 245, 245, 0.7);
  border-radius: 12px;
}

.lyrics-column {
  width: 45%;
  text-align: left;
}

.lyrics-column p {
  margin-bottom: 12px;
  transition: all 0.3s;
  padding: 5px 8px;
  border-radius: 6px;
}

.lyrics-column p.highlight {
  color: #ff4500;
  font-weight: bold;
  transform: scale(1.05);
  background: rgba(255, 69, 0, 0.1);
}

/* 播放器区域优化 */
#player {
  display: flex;
  flex-direction: row; /* 强制横向排列 */
  align-items: center; /* 垂直居中对齐 */
  gap: 15px; /* 封面与音频控件的间距 */
  width: 100%;
  margin-top: 10px;
}

/* 小型封面图样式 */
.mini-cover-container {
  width: 100px; /* 小封面尺寸 */
  height: 100px;
  flex-shrink: 0; /* 防止被压缩 */
}

.mini-cover-rotate {
  width: 100%;
  height: 100%;
  border-radius: 50%; /* 圆形 */
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  /* 旋转动画（默认暂停） */
  animation: rotate 20s linear infinite;
  animation-play-state: paused;
}

#mini-song-cover {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 保持图片比例 */
}

/* 旋转动画关键帧 */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}


/* 音频控件样式调整 */
audio {
  flex-grow: 1; /* 占满剩余宽度 */
  max-width: calc(100% - 65px); /* 减去封面宽度和间距 */
  margin-bottom: 0; /* 取消原底部间距 */
}

/* 按钮区域样式调整 */
.button-container {
  display: flex;
  width: 100%;
  justify-content: center; /* 按钮居中 */
  margin-top: 15px;
  gap: 10px;
}

button {
  padding: 10px 20px;
  cursor: pointer;
  border: none;
  border-radius: 25px;
  background: #4e9ffc;
  color: white;
  font-weight: bold;
  transition: all 0.3s;
  box-shadow: 0 4px 10px rgba(78, 159, 252, 0.3);
}

button:hover {
  background: #3a89e6;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(78, 159, 252, 0.4);
}

button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 5px rgba(78, 159, 252, 0.2);
}

/* 响应式优化 */
@media (max-width: 600px) {
  #song-place {
    padding: 20px;
    border-radius: 15px;
  }

  #song-title {
    font-size: 24px;
  }

  .lyrics-container {
    flex-direction: column;
    gap: 10px;
    max-height: 180px;
  }

  .lyrics-column {
    width: 100%;
  }

  audio {
    max-width: 100%;
  }

  .mini-cover-container {
    width: 40px;
    height: 40px;
  }

  #player {
    gap: 10px;
  }
}
