/* BODHI Dashboard · playlist.css —— 声音页「🎵 歌单」子 tab 播放器（2026-07-16）
   动效三件：旋转唱片 / 播放行均衡器 / 进度条；配色跟 gold/ink 主题走。 */

/* ── 旋转唱片（有 Suno cover_url 时贴封面，无则莲花占位）───── */
@keyframes pl-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.pl-disc {
  width: 88px; height: 88px; border-radius: 9999px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; user-select: none; position: relative; overflow: hidden;
  background:
    radial-gradient(circle at center, #b08642 0 18%, #1c1917 19% 34%, #292524 35% 42%,
      #1c1917 43% 52%, #292524 53% 62%, #1c1917 63% 74%, #292524 75% 84%, #1c1917 85% 100%);
  box-shadow: 0 4px 18px rgba(0,0,0,.35), inset 0 0 0 2px rgba(201,163,107,.45);
  animation: pl-spin 9s linear infinite;
  animation-play-state: paused;
}
.pl-disc.playing { animation-play-state: running; }
.pl-disc-art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 9999px; display: none;
}
.pl-disc.has-cover .pl-disc-art { display: block; }
.pl-disc.has-cover .pl-disc-fallback { display: none; }
/* 有封面时叠一层细黑胶环 + 中心轴，保留「唱片」感 */
.pl-disc.has-cover::after {
  content: ''; position: absolute; inset: 0; border-radius: 9999px; pointer-events: none;
  background:
    radial-gradient(circle at center,
      rgba(28,25,23,.92) 0 7%,
      transparent 8% 72%,
      rgba(0,0,0,.28) 73% 76%,
      transparent 77% 100%);
  box-shadow: inset 0 0 0 1px rgba(201,163,107,.35);
}
.pl-disc-fallback { position: relative; z-index: 1; line-height: 1; }

/* 曲目列表行首小封面 */
.pl-row-cover {
  width: 32px; height: 32px; border-radius: 6px; object-fit: cover;
  background: #1c1917; box-shadow: 0 0 0 1px rgba(176,134,66,.25);
}
.pl-row-cover-empty {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; color: #a8a29e;
  background:
    radial-gradient(circle at center, #b08642 0 22%, #1c1917 23% 100%);
}

/* ── 播放中行的均衡器（3 根跳动竖条）─────────────────────── */
@keyframes pl-eq { 0%,100% { height: 30%; } 50% { height: 95%; } }
.pl-eq { display: inline-flex; align-items: flex-end; gap: 2px; width: 14px; height: 14px; }
.pl-eq span {
  width: 3px; border-radius: 1px; background: #b08642;
  animation: pl-eq 0.9s ease-in-out infinite;
}
.pl-eq span:nth-child(2) { animation-delay: 0.25s; }
.pl-eq span:nth-child(3) { animation-delay: 0.5s; }
.pl-eq.paused span { animation-play-state: paused; height: 40%; }

/* ── 进度条（可点跳转）───────────────────────────────────── */
.pl-bar {
  position: relative; height: 6px; border-radius: 9999px; cursor: pointer;
  background: rgba(120,113,108,.25);
}
.pl-bar:hover { height: 8px; margin-top: -1px; margin-bottom: -1px; }
.pl-bar-fill {
  position: absolute; inset: 0 auto 0 0; width: 0%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #c9a36b, #b08642);
  box-shadow: 0 0 6px rgba(176,134,66,.6);
}
.pl-bar-fill::after {
  content: ''; position: absolute; right: -5px; top: 50%;
  width: 12px; height: 12px; border-radius: 9999px; transform: translateY(-50%);
  background: #fff; border: 2px solid #b08642; box-shadow: 0 1px 4px rgba(0,0,0,.3);
  opacity: 0; transition: opacity .15s;
}
.pl-bar:hover .pl-bar-fill::after { opacity: 1; }

/* ── 播放器卡片底色（亮/暗两套渐变）──────────────────────── */
.pl-card {
  background: linear-gradient(135deg, #fdfaf4 0%, #f3e9d7 55%, #e9d9bb 100%);
  border: 1px solid rgba(176,134,66,.35);
  box-shadow: 0 6px 24px rgba(176,134,66,.12);
}
.dark .pl-card {
  background: linear-gradient(135deg, #1c1917 0%, #26201a 55%, #2e2415 100%);
  border-color: rgba(201,163,107,.28);
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
}

/* 大播放键 */
.pl-play-btn {
  width: 48px; height: 48px; border-radius: 9999px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  color: #fff; background: linear-gradient(135deg, #c9a36b, #8a6730);
  box-shadow: 0 3px 10px rgba(138,103,48,.45);
  transition: transform .12s, box-shadow .12s;
}
.pl-play-btn:hover { transform: scale(1.06); box-shadow: 0 5px 16px rgba(138,103,48,.55); }
.pl-play-btn:active { transform: scale(.96); }

/* 小圆控制键（上一首/下一首/模式）*/
.pl-ctl {
  width: 34px; height: 34px; border-radius: 9999px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  color: #78716c; transition: background .12s, color .12s, transform .12s;
}
.pl-ctl:hover { background: rgba(176,134,66,.15); color: #8a6730; transform: scale(1.08); }
.dark .pl-ctl { color: #a8a29e; }
.dark .pl-ctl:hover { color: #c9a36b; }

/* 收藏星：点亮时的小弹跳 */
@keyframes pl-fav-pop { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }
.pl-fav-pop { animation: pl-fav-pop .3s ease; }

/* ── 音量（静音钮 + 滑杆 + 百分比）───────────────────────────── */
.pl-vol {
  display: flex;
  align-items: center;
  gap: .35rem;
  min-width: 0;
  flex-shrink: 0;
  padding-left: .15rem;
}
.pl-vol-mute {
  width: 30px;
  height: 30px;
  font-size: 14px;
}
.pl-vol-range {
  -webkit-appearance: none;
  appearance: none;
  width: 5.5rem;
  max-width: 22vw;
  height: 5px;
  border-radius: 9999px;
  background: rgba(120, 113, 108, .28);
  outline: none;
  cursor: pointer;
  accent-color: #b08642;
}
.pl-vol-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 9999px;
  background: #fff;
  border: 2px solid #b08642;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  cursor: pointer;
}
.pl-vol-range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 9999px;
  background: #fff;
  border: 2px solid #b08642;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  cursor: pointer;
}
.pl-vol-range.is-muted {
  opacity: .45;
}
.pl-vol-pct {
  font-size: 10px;
  color: #78716c;
  min-width: 2.2rem;
  text-align: right;
  tabular-nums: true;
  font-variant-numeric: tabular-nums;
}
.dark .pl-vol-pct { color: #a8a29e; }

@media (max-width: 520px) {
  .pl-vol-range { width: 3.8rem; }
  .pl-vol-pct { display: none; }
}
