/* ===== 侧边栏音乐播放器（液态玻璃） ===== */
.mp-wrapper {
  position: fixed;
  left: 0;
  top: 35%;
  z-index: 9999;
  display: flex;
  align-items: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  user-select: none;
}
.mp-wrapper * { box-sizing: border-box; margin: 0; padding: 0; }

.mp-toggle {
  width: 34px;
  height: 58px;
  background: rgba(255, 255, 255, .7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .4);
  border-left: none;
  border-radius: 0 12px 12px 0;
  cursor: grab;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--accent);
  box-shadow: 2px 0 16px rgba(0, 0, 0, .08);
  transition: all .3s var(--ease);
  flex-shrink: 0;
  writing-mode: vertical-lr;
  padding: 8px 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
[data-theme="dark"] .mp-toggle { background: rgba(30, 32, 48, .6); border-color: rgba(255,255,255,.1); }
.mp-toggle:active { cursor: grabbing; }
.mp-toggle:hover { background: rgba(255,255,255,.9); box-shadow: 2px 0 24px rgba(0,0,0,.12); transform: scale(1.03); }
.mp-toggle svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }
.mp-toggle .mp-toggle-text { font-size: 10px; font-weight: 700; letter-spacing: 1px; }

.mp-panel {
  width: 250px;
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 0 16px 16px 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
  border: 1px solid rgba(255, 255, 255, .4);
  border-left: none;
  transition: all .35s var(--ease-spring);
  overflow: hidden;
  padding: 12px;
}
[data-theme="dark"] .mp-panel { background: rgba(30, 32, 48, .7); border-color: rgba(255,255,255,.08); }
.mp-panel.hide { width: 0; opacity: 0; padding: 0; border: none; }

.mp-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mp-info { flex: 1; min-width: 0; }
.mp-title { color: var(--text); font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-artist { color: var(--muted); font-size: 10px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mp-play-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); border: none; color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px var(--accent-soft);
  transition: all .2s var(--ease); flex-shrink: 0;
}
.mp-play-btn:hover { transform: scale(1.08); filter: brightness(1.1); }
.mp-play-btn:active { transform: scale(0.94); }
.mp-play-btn svg { width: 14px; height: 14px; fill: currentColor; }

.mp-progress-wrap { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 0 2px; }
.mp-progress-bar {
  flex: 1; height: 4px; background: var(--line); border-radius: 2px;
  cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent;
}
.mp-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .1s linear; pointer-events: none; }
.mp-progress-thumb { width: 10px; height: 10px; background: var(--accent); border-radius: 50%; position: absolute; top: 50%; transform: translate(-50%, -50%); box-shadow: 0 1px 4px var(--accent-soft); pointer-events: none; }
.mp-time { font-size: 9px; color: var(--muted); min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; }

.mp-categories { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.mp-cat { font-size: 10px; padding: 3px 10px; border-radius: 12px; cursor: pointer; background: var(--fill); color: var(--text-2); transition: all .2s; border: 1px solid transparent; }
.mp-cat:hover { background: var(--fill-2); }
.mp-cat.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 600; }

.mp-list { display: flex; flex-direction: column; gap: 3px; max-height: 200px; overflow-y: auto; }
.mp-list::-webkit-scrollbar { width: 4px; }
.mp-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
.mp-item { padding: 7px 10px; border-radius: 8px; cursor: pointer; transition: all .2s; display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.4); }
[data-theme="dark"] .mp-item { background: rgba(255,255,255,.04); }
.mp-item:hover { background: var(--accent-soft); }
.mp-item.active { background: var(--accent-soft); }
.mp-item-num { width: 18px; height: 18px; border-radius: 50%; background: var(--fill); display: flex; align-items: center; justify-content: center; font-size: 9px; color: var(--muted); font-weight: 700; flex-shrink: 0; }
.mp-item.active .mp-item-num { background: var(--accent); color: #fff; }
.mp-item-name { flex: 1; font-size: 11px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-item.active .mp-item-name { color: var(--accent); font-weight: 600; }
.mp-item-cat { font-size: 9px; padding: 1px 6px; border-radius: 8px; background: var(--fill); color: var(--muted); flex-shrink: 0; }
.mp-item.active .mp-item-cat { background: var(--accent); color: #fff; }

@keyframes mp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.mp-item-playing { color: var(--accent); font-size: 10px; animation: mp-pulse 1s ease-in-out infinite; }
.mp-item-playing svg { width: 12px; height: 12px; fill: currentColor; }

@media (max-width: 768px) {
  .mp-panel { width: 210px; }
  .mp-title { font-size: 11px; }
  .mp-toggle { width: 30px; height: 48px; }
}
