/* Seasonal Game Engine - the look shared by every game built on it (overlay, control page, viewer page).
   Uses the same class names and colour variables as the older games (.card, .timer-display, .leaderboard-row, --accent ...) so the
   game themes (game-theme.js / game-theme.css) restyle these games exactly as they do the others. */

.sge-wrap{display:block}
.sge-sub{color:var(--text-dim,#c7c7cc);font-size:13.5px;text-align:center;margin:0 0 6px}
.sge-round{color:var(--text-faint,#8a8a92);font-size:12.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;text-align:center;margin:0 0 4px}
.sge-prompt{font-family:'Space Grotesk',sans-serif;font-size:19px;font-weight:700;text-align:center;line-height:1.25;margin:2px 0 10px}

/* timer: number + a bar that drains */
.sge-timer{display:flex;align-items:center;gap:12px;margin:2px 0 14px}
.sge-timer .timer-display{margin:0;min-width:54px;text-align:center;font-size:28px}
.sge-bar{flex:1;height:10px;border-radius:999px;background:rgba(255,255,255,.09);overflow:hidden}
.sge-bar>i{display:block;height:100%;width:100%;border-radius:999px;background:linear-gradient(90deg,var(--accent-2,#31D6BE),var(--accent,#FF5A36));transition:width .3s linear}
.sge-bar.low>i{background:var(--accent,#FF5A36)}
.sge-next{text-align:center;color:var(--text-faint,#8a8a92);font-size:12px;margin:10px 0 0}

.sge-big{font-size:68px;line-height:1.05;text-align:center}
.sge-big.pop{animation:sgePop .55s cubic-bezier(.2,1.6,.4,1) both}
.sge-box{background:var(--bg-850,#191a1e);border:1px solid var(--border-soft,#232329);border-radius:14px;padding:16px 14px;margin-bottom:12px}
.sge-meta{color:var(--text-faint,#8a8a92);font-size:12.5px;text-align:center;margin-top:8px}
.sge-msg{min-height:20px;text-align:center;font-size:13.5px;font-weight:600;margin:8px 0 0;color:var(--text-dim,#c7c7cc)}
.sge-msg.ok{color:var(--accent-2,#31D6BE)}
.sge-msg.bad{color:var(--danger,#ff6b6b)}

/* clue games */
.sge-clues{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:7px}
.sge-clues li{background:rgba(255,255,255,.05);border:1px solid var(--border-soft,#232329);border-radius:10px;padding:9px 12px;font-size:15px;line-height:1.35}
.sge-clues li.fresh{animation:sgeFade .5s ease both}
.sge-clues li b{color:var(--accent-2,#31D6BE);margin-right:6px;font-family:'JetBrains Mono',monospace;font-size:12px}
.sge-clues li.hidden-clue{opacity:.35;border-style:dashed;animation:none;text-align:center;letter-spacing:.3em}
.sge-rebus{font-size:54px;line-height:1.15;text-align:center;letter-spacing:.06em;margin:4px 0 8px;word-break:keep-all}
.sge-rebus.fresh,.sge-hintpill.fresh{animation:sgeFade .4s ease both}
.sge-hintpill{display:inline-block;background:rgba(255,255,255,.07);border:1px solid var(--border-soft,#232329);border-radius:999px;padding:5px 14px;font-size:13.5px;font-weight:600}
.sge-center{text-align:center}
.sge-answer{font-family:'Space Grotesk',sans-serif;font-size:26px;font-weight:700;text-align:center;margin:4px 0 10px;color:var(--accent-2,#31D6BE)}
.sge-solvers{display:flex;flex-direction:column;gap:5px;margin-top:6px}
.sge-solver{display:flex;justify-content:space-between;gap:10px;font-size:14px;padding:6px 12px;border-radius:8px;background:rgba(255,255,255,.05)}
.sge-solver span:last-child{color:var(--accent-2,#31D6BE);font-weight:700;white-space:nowrap}
.sge-solver.first{background:rgba(255,200,60,.12);border:1px solid rgba(255,200,60,.35)}
.sge-nobody{text-align:center;color:var(--text-dim,#c7c7cc);font-size:14px;margin:6px 0}

/* doors / options (pick + vote) */
.sge-grid{display:grid;gap:10px;grid-template-columns:repeat(3,1fr)}
.sge-grid.two{grid-template-columns:repeat(2,1fr)}
.sge-grid.vote{grid-template-columns:1fr;gap:9px}
.sge-card{position:relative;background:var(--bg-850,#191a1e);border:1px solid var(--border-soft,#232329);border-radius:12px;padding:12px 8px;text-align:center;color:inherit;font:inherit;transition:transform .15s ease,border-color .15s ease,background .15s ease}
button.sge-card{cursor:pointer;width:100%}
button.sge-card:hover:not(:disabled){border-color:var(--accent-2,#31D6BE);transform:translateY(-2px)}
button.sge-card:disabled{cursor:default}
.sge-card .e{display:block;font-size:34px;line-height:1.1}
.sge-card .t{display:block;font-family:'Space Grotesk',sans-serif;font-weight:700;font-size:14px;margin-top:3px}
.sge-card .s{display:block;font-size:12px;color:var(--text-dim,#c7c7cc);margin-top:2px}
.sge-card.mine{border-color:var(--accent,#FF5A36);background:rgba(255,90,54,.12)}
.sge-card.best{border-color:rgba(255,200,60,.8);background:rgba(255,200,60,.12)}
.sge-card.flip{animation:sgeFlip .6s ease both}
.sge-card .v{display:block;font-weight:800;font-size:15px;margin-top:2px}
.sge-card .v.pos{color:var(--accent-2,#31D6BE)}
.sge-card .v.neg{color:var(--danger,#ff6b6b)}
.sge-card .who{display:block;font-size:11.5px;color:var(--text-faint,#8a8a92);margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* vote rows */
.sge-vote{display:flex;align-items:center;gap:10px;text-align:left;padding:10px 12px;position:relative;overflow:hidden}
.sge-vote .n{flex:none;width:26px;height:26px;border-radius:50%;background:rgba(255,255,255,.1);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:13px;z-index:1}
.sge-vote .e{font-size:26px;flex:none;z-index:1;display:inline}
.sge-vote .t{margin:0;flex:1;z-index:1;display:inline}
.sge-vote .c{flex:none;font-weight:800;font-size:14px;z-index:1}
.sge-vote .fill{position:absolute;left:0;top:0;bottom:0;background:linear-gradient(90deg,rgba(49,214,190,.28),rgba(49,214,190,.08));transition:width .4s ease;z-index:0}
.sge-vote.win{border-color:rgba(255,200,60,.8)}
.sge-vote.win .fill{background:linear-gradient(90deg,rgba(255,200,60,.4),rgba(255,200,60,.1))}

/* the present on the table (hold) */
.sge-present{display:flex;flex-direction:column;align-items:center;gap:6px;margin:4px 0 10px}
.sge-present .sge-big{font-size:84px;transition:transform .2s}
.sge-present.shake .sge-big{animation:sgeShake .5s ease}
.sge-holder{font-family:'Space Grotesk',sans-serif;font-weight:700;font-size:18px;text-align:center;margin:2px 0}
.sge-holder b{color:var(--accent-2,#31D6BE)}
.sge-quote{color:var(--text-dim,#c7c7cc);font-style:italic;text-align:center;font-size:14.5px;margin:0 0 6px}
.sge-recent{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-top:8px}
.sge-recent span{background:rgba(255,255,255,.07);border-radius:999px;padding:3px 10px;font-size:12px;color:var(--text-dim,#c7c7cc)}

/* the cracker (tug) */
.sge-tugteams{display:flex;justify-content:space-between;gap:10px;margin-bottom:8px}
.sge-tugteam{flex:1;text-align:center;border-radius:12px;padding:8px 6px;border:2px solid transparent;background:rgba(255,255,255,.05)}
.sge-tugteam .e{display:block;font-size:30px;line-height:1.1}
.sge-tugteam .t{display:block;font-family:'Space Grotesk',sans-serif;font-weight:800;font-size:16px}
.sge-tugteam .s{display:block;font-size:12px;color:var(--text-dim,#c7c7cc)}
.sge-tugteam.win{border-color:rgba(255,200,60,.9);background:rgba(255,200,60,.12)}
.sge-tugteam.mine{border-color:var(--accent-2,#31D6BE)}
.sge-rope{position:relative;height:34px;border-radius:999px;background:#2a2a32;overflow:hidden;display:flex;margin:4px 0 12px}
.sge-rope .a,.sge-rope .b{height:100%;transition:width .35s ease}
.sge-rope .mid{position:absolute;top:50%;transform:translate(-50%,-50%);font-size:26px;transition:left .35s ease;filter:drop-shadow(0 2px 3px rgba(0,0,0,.5))}
.sge-side-0{--side:#e5484d}
.sge-side-1{--side:#30a46c}
.sge-rope .a{background:linear-gradient(90deg,#b8272c,#e5484d)}
.sge-rope .b{background:linear-gradient(90deg,#30a46c,#1f7a4d)}
.sge-prize{background:rgba(255,255,255,.06);border:1px dashed rgba(255,255,255,.3);border-radius:12px;padding:12px 14px;text-align:center;margin-top:8px}
.sge-prize .e{font-size:40px;display:block}
.sge-prize .t{font-weight:700;font-size:15px;display:block;margin:2px 0 6px}
.sge-prize .j{font-size:14px;color:var(--text-dim,#c7c7cc);font-style:italic}

/* the gingerbread house */
.sge-house{display:grid;grid-template-columns:repeat(3,1fr);grid-template-areas:"chimney topper lights" "roof roof roof" "windows walls door" "path path path";gap:6px;margin:8px auto 10px;max-width:340px}
.sge-house .slot{background:rgba(255,255,255,.05);border:1px dashed var(--border,#2a2a32);border-radius:10px;min-height:46px;display:flex;align-items:center;justify-content:center;flex-direction:column;font-size:26px;line-height:1}
.sge-house .slot small{font-size:10px;color:var(--text-faint,#8a8a92);margin-top:2px;letter-spacing:.03em}
.sge-house .slot.filled{border-style:solid;background:rgba(255,200,60,.1);border-color:rgba(255,200,60,.4)}
.sge-house .slot.filled.fresh{animation:sgePop .5s cubic-bezier(.2,1.6,.4,1) both}
.sge-house .slot.empty{opacity:.45}
.sge-house .slot.now{opacity:1;border-color:var(--accent-2,#31D6BE);animation:sgePulse 1.4s ease-in-out infinite}
.sge-house .s-chimney{grid-area:chimney}.sge-house .s-topper{grid-area:topper}.sge-house .s-lights{grid-area:lights}
.sge-house .s-roof{grid-area:roof}.sge-house .s-windows{grid-area:windows}.sge-house .s-walls{grid-area:walls}
.sge-house .s-door{grid-area:door}.sge-house .s-path{grid-area:path}
.sge-house-title{font-size:12px;color:var(--text-faint,#8a8a92);text-align:center;letter-spacing:.05em;text-transform:uppercase;margin-top:6px}

/* the sandwich (leftovers) */
.sge-sandwich{display:flex;flex-direction:column;gap:4px;margin:8px auto 10px;max-width:340px}
.sge-sandwich .layer{display:flex;align-items:center;gap:10px;background:rgba(255,255,255,.05);border:1px dashed var(--border,#2a2a32);border-radius:10px;padding:6px 12px;min-height:40px}
.sge-sandwich .layer .e{font-size:24px;line-height:1;flex:none;width:30px;text-align:center}
.sge-sandwich .layer .t{font-size:13px;font-weight:600}
.sge-sandwich .layer.bread{border-radius:22px 22px 10px 10px}
.sge-sandwich .layer.bread:last-child{border-radius:10px 10px 22px 22px}
.sge-sandwich .layer.filled{border-style:solid;background:rgba(255,200,60,.1);border-color:rgba(255,200,60,.4)}
.sge-sandwich .layer.filled.fresh{animation:sgePop .5s cubic-bezier(.2,1.6,.4,1) both}
.sge-sandwich .layer.empty{opacity:.45}
.sge-sandwich .layer.empty .t{color:var(--text-faint,#8a8a92)}
.sge-sandwich .layer.now{opacity:1;border-color:var(--accent-2,#31D6BE);animation:sgePulse 1.4s ease-in-out infinite}

/* the goal (penalty shootout) */
.sge-grid.goal{grid-template-columns:repeat(3,1fr);gap:0;border:3px solid #e8e8ee;border-bottom:none;border-radius:10px 10px 0 0;padding:10px 10px 0;background:repeating-linear-gradient(45deg,rgba(255,255,255,.06) 0 6px,transparent 6px 12px),repeating-linear-gradient(-45deg,rgba(255,255,255,.06) 0 6px,transparent 6px 12px);margin-bottom:10px}
.sge-grid.goal .sge-card{border-radius:8px;background:rgba(0,0,0,.25);margin:0 4px 10px;padding:16px 6px}
.sge-grid.goal .sge-card .e{font-size:38px}

/* the typing race (sale rush) */
.sge-phrase{font-family:'Space Grotesk',sans-serif;font-weight:800;font-size:28px;line-height:1.2;text-align:center;padding:14px 8px;border-radius:12px;background:rgba(255,200,60,.1);border:2px dashed rgba(255,200,60,.55);color:var(--accent-2,#31D6BE);user-select:none;-webkit-user-select:none;word-break:break-word}
.sge-phrase.fresh{animation:sgePop .45s cubic-bezier(.2,1.6,.4,1) both}
.sge-box .sge-phrase + .sge-solvers,.sge-box .sge-phrase + .sge-meta,.sge-box .sge-phrase + .sge-nobody{margin-top:12px}

/* the panto stage (he's behind you) */
.sge-stage{position:relative;overflow:hidden;background:linear-gradient(180deg,#3a0f1a 0%,#1d0a10 100%);border-color:rgba(255,200,60,.35)}
.sge-stage .sge-curtain{position:absolute;inset:0 0 auto 0;height:14px;background:repeating-linear-gradient(90deg,#8b1a2b 0 16px,#6e1422 16px 32px);border-bottom:2px solid rgba(255,200,60,.6)}
.sge-stage .sge-cast{display:flex;justify-content:center;align-items:flex-end;gap:6px;margin:22px 0 8px;min-height:92px}
.sge-actor{font-size:68px;line-height:1}
.sge-actor.villain{font-size:76px;transform:scaleX(-1);filter:drop-shadow(0 0 10px rgba(255,60,60,.55))}
.sge-actor.villain.sneak{animation:sgeSneak .8s ease-out both}
.sge-stage .sge-quote{margin-top:2px}

/* the pie Hall of Fame (list progress) */
.sge-hall{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin:10px 0 4px;min-height:34px}
.sge-hall .chip{background:rgba(255,200,60,.12);border:1px solid rgba(255,200,60,.4);border-radius:999px;padding:4px 12px;font-size:13px;font-weight:600}
.sge-hall .chip.fresh{animation:sgePop .5s cubic-bezier(.2,1.6,.4,1) both}
.sge-hall .empty{color:var(--text-faint,#8a8a92);font-size:12.5px;align-self:center}

/* the survey board (feud) */
.sge-feud{display:flex;flex-direction:column;gap:6px;margin:4px 0 8px}
.sge-feud .row{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:10px;background:rgba(255,255,255,.05);border:1px solid var(--border-soft,#232329);min-height:44px}
.sge-feud .n{flex:none;width:24px;height:24px;border-radius:50%;background:rgba(255,255,255,.1);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:12px}
.sge-feud .t{flex:1;font-family:'Space Grotesk',sans-serif;font-weight:700;font-size:16px;letter-spacing:.01em}
.sge-feud .w{flex:none;font-size:11.5px;color:var(--text-faint,#8a8a92);max-width:30%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sge-feud .v{flex:none;min-width:28px;text-align:center;font-weight:800;font-size:16px;background:rgba(0,0,0,.25);border-radius:8px;padding:2px 8px}
.sge-feud .row:not(.found) .t{color:var(--text-faint,#8a8a92);letter-spacing:.3em}
.sge-feud .row.found{background:rgba(49,214,190,.14);border-color:rgba(49,214,190,.5)}
.sge-feud .row.found .v{color:var(--accent-2,#31D6BE)}
.sge-feud .row.mine{border-color:var(--accent,#FF5A36)}
.sge-feud .row.missed{opacity:.65}
.sge-feud .row.missed .t{color:inherit;letter-spacing:.01em}
.sge-feud .row.flip{animation:sgeFlip .6s ease both}

/* the wheel and the wall (gratitude) */
.sge-wheel{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin-bottom:6px}
.sge-wheel .seg{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:18px;background:rgba(255,255,255,.06);opacity:.5}
.sge-wheel .seg.on{opacity:1;background:rgba(255,200,60,.22);border:2px solid rgba(255,200,60,.8);transform:scale(1.18)}
.sge-wall{display:flex;flex-direction:column;gap:6px;margin-top:6px}
.sge-wall .note{background:rgba(255,200,60,.1);border-left:3px solid rgba(255,200,60,.7);border-radius:6px;padding:6px 10px;font-size:14px;line-height:1.3}
.sge-wall .note small{display:block;color:var(--text-faint,#8a8a92);font-size:11.5px;margin-top:1px}
.sge-featured{text-align:center;background:rgba(255,200,60,.12);border:1px solid rgba(255,200,60,.5);border-radius:12px;padding:10px 12px;margin:6px 0}
.sge-featured .k{font-size:12px;letter-spacing:.05em;text-transform:uppercase;color:var(--text-faint,#8a8a92)}
.sge-featured .q{font-family:'Space Grotesk',sans-serif;font-weight:700;font-size:18px;margin:4px 0}
.sge-featured .by{font-size:13px;color:var(--text-dim,#c7c7cc)}
.sge-featured .by b{color:var(--accent-2,#31D6BE)}

/* big buttons on the viewer page */
.sge-bigbtn{display:block;width:100%;border:none;border-radius:12px;padding:16px;margin-top:8px;background:var(--accent,#FF5A36);color:#1a0d08;font-family:'Space Grotesk',sans-serif;font-weight:800;font-size:20px;cursor:pointer;transition:transform .08s ease,opacity .15s}
.sge-bigbtn:active:not(:disabled){transform:scale(.97)}
.sge-bigbtn:disabled{opacity:.55;cursor:default}
.sge-bigbtn.alt{background:var(--accent-2,#31D6BE)}
.sge-row{display:flex;gap:10px}
.sge-row>*{flex:1}
.sge-guess{display:flex;gap:8px;margin-top:10px}
.sge-guess input{flex:1}
.sge-guess{align-items:stretch}
.sge-guess .sge-bigbtn{margin-top:0;width:auto;padding:0 22px;font-size:17px}

@keyframes sgePop{0%{transform:scale(.4);opacity:0}100%{transform:scale(1);opacity:1}}
@keyframes sgeFade{0%{opacity:0;transform:translateY(6px)}100%{opacity:1;transform:none}}
@keyframes sgeSneak{0%{transform:translateX(90px) scaleX(-1);opacity:0}100%{transform:translateX(0) scaleX(-1);opacity:1}}
@keyframes sgeFlip{0%{transform:rotateY(90deg);opacity:.2}100%{transform:none;opacity:1}}
@keyframes sgeShake{0%,100%{transform:rotate(0)}20%{transform:rotate(-12deg) scale(1.08)}40%{transform:rotate(10deg) scale(1.08)}60%{transform:rotate(-7deg)}80%{transform:rotate(5deg)}}
@keyframes sgePulse{0%,100%{box-shadow:0 0 0 0 rgba(49,214,190,.0)}50%{box-shadow:0 0 0 4px rgba(49,214,190,.25)}}
/* New Year: stacked bet rows, year reveal, fact note */
.sge-grid.stack{grid-template-columns:1fr;gap:9px}
.sge-grid.stack .sge-card{display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:4px 12px;text-align:left;padding:10px 14px}
.sge-grid.stack .sge-card .e{font-size:28px;grid-row:1 / span 2}
.sge-grid.stack .sge-card .t{margin-top:0;font-size:14.5px}
.sge-grid.stack .sge-card .s,.sge-grid.stack .sge-card .who{margin-top:0;grid-column:2}
.sge-grid.stack .sge-card .v{grid-column:3;grid-row:1 / span 2;font-size:18px;margin:0}
.sge-big.sge-year{font-family:'Space Grotesk',sans-serif;font-weight:800;letter-spacing:.04em}
.sge-note{margin:10px 0 0;padding:8px 12px;border-radius:10px;background:rgba(255,200,60,.1);border:1px solid rgba(255,200,60,.35);font-size:13.5px;color:var(--text-dim,#c7c7cc);text-align:center}
@media (prefers-reduced-motion:reduce){.sge-big.pop,.sge-card.flip,.sge-house .slot.filled.fresh,.sge-clues li.fresh,.sge-rebus.fresh,.sge-hintpill.fresh,.sge-house .slot.now,.sge-present.shake .sge-big,.sge-sandwich .layer.now,.sge-sandwich .layer.filled.fresh,.sge-phrase.fresh,.sge-actor.villain.sneak,.sge-hall .chip.fresh,.sge-feud .row.flip{animation:none !important}}
@media (max-width:420px){.sge-big{font-size:56px}.sge-rebus{font-size:44px}.sge-grid{gap:8px}.sge-card .e{font-size:28px}}

/* in an OBS box: tighter, and room for a long end screen */
body.embed-mode .sge-prompt{font-size:17px;margin-bottom:6px}
body.embed-mode .sge-big{font-size:58px}
body.embed-mode .sge-present .sge-big{font-size:70px}
body.embed-mode .sge-rebus{font-size:48px}
body.embed-mode .sge-phrase{font-size:24px}
body.embed-mode .sge-actor{font-size:58px}
body.embed-mode .sge-timer{margin-bottom:10px}
