/* SoonSoonTCG Background Music (BGM) Player Widget */
.bgm-floating-container {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 998;
}

.bgm-widget {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(18, 20, 24, 0.9);
  border: 1px solid rgba(116, 214, 66, 0.35);
  border-radius: 999px;
  padding: 6px 12px 6px 6px;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 12px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all 0.25s ease;
  user-select: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.bgm-widget:hover {
  border-color: rgba(116, 214, 66, 0.65);
  box-shadow: 0 8px 24px rgba(116, 214, 66, 0.2);
}

.bgm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #74d642, #4fad24);
  color: #080d04;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  transition: transform 0.15s ease, filter 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(116, 214, 66, 0.35);
}

.bgm-btn:hover {
  transform: scale(1.08);
  filter: brightness(1.1);
}

.bgm-btn:active {
  transform: scale(0.92);
}

/* Equalizer Bars */
.bgm-equalizer {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 13px;
  width: 14px;
}

.bgm-equalizer span {
  width: 2.5px;
  background-color: #74d642;
  border-radius: 1px;
  height: 3px;
  transition: height 0.2s ease;
}

.bgm-widget.is-playing .bgm-equalizer span:nth-child(1) {
  animation: bgmEqAnim 0.85s ease-in-out infinite alternate;
}
.bgm-widget.is-playing .bgm-equalizer span:nth-child(2) {
  animation: bgmEqAnim 0.65s ease-in-out infinite alternate 0.2s;
}
.bgm-widget.is-playing .bgm-equalizer span:nth-child(3) {
  animation: bgmEqAnim 1.05s ease-in-out infinite alternate 0.4s;
}

@keyframes bgmEqAnim {
  0% { height: 3px; }
  50% { height: 13px; }
  100% { height: 5px; }
}

.bgm-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  cursor: pointer;
}

.bgm-title {
  font-weight: 600;
  font-size: 11px;
  color: #f8fafc;
  letter-spacing: 0.02em;
}

.bgm-status {
  font-size: 9.5px;
  color: #94a3b8;
}

.bgm-widget.is-playing .bgm-status {
  color: #74d642;
}

/* Volume Slider */
.bgm-volume-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 2px;
}

.bgm-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 46px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  outline: none;
  cursor: pointer;
}

.bgm-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #74d642;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.bgm-volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

/* Light mode support */
body.light-mode .bgm-widget {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(79, 173, 36, 0.35);
  color: #1e293b;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.09);
}

body.light-mode .bgm-title {
  color: #0f172a;
}

body.light-mode .bgm-status {
  color: #64748b;
}

body.light-mode .bgm-volume-slider {
  background: rgba(0, 0, 0, 0.15);
}

/* Mobile responsive */
@media (max-width: 800px) {
  .bgm-floating-container {
    bottom: 82px;
    left: 12px;
  }
  .bgm-widget {
    padding: 5px 10px 5px 5px;
    gap: 7px;
  }
  .bgm-volume-wrap {
    display: none;
  }
}
