:root {
  --bg: #0c1020;
  --panel: #151b33;
  --panel2: #1e2747;
  --text: #f4f7fb;
  --muted: #aeb8d0;
  --accent: #7bdff2;
  --accent2: #f6d365;
  --danger: #ff6b6b;
  --ok: #7cffb2;
  --border: rgba(255,255,255,.12);
  --shadow: 0 20px 70px rgba(0,0,0,.28);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% 10%, #24315f 0, transparent 28%), radial-gradient(circle at 80% 0%, #234b55 0, transparent 24%), var(--bg);
  color: var(--text);
}
a { color: inherit; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0; }
.admin-container { width: min(1920px, calc(100% - 32px)); }
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.035));
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
}
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 360px 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
h1, h2, h3 { margin: 0 0 14px; line-height: 1.05; }
h1 { font-size: clamp(32px, 6vw, 72px); letter-spacing: -0.05em; }
h2 { font-size: clamp(24px, 4vw, 44px); letter-spacing: -0.04em; }
h3 { font-size: 20px; }
p { color: var(--muted); line-height: 1.55; }
button, input {
  font: inherit;
  border: 0;
  border-radius: 14px;
}
input {
  width: 100%;
  padding: 15px 16px;
  background: rgba(255,255,255,.1);
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
}
button {
  padding: 14px 16px;
  background: var(--accent);
  color: #07111a;
  cursor: pointer;
  font-weight: 800;
}
button.secondary { background: rgba(255,255,255,.12); color: var(--text); border: 1px solid var(--border); }
button.warning { background: var(--accent2); }
button.danger { background: var(--danger); color: white; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.submit-answer {
  width: 100%;
  background: var(--ok);
  color: #06120c;
  border: 1px solid rgba(124,255,178,.7);
  box-shadow: 0 10px 28px rgba(124,255,178,.18);
}
button.submit-answer.answer-received {
  background: rgba(124,255,178,.22);
  color: var(--text);
  border-color: rgba(124,255,178,.85);
  opacity: 1;
}
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stack { display: grid; gap: 12px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.1); color: var(--muted); border: 1px solid var(--border); }
.qr { width: 100%; border-radius: 18px; background: white; padding: 10px; }
.admin-qr {
  max-width: 190px;
  margin: 0 auto;
  display: block;
}
.bigQuestion { font-size: clamp(30px, 5vw, 70px); font-weight: 900; letter-spacing: -0.05em; }
.question-media-stack {
  display: grid;
  gap: 18px;
  margin: 26px auto 0;
  max-width: 920px;
}
.question-media {
  margin: 0;
}
.question-image {
  display: block;
  width: 100%;
  max-height: 52vh;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(0,0,0,.24);
  border: 1px solid var(--border);
}
.mobile-question-media {
  margin: 0 0 14px;
}
.mobile-question-media .question-image {
  max-height: 34vh;
}
.image-preview-box {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.06);
}
.image-preview-box img {
  display: block;
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
  margin: 0 auto;
}
.image-error {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255,107,107,.16);
  border: 1px solid rgba(255,107,107,.62);
  color: var(--text);
  text-align: center;
}
.question-audio {
  display: grid;
  gap: 10px;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.11);
  border: 1px solid var(--border);
  text-align: left;
}
.question-audio audio {
  width: 100%;
}
.question-youtube {
  width: min(100%, 960px);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(0,0,0,.24);
  border: 1px solid var(--border);
}
.question-youtube iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.question-youtube video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  color: var(--text);
}
.check-row input {
  width: auto;
}
.option {
  width: 100%;
  text-align: left;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.11);
  border: 1px solid var(--border);
  color: var(--text);
}
.option.selected { outline: 3px solid var(--accent); background: rgba(123,223,242,.18); }
.answer-warning {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(246,211,101,.14);
  border: 1px solid rgba(246,211,101,.42);
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}
.countdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(246,211,101,.14);
  border: 1px solid rgba(246,211,101,.48);
  color: var(--text);
}
.countdown strong {
  font-size: 28px;
  line-height: 1;
}
.countdown-low {
  background: rgba(255,107,107,.18);
  border-color: rgba(255,107,107,.72);
}
.option.answer-correct,
.answer-feedback.answer-correct {
  border-color: rgba(124,255,178,.75);
  background: rgba(124,255,178,.18);
  color: var(--text);
}
.option.answer-wrong,
.answer-feedback.answer-wrong {
  border-color: rgba(255,107,107,.78);
  background: rgba(255,107,107,.18);
  color: var(--text);
}
.answer-feedback {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
}
.correct-answer-pop {
  display: inline-block;
  color: var(--ok);
  font-weight: 900;
  animation: correctAnswerPop .9s cubic-bezier(.2,.9,.25,1.2) both;
  transform-origin: center;
}
.leaderboard { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.result-list {
  width: min(912px, 100%);
  max-width: 912px;
  margin: 24px auto 0;
  text-align: left;
}
.scoreboard-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(1120px, 100%);
  margin: 20px auto 0;
  text-align: left;
}
.scorebar-row {
  order: var(--start-order, var(--rank-order, 0));
  display: grid;
  grid-template-columns: 54px minmax(150px, 280px) minmax(160px, 1fr) 92px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  will-change: transform;
}
.scoreboard-bars.is-sorted .scorebar-row {
  order: var(--rank-order, 0);
}
.scorebar-rank {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: var(--muted);
  font-size: 20px;
  font-weight: 900;
  opacity: 0;
  transform: scale(.84);
  transition: opacity .3s ease, transform .3s ease, background .3s ease, color .3s ease;
}
.scoreboard-bars.is-sorted .scorebar-rank {
  opacity: 1;
  transform: scale(1);
  background: rgba(124,255,178,.22);
  color: var(--text);
}
.scorebar-name {
  font-size: clamp(16px, 1.7vw, 26px);
  font-weight: 900;
  overflow-wrap: anywhere;
}
.scorebar-track {
  height: 24px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.13);
}
.scorebar-fill {
  width: var(--previous-bar-width, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #f6d365);
  transition: width 1.35s cubic-bezier(.2,.8,.2,1);
}
.scoreboard-bars.is-animating .scorebar-fill {
  width: var(--bar-width, 0%);
}
.scorebar-score {
  justify-self: end;
  font-size: clamp(16px, 1.55vw, 24px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 86px;
}
.scorebar-gain {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(124,255,178,.2);
  color: var(--ok);
  border: 1px solid rgba(124,255,178,.45);
  font-size: 16px;
  line-height: 1.1;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease;
}
.scoreboard-bars.is-animating .scorebar-gain {
  opacity: 1;
  transform: translateY(0);
}
.podium {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: end;
  gap: 12px;
  width: min(900px, 100%);
  margin: 24px auto;
}
.podium-place {
  position: relative;
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 150px;
  padding: 18px 12px;
  border-radius: 18px 18px 8px 8px;
  background: rgba(255,255,255,.1);
  border: 1px solid var(--border);
  text-align: center;
}
.podium-1 {
  min-height: 220px;
  background: linear-gradient(180deg, rgba(255,226,122,.42), rgba(181,122,28,.26));
  border-color: rgba(255,215,0,.9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.36), 0 16px 34px rgba(255,198,41,.14);
}
.podium-2 {
  min-height: 180px;
  background: linear-gradient(180deg, rgba(238,243,248,.34), rgba(130,143,156,.22));
  border-color: rgba(214,226,238,.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32);
}
.podium-3 {
  min-height: 150px;
  background: linear-gradient(180deg, rgba(205,127,50,.36), rgba(118,68,32,.24));
  border-color: rgba(205,127,50,.84);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}
.podium-animate {
  opacity: 0;
  transform: translateY(42px) scale(.94);
  animation: podiumRise 1.4s cubic-bezier(.2,.8,.2,1) forwards;
}
.podium-delay-3 { animation-delay: .25s; }
.podium-delay-2 { animation-delay: 1.9s; }
.podium-delay-1 { animation-delay: 4.3s; }
.podium-manual .podium-animate {
  animation-delay: .1s;
}
.podium-unrevealed strong,
.podium-unrevealed span {
  visibility: hidden;
}
.podium-rank {
  font-size: 28px;
  font-weight: 900;
}
.podium-place strong {
  font-size: clamp(18px, 3vw, 30px);
  overflow-wrap: anywhere;
}
.podium-place span { color: var(--muted); }
.podium-empty { opacity: .45; }
.confetti-rain {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(1640px, 170vw);
  height: min(900px, 90vh);
  pointer-events: none;
  overflow: visible;
  opacity: 1;
  transform: translate(-50%, -40px);
}
.confetti-rain span {
  position: absolute;
  top: 0;
  left: 50%;
  --explode-x: 0px;
  --explode-y: -120px;
  --drift-x: 0px;
  --fall-y: 840px;
  --rotate: 0deg;
  --delay: 0s;
  width: 18px;
  height: 30px;
  border-radius: 3px;
  background: #f6d365;
  opacity: .95;
  transform: rotate(var(--rotate, 0deg));
  animation: confettiBlast 3s ease-out calc(4.55s + var(--delay, 0s)) infinite;
}
.confetti-rain span:nth-child(6n+1) { --drift-x: -320px; }
.confetti-rain span:nth-child(6n+2) { --drift-x: -190px; }
.confetti-rain span:nth-child(6n+3) { --drift-x: -70px; }
.confetti-rain span:nth-child(6n+4) { --drift-x: 90px; }
.confetti-rain span:nth-child(6n+5) { --drift-x: 210px; }
.confetti-rain span:nth-child(6n) { --drift-x: 340px; }
.confetti-rain span:nth-child(1) { --explode-x: -260px; --explode-y: -250px; --fall-x: -22%; --delay: 0s; --rotate: 8deg; background: #f6d365; }
.confetti-rain span:nth-child(2) { --explode-x: -190px; --explode-y: -290px; --fall-x: -8%; --delay: .08s; --rotate: 42deg; background: #7cffb2; }
.confetti-rain span:nth-child(3) { --explode-x: -120px; --explode-y: -320px; --fall-x: 4%; --delay: .14s; --rotate: 75deg; background: #6bbcff; }
.confetti-rain span:nth-child(4) { --explode-x: -40px; --explode-y: -335px; --fall-x: 14%; --delay: .04s; --rotate: 18deg; background: #ff6b6b; }
.confetti-rain span:nth-child(5) { --explode-x: 42px; --explode-y: -330px; --fall-x: 24%; --delay: .2s; --rotate: 110deg; background: #ffffff; }
.confetti-rain span:nth-child(6) { --explode-x: 120px; --explode-y: -312px; --fall-x: 35%; --delay: .12s; --rotate: 64deg; background: #f6d365; }
.confetti-rain span:nth-child(7) { --explode-x: 190px; --explode-y: -275px; --fall-x: 48%; --delay: .03s; --rotate: 150deg; background: #7cffb2; }
.confetti-rain span:nth-child(8) { --explode-x: 260px; --explode-y: -235px; --fall-x: 62%; --delay: .18s; --rotate: 30deg; background: #6bbcff; }
.confetti-rain span:nth-child(9) { --explode-x: -300px; --explode-y: -170px; --fall-x: 76%; --delay: .25s; --rotate: 96deg; background: #ff6b6b; }
.confetti-rain span:nth-child(10) { --explode-x: -230px; --explode-y: -215px; --fall-x: 88%; --delay: .31s; --rotate: 124deg; background: #ffffff; }
.confetti-rain span:nth-child(11) { --explode-x: 230px; --explode-y: -208px; --fall-x: 102%; --delay: .22s; --rotate: 22deg; background: #f6d365; }
.confetti-rain span:nth-child(12) { --explode-x: 310px; --explode-y: -160px; --fall-x: 116%; --delay: .1s; --rotate: 88deg; background: #7cffb2; }
.confetti-rain span:nth-child(13) { --explode-x: -175px; --explode-y: -250px; --fall-x: -18%; --delay: .38s; --rotate: 133deg; background: #6bbcff; }
.confetti-rain span:nth-child(14) { --explode-x: -90px; --explode-y: -280px; --fall-x: -2%; --delay: .46s; --rotate: 17deg; background: #ff6b6b; }
.confetti-rain span:nth-child(15) { --explode-x: 0px; --explode-y: -345px; --fall-x: 10%; --delay: .34s; --rotate: 56deg; background: #ffffff; }
.confetti-rain span:nth-child(16) { --explode-x: 95px; --explode-y: -285px; --fall-x: 22%; --delay: .42s; --rotate: 101deg; background: #f6d365; }
.confetti-rain span:nth-child(17) { --explode-x: 175px; --explode-y: -250px; --fall-x: 34%; --delay: .5s; --rotate: 142deg; background: #7cffb2; }
.confetti-rain span:nth-child(18) { --explode-x: -285px; --explode-y: -220px; --fall-x: 46%; --delay: .57s; --rotate: 34deg; background: #6bbcff; }
.confetti-rain span:nth-child(19) { --explode-x: -215px; --explode-y: -260px; --fall-x: 58%; --delay: .64s; --rotate: 76deg; background: #ff6b6b; }
.confetti-rain span:nth-child(20) { --explode-x: -55px; --explode-y: -300px; --fall-x: 70%; --delay: .52s; --rotate: 119deg; background: #ffffff; }
.confetti-rain span:nth-child(21) { --explode-x: 58px; --explode-y: -300px; --fall-x: 82%; --delay: .7s; --rotate: 12deg; background: #f6d365; }
.confetti-rain span:nth-child(22) { --explode-x: 215px; --explode-y: -255px; --fall-x: 94%; --delay: .6s; --rotate: 155deg; background: #7cffb2; }
.confetti-rain span:nth-child(23) { --explode-x: 285px; --explode-y: -215px; --fall-x: 106%; --delay: .74s; --rotate: 52deg; background: #6bbcff; }
.confetti-rain span:nth-child(24) { --explode-x: 20px; --explode-y: -250px; --fall-x: 118%; --delay: .82s; --rotate: 97deg; background: #ff6b6b; }
.confetti-rain span:nth-child(25) { --explode-x: -340px; --explode-y: -120px; --fall-x: -24%; --fall-y: 760px; --delay: .9s; --rotate: 145deg; background: #ffffff; }
.confetti-rain span:nth-child(26) { --explode-x: -280px; --explode-y: -185px; --fall-x: -12%; --fall-y: 820px; --delay: .98s; --rotate: 44deg; background: #f6d365; }
.confetti-rain span:nth-child(27) { --explode-x: -220px; --explode-y: -235px; --fall-x: 0%; --fall-y: 900px; --delay: 1.06s; --rotate: 99deg; background: #7cffb2; }
.confetti-rain span:nth-child(28) { --explode-x: -150px; --explode-y: -270px; --fall-x: 8%; --fall-y: 790px; --delay: 1.14s; --rotate: 22deg; background: #6bbcff; }
.confetti-rain span:nth-child(29) { --explode-x: -75px; --explode-y: -305px; --fall-x: 16%; --fall-y: 860px; --delay: .86s; --rotate: 132deg; background: #ff6b6b; }
.confetti-rain span:nth-child(30) { --explode-x: 0px; --explode-y: -320px; --fall-x: 24%; --fall-y: 930px; --delay: .94s; --rotate: 68deg; background: #ffffff; }
.confetti-rain span:nth-child(31) { --explode-x: 75px; --explode-y: -305px; --fall-x: 32%; --fall-y: 770px; --delay: 1.02s; --rotate: 14deg; background: #f6d365; }
.confetti-rain span:nth-child(32) { --explode-x: 150px; --explode-y: -270px; --fall-x: 40%; --fall-y: 840px; --delay: 1.1s; --rotate: 157deg; background: #7cffb2; }
.confetti-rain span:nth-child(33) { --explode-x: 220px; --explode-y: -235px; --fall-x: 48%; --fall-y: 900px; --delay: 1.18s; --rotate: 52deg; background: #6bbcff; }
.confetti-rain span:nth-child(34) { --explode-x: 280px; --explode-y: -185px; --fall-x: 56%; --fall-y: 790px; --delay: 1.26s; --rotate: 115deg; background: #ff6b6b; }
.confetti-rain span:nth-child(35) { --explode-x: 340px; --explode-y: -120px; --fall-x: 64%; --fall-y: 870px; --delay: .88s; --rotate: 83deg; background: #ffffff; }
.confetti-rain span:nth-child(36) { --explode-x: -360px; --explode-y: -70px; --fall-x: 72%; --fall-y: 940px; --delay: .96s; --rotate: 31deg; background: #f6d365; }
.confetti-rain span:nth-child(37) { --explode-x: -305px; --explode-y: -145px; --fall-x: 80%; --fall-y: 780px; --delay: 1.04s; --rotate: 174deg; background: #7cffb2; }
.confetti-rain span:nth-child(38) { --explode-x: -245px; --explode-y: -205px; --fall-x: 88%; --fall-y: 850px; --delay: 1.12s; --rotate: 37deg; background: #6bbcff; }
.confetti-rain span:nth-child(39) { --explode-x: -110px; --explode-y: -245px; --fall-x: 96%; --fall-y: 920px; --delay: 1.2s; --rotate: 127deg; background: #ff6b6b; }
.confetti-rain span:nth-child(40) { --explode-x: 110px; --explode-y: -245px; --fall-x: 104%; --fall-y: 800px; --delay: 1.28s; --rotate: 73deg; background: #ffffff; }
.confetti-rain span:nth-child(41) { --explode-x: 245px; --explode-y: -205px; --fall-x: 112%; --fall-y: 870px; --delay: 1.36s; --rotate: 9deg; background: #f6d365; }
.confetti-rain span:nth-child(42) { --explode-x: 305px; --explode-y: -145px; --fall-x: 120%; --fall-y: 930px; --delay: 1.44s; --rotate: 151deg; background: #7cffb2; }
.confetti-rain span:nth-child(43) { --explode-x: 360px; --explode-y: -70px; --fall-x: -20%; --fall-y: 810px; --delay: 1.32s; --rotate: 58deg; background: #6bbcff; }
.confetti-rain span:nth-child(44) { --explode-x: -390px; --explode-y: -30px; --fall-x: 12%; --fall-y: 880px; --delay: 1.4s; --rotate: 107deg; background: #ff6b6b; }
.confetti-rain span:nth-child(45) { --explode-x: -20px; --explode-y: -360px; --fall-x: 44%; --fall-y: 940px; --delay: 1.48s; --rotate: 26deg; background: #ffffff; }
.confetti-rain span:nth-child(46) { --explode-x: 20px; --explode-y: -360px; --fall-x: 68%; --fall-y: 820px; --delay: 1.56s; --rotate: 139deg; background: #f6d365; }
.confetti-rain span:nth-child(47) { --explode-x: 390px; --explode-y: -30px; --fall-x: 92%; --fall-y: 890px; --delay: 1.64s; --rotate: 66deg; background: #7cffb2; }
.confetti-rain span:nth-child(48) { --explode-x: 0px; --explode-y: -390px; --fall-x: 50%; --fall-y: 960px; --delay: 1.72s; --rotate: 121deg; background: #6bbcff; }
.leaderboard li, .answer-row, .team-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--border);
}
.quiz-library-row {
  align-items: center;
}
.quiz-title-link {
  color: var(--text);
  text-decoration: none;
}
.quiz-title-link:hover {
  text-decoration: underline;
}
.quiz-actions {
  justify-content: flex-end;
}
.admin-preview-top {
  margin-top: 0;
  margin-bottom: 14px;
  padding: 18px 20px;
}
.admin-container {
  padding-top: 12px;
}
.admin-preview-heading {
  display: grid;
  gap: 2px;
}
.admin-title-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  min-width: 0;
}
.admin-preview-heading h1 {
  margin: 0;
  font-size: clamp(34px, 3.6vw, 58px);
}
.admin-join-info {
  color: var(--muted);
  font-size: clamp(12px, .9vw, 15px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.admin-preview-heading h2 {
  margin: 0;
  font-size: clamp(22px, 2.5vw, 36px);
}
.admin-question-count {
  margin-left: auto;
  color: var(--text);
  font-size: clamp(34px, 3.6vw, 58px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  text-align: right;
  white-space: nowrap;
}
.admin-preview-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.admin-preview-actions .badge {
  padding: 7px 10px;
  font-size: clamp(12px, .9vw, 15px);
  line-height: 1.1;
  text-align: center;
}
.admin-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.admin-controls-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.admin-controls-left {
  justify-content: flex-start;
}
.admin-controls-right {
  justify-content: flex-end;
  margin-left: auto;
}
.admin-controls-row button {
  flex: 0 1 auto;
}
.admin-controls-row .icon-btn {
  width: 52px;
  min-width: 52px;
  height: 46px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 28px;
  line-height: 1;
}
.admin-status-grid {
  align-items: start;
}
.admin-control-card {
  min-width: 0;
}
.admin-control-stack {
  display: grid;
  gap: 10px;
}
.admin-control-line {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.admin-control-primary {
  grid-template-columns: 46px 46px minmax(0, 1fr);
}
.admin-control-virtual {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-control-final {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .78fr) minmax(0, .9fr);
}
.admin-control-line button {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 9px 8px;
  border-radius: 12px;
  font-size: clamp(12px, .78vw, 15px);
  line-height: 1.08;
  white-space: normal;
  overflow-wrap: anywhere;
}
.admin-control-line .icon-btn {
  width: 46px;
  min-width: 46px;
  height: 44px;
  padding: 0;
  font-size: 25px;
  white-space: nowrap;
}
.admin-question-card {
  position: relative;
  min-height: 190px;
  padding-bottom: 72px;
}
.admin-countdown {
  position: absolute;
  right: 22px;
  bottom: 18px;
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.admin-countdown.is-closed {
  color: var(--danger);
}
.answer-row.correct { border-color: rgba(124,255,178,.55); }
.answer-row.wrong { border-color: rgba(255,107,107,.55); }
.answer-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.approve-btn {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--ok);
  color: #06120c;
  font-size: 13px;
  line-height: 1;
  border: 1px solid rgba(124,255,178,.7);
}
.revoke-approve-btn {
  background: var(--danger);
  color: white;
  border-color: rgba(255,107,107,.75);
}
.small { font-size: 14px; color: var(--muted); }
.hidden { display: none !important; }
.hero { min-height: 100vh; display: grid; align-items: center; }
.center { text-align: center; }
.join-box { max-width: 520px; margin: 0 auto; }
.footer-note { margin-top: 18px; color: var(--muted); font-size: 14px; }
.presentation-body {
  overflow: hidden;
  background: #05070f;
}
.presentation-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #05070f;
}
.presentation-stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1920px;
  height: 1080px;
  transform-origin: center center;
  background: radial-gradient(circle at 20% 10%, #24315f 0, transparent 28%), radial-gradient(circle at 80% 0%, #234b55 0, transparent 24%), var(--bg);
  display: grid;
  place-items: center;
  padding: 36px;
}
.presentation-card {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  padding: 40px 56px;
  overflow: hidden;
}
.presentation-stage.has-lobby-image-slide .presentation-card {
  padding: 0;
}
.presentation-stage.has-lobby-image-slide .presentation-meta-row {
  display: none;
}
.presentation-stage.has-lobby-image-slide .presentation-fullscreen {
  display: none;
}
#mainContent {
  min-height: 0;
  height: 100%;
  display: grid;
  overflow: hidden;
  position: relative;
}
.leaderboard-overlay-backdrop {
  position: absolute;
  inset: 0;
  display: grid;
  overflow: hidden;
  filter: blur(8px);
  transform: scale(1.025);
  opacity: .42;
  pointer-events: none;
}
.leaderboard-overlay-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5,7,15,.44);
}
.leaderboard-overlay-window {
  position: relative;
  z-index: 2;
  align-self: center;
  justify-self: center;
  width: min(1560px, 94%);
  max-height: 90%;
  overflow: hidden;
  padding: 42px 54px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(15,20,38,.68);
  box-shadow: 0 32px 90px rgba(0,0,0,.42);
  backdrop-filter: blur(24px) saturate(130%);
  -webkit-backdrop-filter: blur(24px) saturate(130%);
}
.leaderboard-overlay-window h1 {
  margin-bottom: 8px;
  font-size: 54px;
}
.leaderboard-overlay-window .scoreboard-bars {
  width: 100%;
  max-height: 760px;
  overflow: hidden;
  gap: 8px;
  margin-top: 14px;
}
.leaderboard-overlay-window .scorebar-row {
  grid-template-columns: 42px minmax(140px, 260px) minmax(160px, 1fr) 82px;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 11px;
}
.leaderboard-overlay-window .scorebar-rank {
  width: 32px;
  height: 32px;
  font-size: 17px;
}
.leaderboard-overlay-window .scorebar-name {
  font-size: clamp(16px, 1.35vw, 22px);
}
.leaderboard-overlay-window .scorebar-track {
  height: 19px;
}
.leaderboard-overlay-window .scorebar-score {
  font-size: clamp(15px, 1.25vw, 20px);
  min-width: 76px;
}
.leaderboard-overlay-window .scorebar-gain {
  font-size: 13px;
  padding: 2px 7px;
}
.presentation-fullscreen {
  position: absolute;
  top: 28px;
  right: 28px;
  z-index: 5;
}
.presentation-countdown {
  position: absolute;
  right: 72px;
  bottom: 54px;
  z-index: 4;
  font-size: 86px;
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.presentation-answer-count {
  position: absolute;
  right: 72px;
  bottom: 150px;
  z-index: 4;
  font-size: 86px;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.presentation-countdown.is-closed {
  color: var(--danger);
  font-size: 43px;
}
.presentation-countdown.is-low {
  color: var(--danger);
}
:fullscreen .presentation-fullscreen {
  display: none;
}
.presentation-stage .bigQuestion {
  max-width: 100%;
  font-size: clamp(48px, 4vw, 78px);
  line-height: 1.02;
  overflow-wrap: anywhere;
}
.presentation-stage .option-grid {
  width: 100%;
  max-width: 1320px !important;
  min-height: 0;
  overflow: auto;
}
.presentation-stage .option {
  font-size: clamp(22px, 1.55vw, 30px);
  line-height: 1.18;
  overflow-wrap: anywhere;
}
.presentation-question {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, auto) minmax(0, 1fr) auto;
  justify-items: center;
  align-content: stretch;
  gap: 22px;
  overflow: hidden;
}
.presentation-answer-reveal {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}
.presentation-answer-reveal h1 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(52px, 4vw, 78px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}
.answer-distribution {
  width: min(1180px, 100%);
  min-height: 210px;
  max-height: 280px;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-self: stretch;
}
.compact-correct-answer {
  margin: 0;
  color: var(--ok);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
}
.compact-correct-answer strong {
  font-weight: 950;
}
.answer-distribution-axis {
  border-right: 2px solid rgba(255,255,255,.38);
  border-bottom: 2px solid rgba(255,255,255,.38);
}
.answer-distribution-bars {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(var(--answer-count), minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.answer-distribution-item {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 7px;
  align-items: end;
  justify-items: center;
}
.answer-distribution-value {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}
.answer-distribution-bar {
  width: min(100%, 74px);
  height: var(--bar-height);
  min-height: 8px;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, var(--accent), var(--ok));
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
.answer-distribution-label {
  width: 100%;
  min-height: 34px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.answer-distribution-item.is-correct .answer-distribution-label {
  color: var(--ok);
}
.answer-distribution-item.is-wrong .answer-distribution-label {
  color: var(--danger);
}
.answer-distribution-item.is-correct .answer-distribution-bar {
  background: linear-gradient(180deg, var(--ok), #1fd56d);
}
.answer-distribution-item.is-wrong .answer-distribution-bar {
  background: linear-gradient(180deg, #ff9a9a, var(--danger));
}
.presentation-mobile-hint,
.presentation-answer-status {
  align-self: end;
}
.presentation-question-description {
  max-width: 1180px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(28px, 2vw, 40px);
  line-height: 1.18;
  overflow-wrap: anywhere;
}
.presentation-stage .question-media-stack {
  width: 100%;
  max-width: 1320px;
  min-height: 0;
  margin-top: 0;
  overflow: hidden;
}
.presentation-stage .question-image {
  max-height: min(52vh, 500px);
}
.presentation-stage .question-youtube {
  width: min(100%, 889px);
  max-height: min(52vh, 500px);
}
.presentation-text-slide {
  display: grid;
  justify-items: center;
  gap: 28px;
  max-width: 1320px;
  margin: 0 auto;
}
.presentation-text-slide p {
  font-size: 42px;
  line-height: 1.25;
  max-width: 1180px;
  margin: 0;
}
.presentation-image-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  place-items: center;
  background: #05070f;
}
.presentation-image-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.presentation-lobby {
  display: grid;
  justify-items: center;
  gap: 28px;
  text-align: center;
  width: 100%;
  height: 100%;
  align-content: center;
}
.presentation-lobby-join {
  position: relative;
  width: min(1580px, 100%);
  min-height: 640px;
  display: grid;
  place-items: center;
}
.presentation-lobby.has-lobby-image .presentation-lobby-join {
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  justify-items: stretch;
  place-items: stretch;
}
.presentation-lobby-qr-wrap {
  display: grid;
  justify-items: center;
  gap: 18px;
  position: relative;
  z-index: 3;
}
.presentation-lobby.has-lobby-image .presentation-lobby-qr-wrap {
  align-content: start;
  justify-items: start;
  text-align: left;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  grid-column: 1;
  padding: 32px;
  background: rgba(5,7,15,.38);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}
.presentation-lobby-qr {
  width: 360px;
  max-width: 100%;
}
.presentation-lobby.has-lobby-image .presentation-lobby-qr {
  width: 360px;
  max-width: 100%;
}
.presentation-lobby-scan-text {
  margin: 0;
  max-width: 340px;
  color: var(--muted);
  font-size: 24px;
  line-height: 1.25;
}
.presentation-lobby-code {
  font-size: 28px;
  justify-self: center;
}
.presentation-lobby.has-lobby-image .presentation-lobby-code {
  justify-self: start;
}
.presentation-lobby-image-wrap {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  background: rgba(255,255,255,.06);
}
.presentation-lobby-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.presentation-lobby-team-list {
  align-self: stretch;
  display: grid;
  grid-auto-rows: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  padding: 0 20px;
}
.presentation-lobby-team-list-item {
  display: grid;
  align-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.presentation-lobby-team-list .presentation-lobby-team {
  width: 100%;
  max-width: 100%;
  justify-content: flex-start;
  padding: 10px 16px;
  border-width: 2px;
  font-size: 22px;
  line-height: 1.08;
  transform-origin: center center;
  animation-name: lobbyTeamPopContained, lobbyTeamPulseContained;
}
.presentation-lobby-team-list .presentation-lobby-team strong {
  max-width: 100%;
}
.presentation-lobby-team-list.is-compact {
  gap: 6px;
}
.presentation-lobby-team-list.is-compact .presentation-lobby-team {
  font-size: 18px;
  padding: 7px 12px;
}
.presentation-lobby-team-list.is-dense {
  gap: 5px;
}
.presentation-lobby-team-list.is-dense .presentation-lobby-team {
  font-size: 15px;
  padding: 5px 10px;
}
.presentation-lobby-team-list.is-ultra-dense {
  gap: 4px;
}
.presentation-lobby-team-list.is-ultra-dense .presentation-lobby-team {
  font-size: 12px;
  padding: 4px 8px;
}
.presentation-lobby-teams {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px minmax(0, 1fr);
  grid-auto-rows: minmax(74px, auto);
  align-content: center;
  gap: 10px 18px;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}
.presentation-lobby-team-cell {
  grid-column: 1;
  grid-row: var(--team-row, auto);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  overflow: visible;
  padding: 0 10px;
}
.presentation-lobby-team-cell[style*="--team-side:right"] {
  grid-column: 3;
  justify-content: flex-start;
}
.presentation-lobby-team {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: min(100%, 560px);
  padding: 13px 20px;
  border-radius: 999px;
  background: rgba(5,7,15,.76);
  border: 2px solid color-mix(in srgb, var(--team-color), white 14%);
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
  color: var(--team-color);
  font-size: clamp(24px, 1.95vw, 38px);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  transform: scale(.2);
  opacity: 0;
  animation:
    lobbyTeamPop .72s cubic-bezier(.18,.9,.22,1.25) var(--team-delay, 0s) forwards,
    lobbyTeamPulse 2.6s ease-in-out calc(var(--team-delay, 0s) + .8s + var(--pulse-delay, 0s)) infinite;
}
.presentation-lobby-team strong {
  display: inline-block;
  min-width: 0;
  max-width: 520px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}
.presentation-lobby-teams-empty {
  position: static;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-size: 34px;
  font-weight: 800;
}
.quiz-settings-card {
  margin-bottom: 20px;
}
.full-preview {
  margin-top: 20px;
}
.presentation-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  align-items: stretch;
}
.presentation-preview-pane {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.presentation-preview-current {
  grid-template-rows: auto 1fr;
}
.presentation-preview-next {
  grid-template-rows: auto auto 1fr;
}
.presentation-preview-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #05070f;
}
.presentation-preview-clickable {
  position: relative;
  width: 100%;
}
.presentation-preview-edit-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 18px;
  cursor: pointer;
}
.presentation-preview-edit-link:hover {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}
.presentation-preview-frame-small {
  aspect-ratio: 16 / 9;
}
.presentation-preview-clickable-small {
  width: 72%;
  justify-self: center;
}
.quizmaster-notes-card {
  min-height: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,255,255,.07);
  overflow: auto;
}
.quizmaster-notes-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}
.quizmaster-notes-text {
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.45;
}
@media (max-width: 850px) {
  .grid-2, .grid-3, .grid-4, .option-grid { grid-template-columns: 1fr; }
  .presentation-preview-grid { grid-template-columns: 1fr; }
  .podium { grid-template-columns: 1fr; align-items: stretch; }
  .podium-1 { order: 1; }
  .podium-2 { order: 2; }
  .podium-3 { order: 3; }
  .podium-1, .podium-2, .podium-3 { min-height: 120px; }
  .scorebar-row {
    grid-template-columns: 34px 1fr 74px;
    gap: 8px;
    padding: 8px 10px;
  }
  .scorebar-track {
    grid-column: 2 / -1;
    height: 18px;
  }
  .scorebar-score {
    justify-self: end;
    font-size: 15px;
    min-width: 68px;
  }
  .scorebar-rank {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
  .scorebar-name {
    font-size: 16px;
  }
  .scoreboard-bars {
    gap: 8px;
    margin-top: 14px;
  }
  .leaderboard-overlay-window {
    width: min(100%, 98%);
    max-height: 92%;
    padding: 20px 16px;
    border-radius: 16px;
  }
  .leaderboard-overlay-window .scoreboard-bars {
    max-height: 78vh;
  }
  .presentation-lobby.has-lobby-image .presentation-lobby-join {
    width: min(100%, 96%);
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }
  .presentation-lobby-image-wrap {
    grid-column: 1;
    grid-row: auto;
    aspect-ratio: 16 / 9;
  }
  .presentation-stage.has-lobby-image-slide .presentation-lobby.has-lobby-image .presentation-lobby-join {
    width: 100%;
    height: 100%;
    grid-template-columns: 400px minmax(0, 1fr);
  }
  .presentation-stage.has-lobby-image-slide .presentation-lobby-image-wrap {
    grid-column: 2;
    grid-row: 1;
    aspect-ratio: auto;
  }
  .presentation-stage.has-lobby-image-slide .presentation-lobby-team-list {
    max-height: 100%;
  }
  .presentation-lobby-team-list {
    max-height: 160px;
  }
  #playPanel.join-box {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
  .container { width: min(100% - 22px, 1180px); padding: 16px 0; }
  .card { padding: 18px; border-radius: 20px; }
  #playPanel.card {
    border-radius: 0;
  }
}

@keyframes podiumRise {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes lobbyTeamPop {
  0% {
    opacity: 0;
    transform: scale(.2);
  }
  62% {
    opacity: 1;
    transform: scale(1.16);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes lobbyTeamPopContained {
  0% {
    opacity: 0;
    transform: scale(.2);
  }
  62% {
    opacity: 1;
    transform: scale(1.018);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes lobbyTeamListPop {
  0% {
    opacity: 0;
    transform: scale(.86);
  }
  70% {
    opacity: 1;
    transform: scale(1.03);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes lobbyTeamPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.045);
  }
}

@keyframes lobbyTeamPulseContained {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.008);
  }
}

@keyframes lobbyTeamListPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.012);
  }
}

@keyframes correctAnswerPop {
  0% {
    transform: scale(.78);
    opacity: .35;
  }
  45% {
    transform: scale(1.18);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes confettiStart {
  to {
    opacity: 1;
  }
}

@keyframes confettiFall {
  0% {
    opacity: 0;
    transform: translateY(-12px) translateX(0) rotate(var(--rotate, 0deg));
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: .9;
    transform: translateY(210px) translateX(28px) rotate(calc(var(--rotate, 0deg) + 270deg));
  }
}

@keyframes confettiBlast {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(.25) rotate(var(--rotate, 0deg));
  }
  10% {
    opacity: 1;
  }
  28% {
    opacity: 1;
    transform: translate(calc(-50% + var(--explode-x)), var(--explode-y)) scale(1.15) rotate(calc(var(--rotate, 0deg) + 130deg));
  }
  82% {
    opacity: .95;
    transform: translate(calc(-50% + var(--explode-x) + var(--drift-x)), calc(var(--fall-y) - 210px)) scale(1) rotate(calc(var(--rotate, 0deg) + 430deg));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--explode-x) + var(--drift-x)), var(--fall-y)) scale(.9) rotate(calc(var(--rotate, 0deg) + 620deg));
  }
}
