/* BGM Player - 神圣频率共振按钮 */
.bgm-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(15,18,40,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #6b7b9c;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s var(--ease-out-expo, cubic-bezier(0.16,1,0.3,1)),
              background 0.35s,
              border-color 0.35s,
              box-shadow 0.35s,
              color 0.35s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  outline: none;
}

.bgm-btn:hover {
  transform: scale(1.12);
  background: rgba(25,30,60,0.92);
  border-color: rgba(180,160,220,0.30);
  color: #b4a0dc;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 20px rgba(140,120,200,0.10);
}

.bgm-btn:active {
  transform: scale(0.95);
  transition: transform 0.12s;
}

/* 共振激活状态 — 神秘紫光 */
.bgm-btn.playing {
  color: #c0b0e8;
  border-color: rgba(180,160,220,0.35);
  box-shadow: 0 2px 12px rgba(0,0,0,0.35), 0 0 24px rgba(140,120,200,0.16);
}

/* 加载后 3 秒呼吸动画 — 波动共振感 */
@keyframes bgm-breathe {
  0%, 100% { box-shadow: 0 2px 12px rgba(0,0,0,0.35); }
  50% { box-shadow: 0 2px 20px rgba(120,140,180,0.25), 0 0 24px rgba(120,140,180,0.08); }
}

.bgm-btn.idle-hint {
  animation: bgm-breathe 2.5s ease-in-out infinite;
}

.bgm-btn.playing,
.bgm-btn.no-hint {
  animation: none;
}

/* 提示标签 */
.bgm-tooltip {
  position: fixed;
  bottom: 76px;
  right: 14px;
  z-index: 9999;
  background: rgba(15,18,40,0.92);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 6px 12px;
  color: #8899b4;
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s, transform 0.4s;
}

.bgm-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 移动端适配 */
@media (max-width: 640px) {
  .bgm-btn {
    bottom: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
  .bgm-tooltip {
    bottom: 66px;
    right: 10px;
    font-size: 11px;
    padding: 5px 10px;
  }
}
