/* 自定义音乐播放器（替换掉角落里那个小音符按钮）
   前缀 zwp，避免和播放器自带的 class 打架。 */

.zwp {
  position: fixed;
  right: 14px;
  top: 70px;
  z-index: 2147483000;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* 折叠态：胶囊 */
.zwp-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 7px;
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.74);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3);
  max-width: min(76vw, 320px);
  cursor: pointer;
}

.zwp-disc {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: #171717;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 2px 8px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}
.zwp.playing .zwp-disc { animation: zwp-spin 6s linear infinite; }
@keyframes zwp-spin { to { transform: rotate(360deg); } }
.zwp-disc svg { width: 15px; height: 15px; fill: #fff; display: block; }
.zwp-disc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  -webkit-user-drag: none;
}

.zwp-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.zwp-title {
  font-size: 13px; line-height: 1.2; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.02em;
}
.zwp-sub { font-size: 10.5px; line-height: 1.2; color: rgba(255, 255, 255, 0.55); letter-spacing: 0.04em; }

/* 展开态：面板 */
.zwp-panel {
  position: absolute;
  right: 0;
  left: auto;
  top: calc(100% + 10px);
  bottom: auto;
  width: min(74vw, 300px);
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 12px 12px 10px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5);
  display: none;
}
.zwp.open .zwp-panel { display: block; }

.zwp-row { display: flex; align-items: center; gap: 10px; }
.zwp-controls { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 4px 0 12px; }
.zwp-btn {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, 0.1); color: #fff;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.zwp-btn:active { background: rgba(255, 255, 255, 0.22); }
.zwp-btn svg { width: 16px; height: 16px; fill: #fff; }
.zwp-btn.main { width: 46px; height: 46px; background: #fff; }
.zwp-btn.main svg { fill: #111; width: 18px; height: 18px; }
.zwp-btn[disabled] { opacity: 0.3; }

.zwp-now { margin-bottom: 8px; }
.zwp-now .t { font-size: 14px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zwp-now .a { font-size: 11px; color: rgba(255, 255, 255, 0.55); margin-top: 3px; }

.zwp-bar { display: flex; align-items: center; gap: 8px; margin: 12px 2px 4px; }
.zwp-time { font-size: 10.5px; color: rgba(255, 255, 255, 0.6); font-variant-numeric: tabular-nums; min-width: 32px; text-align: center; }

input.zwp-range {
  -webkit-appearance: none; appearance: none;
  flex: 1 1 auto; height: 3px; border-radius: 3px;
  background: rgba(255, 255, 255, 0.22);
  outline: none; margin: 0;
}
input.zwp-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}
input.zwp-range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }

.zwp-list { max-height: 168px; overflow-y: auto; margin-top: 8px; -webkit-overflow-scrolling: touch; }
.zwp-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 6px; border-radius: 8px; font-size: 12.5px;
  color: rgba(255, 255, 255, 0.78);
}
.zwp-item:active { background: rgba(255, 255, 255, 0.08); }
.zwp-item.cur { color: #fff; background: rgba(255, 255, 255, 0.1); }
.zwp-item .n { width: 16px; text-align: right; color: rgba(255, 255, 255, 0.45); font-size: 11px; }
.zwp-item .nm { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zwp-item .d { font-size: 10.5px; color: rgba(255, 255, 255, 0.45); font-variant-numeric: tabular-nums; }

.zwp-hint {
  position: absolute; right: 0; left: auto; bottom: calc(100% + 8px);
  white-space: nowrap; font-size: 11px; padding: 5px 10px;
  border-radius: 999px; background: rgba(18, 18, 18, 0.86);
  color: rgba(255, 255, 255, 0.9); opacity: 0; transition: opacity 0.4s;
  pointer-events: none;
}
.zwp.show-hint .zwp-hint { opacity: 1; }

/* 隐藏播放器自带的音符按钮 */
.player-button { display: none !important; }
