/* ============================================================================
   Shared "Quiz of the Year" theme — TV gameshow energy: purple sunburst
   backdrops, gold bubble-lettering on blue banner plaques, big chunky type.
   Used by game.html, team.html, admin.html, index.html and qrcodes.html.
   ============================================================================ */

:root {
  --bg: #0a0616;
  --bg-2: #150c28;
  --panel: #171223;
  --panel-2: #1f182e;
  --line: #35294a;

  --gold: #ffcc33;
  --gold-dim: #c9971f;
  --red: #e8432b;
  --blue: #2fb6e0;
  --blue-dark: #0c3f63;
  --purple-1: #6a1b9a;
  --purple-2: #c239e0;
  --green: #4cd97b;

  --text: #f7f3ff;
  --text-dim: #a79bc4;

  --radius: 14px;
  --radius-lg: 22px;

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Ambient, low-contrast sunburst texture behind every page — the bold
   version lives in .spectacular for lobby/reveal/end "big moments". */
body {
  background:
    radial-gradient(ellipse 120% 70% at 50% -10%, rgba(194, 57, 224, 0.14), transparent 60%),
    repeating-conic-gradient(from 0deg at 50% 15%, rgba(106, 27, 154, 0.10) 0deg 9deg, rgba(10, 6, 22, 0) 9deg 18deg),
    radial-gradient(ellipse 100% 60% at 50% 110%, rgba(255, 204, 51, 0.06), transparent 60%),
    var(--bg);
  min-height: 100%;
}

h1,
h2,
h3,
.display {
  font-family: "Fredoka", "Rubik", sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0;
}

a {
  color: inherit;
}

.dim {
  color: var(--text-dim);
}

.gold {
  color: var(--gold);
}
.red {
  color: var(--red);
}
.blue {
  color: var(--blue);
}
.green {
  color: var(--green);
}

/* ---------------------------------------------------------------------- */
/* Bubble-letter hero title — the "TV logo" treatment. Gold fill, thick   */
/* navy outline, hard drop shadow. Use sparingly, for marquee moments.    */
/* ---------------------------------------------------------------------- */
.bfq-title {
  font-family: "Luckiest Guy", "Fredoka", cursive;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--gold);
  letter-spacing: 0.01em;
  line-height: 1.05;
  -webkit-text-stroke: 3px var(--blue-dark);
  text-stroke: 3px var(--blue-dark);
  text-shadow: 4px 4px 0 var(--blue-dark), 4px 4px 0 var(--blue-dark), 0 10px 26px rgba(0, 0, 0, 0.55);
  margin: 0;
}

/* Rounded banner/plaque behind a title — the blue "badge" the bubble     */
/* letters sit on in classic gameshow logo cards.                        */
.plaque {
  display: inline-block;
  background: linear-gradient(180deg, #3fc4ea 0%, #0f6fa8 55%, #0c3f63 100%);
  border: 4px solid var(--gold);
  border-radius: 28px;
  padding: 14px 36px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35), 0 14px 28px rgba(0, 0, 0, 0.5);
}
.plaque.plaque-sm {
  border-width: 3px;
  border-radius: 16px;
  padding: 8px 20px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), 0 8px 16px rgba(0, 0, 0, 0.45);
}

/* ---------------------------------------------------------------------- */
/* Spectacular backdrop — rotating purple sunburst + vignette, confined   */
/* to whatever element carries the class (a screen/section), so content   */
/* elsewhere stays clean and minimal.                                    */
/* ---------------------------------------------------------------------- */
.spectacular {
  position: relative;
  overflow: hidden;
}
.spectacular::before {
  content: "";
  position: absolute;
  inset: -35%;
  background: repeating-conic-gradient(from 0deg at 50% 50%, var(--purple-2) 0deg 9deg, var(--purple-1) 9deg 18deg);
  opacity: 0.85;
  z-index: 0;
  animation: spin 100s linear infinite;
}
.spectacular::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 45%, rgba(10, 6, 22, 0.08) 0%, rgba(10, 6, 22, 0.93) 75%);
  z-index: 1;
}
.spectacular > * {
  position: relative;
  z-index: 2;
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */
.btn {
  font-family: "Fredoka", "Rubik", sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 16px;
  border: none;
  border-radius: 999px;
  padding: 14px 26px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:active {
  transform: scale(0.96);
}
.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--gold);
  color: #1a1305;
  box-shadow: 0 4px 0 var(--gold-dim), var(--shadow);
}
.btn-primary:active:not(:disabled) {
  box-shadow: 0 1px 0 var(--gold-dim);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--line);
}
.btn-outline:hover {
  border-color: var(--gold);
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-block {
  width: 100%;
  display: block;
}

.btn-lg {
  font-size: 20px;
  padding: 18px 32px;
}

.btn-icon {
  border-radius: 999px;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  padding: 0;
}

/* ---------------------------------------------------------------------- */
/* Cards / panels                                                          */
/* ---------------------------------------------------------------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  flex: none;
}
.badge-dot.on {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dim);
  transition: all 0.2s ease;
}
.chip.connected {
  color: var(--text);
  border-color: var(--blue);
}
.chip.answered {
  background: rgba(255, 204, 51, 0.14);
  border-color: var(--gold);
  color: var(--gold);
}

/* "Rubber stamp" badge — for the TV-gameshow "LOCKED IN" / "CORRECT" beat */
.stamp {
  display: inline-block;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
  border: 3px solid var(--green);
  border-radius: 10px;
  padding: 6px 16px;
  transform: rotate(-4deg);
  animation: stamp-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes stamp-in {
  0% {
    transform: rotate(-4deg) scale(1.8);
    opacity: 0;
  }
  100% {
    transform: rotate(-4deg) scale(1);
    opacity: 1;
  }
}

/* ---------------------------------------------------------------------- */
/* Scrollbar (webkit) — subtle, dark                                       */
/* ---------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 10px;
}

/* ---------------------------------------------------------------------- */
/* Small utility                                                           */
/* ---------------------------------------------------------------------- */
.center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.stack {
  display: flex;
  flex-direction: column;
}
.row {
  display: flex;
  align-items: center;
}
.gap-1 {
  gap: 8px;
}
.gap-2 {
  gap: 16px;
}
.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pop {
  0% {
    transform: scale(0.85) rotate(-2deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.04) rotate(1deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}
