/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: Arial, sans-serif;
  background-color: #222;
  color: #fff;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* 导航栏样式 - 修改为纯透明 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px 0;
  z-index: 1000;
  background-color: transparent;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.nav-btn {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 14px;
  transition: all 0.3s;
}

.nav-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-btn svg {
  margin-right: 5px;
}

/* 增大导航栏中心文字 */
.nav-center {
  font-size: 22px;
  font-weight: bold;
  color: white;
}

.nav-text {
  display: none;
}

/* 播放器容器 */
.player-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 500px;
  padding: 20px;
}

.player {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 专辑和控制器 */
.album-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-bottom: 30px;
}

.control-btn {
  font-size: 24px;
  color: #fff;
  opacity: 0.7;
  cursor: pointer;
  transition: all 0.3s;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.album {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  position: relative;
  margin: 0 20px;
}

.album img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s;
  position: absolute;
  top: 0;
  left: 0;
}

.playbtn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40px;
  color: white;
  z-index: 2;
  cursor: pointer;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.playing {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.playing span {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  display: none;
}

/* 歌曲信息 */
.song-info {
  width: 100%;
  text-align: center;
  margin-bottom: 20px;
}

.title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist, .album-name {
  font-size: 16px;
  color: #aaa;
  margin-bottom: 3px;
}

/* 进度条 - 增加触摸区域 */
.progress-container {
  width: 100%;
  margin-bottom: 15px;
  padding: 10px 0; /* 增加触摸区域 */
}

.progress-bar {
  width: 100%;
  height: 6px; /* 增加高度便于触摸 */
  -webkit-appearance: none;
  appearance: none;
  background: #555;
  border-radius: 3px;
  outline: none;
  margin: 10px 0;
  touch-action: manipulation; /* 改善触摸行为 */
}

.progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; /* 增大拇指大小 */
  height: 16px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.time {
  font-size: 14px;
  color: #aaa;
  text-align: center;
  min-height: 20px; /* 防止布局抖动 */
}

/* 歌词 */
.lrc {
  width: 100%;
  text-align: center;
  font-size: 16px;
  color: #ccc;
  margin: 15px 0;
  min-height: 24px;
}

/* 播放控制 */
.player-controls {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 20px;
}

.player-controls .control-btn {
  font-size: 20px;
  margin: 0 15px;
}

.player-controls .control-btn.act {
  color: #0ff;
}

/* 背景 */
.bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(30px) brightness(0.6);
  transform: scale(1.1);
  opacity: 0;
  transition: opacity 0.5s;
}

/* 播放列表 */
.playlist {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 400px;
  max-height: 70vh;
  background-color: #333;
  border-radius: 10px;
  padding: 20px;
  z-index: 1001;
  display: none;
  overflow-y: auto;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.playlist ul {
  list-style: none;
}

.playlist li {
  padding: 10px;
  border-bottom: 1px solid #444;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist li:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.playlist li.act {
  color: #0ff;
  font-weight: bold;
}

/* 动画 */
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes playing {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* 播放状态 */
.player.play .album img {
  animation: rotate 20s linear infinite;
}

.player.play .playing span {
  display: block;
  animation: playing 2s infinite ease-out;
}

.player.play .playing span:nth-child(2) {
  animation-delay: 0.4s;
}

.player.play .playing span:nth-child(3) {
  animation-delay: 0.8s;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .album {
    width: 180px;
    height: 180px;
    margin: 0 15px;
  }
  
  .control-btn {
    font-size: 20px;
  }
  
  .title {
    font-size: 20px;
  }
  
  .artist, .album-name {
    font-size: 15px;
  }
  
  /* 移动端导航栏调整 */
  .nav-center {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .album {
    width: 150px;
    height: 150px;
    margin: 0 10px;
  }
  
  .playbtn svg {
    width: 35px;
    height: 35px;
  }
  
  .nav-center {
    font-size: 18px;
  }
  
  .nav-btn svg {
    margin-right: 0;
  }
  
  .nav-text {
    display: inline;
  }
  
  .player-container {
    top: 55%;
  }
  
  /* 移动端进度条优化 */
  .progress-bar {
    height: 8px;
  }
  
  .progress-bar::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
  }
}