/* ============================================
   AI 音乐库 · 全局底部播放器
   ============================================ */

.global-player {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  background: rgba(5, 8, 22, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--border-2);
  padding: 12px 20px;
  display: none;            /* 有播放任务时才显示 */
  align-items: center;
  gap: 16px;
  font-size: 13px;
}
.global-player.is-active { display: flex; }

.gp-cover {
  width: 48px; height: 48px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-3);
  border: 1px solid var(--border);
}
.gp-cover img { width: 100%; height: 100%; object-fit: cover; }

.gp-info { flex: 0 1 220px; min-width: 0; }
.gp-title {
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 14px;
}
.gp-artist {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.gp-controls {
  display: flex; align-items: center; gap: 8px;
  flex: 0 0 auto;
}
.gp-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-1);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.gp-btn:hover {
  color: var(--c-cyan);
  background: rgba(0,229,255,0.08);
  border-color: var(--border-2);
}
.gp-btn svg { width: 18px; height: 18px; fill: currentColor; }

.gp-play {
  width: 44px; height: 44px;
  background: var(--gradient);
  color: #050816;
  border-radius: 50%;
  border: none;
  box-shadow: 0 0 16px var(--c-cyan-glow);
}
.gp-play:hover {
  color: #050816;
  background: var(--gradient);
  transform: scale(1.06);
  box-shadow: 0 0 24px var(--c-cyan-glow);
}
.gp-play svg { width: 20px; height: 20px; }

.gp-progress {
  flex: 1 1 auto;
  display: flex; align-items: center; gap: 10px;
  min-width: 100px;
}
.gp-progress .time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  flex-shrink: 0;
  width: 38px;
  text-align: center;
}
.gp-progress .bar-track {
  flex: 1 1 auto;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: visible;
}
.gp-progress .bar-fill {
  height: 100%;
  width: 0;
  background: var(--gradient);
  border-radius: 2px;
  position: relative;
  transition: width 0.08s linear;
}
.gp-progress .bar-fill::after {
  content: '';
  position: absolute;
  right: -5px; top: 50%;
  transform: translateY(-50%);
  width: 10px; height: 10px;
  background: var(--c-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--c-cyan);
  opacity: 0;
  transition: opacity .2s;
}
.gp-progress .bar-track:hover .bar-fill::after { opacity: 1; }

.gp-volume {
  flex: 0 0 100px;
  display: flex; align-items: center; gap: 6px;
}
.gp-volume svg {
  width: 14px; height: 14px;
  color: var(--text-2);
  flex-shrink: 0;
}
.gp-volume input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.gp-volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--c-cyan);
  cursor: pointer;
  box-shadow: 0 0 6px var(--c-cyan-glow);
}
.gp-volume input[type="range"]::-moz-range-thumb {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--c-cyan);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 6px var(--c-cyan-glow);
}

@media (max-width: 720px) {
  .global-player {
    padding: 8px 12px;
    gap: 10px;
  }
  .gp-info { display: none; }
  .gp-cover { width: 40px; height: 40px; }
  .gp-volume { display: none; }
  .gp-progress .time { font-size: 10px; width: 32px; }
}
