/* Festivalen – the song contest look (owner, 2026-11-24: "snyggt och kanske inte så fritidshack ... Mer Mello, som i
   powerpointen"): pastel glitter in pink, lilac and gold on the bright slides, a slate-to-mauve night on the counting
   and result slides, white glowing pill rows. Our own drawing – no logos, no pictures from anyone else. Used by the
   teacher page (index.html), the big screen (show.html) and the voting page (/rosta/). */

@font-face {
  font-family: "Exo 2";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/exo2-latin.woff2") format("woff2");
}

:root {
  --f-pink: #f6b9e3;
  --f-rose: #f08fcf;
  --f-lilac: #c6b4f7;
  --f-violet: #8c6cf0;
  --f-peach: #ffdcae;
  --f-gold: #ffcf5a;
  --f-ice: #d6e8f7;
  --f-ink: #24193a;
  --f-ink-soft: #5b4b78;
  --f-night-a: #3d4a6c;
  --f-night-b: #69497f;
  --f-night-c: #a88fb8;
  --f-white: #fffaff;
  --f-glow: 0 0 0.6em rgba(255, 255, 255, 0.85), 0 0 1.6em rgba(255, 190, 240, 0.6);
  /* the four point buttons (our own colours) */
  --p1: #ff5c8a;
  --p2: #7c6cff;
  --p4: #f2b322;
  --p6: #2fc4a1;
  --f-font: "Exo 2", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }   /* our display: grid/flex must not beat the hidden attribute */

html, body { margin: 0; height: 100%; }

body.f-page {
  font-family: var(--f-font);
  color: var(--f-ink);
  background: var(--f-pink);
}

/* ---------- The background: glitter and light beams ---------- */

.f-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  background:
    radial-gradient(60% 50% at 78% 30%, rgba(255, 255, 255, 0.95), transparent 70%),
    radial-gradient(45% 60% at 15% 80%, rgba(255, 214, 160, 0.85), transparent 70%),
    radial-gradient(60% 70% at 25% 20%, rgba(198, 180, 247, 0.95), transparent 70%),
    linear-gradient(120deg, var(--f-pink), var(--f-lilac) 45%, var(--f-peach) 80%, var(--f-pink));
  transition: opacity 0.9s ease;
}

.f-bg::before,
.f-bg::after {
  /* slanted beams of light, drifting slowly */
  content: "";
  position: absolute;
  inset: -40%;
  background: repeating-linear-gradient(105deg,
    transparent 0 9%, rgba(255, 255, 255, 0.38) 11%, transparent 15%,
    transparent 22%, rgba(255, 240, 200, 0.3) 24%, transparent 29%);
  filter: blur(14px);
  animation: f-beams 26s linear infinite alternate;
}

.f-bg::after {
  background: repeating-linear-gradient(75deg,
    transparent 0 14%, rgba(255, 255, 255, 0.25) 16%, transparent 21%);
  animation-duration: 34s;
  animation-direction: alternate-reverse;
}

@keyframes f-beams {
  from { transform: translateX(-6%) rotate(0deg); }
  to { transform: translateX(6%) rotate(3deg); }
}

.f-bg.night {
  background:
    radial-gradient(50% 60% at 50% 45%, rgba(255, 210, 245, 0.25), transparent 70%),
    linear-gradient(90deg, var(--f-night-c), var(--f-night-a) 18%, var(--f-night-b) 55%, var(--f-night-a) 82%, var(--f-night-c));
}

.f-bg.night::before { opacity: 0.35; }
.f-bg.night::after { opacity: 0.2; }

.f-glitter {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.f-confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 40;
  pointer-events: none;
}

/* ---------- Shared pieces ---------- */

.f-shine {
  /* glittering text: a moving light across the letters */
  background: linear-gradient(100deg, var(--f-ink) 0 40%, #8f5fd6 47%, #fff 50%, #8f5fd6 53%, var(--f-ink) 60% 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: f-shine 5s ease-in-out infinite;
}

.night .f-shine,
.f-shine.on-night {
  background-image: linear-gradient(100deg, #fff 0 40%, #ffd1f3 47%, #fff8d0 50%, #ffd1f3 53%, #fff 60% 100%);
  text-shadow: none;
  filter: drop-shadow(0 0 0.25em rgba(255, 220, 250, 0.7));
}

@keyframes f-shine {
  0%, 30% { background-position: 100% 0; }
  70%, 100% { background-position: 0 0; }
}

.f-pill {
  /* the white glowing row: a circle with the number, then the text */
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.25em 1.4em 0.25em 0.25em;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(232, 200, 250, 0.75));
  border: 0.12em solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0.8em rgba(255, 255, 255, 0.8), inset 0 0 0.6em rgba(255, 255, 255, 0.6);
  color: var(--f-ink);
}

.f-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  border: 0.12em solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.35);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.f-names { display: grid; line-height: 1.1; min-width: 0; }
.f-artist { font-size: 0.62em; opacity: 0.8; }
.f-song { font-size: 1em; font-weight: 600; }
.f-artist, .f-song { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }



.f-heart {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: currentColor;
  -webkit-mask: url("heart.svg") center / contain no-repeat;
  mask: url("heart.svg") center / contain no-repeat;
}

.f-button {
  font: inherit;
  font-weight: 700;
  border: 0.12em solid #fff;
  border-radius: 999px;
  padding: 0.55em 1.4em;
  background: linear-gradient(180deg, #fff, #f1def9);
  color: var(--f-ink);
  box-shadow: 0 0.2em 0.8em rgba(120, 60, 160, 0.25);
  cursor: pointer;
}

.f-button:hover { filter: brightness(1.05); }
.f-button:disabled { opacity: 0.5; cursor: default; }
.f-button.primary { background: linear-gradient(180deg, #a98cff, #7a5ce8); color: #fff; border-color: #e5dcff; }
.f-button.danger { background: linear-gradient(180deg, #ff9ab9, #ef5d8c); color: #fff; border-color: #ffe0ea; }

@media (prefers-reduced-motion: reduce) {
  .f-bg::before, .f-bg::after, .f-shine { animation: none; }
}
