/* =========================================================
   背景音乐播放器 · 通用组件
   用法：
     1) 页面底部  body 闭合前加：
        <link rel="stylesheet" href="/assets/music-player.css">
        <script src="/assets/music-player.js"
                data-type="guqin"
                data-src="（可选：mp3外链，留空则用Web Audio合成）"
                data-title="页脚提示名">
        </script>
     2) 自动在右下角生成悬浮按钮
   ========================================================= */

/* -------- 悬浮按钮 -------- */
.mp-wrap{position:fixed;right:18px;bottom:22px;z-index:9999}
.mp-btn{width:52px;height:52px;border-radius:50%;background:rgba(34,51,42,.82);
  color:#b89a52;border:1px solid rgba(184,154,82,.55);
  display:flex;align-items:center;justify-content:center;cursor:pointer;
  transition:.25s;backdrop-filter:blur(6px);box-shadow:0 6px 16px rgba(0,0,0,.25)}
.mp-btn:hover{transform:scale(1.07);background:rgba(34,51,42,.95);border-color:#b89a52}
.mp-btn .bars{display:flex;align-items:flex-end;gap:3px;height:22px}
.mp-btn .bars span{display:block;width:3px;background:#b89a52;border-radius:2px;
  animation:mp-bar 1s ease-in-out infinite}
.mp-btn .bars span:nth-child(1){animation-delay:.0s}
.mp-btn .bars span:nth-child(2){animation-delay:.15s}
.mp-btn .bars span:nth-child(3){animation-delay:.3s}
.mp-btn .bars span:nth-child(4){animation-delay:.45s}
.mp-btn:not(.playing) .bars span{animation:none;height:6px}
.mp-btn.playing .bars span{animation-name:mp-bar}
@keyframes mp-bar{0%,100%{height:4px}50%{height:22px}}
.mp-btn svg{width:22px;height:22px;display:none}
.mp-btn:not(.playing) svg.mp-play{display:block}
.mp-btn.playing svg.mp-bars{display:none}
.mp-tip{position:absolute;right:58px;top:50%;transform:translateY(-50%);
  white-space:nowrap;background:rgba(34,51,42,.88);color:#b89a52;
  padding:5px 10px;border-radius:6px;font-size:12px;letter-spacing:1px;
  opacity:0;pointer-events:none;transition:.25s}
.mp-wrap:hover .mp-tip{opacity:1}
/* 浅色背景适配 */
@media (max-width:600px){
  .mp-btn{width:44px;height:44px}
  .mp-btn .bars{height:18px}
}
