/* 站内音乐播放器：固定左下角的三态 dock */
#site-player {
  --dock-cover: none;
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 62px;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 999px;
  background:
    radial-gradient(200px 90px at 85% 0, rgba(255, 255, 255, 0.13), transparent 70%),
    linear-gradient(rgba(12, 15, 22, 0.44), rgba(10, 12, 18, 0.66)),
    #0c0f16 url('/img/player-bg.jpg') center / cover no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(7px) saturate(1.15);
  -webkit-backdrop-filter: blur(7px) saturate(1.15);
  overflow: hidden;
  width: 62px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: width 0.42s cubic-bezier(0.22, 0.9, 0.24, 1),
    border-radius 0.42s ease, background-color 0.3s ease;
}
#site-player[data-open] {
  width: 436px;
  height: 78px;
  border-radius: 22px;
  background:
    radial-gradient(220px 110px at 85% 0, rgba(255, 255, 255, 0.16), transparent 72%),
    linear-gradient(rgba(12, 15, 22, 0.3), rgba(10, 12, 18, 0.56)),
    #0c0f16 url('/img/player-bg.jpg') center / cover no-repeat;
}

/* 唱片 */
#site-player .pl-dock-disc {
  position: relative;
  touch-action: none;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  background: radial-gradient(circle at 50% 50%, #0e1116 0 30%, #16191f 31% 100%),
    var(--dock-cover) center / cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
#site-player .pl-dock-disc::before {
  content: '';
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: var(--dock-cover) center / cover, #22262e;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}
#site-player .pl-dock-disc::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.16);
}
#site-player[data-playing] .pl-dock-disc {
  animation: pl-spin 6.5s linear infinite;
}
@keyframes pl-spin {
  to { transform: rotate(360deg); }
}

/* 展开后的内容 */
#site-player .pl-dock-body {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
  transition: opacity 0.28s ease 0.08s, transform 0.28s ease 0.08s;
}
#site-player[data-open] .pl-dock-body {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
#site-player .pl-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 152px;
}
#site-player .pl-title,
#site-player .pl-artist {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#site-player .pl-title {
  color: rgba(255, 255, 255, 0.95);
  font-size: 13px;
  line-height: 1.35;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.72);
}
#site-player .pl-artist {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.72);
}
#site-player .pl-bar {
  position: relative;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  cursor: pointer;
}
#site-player .pl-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.95));
}
#site-player .pl-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  transition: background-color 0.2s ease, color 0.2s ease;
}
#site-player .pl-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
#site-player .pl-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
#site-player .pl-play {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
#site-player .pl-play svg {
  width: 18px;
  height: 18px;
}

/* 首页进站锁屏时先不出现，避免和「点一下展开」抢点击 */
html.se-locked #site-player {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 700px) {
  #site-player {
    left: 12px;
    bottom: 12px;
  }
  #site-player[data-open] {
    width: min(300px, calc(100vw - 24px));
  }
  #site-player .pl-meta {
    width: 130px;
  }
}

/* ---------- 音量：自绘滑块（弹性） ---------- */
.pl-vol {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .78);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: color .2s ease;
}
.pl-vol:hover { color: #fff; }

.pl-volume {
  --v: 80%;
  position: relative;
  width: 58px;
  height: 18px;
  flex: 0 0 auto;
  margin-left: 8px;
  cursor: pointer;
  touch-action: none;
}
.pl-volume::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .22);
}
.pl-vol-fill {
  position: absolute;
  left: 0; top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 2px;
  width: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, .72), #fff);
  transition: width .08s linear;
}
.pl-vol-thumb {
  position: absolute;
  left: 80%; top: 50%;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
  transition: transform .28s cubic-bezier(.34, 1.56, .64, 1), left .08s linear;
}
.pl-volume.is-over .pl-vol-thumb {
  transition: transform .08s linear;
  box-shadow: 0 1px 6px rgba(255, 255, 255, .35), 0 1px 4px rgba(0, 0, 0, .45);
}
