/* Effects layer, Music & Video and Music & Inspiration (docs/FX.md). Normal and Turn it up.
   - Rings round the player that follow the song's bass (--fx-bass, assets/js/spectrum.js).
   - While a song plays its cover's colour (--fx-cover, assets/js/fx/music.js) melts into
     the page background and the Music section.
   - The card playing in Music & Inspiration wears a turning chrome halo. */

:where(html:not([data-fx="calm"])) .song-stage-player {
  position: relative;
  box-shadow:
    0 0 0 calc(2px + var(--fx-bass, 0) * 10px) rgb(var(--fx-cover, 167 139 250) / 0.55),
    0 0 0 calc(6px + var(--fx-bass, 0) * 26px) rgb(var(--fx-cover, 167 139 250) / 0.2),
    0 0 0 calc(12px + var(--fx-bass, 0) * 46px) rgb(var(--fx-cover, 167 139 250) / 0.08),
    0 0 calc(30px + var(--fx-bass, 0) * 80px) rgb(var(--fx-cover, 167 139 250) / 0.6);
  transition: box-shadow 0.08s linear;
}
html[data-fx="loud"] .song-stage-player { scale: calc(1 + var(--fx-bass, 0) * 0.025); }

:where(html:not([data-fx="calm"])).fx-playing body::after {
  background-image:
    radial-gradient(ellipse 90% 70% at 50% 40%, rgb(var(--fx-cover, 167 139 250) / calc(0.28 + var(--fx-bass, 0) * 0.25)), transparent 70%),
    radial-gradient(ellipse 80% 60% at 15% 0%, var(--scrim-violet), transparent 60%),
    radial-gradient(ellipse 70% 50% at 100% 35%, var(--scrim-teal), transparent 60%),
    linear-gradient(160deg, rgba(7, 7, 15, 0.55) 0%, rgba(10, 8, 23, 0.45) 45%, rgba(5, 10, 16, 0.6) 100%);
}
:where(html:not([data-fx="calm"])).fx-playing #music {
  --section-accent: rgb(var(--fx-cover, 196 181 253));
}

:where(html:not([data-fx="calm"])) .music-links .card.is-now-playing::after {
  opacity: 1;
  padding: 3px;
  animation-duration: 2.2s;
  animation-play-state: running;
  background: conic-gradient(from var(--fx-spin), #ffffff, var(--section-accent), transparent 30%, transparent 50%, #ffffff, var(--accent1), transparent 80%, #ffffff);
  filter: drop-shadow(0 0 8px var(--section-accent));
}
