/* Addition for the multipage prototype only — background music toggle.
   Not part of the original one-page style.css. */

.music-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.music-toggle:hover { transform: scale(1.08); }
.music-toggle:focus-visible { outline: 2px solid var(--fg-color); outline-offset: 3px; }

.music-toggle svg { width: 22px; height: 22px; color: #FFFFFF; }
.music-toggle .icon-playing { display: none; }
.music-toggle.playing .icon-muted { display: none; }
.music-toggle.playing .icon-playing { display: block; }

/* Gentle pulse ring only while playing, so the control stays noticeable
   without being distracting — respects reduced-motion. */
.music-toggle.playing::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--color-accent);
  opacity: 0.6;
  animation: music-pulse 2.2s ease-out infinite;
}
@keyframes music-pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.35); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .music-toggle.playing::after { animation: none; display: none; }
  .music-toggle { transition: none; }
}

@media (max-width: 768px) {
  .music-toggle { right: 16px; bottom: 16px; width: 46px; height: 46px; }
  .music-toggle svg { width: 19px; height: 19px; }
}
