/* 全站悬浮 Meting + APlayer 播放器 */
.meting-player {
  position: fixed;
  left: 12px;
  top: 70vh;
  z-index: 8500;
  width: 52px;
  height: 52px;
  color: #4b3858;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", sans-serif;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.meting-bubble {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(135deg,#ffd6e9,#dfd4ff);
  border: 2px solid rgba(255,255,255,.96);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(79,48,101,.24), 0 0 0 1px rgba(225,176,210,.55);
  cursor: grab;
  touch-action: none;
}
.meting-bubble:active { cursor: grabbing; }
.meting-bubble::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(68,35,84,.13);
  opacity: 0;
  transition: opacity .18s ease;
}
.meting-player.is-open .meting-bubble::after { opacity: 1; }
.meting-bubble img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.meting-bubble-disc {
  position: absolute;
  inset: 7px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(64,35,82,.24);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}
.meting-player:hover .meting-bubble-disc,
.meting-player.is-open .meting-bubble-disc,
.meting-player.is-playing .meting-bubble-disc { opacity: 1; }
.meting-player.is-playing .meting-bubble img {
  animation: metingCoverSpin 9s linear infinite;
}
.meting-player.is-loading .meting-bubble-disc { opacity: 1; }
.meting-player.is-loading .meting-bubble-disc::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.55);
  border-top-color: #fff;
  border-radius: 50%;
  animation: metingSpin .7s linear infinite;
}
.meting-player.is-loading .meting-bubble-disc span { display: none; }

.meting-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 9px);
  display: none;
  width: min(324px, calc(100vw - 24px));
  max-height: min(72dvh, 560px);
  overflow: hidden;
  color: #4b3858;
  background:
    radial-gradient(circle at 96% 0%, rgba(255,188,220,.72), transparent 13rem),
    radial-gradient(circle at 0% 100%, rgba(194,217,255,.58), transparent 14rem),
    rgba(255,250,253,.98);
  border: 1px solid rgba(255,255,255,.98);
  border-radius: 18px;
  box-shadow: 0 22px 52px rgba(72,43,91,.28);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transform-origin: bottom left;
  animation: metingPanelIn .22s cubic-bezier(.2,.75,.2,1);
}
.meting-player.is-open .meting-panel { display: block; }
.meting-player.align-right .meting-panel { left: auto; right: 0; transform-origin: bottom right; }
.meting-player.panel-below .meting-panel { bottom: auto; top: calc(100% + 9px); transform-origin: top left; }
.meting-player.panel-below.align-right .meting-panel { transform-origin: top right; }
.meting-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 8px;
  border-bottom: 1px solid #f4e1ec;
}
.meting-panel-cover {
  width: 39px;
  height: 39px;
  flex: none;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(105,73,129,.16);
}
.meting-panel-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.meting-panel-meta { min-width: 0; flex: 1; }
.meting-panel-meta strong {
  display: block;
  overflow: hidden;
  color: #513c5f;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.meting-panel-meta small {
  display: block;
  overflow: hidden;
  margin-top: 1px;
  color: #a18ba7;
  font-size: 6.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.meting-panel-close {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: none;
  color: #a18ba7;
  background: rgba(255,255,255,.7);
  border: 1px solid #efd9e7;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.meting-panel-body { padding: 8px; overflow-y: auto; max-height: calc(72dvh - 58px); }
.meting-status { margin: 0 2px 5px; color: #ad96b3; font-size: 6px; line-height: 1.5; }

/* APlayer 粉紫适配 */
.meting-panel .aplayer {
  margin: 0;
  color: #4b3858;
  background: transparent;
  border-radius: 10px;
  box-shadow: none;
  font-family: inherit;
}
.meting-panel .aplayer-body { background: transparent; }
.meting-panel .aplayer-pic {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background-size: cover;
}
.meting-panel .aplayer-info { border-bottom: 1px solid #f1deea; }
.meting-panel .aplayer-title { color: #513c5f; font-size: 9px; font-weight: 700; }
.meting-panel .aplayer-author { color: #a18ba7; font-size: 6.5px; }
.meting-panel .aplayer-controller { padding: 2px 8px 3px; }
.meting-panel .aplayer-bar-wrap { margin: 2px 0; }
.meting-panel .aplayer-bar { height: 3px; background: #f1dfeb; }
.meting-panel .aplayer-played { background: linear-gradient(90deg,#ff87bf,#a581ff) !important; }
.meting-panel .aplayer-thumb { background: #fff; box-shadow: 0 0 0 2px #f19ac7; }
.meting-panel .aplayer-time { color: #a993ae; font-size: 6.5px; }
.meting-panel .aplayer-icon { fill: #a45b8a; }
.meting-panel .aplayer-volume-wrap { margin-left: 3px; }
.meting-panel .aplayer-volume-bar { background: #f1dfeb; }
.meting-panel .aplayer-volume { background: linear-gradient(90deg,#ff87bf,#a581ff); }
.meting-panel .aplayer-lrc {
  display: block;
  height: 84px;
  margin: 1px 0 0;
  padding: 0 7px;
  background: rgba(255,247,252,.74);
  border-radius: 8px;
  text-shadow: none;
}
.meting-panel .aplayer-lrc:before { background: linear-gradient(180deg,#fff8fd,rgba(255,248,253,0)); }
.meting-panel .aplayer-lrc:after { background: linear-gradient(0deg,#fff8fd,rgba(255,248,253,0)); }
.meting-panel .aplayer-lrc p { color: #a28ba9; font-size: 7.5px; line-height: 17px; }
.meting-panel .aplayer-lrc-current { color: #a04f86; font-size: 8.5px; font-weight: 700; }
.meting-panel .aplayer-list { max-height: 160px; }
.meting-panel .aplayer-list ol { max-height: 160px; }
.meting-panel .aplayer-list li { color: #806e88; font-size: 6.5px; }
.meting-panel .aplayer-list li.aplayer-list-light { background: #fff0f8; }
.meting-panel .aplayer-list-cur { background: #e27bb4 !important; }
.meting-panel .aplayer-list-title { color: #5e496a; }

@keyframes metingCoverSpin { to { transform: rotate(360deg); } }
@keyframes metingSpin { to { transform: rotate(360deg); } }
@keyframes metingPanelIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 380px) {
  .meting-panel { width: min(300px, calc(100vw - 20px)); }
}
@media (prefers-reduced-motion: reduce) {
  .meting-player.is-playing .meting-bubble img,
  .meting-player.is-loading .meting-bubble-disc::before,
  .meting-panel { animation: none !important; }
}
