/* media-visualiser styling. Dark by necessity: this is a full-screen surface on a TV or
 * a panel in a room where the lights may be off, and the ring's colours come from album
 * art that has to read against it. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #0a0510;
  color: #eadcff;
  font-family: system-ui, sans-serif;
  overflow: hidden;
}

#stage {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto;
  place-items: center;
  padding: 4vh 4vw;
}

/* The ring fills the stage and everything else sits on top of it. */
#ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#centre {
  position: relative;
  grid-row: 1;
  display: grid;
  place-items: center;
}

#cover, #cover-fallback {
  width: min(34vh, 34vw);
  height: min(34vh, 34vw);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

#cover-fallback {
  display: grid;
  place-items: center;
  font-size: min(12vh, 12vw);
  color: rgba(234, 220, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

#meta { position: relative; grid-row: 2; text-align: center; max-width: 90vw; }
#meta h1 { margin: 0; font-size: clamp(20px, 3.4vh, 40px); }
#meta p { margin: 4px 0 0; color: #a98fc4; font-size: clamp(14px, 2vh, 22px); }

/* The synthetic tier says so, quietly and permanently. It is a mood light, and the
 * moment somebody believes it is a spectrum every bass drop it misses is a bug. */
.tier-note {
  font-size: 12px !important;
  opacity: 0.45;
  letter-spacing: 0.04em;
}

/* Lyrics are the addition, never the layout's assumption — most tracks have none, and
 * this row simply collapses when they do. */
#lyrics {
  position: relative;
  grid-row: 3;
  width: min(700px, 92vw);
  max-height: 24vh;
  overflow-y: auto;
  text-align: center;
  scrollbar-width: none;
  mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
}
#lyrics::-webkit-scrollbar { display: none; }

#lyrics-lines p {
  margin: 6px 0;
  font-size: clamp(15px, 2.2vh, 24px);
  color: rgba(234, 220, 255, 0.38);
  transition: color 240ms ease, transform 240ms ease;
}
#lyrics-lines p.current {
  color: #fff;
  transform: scale(1.06);
}
#lyrics-lines .plain {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: clamp(14px, 1.9vh, 20px);
  color: rgba(234, 220, 255, 0.6);
  text-align: center;
}

.error {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  text-align: center;
  color: #ff8080;
  font-size: 14px;
}
