/* 音乐播放器样式 */
.music-player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e1e4e8;
  padding: 12px 20px;
  display: none;
  align-items: center;
  gap: 16px;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
  z-index: 1000;
}

.music-player-bar.active {
  display: flex;
}

.player-cover {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.player-info {
  flex: 1;
  min-width: 0;
}

.player-title {
  font-size: 14px;
  font-weight: 600;
  color: #24292e;
  margin-bottom: 4px;
  word-break: break-word;
}

.player-artist {
  font-size: 12px;
  color: #586069;
}

.player-progress-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}

.player-time {
  font-size: 11px;
  color: #586069;
  font-family: monospace;
  min-width: 40px;
  text-align: center;
}

.player-progress {
  flex: 1;
  height: 4px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: #e1e4e8;
  border-radius: 2px;
  outline: none;
}

.player-progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #0366d6;
  border-radius: 50%;
  cursor: pointer;
}

.player-progress::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #0366d6;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.player-progress::-webkit-slider-runnable-track {
  height: 4px;
  background: #e1e4e8;
  border-radius: 2px;
}

.player-progress::-moz-range-track {
  height: 4px;
  background: #e1e4e8;
  border-radius: 2px;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-btn {
  background: transparent;
  border: none;
  color: #24292e;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s;
}

.player-btn:hover {
  background: #f6f8fa;
}

.player-speed {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #586069;
}

.player-speed select {
  padding: 4px 8px;
  border: 1px solid #d1d5da;
  border-radius: 4px;
  font-size: 12px;
  background: #fff;
}

.player-volume {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.player-volume input[type="range"] {
  flex: 1;
  height: 4px;
}

/* 播放历史记录 */
.play-history {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  padding: 12px;
  max-width: 300px;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
}

.play-history.visible {
  display: block;
}

.play-history-header {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #24292e;
}

.play-history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 4px;
}

.play-history-item:hover {
  background: #f6f8fa;
}

.play-history-cover {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.play-history-info {
  flex: 1;
  min-width: 0;
}

.play-history-title {
  font-size: 12px;
  font-weight: 500;
  color: #24292e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.play-history-artist {
  font-size: 11px;
  color: #586069;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .music-player-bar {
    flex-wrap: wrap;
    padding: 8px 12px;
  }
  
  .player-info {
    order: 1;
    width: 100%;
    margin-bottom: 8px;
  }
  
  .player-progress-container {
    order: 2;
    width: 100%;
    max-width: 100%;
    margin-bottom: 8px;
  }
  
  .player-controls {
    order: 3;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }
  
  .player-speed {
    font-size: 11px;
  }
  
  .player-volume {
    min-width: 100px;
  }
  
  .play-history {
    bottom: 70px;
    right: 10px;
    left: 10px;
    max-width: 100%;
  }
}
