/* ============================================================
   asdw3小站 — 音乐播放器（右下角悬浮，可拖动，墨笺风格）
   ============================================================ */

.music-player {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9990;
  width: 324px;
  max-width: calc(100vw - 24px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(0, 0, 0, .25);
  overflow: hidden;
  font-family: var(--kai);
  color: var(--paper);
  user-select: none;
  -webkit-user-select: none;
}

/* ---- 顶栏（拖动把手） ---- */
.mp-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border-bottom: 1px solid var(--line);
  cursor: move;
  touch-action: none;
}
.mp-logo {
  height: 24px; padding: 0 8px; flex: none;
  border-radius: 6px;
  background: var(--cinnabar);
  color: #f6eee2;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  letter-spacing: .01em;
  white-space: nowrap;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.16);
}
.mp-name { font-size: 15px; letter-spacing: .06em; white-space: nowrap; }
.mp-status {
  margin-left: auto;
  font-size: 12px;
  color: var(--paper-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-status.err { color: var(--err); }
.mp-min {
  flex: none;
  background: none;
  border: none;
  color: var(--paper-dim);
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
}
.mp-min:hover { color: var(--paper); background: var(--panel-2); }

/* ---- 主体 ---- */
.mp-body { padding: 12px; }

.mp-now { display: flex; align-items: center; gap: 12px; }
.mp-cover {
  width: 56px; height: 56px; flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, var(--cinnabar-soft), var(--cinnabar-ink));
  color: #f6eee2;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  letter-spacing: .01em;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.14), 0 3px 12px rgba(194,71,45,.32);
}
.mp-cover.spin { animation: mpSpin 9s linear infinite; }
@keyframes mpSpin { to { transform: rotate(360deg); } }

.mp-info { flex: 1; min-width: 0; }
.mp-song {
  font-size: 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mp-artist {
  font-size: 13px; color: var(--paper-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}
.mp-genre {
  font-size: 12px; color: var(--paper-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 播放中的小均衡条 */
.mp-eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; flex: none; }
.mp-eq span {
  width: 3px; height: 4px;
  background: var(--cinnabar-soft);
  border-radius: 1px;
}
.mp-eq.on span { animation: mpEq 1s ease-in-out infinite; }
.mp-eq.on span:nth-child(2) { animation-delay: .2s; }
.mp-eq.on span:nth-child(3) { animation-delay: .4s; }
@keyframes mpEq {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}

/* ---- 进度条 ---- */
.mp-seek { margin-top: 12px; }
.mp-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--line-2);
  outline: none;
  cursor: pointer;
  display: block;
}
.mp-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--cinnabar);
  border: 2px solid #f6eee2;
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
  cursor: pointer;
  transition: transform .12s ease;
}
.mp-range::-webkit-slider-thumb:hover { transform: scale(1.15); }
.mp-range::-moz-range-thumb {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--cinnabar);
  border: 2px solid #f6eee2;
  cursor: pointer;
}
.mp-range:disabled { opacity: .4; cursor: default; }
.mp-times {
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--paper-dim);
  margin-top: 4px;
}

/* ---- 控制按钮 ---- */
.mp-controls { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.mp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  color: var(--paper);
  cursor: pointer;
  font-family: var(--kai);
  font-size: 14px;
  line-height: 1;
  transition: all .15s ease;
  flex: none;
}
.mp-btn:hover { border-color: var(--cinnabar); color: var(--paper); background: #2a231c; }
.mp-btn.play {
  width: 44px; height: 44px;
  background: var(--cinnabar);
  border-color: var(--cinnabar);
  color: #f8f0e4;
  font-size: 16px;
}
.mp-btn.play:hover { background: var(--cinnabar-soft); border-color: var(--cinnabar-soft); }
.mp-btn.mode {
  width: auto;
  padding: 0 10px;
  border-radius: 17px;
  font-size: 12px;
  letter-spacing: .03em;
  color: var(--gold);
}
.mp-btn.mode:hover { color: var(--gold); }
.mp-btn.on { border-color: var(--cinnabar); color: var(--cinnabar-soft); }

/* ---- 音量 ---- */
.mp-vol { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.mp-vol .mp-btn { width: 30px; height: 30px; font-size: 13px; }
.mp-vol input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 62px; height: 4px;
  border-radius: 2px;
  background: var(--line-2);
  outline: none;
  cursor: pointer;
}
.mp-vol input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--paper-dim); border: none; cursor: pointer;
}
.mp-vol input[type="range"]::-moz-range-thumb {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--paper-dim); border: none; cursor: pointer;
}

/* ---- 音乐列表 ---- */
.mp-list {
  margin-top: 12px;
  border-top: 1px dashed var(--line);
  padding-top: 8px;
  max-height: 218px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.mp-list::-webkit-scrollbar { width: 6px; }
.mp-list::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
.mp-list ul { list-style: none; margin: 0; padding: 0; }
.mp-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.mp-item:hover { background: var(--panel-2); }
.mp-item .n {
  width: 22px; flex: none;
  color: var(--paper-faint);
  font-family: var(--mono);
  font-size: 12px;
  text-align: right;
}
.mp-item .t {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mp-item .t .a { color: var(--paper-faint); font-size: 12px; margin-left: 6px; }
.mp-item .d {
  flex: none;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--paper-faint);
}
.mp-item.cur { background: rgba(194,71,45,.13); }
.mp-item.cur .t { color: var(--cinnabar-soft); }
.mp-empty {
  padding: 14px 8px;
  text-align: center;
  color: var(--paper-faint);
  font-size: 13px;
  cursor: default;
}
.mp-empty button {
  margin-left: 8px;
  background: none; border: 1px solid var(--line-2);
  color: var(--gold); border-radius: 4px;
  cursor: pointer; font-family: var(--kai); font-size: 12px;
  padding: 2px 8px;
}
.mp-empty button:hover { border-color: var(--cinnabar); }

/* ---- 收起态 ---- */
.music-player.min .mp-body { display: none; }
.music-player.min .mp-head { border-bottom: none; }

@media (max-width: 480px) {
  .music-player { width: 292px; right: 12px; bottom: 12px; }
  .mp-vol input[type="range"] { width: 44px; }
}