/* Imam Feud: show theme. Loaded after deck.css and overrides it.
   Bigger projection type (every size scales with --fs, which auto-fit lowers on crowded slides),
   the marquee logo, answer tiles, the live buzzer strip, QR join cards, scoreboard and host console. */

:root { --gold: #E8B53A; --gold2: #FFD877; --cream: #F6F1E4; --mist: #BFD8D5; --navy: #0F1B2D; --ink: #08111D; --teal: #12494A; --muted: #8FA3B8; --red: #FF7A66; --green: #3CC2B4; }
#stage section { --fs: 1; padding: 88px 120px 150px; gap: calc(30px * var(--fs)); }

/* ---------- spotlight + vignette for a stage-lit feel ---------- */
#stage section::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(60% 55% at 50% 38%, rgba(255, 216, 119, .10), transparent 70%),
              radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, .45) 100%); }
#stage section.divider::before { background: radial-gradient(60% 60% at 50% 45%, rgba(255, 255, 255, .35), transparent 70%), radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(120, 70, 0, .35) 100%); }
#stage section > :not(.decor) { position: relative; z-index: 1; }
#stage section > .brand { position: absolute; }

/* ---------- type, scaled up for the projector ---------- */
.eyebrow { font-size: calc(40px * var(--fs)); letter-spacing: 6px; align-self: flex-start; padding: 10px 28px; border-radius: 999px; background: rgba(232, 181, 58, .14); border: 2px solid rgba(232, 181, 58, .55); line-height: 1.2; }
section.cover .eyebrow { align-self: center; }
section.divider .eyebrow { background: rgba(15, 27, 45, .12); border-color: rgba(15, 27, 45, .45); align-self: center; }
.sub { font-size: calc(54px * var(--fs)); }
section.divider { align-items: center; text-align: center; }
.stage-title { margin: 0; font-family: 'Oswald', Arial, sans-serif; font-size: calc(330px * var(--fs)); line-height: .95; font-weight: 700; color: var(--navy); letter-spacing: 10px;
  text-shadow: 0 6px 0 rgba(255, 255, 255, .35), 0 14px 30px rgba(90, 50, 0, .35); }
.stage-desc { font-size: calc(76px * var(--fs)); font-weight: 600; }
h2.q { font-size: calc(116px * var(--fs)); line-height: 1.1; text-shadow: 0 4px 24px rgba(0, 0, 0, .35); }
h2.q.long { font-size: calc(82px * var(--fs)); line-height: 1.22; }
.bonus { font-size: calc(50px * var(--fs)); font-weight: 600; }
.ar.key-word { font-size: calc(300px * var(--fs)); text-shadow: 0 0 60px rgba(232, 181, 58, .45), 0 8px 0 rgba(0, 0, 0, .25); }
.ar.key-word.mid { font-size: calc(200px * var(--fs)); }
.ar.ayah { font-size: calc(100px * var(--fs)); }
.ar.ayah.sm { font-size: calc(74px * var(--fs)); }
.ref { font-size: calc(50px * var(--fs)); }
.also { font-size: calc(48px * var(--fs)); }
.fact { font-size: calc(50px * var(--fs)); font-weight: 600; }
.fact.big { font-size: calc(76px * var(--fs)); }
.ayah-card { border: 3px solid rgba(232, 181, 58, .35); box-shadow: inset 0 0 80px rgba(0, 0, 0, .25), 0 20px 50px rgba(0, 0, 0, .3); }
.card, .chip { border: 2px solid rgba(232, 181, 58, .28); box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
.card .num { font-size: calc(66px * var(--fs)); }
.card .card-ar { font-size: calc(50px * var(--fs)); }
.card .card-ar.lg { font-size: calc(66px * var(--fs)); }
.card .cref { font-size: calc(36px * var(--fs)); }
.grid5 .card .card-ar { font-size: calc(42px * var(--fs)); }
.grid5 .card .num { font-size: calc(58px * var(--fs)); }
.chip .chip-en { font-size: calc(32px * var(--fs)); }
.chip .chip-ar { font-size: calc(46px * var(--fs)); }
table.cities th { font-size: calc(36px * var(--fs)); }
table.cities .c-en { font-size: calc(42px * var(--fs)); }
table.cities .c-ar { font-size: calc(44px * var(--fs)); }
table.cities .c-ref { font-size: calc(34px * var(--fs)); }
table.cities td { padding: calc(8px * var(--fs)) 16px; }
.closing-ar { font-size: calc(240px * var(--fs)); text-shadow: 0 0 70px rgba(232, 181, 58, .45); }

/* answers flip in like a board tile */
h2.a { font-size: calc(104px * var(--fs)); align-self: flex-start; color: var(--navy); padding: 14px 48px 18px; border-radius: 22px;
  background: linear-gradient(180deg, #FFE39A 0%, #E8B53A 48%, #C98F1C 100%);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .25) inset, 0 10px 0 #8A5E0C, 0 24px 50px rgba(0, 0, 0, .45); }
section.ans.on h2.a { animation: flip .7s cubic-bezier(.2, .9, .3, 1.2) .1s both; transform-origin: 50% 0; }
@keyframes flip { 0% { opacity: 0; transform: perspective(900px) rotateX(-95deg); } 60% { opacity: 1; } 100% { transform: perspective(900px) rotateX(0); } }

/* ---------- logo ---------- */
.logo { display: block; width: 100%; height: auto; overflow: visible; }
.logo .bulb { animation: bulb 1.2s ease-in-out infinite; }
.logo .bulb:nth-child(odd) { animation-delay: .6s; }
@keyframes bulb { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.logo .rays { animation: spin 90s linear infinite; transform-origin: 400px 215px; transform-box: view-box; }
.cover-logo { width: calc(900px * var(--fs)); max-width: 100%; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .55)); }
section.cover.on .cover-logo { animation: logoin 1s cubic-bezier(.2, .9, .3, 1.25) both; }
@keyframes logoin { from { opacity: 0; transform: scale(.6) rotate(-4deg); } }
.brand { left: 64px; bottom: 30px; width: 190px; height: auto; font-size: 0; opacity: .95; }
section.divider .brand { display: none; }

/* ---------- join card with QR ---------- */
.joinrow { display: flex; align-items: center; gap: 48px; justify-content: center; }
.join { display: flex; align-items: center; gap: 28px; padding: 18px 30px 18px 18px; border-radius: 28px; background: rgba(8, 17, 29, .72); border: 3px solid rgba(232, 181, 58, .6); text-align: left; }
section.divider .join { background: var(--navy); border-color: var(--navy); }
.join .qr { width: 210px; height: 210px; background: #fff; border-radius: 16px; padding: 10px; flex: none; }
.join .qr svg { width: 100%; height: 100%; display: block; }
.join .jt { font-family: 'Oswald', Arial, sans-serif; font-size: 34px; letter-spacing: 3px; color: var(--mist); margin: 0; text-transform: uppercase; }
.join .ju { font-family: 'Oswald', Arial, sans-serif; font-size: 54px; font-weight: 700; color: var(--gold); margin: 0; line-height: 1.05; }
.join .jn { font-size: 28px; color: var(--mist); margin: 6px 0 0; }

/* ---------- Stage 3 live buzzer on the slide ---------- */
.buzzbadge { position: absolute !important; top: 70px; right: 96px; z-index: 3; font-family: 'Oswald', Arial, sans-serif; font-size: 44px; font-weight: 700; letter-spacing: 4px;
  color: var(--navy); background: var(--gold); padding: 8px 30px; border-radius: 999px; box-shadow: 0 8px 0 #8A5E0C, 0 0 40px rgba(232, 181, 58, .6); transform: rotate(3deg); }
.buzzstrip { position: absolute !important; left: 330px; right: 96px; bottom: 34px; z-index: 3; display: flex; align-items: center; gap: 18px; min-height: 86px; }
.buzzstrip .bs-state { font-family: 'Oswald', Arial, sans-serif; font-size: 36px; font-weight: 700; letter-spacing: 3px; padding: 12px 26px; border-radius: 16px; background: #1C3350; color: var(--mist); white-space: nowrap; }
.buzzstrip.open .bs-state { background: var(--green); color: var(--ink); animation: openpulse 1.2s ease-in-out infinite; }
.buzzstrip.answering .bs-state { background: var(--gold); color: var(--ink); }
.buzzstrip.closed .bs-state { background: #2C4A6E; color: var(--cream); }
@keyframes openpulse { 50% { box-shadow: 0 0 0 10px rgba(60, 194, 180, .25); } }
.bs-q { display: flex; gap: 14px; flex-wrap: nowrap; overflow: hidden; }
.bs-chip { display: flex; align-items: center; gap: 12px; padding: 10px 22px 10px 12px; border-radius: 16px; background: rgba(8, 17, 29, .8); border: 3px solid var(--c); font-size: 32px; white-space: nowrap; animation: pop .4s cubic-bezier(.2, .9, .3, 1.3) both; }
.bs-chip b { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--c); color: var(--ink); font-family: 'Oswald', Arial, sans-serif; font-size: 30px; }
.bs-chip .who { font-family: 'Oswald', Arial, sans-serif; font-weight: 600; color: var(--cream); }
.bs-chip .pl { color: var(--mist); font-size: 26px; }
.bs-chip .dt { color: var(--muted); font-size: 24px; }
.bs-chip.cur { box-shadow: 0 0 30px var(--c); transform: scale(1.06); }
.bs-chip.out { opacity: .4; text-decoration: line-through; }
.bs-chip.win { background: var(--c); }
.bs-chip.win .who, .bs-chip.win .pl, .bs-chip.win .dt { color: var(--ink); }

/* ---------- full-screen scoreboard ---------- */
#board { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; background: rgba(8, 17, 29, .9); backdrop-filter: blur(6px); }
#board.show { display: flex; }
#board .inner { width: min(92vw, 1100px); display: flex; flex-direction: column; gap: 2vh; }
#board h2 { margin: 0 0 1vh; text-align: center; font-family: 'Oswald', Arial, sans-serif; font-size: clamp(32px, 6vh, 80px); color: var(--gold); letter-spacing: 6px; }
.lb { display: flex; flex-direction: column; gap: 1.6vh; }
.lb-row { display: grid; grid-template-columns: 1.2em 1fr auto; align-items: center; gap: .6em; font-family: 'Oswald', Arial, sans-serif; font-size: clamp(26px, 5vh, 64px); padding: .25em .6em; border-radius: .4em;
  background: color-mix(in srgb, var(--c) 18%, #122236); border: 4px solid var(--c); color: var(--cream); animation: rise .5s ease-out both; }
.lb-row .rk { color: var(--c); font-weight: 700; }
.lb-row .sc { font-weight: 700; color: var(--gold); min-width: 2.2em; text-align: right; }
.lb-row.top { box-shadow: 0 0 40px var(--c); transform: scale(1.03); }
.lb-row.top .nm::after { content: " \1F451"; }
#closing .closing-ar { font-size: calc(170px * var(--fs)); }
#closing .lb { flex-direction: row; flex-wrap: wrap; justify-content: center; width: 1600px; gap: 18px 24px; align-self: center; }
#closing .lb-row { font-size: calc(48px * var(--fs)); min-width: 480px; }

/* ---------- host console ---------- */
#bar { gap: 12px; padding: 10px 14px; }
.team { position: relative; }
.team .pc { position: absolute; top: 6px; right: 34px; font-size: 12px; color: var(--mist); }
#conn { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--mist); white-space: nowrap; }
#conn i { width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
#conn.on i { background: var(--green); box-shadow: 0 0 8px var(--green); }
#conn.denied i { background: var(--gold); }
#tools { flex-wrap: wrap; }
#tools button.on { background: var(--gold); color: var(--ink); }

#buzzer { gap: 14px; padding: 10px 14px; align-items: center; flex-wrap: wrap; }
#bstatus { min-width: 220px; }
#bqueue { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 200px; }
#bqueue .bs-chip { font-size: 15px; padding: 4px 12px 4px 4px; border-width: 2px; border-radius: 10px; gap: 8px; }
#bqueue .bs-chip b { width: 26px; height: 26px; font-size: 15px; }
#bqueue .bs-chip .pl, #bqueue .bs-chip .dt { font-size: 13px; }
#bqueue .bs-chip.cur { transform: none; box-shadow: 0 0 12px var(--c); }
.bz { position: relative; }
.bz .pcount { position: absolute; bottom: -6px; right: -6px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--ink); color: var(--cream); font-size: 12px; display: grid; place-items: center; border: 2px solid var(--c); padding: 0 4px; }

.dlg label.chk { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--mist); }
#joindlg { top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; width: min(92vw, 560px); }
#joindlg .qr { width: min(70vw, 360px); aspect-ratio: 1; margin: 14px auto; background: #fff; border-radius: 16px; padding: 12px; }
#joindlg .qr svg { width: 100%; height: 100%; display: block; }
#joindlg .ju { font-family: 'Oswald', Arial, sans-serif; font-size: 30px; color: var(--gold); word-break: break-all; }
#pindlg { top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(92vw, 460px); }
#pindlg input { font: inherit; font-size: 22px; padding: 10px 14px; border-radius: 10px; border: 2px solid #2C4A6E; background: #0B1624; color: var(--cream); width: 100%; margin: 10px 0; }
#pindlg .err { color: var(--red); min-height: 1.2em; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .logo .bulb, .logo .rays, .buzzstrip.open .bs-state { animation: none; }
}

/* measuring pass for auto-fit */
#stage section.measure { display: flex !important; visibility: hidden; }
#cover { padding: 40px 120px 60px; justify-content: center; gap: calc(22px * var(--fs)); }
.dlg .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.bs-hint { font-size: 30px; color: var(--mist); white-space: nowrap; }
.bs-hint b { color: var(--gold); }
#bstatus { font-family: 'Oswald', Arial, sans-serif; font-size: 20px; font-weight: 700; letter-spacing: 2px; }
#bbtns { display: flex; gap: 8px; flex-wrap: wrap; }
button:disabled { opacity: .4; cursor: not-allowed; }
#bbtns { flex: 2; min-width: 240px; }
#bbtns .bz { min-height: 52px; font-size: 20px; border-width: 3px; padding: 4px 14px; }
#bbtns .bz kbd { display: inline; font-size: 12px; margin-left: 6px; }
/* audience view: C hides the host controls */
body.clean #bar, body.clean #buzzer { display: none !important; }
#cleantip { position: fixed; right: 12px; bottom: 10px; z-index: 70; font: 600 12px Rubik, sans-serif; color: var(--mist); background: rgba(8,17,29,.75); padding: 6px 10px; border-radius: 8px; opacity: 0; transition: opacity .3s; pointer-events: none; }
body.clean #cleantip { animation: tipfade 3s ease both; }
@keyframes tipfade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
/* bigger buzz strip so the room can read who buzzed */
.buzzstrip { bottom: 26px; min-height: 104px; }
.buzzstrip .bs-state { font-size: 46px; padding: 14px 30px; }
.bs-chip { font-size: 40px; padding: 10px 26px 10px 12px; border-width: 4px; }
.bs-chip b { width: 62px; height: 62px; font-size: 36px; }
.bs-chip .pl { font-size: 32px; }
.bs-chip .dt { font-size: 28px; }
.bs-hint { font-size: 38px; }
/* FunFen (host organisation) logo */
.funfen { right: 76px; bottom: 20px; height: 108px; width: auto; opacity: .92; }
.presented { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.presented span { font-family: 'Oswald', Arial, sans-serif; font-size: 26px; letter-spacing: 6px; text-transform: uppercase; color: var(--mist); }
.presented img { height: 210px; width: auto; display: block; }
