/* ==========================================================================
   Pico · 内置音乐播放器
   两处形态：.pc-dock（右下/左下悬浮条）、.pc-inline（正文内的歌单卡片）
   全部使用主题 token，换皮肤、切暗色自动跟随。
   ========================================================================== */

.pc-player {
  --pc-prog: 0%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  box-shadow: var(--shadow-2);
  color: var(--text);
  overflow: hidden;
  font-size: 13px;
}

/* ---------- 悬浮 ---------- */
.pc-dock {
  position: fixed;
  z-index: 90;
  width: 348px;
  max-width: calc(100vw - 24px);
  box-shadow: var(--shadow-3);
}

.pc-dock.pc-pos-right {
  right: 84px;
  bottom: 88px;
}

.pc-dock.pc-pos-left {
  left: max(16px, calc((100vw - var(--shell-w)) / 2 - 348px));
  bottom: 24px;
}

/* 折叠后只剩一条细条 */
.pc-dock.is-folded .pc-body { display: none; }
.pc-dock:not(.is-folded) .pc-mini { display: none; }

.pc-inline .pc-mini { display: none; }
.pc-inline { margin: 26px 0 12px; box-shadow: var(--shadow-1); }

/* ---------- 迷你条 ---------- */
.pc-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px 9px 8px;
  background: var(--surface-2);
}

.pc-mini-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 头部 ---------- */
.pc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 8px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.pc-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-3);
  min-width: 0;
}

.pc-hint .ico { font-size: 13px; color: var(--accent); }

.pc-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}

.pc-btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}

.pc-btn:hover { color: var(--text); background: var(--surface-3); }
.pc-btn .ico { font-size: 15px; }
.pc-btn.is-on { color: var(--accent); }

.pc-vol {
  display: flex;
  align-items: center;
  gap: 2px;
}

.pc-vol-range {
  width: 54px;
  height: 4px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.pc-vol-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: var(--line-2);
}

.pc-vol-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--accent);
  border: 1px solid var(--surface);
}

.pc-vol-range::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--line-2);
}

.pc-vol-range::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 1px solid var(--surface);
}

/* ---------- 歌单 ---------- */
.pc-list,
.pc-player .pc-list,
.pc-inline .pc-list,
.entry .pc-list {
  list-style: none;
  margin: 0;
  padding: 4px 0 5px;
  max-height: 268px;
  overflow-y: auto;
}

/* 正文里的 ul/li 自带样式，这里全部按掉（行内边距由 .pc-row 自己管） */
.pc-list li,
.entry .pc-list li {
  list-style: none;
  margin: 0;
}

/* 主题给正文列表画的小圆点，播放器行不需要 */
.entry .pc-list li::before,
.entry .pc-list li::marker {
  content: none;
  display: none;
}

.pc-list::-webkit-scrollbar { width: 6px; }
.pc-list::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }

.pc-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px 9px 14px;
  cursor: pointer;
  overflow: hidden;
  transition: background .16s ease;
}

.pc-row:hover { background: var(--surface-2); }

/* 播放中的行：左侧随进度渐染 + 深色竖条跟着走 */
.pc-row.is-playing { background: var(--surface-2); }

.pc-row.is-playing::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--pc-prog);
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  mask-image: linear-gradient(90deg, #000 62%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 62%, transparent);
  pointer-events: none;
  transition: width .12s linear;
}

.pc-row.is-playing::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pc-prog);
  width: 3px;
  margin-left: -1.5px;
  background: var(--accent-2);
  pointer-events: none;
  transition: left .12s linear;
}

.pc-name {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.pc-row.is-playing .pc-name { color: var(--accent); font-weight: 650; }

.pc-artist {
  position: relative;
  z-index: 1;
  flex: none;
  max-width: 40%;
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-state {
  position: relative;
  z-index: 1;
  flex: none;
  display: grid;
  place-items: center;
  width: 16px;
  color: var(--text-3);
}

.pc-state .ico { font-size: 13px; }
.pc-row.is-playing .pc-state { color: var(--accent); }

/* ---------- 移动端 ---------- */
@media (max-width: 768px) {
  .pc-dock,
  .pc-dock.pc-pos-right,
  .pc-dock.pc-pos-left {
    left: 12px;
    right: 12px;
    bottom: 74px;
    width: auto;
    max-width: none;
  }
  .pc-list { max-height: 210px; }
}
