.floating-player {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 300px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 12px;
  z-index: 9999;
  font-family: Arial, sans-serif;
  margin: 0;
  transform: none;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.song-info {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #000;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.control-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #555;
  transition: color 0.2s, transform 0.2s;
}

.control-btn:hover {
  color: #000;
  transform: scale(1.1);
}

.play-btn {
  font-size: 24px;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 5px;
}

#volume-slider {
  width: 60px;
  height: 6px;
  accent-color: #555;
}

@media (max-width: 480px) {
  .floating-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px;
    z-index: 9999;
    font-family: Arial, sans-serif;
    margin: 0;
    transform: none;
    /* 添加半透明边框 */
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px); /* 背景模糊效果 */
    -webkit-backdrop-filter: blur(10px); /* 兼容Safari */
    /* 添加可拖动样式 */
    cursor: move;
    user-select: none;
  }

  .song-info {
    font-size: 12px;
    max-width: 180px;
  }

  .control-btn {
    font-size: 16px;
  }

  .play-btn {
    font-size: 20px;
  }
  /* 添加拖动时的悬停效果 */
  .player-header:hover {
    cursor: move;
  }

  /* 添加拖动时的视觉反馈 */
  .floating-player.dragging {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    opacity: 0.95;
  }

  /* 新增打开播放器按钮样式 */
  .open-player-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9990;
    display: none; /* 默认隐藏 */
  }

  .open-player-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
  }

  .open-player-btn:hover {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 1);
  }

  /* 移动端适配 */
  @media (max-width: 480px) {
    .open-player-container {
      bottom: 15px;
      right: 15px;
    }

    .open-player-btn {
      width: 40px;
      height: 40px;
      font-size: 20px;
    }
  }

  #volume-slider {
    width: 50px;
  }
}
