:root {
  --bg: #0A0812; --panel: #1a1226cc; --panel2: #2a1b3a; --line: #ff4fd833; --line2: #8f6bff44;
  --text: #FFF6FD; --muted: #C6B6D6; --blue: #2EA8FF; --pink: #FF3FBF; --purple: #8F5BFF; --yellow: #FFD23F;
  --green: #2EE07A; --red: #FF4D6A; --radius: 18px;
  --hfont: 'Lilita One', 'Fredoka', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; color: var(--text); font-family: 'Fredoka', system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { min-height: 100vh; position: relative; overflow-x: hidden;
  background:
    radial-gradient(60vmax 50vmax at 0% 0%, #6b1a5c88, transparent 60%),
    radial-gradient(55vmax 45vmax at 100% 100%, #1b4a6a88, transparent 60%),
    radial-gradient(40vmax 40vmax at 100% 0%, #3b1f7a55, transparent 60%),
    var(--bg);
  background-attachment: fixed; }
/* floating glow blobs make the page feel alive */
body::before, body::after { content: ''; position: fixed; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; }
body::before { width: 46vmax; height: 46vmax; left: -12vmax; top: 30vh; background: #ff3fbf55; animation: drift1 18s ease-in-out infinite alternate; }
body::after { width: 40vmax; height: 40vmax; right: -10vmax; top: -10vmax; background: #2ea8ff44; animation: drift2 22s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(30vw, -25vh) scale(1.2); } }
@keyframes drift2 { to { transform: translate(-30vw, 40vh) scale(.85); } }
#app { position: relative; z-index: 1; }

h1, h2, h3 { margin: 6px 0; font-family: var(--hfont); font-weight: 400; letter-spacing: .3px; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 14px; padding: 12px 18px; background: #2a1b3acc; color: var(--text); font-weight: 600;
  border: 1px solid #ffffff1a; transition: transform .08s, filter .15s, box-shadow .2s; }
button:hover { filter: brightness(1.12); }
button:active { transform: translateY(2px) scale(.98); }
button.primary { background: linear-gradient(135deg, #ff3fbf, #8f5bff); color: #fff; border: 0; box-shadow: 0 6px 0 #5a1f86, 0 0 26px #ff3fbf66; }
button.primary:active { box-shadow: 0 2px 0 #5a1f86, 0 0 26px #ff3fbf66; }
button.pink { background: linear-gradient(135deg, #ffb13f, #ff3f8f); color: #fff; border: 0; box-shadow: 0 6px 0 #8a2a45, 0 0 22px #ff7a3f55; }
button.ghost { background: #ffffff08; border: 1.5px solid #ffffff22; }
button.danger { background: #4a1424aa; color: #ff9fb3; border-color: #ff4d6a44; }
button.small { padding: 8px 12px; font-size: 14px; border-radius: 11px; box-shadow: none; }
button.primary.small { box-shadow: 0 3px 0 #5a1f86; }
button:disabled { opacity: .5; }
input, textarea, select { font: inherit; width: 100%; background: #0d0918cc; color: var(--text); border: 1.5px solid #ffffff1f; border-radius: 14px; padding: 12px 14px; outline: none; transition: border .2s, box-shadow .2s; }
input:focus, textarea:focus, select:focus { border-color: var(--pink); box-shadow: 0 0 0 4px #ff3fbf22; }
label { display: block; font-size: 13px; color: var(--pink); margin: 16px 0 6px; font-family: var(--hfont); letter-spacing: 1px; text-transform: uppercase; }
a { color: var(--blue); }
.wrap { max-width: 720px; margin: 0 auto; padding: 18px 16px 80px; }
.logo { display: block; max-width: 100%; margin: 0 auto; filter: drop-shadow(0 0 24px #ff3fbf55); }
.card { position: relative; background: linear-gradient(140deg, #4a1845b3 0%, #17111fd9 45%, #15243ad9 100%); border: 1px solid #ff4fd840; border-radius: var(--radius); padding: 18px; margin: 14px 0;
  box-shadow: 0 10px 30px #0006, inset 0 1px 0 #ffffff14; backdrop-filter: blur(8px); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small-t { font-size: 14px; }
.err { color: #ff8fa3; font-size: 14px; margin-top: 8px; min-height: 1em; }
.pill { display: inline-block; font-size: 12px; padding: 4px 10px; border-radius: 99px; background: #ffffff12; color: var(--muted); font-weight: 600; }
.pill.mc { background: #12385acc; color: #9fd8ff; } .pill.poll { background: #4a3405cc; color: #ffdb7a; } .pill.people { background: #4d1247cc; color: #ffa6f0; }
.tabs { display: flex; gap: 6px; margin: 14px 0; background: #0d0918b3; padding: 6px; border-radius: 16px; border: 1px solid #ffffff14; }
.tabs button { flex: 1; background: transparent; border: 0; padding: 10px 6px; box-shadow: none; color: var(--muted); }
.tabs button.on { background: linear-gradient(135deg, #ff3fbf, #8f5bff); color: #fff; box-shadow: 0 0 18px #ff3fbf55; }
.center { text-align: center; }
.stack > * + * { margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { padding: 8px 12px; border-radius: 99px; background: #ffffff0d; font-size: 14px; border: 1.5px solid #ffffff1a; box-shadow: none; font-weight: 500; }
.chip.on { border-color: var(--pink); background: #ff3fbf2e; box-shadow: 0 0 14px #ff3fbf44; }
.qitem { display: flex; gap: 12px; align-items: flex-start; }
.qnum { width: 32px; height: 32px; flex: none; border-radius: 10px; background: linear-gradient(135deg, #ff3fbf, #8f5bff); display: grid; place-items: center; font-family: var(--hfont); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: linear-gradient(135deg, #ff3fbf, #8f5bff); color: #fff; padding: 11px 18px; border-radius: 14px; z-index: 99; font-weight: 600; box-shadow: 0 8px 30px #ff3fbf66; animation: pop .3s; }

/* answer tiles: chunky, 3D, game-show */
.tile { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; font-weight: 600; text-align: left; width: 100%;
  box-shadow: inset 0 -6px 0 #0004, inset 0 2px 0 #ffffff40, 0 6px 18px #0005; position: relative; overflow: hidden; }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #ffffff22, transparent 50%); pointer-events: none; }
.tile .sym { width: 36px; height: 36px; flex: none; border-radius: 10px; background: #0003; display: grid; place-items: center; font-size: 20px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tiles.one { grid-template-columns: 1fr; }
.tiles > * { animation: tileIn .45s cubic-bezier(.2,1.4,.4,1) both; }
.tiles > *:nth-child(2) { animation-delay: .07s } .tiles > *:nth-child(3) { animation-delay: .14s } .tiles > *:nth-child(4) { animation-delay: .21s }
.tiles > *:nth-child(5) { animation-delay: .28s } .tiles > *:nth-child(6) { animation-delay: .35s } .tiles > *:nth-child(7) { animation-delay: .42s } .tiles > *:nth-child(8) { animation-delay: .49s }
@keyframes tileIn { from { transform: translateY(30px) scale(.8); opacity: 0; } }

/* phone play */
.play { min-height: 100vh; display: flex; flex-direction: column; padding: 14px; gap: 12px; }
.play .top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); background: #0d0918b3; border: 1px solid #ffffff14; padding: 8px 14px; border-radius: 99px; }
.play .top #sc { color: var(--yellow); font-weight: 600; }
.play .big { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 14px; }
.play .big h2 { font-size: 30px; }
.play .tiles .tile { min-height: 88px; font-size: 19px; }
.play [data-ans] { border: 0; box-shadow: none; padding: 0; background: none; }
.emoji-xl { font-size: 72px; line-height: 1; animation: bounce 1.4s ease-in-out infinite; }
@keyframes bounce { 50% { transform: translateY(-10px) scale(1.05); } }
.pcard { background: linear-gradient(150deg, #5a1a52, #1a1440 60%, #10304a); border: 2px solid var(--pink); border-radius: 22px; padding: 22px; text-align: center; box-shadow: 0 0 40px #ff3fbf55; animation: pop .6s; }

/* ---------- TV ---------- */
.tv { position: fixed; inset: 0; display: flex; flex-direction: column; padding: 2vw 3vw; overflow: hidden; }
.tv::before { content: ''; position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background: conic-gradient(from 0deg at 50% 50%, #ff3fbf18, #2ea8ff14, #8f5bff18, #ffd23f10, #ff3fbf18); animation: spin 30s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sparks { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.sparks i { position: absolute; bottom: -2vw; width: .5vw; height: .5vw; border-radius: 50%; background: #fff; opacity: .6; animation: rise linear infinite; box-shadow: 0 0 1vw currentColor; }
@keyframes rise { to { transform: translateY(-110vh) translateX(4vw); opacity: 0; } }
.tv .bar { display: flex; justify-content: space-between; align-items: center; font-size: 1.5vw; color: var(--muted); }
.tv .bar > span { background: #0d0918b3; border: 1px solid #ffffff1a; padding: .5vw 1.3vw; border-radius: 99px; }
.tv .bar img { filter: drop-shadow(0 0 1vw #ff3fbf88); }
.tv .main { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.tv h1 { font-size: 4vw; text-align: center; line-height: 1.12; margin: 1vw 0 2vw; text-shadow: 0 .3vw 0 #0006, 0 0 2vw #ff3fbf55; animation: pop .5s cubic-bezier(.2,1.4,.4,1); }
.tv .tiles { gap: 1.3vw; }
.tv .tile { font-size: 2.4vw; padding: 1.5vw 1.7vw; border-radius: 1.4vw; box-shadow: inset 0 -.6vw 0 #0004, inset 0 .2vw 0 #ffffff40, 0 .6vw 2vw #0006; }
.tv .tile .sym { width: 3.6vw; height: 3.6vw; font-size: 2vw; border-radius: .9vw; }
.tv .tile.dim { opacity: .25; filter: saturate(.4); }
.tv .qimg { max-height: 28vh; max-width: 60vw; border-radius: 1.2vw; display: block; margin: 0 auto 2vw; box-shadow: 0 0 3vw #ff3fbf55; border: .3vw solid #fff; }
.timer { width: 8vw; height: 8vw; border-radius: 50%; display: grid; place-items: center; font-size: 3.4vw; font-family: var(--hfont); color: #fff;
  background: radial-gradient(circle, #1a1226 58%, transparent 60%), conic-gradient(var(--yellow) var(--p, 100%), #ffffff1a 0); box-shadow: 0 0 2.5vw #ffd23f66; }
.timer.low { background: radial-gradient(circle, #2a0d16 58%, transparent 60%), conic-gradient(var(--red) var(--p, 100%), #ffffff1a 0); box-shadow: 0 0 3vw #ff4d6aaa; animation: pulse .5s infinite alternate; }
@keyframes pulse { to { transform: scale(1.08); } }
.lobby { display: grid; grid-template-columns: 1fr 1.05fr; gap: 3vw; align-items: center; flex: 1; }
.qrbox { background: #fff; padding: 1.4vw; border-radius: 2vw; width: 25vw; margin: 0 auto; box-shadow: 0 0 0 .5vw #ff3fbf, 0 0 0 1vw #8f5bff66, 0 0 5vw #ff3fbf88; animation: glow 2s ease-in-out infinite alternate; }
@keyframes glow { to { box-shadow: 0 0 0 .5vw #2ea8ff, 0 0 0 1vw #ff3fbf66, 0 0 6vw #2ea8ff88; } }
.qrbox img, .qrbox canvas { width: 100%; display: block; }
.scan { font-family: var(--hfont); font-size: 3vw; margin: 0 0 1.4vw; background: linear-gradient(90deg, #ffd23f, #ff3fbf, #2ea8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.code { font-size: 5vw; letter-spacing: .7vw; color: var(--yellow); text-align: center; font-family: var(--hfont); text-shadow: 0 0 2vw #ffd23f88; }
.names { display: flex; flex-wrap: wrap; gap: .9vw; justify-content: center; }
.names span { background: linear-gradient(135deg, #ff3fbf, #8f5bff); padding: .7vw 1.4vw; border-radius: 99px; font-size: 1.8vw; font-weight: 600; box-shadow: 0 .4vw 0 #5a1f86, 0 0 1.5vw #ff3fbf55; animation: popin .5s cubic-bezier(.2,1.6,.4,1); }
.names span:nth-child(3n+2) { background: linear-gradient(135deg, #2ea8ff, #8f5bff); box-shadow: 0 .4vw 0 #1f3f86, 0 0 1.5vw #2ea8ff55; }
.names span:nth-child(3n) { background: linear-gradient(135deg, #ffb13f, #ff3f8f); box-shadow: 0 .4vw 0 #8a2a45, 0 0 1.5vw #ff7a3f55; }
@keyframes popin { from { transform: scale(0) rotate(-12deg); } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.bars { display: flex; align-items: flex-end; justify-content: center; gap: 2vw; height: 30vh; flex: none; margin-top: 1vw; }
.bars .b { width: 9vw; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bars .fill { width: 100%; border-radius: 1.2vw 1.2vw .3vw .3vw; min-height: .6vw; transition: height 1s cubic-bezier(.2,1.3,.3,1); box-shadow: inset 0 -.5vw 0 #0003, inset 0 .3vw 0 #ffffff40; }
.bars .n { font-size: 2.8vw; font-family: var(--hfont); margin-bottom: .5vw; }
.reveal .tile { font-size: 1.9vw; padding: 1vw 1.4vw; }
.slide { text-align: center; animation: pop .6s cubic-bezier(.2,1.4,.4,1); }
.slide .em { font-size: 10vw; line-height: 1; animation: bounce 1.6s ease-in-out infinite; filter: drop-shadow(0 0 2vw #ff3fbf88); }
.slide h2 { font-size: 5vw; margin: 1vw 0; background: linear-gradient(90deg, #ffd23f, #ff7a3f, #ff3fbf); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 1.5vw #ff3fbf66); }
.slide .who { font-size: 5.4vw; font-family: var(--hfont); text-shadow: 0 .3vw 0 #0006; }
.slide p { font-size: 2.4vw; color: var(--muted); max-width: 70vw; margin: 1.5vw auto; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 2vw; margin-top: 3vw; }
.podium .step { width: 18vw; text-align: center; animation: rise2 .9s cubic-bezier(.2,1.3,.3,1) both; }
.podium .step:nth-child(1) { animation-delay: .5s } .podium .step:nth-child(2) { animation-delay: 1.1s } .podium .step:nth-child(3) { animation-delay: 0s }
@keyframes rise2 { from { transform: translateY(40vh); opacity: 0; } }
.podium .blk { border-radius: 1.4vw 1.4vw 0 0; display: grid; place-items: start center; padding-top: 1vw; font-size: 4.4vw; font-family: var(--hfont); box-shadow: inset 0 .4vw 0 #ffffff66, 0 0 3vw #ffd23f44; }
.podium .nm { font-size: 2.6vw; font-family: var(--hfont); margin-bottom: .4vw; }
.podium .sc { font-size: 1.6vw; color: var(--muted); margin-bottom: .6vw; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(20vw, 1fr)); gap: 1.2vw; }
.pgrid > div { background: linear-gradient(140deg, #4a1845b3, #15243ad9); border: 1px solid #ff4fd840; border-radius: 1.4vw; padding: 1.3vw; font-size: 1.7vw; animation: popin .5s both; }
.overlay { position: fixed; inset: 0; background: radial-gradient(circle at 50% 40%, #3a1440f2, #0A0812f7 70%); display: grid; place-items: center; z-index: 50; text-align: center; }
.paused { position: absolute; top: 40%; left: 50%; transform: translate(-50%,-50%); background: linear-gradient(135deg, #ff3fbf, #8f5bff); padding: 1.5vw 4vw; border-radius: 2vw; font-size: 4vw; font-family: var(--hfont); z-index: 5; box-shadow: 0 0 4vw #ff3fbf99; }
.corner { position: fixed; right: 1vw; bottom: 1vw; display: flex; gap: .6vw; opacity: .35; z-index: 60; }
.corner:hover { opacity: 1; }
.eq { display: inline-flex; gap: .25vw; align-items: flex-end; height: 1.6vw; margin-right: .6vw; vertical-align: middle; }
.eq b { width: .35vw; background: var(--pink); border-radius: .2vw; animation: eq .8s ease-in-out infinite alternate; }
.eq b:nth-child(2) { animation-delay: .2s; background: var(--blue); } .eq b:nth-child(3) { animation-delay: .4s; background: var(--yellow); } .eq b:nth-child(4) { animation-delay: .1s; }
@keyframes eq { from { height: 20%; } to { height: 100%; } }

/* logo is neon on black: screen-blend makes the black disappear on any dark background */
img[src='logo.jpg'], img[src='icon.png'] { mix-blend-mode: screen; }
