/* YS云鉴权 音乐模块 —— 液态毛玻璃悬浮播放器 */
.ysm-root {
  position: fixed;
  bottom: 26px;
  z-index: 2147482000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.ysm-root.ysm-left  { left: 26px; }
.ysm-root.ysm-right { right: 26px; }

/* ── 悬浮唱片按钮 ─────────────────────────────── */
.ysm-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
  display: block;
  position: relative;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.08) 46%),
    linear-gradient(145deg, rgba(0, 110, 255, 0.85), rgba(0, 60, 160, 0.9));
  backdrop-filter: blur(14px) saturate(1.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  box-shadow:
    0 8px 28px rgba(0, 60, 180, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.18),
    inset 0 1px 1px rgba(255, 255, 255, 0.45);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s;
  animation: ysm-float 4.5s ease-in-out infinite;
}
.ysm-fab:hover { transform: scale(1.08); box-shadow: 0 12px 34px rgba(0, 60, 180, 0.45), inset 0 1px 1px rgba(255,255,255,0.45); }
.ysm-fab:active { transform: scale(0.96); }
@keyframes ysm-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -5px; }
}

/* 唱片纹路 + 中心标签 */
.ysm-disc {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #eaf3ff 0 17%, rgba(10, 20, 40, 0.9) 18% 19%, transparent 19.5%),
    repeating-radial-gradient(circle at center, rgba(255,255,255,0.14) 0 1.5px, transparent 1.5px 4px),
    conic-gradient(from 0deg, #0b1c3d, #14336b, #0b1c3d, #1c4488, #0b1c3d);
  animation: ysm-spin 3.2s linear infinite;
  animation-play-state: paused;
}
.ysm-root.ysm-playing .ysm-disc { animation-play-state: running; }
.ysm-root.ysm-playing .ysm-fab { box-shadow: 0 8px 28px rgba(0,110,255,0.55), 0 0 22px rgba(0,110,255,0.35), inset 0 1px 1px rgba(255,255,255,0.45); }
@keyframes ysm-spin { to { transform: rotate(360deg); } }

/* 音波 */
.ysm-wave { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(0,110,255,0.5); opacity: 0; }
.ysm-root.ysm-playing .ysm-wave { animation: ysm-wave 1.8s ease-out infinite; }
.ysm-root.ysm-playing .ysm-wave:nth-child(2) { animation-delay: 0.6s; }
@keyframes ysm-wave {
  0%   { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* ── 毛玻璃面板 ─────────────────────────────── */
.ysm-panel {
  position: absolute;
  bottom: 70px;
  width: 320px;
  border-radius: 22px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.96);
  transform-origin: bottom center;
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.34, 1.4, 0.64, 1), visibility 0.28s;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(160deg, rgba(245, 249, 255, 0.82), rgba(228, 238, 252, 0.66));
  backdrop-filter: blur(22px) saturate(1.7);
  -webkit-backdrop-filter: blur(22px) saturate(1.7);
  box-shadow:
    0 20px 50px rgba(8, 30, 80, 0.28),
    0 4px 14px rgba(8, 30, 80, 0.14),
    inset 0 1px 1px rgba(255, 255, 255, 0.7);
}
.ysm-root.ysm-left  .ysm-panel { left: 0; }
.ysm-root.ysm-right .ysm-panel { right: 0; }
.ysm-root.ysm-open .ysm-panel { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

/* 液态流光背景 */
.ysm-liquid {
  position: absolute;
  inset: -40%;
  pointer-events: none;
  filter: blur(38px);
  opacity: 0.5;
}
.ysm-liquid::before,
.ysm-liquid::after {
  content: "";
  position: absolute;
  border-radius: 42% 58% 61% 39% / 45% 42% 58% 55%;
}
.ysm-liquid::before {
  width: 62%; height: 62%;
  left: 4%; top: 8%;
  background: radial-gradient(circle at 35% 35%, rgba(0, 140, 255, 0.55), rgba(0, 90, 220, 0.18));
  animation: ysm-blob 11s ease-in-out infinite;
}
.ysm-liquid::after {
  width: 55%; height: 55%;
  right: 2%; bottom: 4%;
  background: radial-gradient(circle at 60% 60%, rgba(90, 190, 255, 0.5), rgba(0, 110, 255, 0.15));
  animation: ysm-blob 13s ease-in-out infinite reverse;
}
@keyframes ysm-blob {
  0%, 100% { border-radius: 42% 58% 61% 39% / 45% 42% 58% 55%; transform: rotate(0deg) translate(0, 0); }
  33%      { border-radius: 58% 42% 39% 61% / 55% 58% 42% 45%; transform: rotate(28deg) translate(6%, -4%); }
  66%      { border-radius: 48% 52% 55% 45% / 40% 55% 45% 60%; transform: rotate(-20deg) translate(-5%, 5%); }
}

.ysm-panel-in { position: relative; padding: 16px 16px 14px; }

/* 顶部：封面 + 标题 */
.ysm-head { display: flex; align-items: center; gap: 12px; }
.ysm-cover {
  width: 52px; height: 52px;
  border-radius: 14px;
  flex: none;
  background:
    radial-gradient(circle at 32% 30%, rgba(255,255,255,0.75), rgba(255,255,255,0.12) 48%),
    linear-gradient(145deg, #0b1c3d, #1c4488);
  background-size: cover, auto;
  background-position: center;
  box-shadow: 0 4px 12px rgba(0, 40, 120, 0.3), inset 0 1px 1px rgba(255,255,255,0.5);
  position: relative;
  overflow: hidden;
}
.ysm-cover::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-radial-gradient(circle at center, rgba(255,255,255,0.16) 0 1px, transparent 1px 3.5px);
}
.ysm-root.ysm-playing .ysm-cover::after { animation: ysm-spin 3.2s linear infinite; }
.ysm-meta { flex: 1; min-width: 0; }
.ysm-title {
  font-size: 14px; font-weight: 600; color: #12274d;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ysm-root.ysm-marquee .ysm-title { overflow: visible; }
.ysm-artist {
  font-size: 12px; color: #4a639a; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ysm-eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; margin-right: 5px; vertical-align: -1px; }
.ysm-eq i { width: 2.5px; background: #0a6cff; border-radius: 2px; animation: ysm-eq 0.9s ease-in-out infinite; }
.ysm-eq i:nth-child(1) { height: 55%; }
.ysm-eq i:nth-child(2) { height: 100%; animation-delay: 0.25s; }
.ysm-eq i:nth-child(3) { height: 70%; animation-delay: 0.5s; }
.ysm-root:not(.ysm-playing) .ysm-eq i { animation-play-state: paused; }
@keyframes ysm-eq { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }

/* 进度条 */
.ysm-progress { display: flex; align-items: center; gap: 8px; margin-top: 13px; }
.ysm-time { font-size: 10.5px; color: #5a739f; font-variant-numeric: tabular-nums; min-width: 30px; }
.ysm-bar {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, #0a6cff var(--p, 0%), rgba(10, 40, 100, 0.18) var(--p, 0%));
  outline: none;
  cursor: pointer;
}
.ysm-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid #0a6cff;
  box-shadow: 0 2px 6px rgba(0, 60, 200, 0.4);
  cursor: grab;
}
.ysm-bar::-moz-range-thumb {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid #0a6cff;
  cursor: grab;
}

/* 控制按钮行 */
.ysm-ctrl { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 12px; }
.ysm-btn {
  border: none;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: grid; place-items: center;
  color: #12336e;
  box-shadow: 0 3px 10px rgba(0, 40, 120, 0.16), inset 0 1px 1px rgba(255,255,255,0.7);
  transition: transform 0.18s, background 0.18s;
}
.ysm-btn:hover { transform: scale(1.1); background: rgba(255,255,255,0.85); }
.ysm-btn:active { transform: scale(0.92); }
.ysm-btn svg { width: 17px; height: 17px; fill: currentColor; }
.ysm-btn-play {
  width: 48px; height: 48px;
  background: linear-gradient(145deg, #0a6cff, #0653d2);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 90, 220, 0.45), inset 0 1px 1px rgba(255,255,255,0.4);
}
.ysm-btn-play svg { width: 20px; height: 20px; }

/* 音量行 */
.ysm-vol { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.ysm-vol svg { width: 15px; height: 15px; fill: #4a639a; flex: none; }
.ysm-vol .ysm-bar { height: 4px; }

/* 播放列表 */
.ysm-list {
  margin-top: 13px;
  max-height: 176px;
  overflow-y: auto;
  border-top: 1px solid rgba(10, 60, 160, 0.12);
  padding-top: 7px;
  scrollbar-width: thin;
  scrollbar-color: rgba(10, 108, 255, 0.4) transparent;
}
.ysm-list::-webkit-scrollbar { width: 4px; }
.ysm-list::-webkit-scrollbar-thumb { background: rgba(10, 108, 255, 0.35); border-radius: 2px; }
.ysm-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 8px 9px;
  border-radius: 11px;
  cursor: pointer;
  text-align: left;
  transition: background 0.16s;
}
.ysm-item:hover { background: rgba(10, 108, 255, 0.1); }
.ysm-item.ysm-cur { background: rgba(10, 108, 255, 0.16); }
.ysm-item-idx { font-size: 11px; color: #7d92ba; width: 16px; text-align: center; flex: none; font-variant-numeric: tabular-nums; }
.ysm-item-name { flex: 1; min-width: 0; font-size: 12.5px; color: #1a3260; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ysm-item-artist { font-size: 11px; color: #7d92ba; max-width: 74px; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ysm-list-empty { text-align: center; color: #7d92ba; font-size: 12px; padding: 14px 0 10px; }

/* ── 小巧模式（默认）：整体缩小约 25%，减少对首页内容的遮挡 ──────────
   后台「应用商店 → 音乐模块 → 播放器尺寸」切到「标准」即恢复上方原始尺寸。 */
.ysm-root.ysm-compact { bottom: 20px; }
.ysm-root.ysm-compact.ysm-left  { left: 20px; }
.ysm-root.ysm-compact.ysm-right { right: 20px; }

.ysm-root.ysm-compact .ysm-fab  { width: 42px; height: 42px; }
.ysm-root.ysm-compact .ysm-disc { inset: 5px; }
.ysm-root.ysm-compact .ysm-wave { inset: -3px; }

.ysm-root.ysm-compact .ysm-panel {
  bottom: 52px;
  width: 248px;
  border-radius: 18px;
}
.ysm-root.ysm-compact .ysm-panel-in { padding: 12px 12px 10px; }
.ysm-root.ysm-compact .ysm-head    { gap: 9px; }
.ysm-root.ysm-compact .ysm-cover   { width: 40px; height: 40px; border-radius: 11px; }
.ysm-root.ysm-compact .ysm-title   { font-size: 12.5px; }
.ysm-root.ysm-compact .ysm-artist  { font-size: 11px; margin-top: 2px; }
.ysm-root.ysm-compact .ysm-eq      { height: 10px; }

.ysm-root.ysm-compact .ysm-progress { margin-top: 10px; gap: 6px; }
.ysm-root.ysm-compact .ysm-time     { font-size: 9.5px; min-width: 26px; }
.ysm-root.ysm-compact .ysm-bar      { height: 4px; }
.ysm-root.ysm-compact .ysm-bar::-webkit-slider-thumb { width: 10px; height: 10px; border-width: 2px; }
.ysm-root.ysm-compact .ysm-bar::-moz-range-thumb     { width: 9px;  height: 9px; }

.ysm-root.ysm-compact .ysm-ctrl          { gap: 14px; margin-top: 9px; }
.ysm-root.ysm-compact .ysm-btn           { width: 30px; height: 30px; }
.ysm-root.ysm-compact .ysm-btn svg       { width: 14px; height: 14px; }
.ysm-root.ysm-compact .ysm-btn-play      { width: 38px; height: 38px; }
.ysm-root.ysm-compact .ysm-btn-play svg  { width: 16px; height: 16px; }
.ysm-root.ysm-compact .ysm-vol           { gap: 6px; margin-top: 9px; }
.ysm-root.ysm-compact .ysm-vol svg       { width: 13px; height: 13px; }

.ysm-root.ysm-compact .ysm-list        { margin-top: 10px; max-height: 132px; padding-top: 6px; }
.ysm-root.ysm-compact .ysm-item        { gap: 7px; padding: 6px 8px; border-radius: 9px; }
.ysm-root.ysm-compact .ysm-item-idx    { font-size: 10px; width: 14px; }
.ysm-root.ysm-compact .ysm-item-name   { font-size: 11.5px; }
.ysm-root.ysm-compact .ysm-item-artist { font-size: 10px; max-width: 64px; }
.ysm-root.ysm-compact .ysm-list-empty  { font-size: 11px; padding: 10px 0 8px; }

/* ── v1.1 新增：播放模式 / 倍速 / 歌词 迷你按钮 ────────────── */
.ysm-mini-wrap { display: inline-flex; align-items: center; gap: 5px; margin-left: 2px; }
.ysm-mini {
  min-width: 26px;
  height: 22px;
  padding: 0 5px;
  border: 1px solid rgba(10, 60, 160, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.5);
  color: #3a5790;
  font-size: 10.5px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s, color .16s, transform .16s;
}
.ysm-mini:hover { background: rgba(255, 255, 255, .9); transform: scale(1.06); }
.ysm-mini-on { background: linear-gradient(145deg, #0a6cff, #0653d2); color: #fff; border-color: transparent; }
.ysm-mini-dim { opacity: .55; }
.ysm-root.ysm-compact .ysm-mini { min-width: 23px; height: 19px; font-size: 9.5px; padding: 0 4px; border-radius: 6px; }
.ysm-root.ysm-compact .ysm-mini-wrap { gap: 4px; }

/* 歌单分类标签 */
.ysm-cats { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.ysm-cat {
  border: 1px solid rgba(10, 60, 160, .18);
  background: rgba(255, 255, 255, .45);
  color: #4a639a;
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 10.5px;
  cursor: pointer;
  transition: background .16s;
}
.ysm-cat:hover { background: rgba(10, 108, 255, .12); }
.ysm-cat-on { background: rgba(10, 108, 255, .18); color: #12336e; border-color: rgba(10, 108, 255, .45); }
.ysm-root.ysm-compact .ysm-cats { gap: 4px; margin-top: 7px; }
.ysm-root.ysm-compact .ysm-cat { font-size: 9.5px; padding: 2px 7px; }

/* LRC 歌词滚动 */
.ysm-lyrics {
  display: none;
  margin-top: 10px;
  max-height: 132px;
  overflow-y: auto;
  text-align: center;
  border-top: 1px solid rgba(10, 60, 160, .12);
  padding-top: 8px;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}
.ysm-lrc-line {
  font-size: 11.5px;
  line-height: 1.9;
  color: #7d92ba;
  padding: 2px 4px;
  transition: color .2s, transform .2s;
}
.ysm-lrc-on { color: #0a5fe0; font-weight: 600; transform: scale(1.04); }
.ysm-root.ysm-compact .ysm-lyrics { max-height: 108px; margin-top: 8px; }
.ysm-root.ysm-compact .ysm-lrc-line { font-size: 10.5px; line-height: 1.8; }

/* 移动端 */
@media (max-width: 560px) {
  .ysm-root { bottom: 18px; }
  .ysm-root.ysm-left  { left: 16px; }
  .ysm-root.ysm-right { right: 16px; }
  .ysm-panel {
    position: fixed;
    left: 12px !important;
    right: 12px !important;
    width: auto;
    bottom: 88px;
  }
  .ysm-root.ysm-compact { bottom: 14px; }
  .ysm-root.ysm-compact.ysm-left  { left: 12px; }
  .ysm-root.ysm-compact.ysm-right { right: 12px; }
  .ysm-root.ysm-compact .ysm-panel { bottom: 64px; }
}
