:root {
  --bg: #12082b;
  --bg2: #1e0f45;
  --card: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.14);
  --text: #fff;
  --muted: #b9acd9;
  --pink: #ff3d8b;
  --gold: #ffc93c;
  --cyan: #39d5ff;
  --green: #3ee8a4;
  --radius: 18px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse 60% 45% at 20% 0%, rgba(255, 61, 139, 0.35), transparent 70%),
    radial-gradient(ellipse 60% 45% at 85% 5%, rgba(57, 213, 255, 0.28), transparent 70%),
    linear-gradient(180deg, var(--bg2), var(--bg) 60%);
  background-attachment: fixed;
}
.hidden { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.1; }
button { font: inherit; cursor: pointer; border: 0; color: inherit; }
input, select {
  font: inherit; color: var(--text); width: 100%;
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; outline: none;
}
input:focus, select:focus { border-color: var(--pink); }
select option { color: #000; }
.muted { color: var(--muted); }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; backdrop-filter: blur(6px);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px; font-weight: 700;
  background: linear-gradient(135deg, var(--pink), #b23cff);
  box-shadow: 0 8px 24px rgba(255, 61, 139, 0.35);
  transition: transform .1s;
}
.btn:active { transform: scale(.96); }
.btn.block { width: 100%; }
.btn.ghost { background: rgba(255, 255, 255, 0.1); box-shadow: none; }
.btn.gold { background: linear-gradient(135deg, #ffd65c, #ff9f1c); color: #2b1600; box-shadow: 0 8px 24px rgba(255, 201, 60, .35); }
.btn:disabled { opacity: .45; cursor: default; }

.avatar {
  width: 64px; height: 64px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 24px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px;
  font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.badge.live { background: var(--pink); animation: pulse 1.4s infinite; }
.badge.next { background: rgba(255, 255, 255, .15); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,61,139,.7);} 50% { box-shadow: 0 0 0 10px rgba(255,61,139,0);} }

.meter { height: 14px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.meter > i {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--gold));
  transition: width .6s ease;
}

/* lucky wheel — game-show style */
.wheel { position: relative; width: var(--wheel, 300px); height: var(--wheel, 300px); margin: 0 auto; filter: drop-shadow(0 18px 40px rgba(0,0,0,.55)); }
.wheel-rim { position: absolute; inset: 0; width: 100%; height: 100%; }
.wheel-rim .bulb { fill: #fff3b0; animation: bulbBlink 1.2s infinite; }
.wheel-rim .bulb.b2 { animation-delay: .6s; }
.wheel.spinning .wheel-rim .bulb { animation-duration: .25s; }
@keyframes bulbBlink { 0%, 100% { fill: #fff8d6; filter: drop-shadow(0 0 2px #ffd23f); } 50% { fill: #8a6a12; filter: none; } }
.wheel-disc { position: absolute; inset: 0; will-change: transform; }
.wheel-disc svg { width: 100%; height: 100%; display: block; }
.wheel-disc .seg.winner { animation: segWin .45s ease-in-out infinite alternate; }
@keyframes segWin { from { filter: brightness(1); } to { filter: brightness(1.6) saturate(1.3); } }
.wheel-ptr {
  position: absolute; top: -5%; left: 50%; width: 13%; margin-left: -6.5%; z-index: 3; transform-origin: 50% 28%;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.6));
}
.wheel-ptr svg { width: 100%; display: block; }
.wheel-ptr.flick { animation: ptrFlick .14s ease-out; }
@keyframes ptrFlick { 0% { transform: rotate(0); } 35% { transform: rotate(-24deg); } 100% { transform: rotate(0); } }
.wheel-hub {
  position: absolute; top: 50%; left: 50%; width: 17%; height: 17%; transform: translate(-50%, -50%); border-radius: 50%; z-index: 2;
  background: radial-gradient(circle at 35% 30%, #fff6d0, #d79a1e 60%, #8a5a00); border: 3px solid #fff;
  display: grid; place-items: center; font-size: calc(var(--wheel, 300px) * .075); box-shadow: 0 4px 12px rgba(0,0,0,.5);
}
.wheel-now {
  text-align: center; margin-top: calc(var(--wheel, 300px) * .05); min-height: 1.4em; font-weight: 900;
  font-size: calc(var(--wheel, 300px) * .085); color: #fff; letter-spacing: .02em; text-shadow: 0 0 18px rgba(255,61,139,.8);
}
.wheel-now.win { color: var(--gold); animation: pop .5s; text-shadow: 0 0 24px rgba(255,201,60,.9); }.order-list { list-style: none; margin: 0; padding: 0; }
.order-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); animation: pop .4s; }
.order-list .k { font-weight: 900; color: var(--gold); width: 2.2em; }
.order-list li.empty { opacity: .55; }
.order-list li.empty span:last-child { color: var(--muted); letter-spacing: .3em; }

/* jackpot name reel */
.order-list li.reel-row { background: linear-gradient(90deg, rgba(255,201,60,.18), rgba(255,61,139,.12)); border-radius: 10px; padding-left: 6px; }
.reel {
  display: inline-block; min-width: 8em; padding: 2px 12px; border-radius: 8px; font-weight: 900; color: var(--gold);
  background: #0c0520; border: 2px solid rgba(255,201,60,.7); box-shadow: inset 0 0 10px rgba(0,0,0,.8), 0 0 14px rgba(255,201,60,.35);
  letter-spacing: .02em; overflow: hidden; white-space: nowrap;
}
.reel.tick { animation: reelTick .09s ease-out; }
@keyframes reelTick { from { transform: translateY(-55%); opacity: .2; filter: blur(2px); } to { transform: none; opacity: 1; filter: none; } }
.reel.locked { color: #1b1035; background: linear-gradient(135deg, #ffe08a, var(--gold)); border-color: #fff; animation: reelWin .6s cubic-bezier(.2,1.6,.4,1); box-shadow: 0 0 24px rgba(255,201,60,.9); }
@keyframes reelWin { 0% { transform: scale(.7); } 60% { transform: scale(1.18); } 100% { transform: none; } }
.order-list li.reel-row.won { animation: rowFlash .5s 3; }
@keyframes rowFlash { 50% { background: rgba(255,201,60,.45); } }

/* crowd view pop-ups (phones, when there's no big screen) */
.crowd-pop {
  position: fixed; inset: 0; z-index: 85; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 24px; text-align: center; background: rgba(10,4,30,.9); backdrop-filter: blur(6px);
  opacity: 0; transform: scale(.85); transition: opacity .35s, transform .45s cubic-bezier(.2,1.6,.4,1);
}
.crowd-pop.show { opacity: 1; transform: none; }
.crowd-pop .avatar { margin: 6px auto; }
.crowd-pop .cp-k { font-size: 20px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.crowd-pop .cp-n { font-size: 38px; font-weight: 900; line-height: 1.1; text-shadow: 0 0 30px rgba(255,61,139,.7); }
.crowd-pop .cp-s { color: var(--muted); font-size: 16px; }
.crowd-pop.gold { background: radial-gradient(circle at 50% 40%, rgba(255,201,60,.35), rgba(10,4,30,.94) 65%); }
.crowd-pop.gold .cp-n { background: linear-gradient(90deg, var(--gold), #fff, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* floating emoji */
.floater {
  position: fixed; bottom: -60px; pointer-events: none; z-index: 50;
  animation: floatUp var(--dur, 2.6s) ease-out forwards;
}
@keyframes floatUp {
  0% { transform: translate(0, 0) scale(.6); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translate(var(--dx, 0px), -95vh) scale(1.3) rotate(var(--rot, 0deg)); opacity: 0; }
}
.confetti {
  position: fixed; top: -20px; width: 10px; height: 16px; z-index: 60; pointer-events: none;
  animation: fall var(--dur, 3s) linear forwards;
}
@keyframes fall { to { transform: translate(var(--dx, 0), 110vh) rotate(720deg); } }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(120px);
  background: #fff; color: #1b1035; font-weight: 700; padding: 12px 20px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: transform .3s; z-index: 80; max-width: 92vw; text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

.noise {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; pointer-events: none;
  font-size: clamp(36px, 9vw, 140px); font-weight: 900; text-align: center; letter-spacing: .02em;
  text-shadow: 0 0 30px var(--pink), 0 0 60px var(--pink);
  animation: shake .25s infinite, flash 1s infinite;
}
@keyframes shake { 0%,100% { transform: translate(0,0) rotate(-1deg);} 50% { transform: translate(3px,-3px) rotate(1deg);} }
@keyframes flash { 0%,100% { background: rgba(255,61,139,.18);} 50% { background: rgba(57,213,255,.18);} }

/* ---------------- voter (phone) ---------------- */
.phone { max-width: 520px; margin: 0 auto; padding: 16px 16px 90px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.brand { font-weight: 900; font-size: 18px; letter-spacing: .02em; }
.chip { background: rgba(255,255,255,.1); padding: 6px 12px; border-radius: 999px; font-size: 13px; }
.join-hero { text-align: center; padding: 48px 8px 24px; }
.join-hero .mic { font-size: 84px; display: inline-block; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-8deg); } }
.join-hero h1 { font-size: 34px; margin: 10px 0 6px; }
.stack > * + * { margin-top: 12px; }
.status-strip {
  text-align: center; font-weight: 800; font-size: 14px; padding: 9px 14px; border-radius: 999px; margin: -4px 0 14px;
  background: rgba(255,255,255,.08); border: 1px solid var(--line);
}
.status-strip.live { background: rgba(255,61,139,.22); border-color: rgba(255,61,139,.6); }
.status-strip.draw, .status-strip.surprise, .status-strip.results { background: rgba(255,201,60,.18); border-color: rgba(255,201,60,.55); color: var(--gold); }
.footer-links { text-align: center; color: var(--muted); font-size: 12px; margin-top: 22px; }
.footer-links a { color: var(--muted); }
details.how summary { cursor: pointer; font-weight: 800; list-style: none; }
details.how summary::-webkit-details-marker { display: none; }
.modal { position: fixed; inset: 0; z-index: 90; background: rgba(10,4,30,.85); display: grid; place-items: center; padding: 18px; backdrop-filter: blur(6px); }
.modal-box {
  width: 100%; max-width: 420px; border-radius: 24px; padding: 26px 22px; animation: pop .5s;
  background: linear-gradient(160deg, #3b1670, #1e0f45); border: 2px solid var(--gold); box-shadow: 0 0 60px rgba(255,201,60,.4);
}
.role {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; transition: transform .1s;
}
.role:active { transform: scale(.98); }
.role:hover { border-color: var(--pink); }
.role .ri { font-size: 34px; }
.role b { display: block; font-size: 19px; }
.role small { color: var(--muted); font-size: 13px; }
.role[data-role="aud"] { background: linear-gradient(135deg, rgba(255,61,139,.25), rgba(178,60,255,.2)); border-color: rgba(255,61,139,.5); }

.singer-card { display: flex; gap: 14px; align-items: center; }
.singer-card h2 { font-size: 24px; margin: 4px 0; }
.song { color: var(--gold); font-weight: 600; }

.stars { display: flex; justify-content: space-between; gap: 6px; margin: 10px 0 4px; }
.star {
  flex: 1; min-width: 0; padding: 0; font-size: clamp(28px, 9vw, 42px); background: none; filter: grayscale(1) brightness(.6);
  transition: transform .15s, filter .15s;
}
.star.on { filter: none; transform: scale(1.12); }
.star:active { transform: scale(.9); }
.crow { padding: 8px 0; border-bottom: 1px solid var(--line); }
.crow:last-child { border: 0; }
.crow .cl { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; }
.crow .cl span { color: var(--muted); font-weight: 600; font-size: 13px; }
.crow .stars { margin: 4px 0 0; }
.crow .star { font-size: clamp(24px, 8vw, 34px); }
.star-label { text-align: center; font-weight: 800; min-height: 24px; color: var(--gold); }

.react-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.react {
  font-size: 30px; padding: 12px 0; border-radius: 16px; background: rgba(255,255,255,.08);
  transition: transform .08s;
}
.react:active { transform: scale(1.25); background: rgba(255,61,139,.35); }
.noise-on .react { animation: wiggle .4s infinite; background: rgba(255,61,139,.3); }
@keyframes wiggle { 50% { transform: rotate(8deg) scale(1.08); } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chips button { background: rgba(255,255,255,.1); padding: 8px 12px; border-radius: 999px; font-size: 14px; }
.chips button:active { background: var(--pink); }
.row { display: flex; gap: 8px; }
.row input { flex: 1; }

.cheer-list { list-style: none; padding: 0; margin: 0; }
.cheer-list li { padding: 8px 0; border-bottom: 1px solid var(--line); animation: pop .35s; }
.cheer-list li:last-child { border: 0; }
.cheer-list b { color: var(--cyan); }
.shout { background: linear-gradient(135deg, rgba(255,201,60,.25), rgba(255,61,139,.25)); border-color: rgba(255,201,60,.5); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

.golden { border-color: rgba(255, 201, 60, .5); background: linear-gradient(135deg, rgba(255,201,60,.14), rgba(255,255,255,.04)); }
.lineup { list-style: none; padding: 0; margin: 0; }
.lineup li { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.lineup .avatar { width: 40px; height: 40px; font-size: 15px; }
.lineup li.done { opacity: .5; }
.lineup li.live { color: var(--pink); font-weight: 800; }
.section-title { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; font-weight: 800; }
.big-emoji { font-size: 64px; text-align: center; }
.center { text-align: center; }
table.board { width: 100%; border-collapse: collapse; }
table.board td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
table.board td.r { text-align: right; font-weight: 800; color: var(--gold); }
