/* Fontes da marca (manual p.20). Coloque os arquivos em public/fonts/ (veja public/fonts/LEIA-ME.txt).
   Sem os arquivos, o navegador usa Montserrat como reserva. */
@font-face { font-family: "Stapel Semi Expanded"; src: local("Stapel Semi Expanded"), url(/fonts/StapelSemiExpanded.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Gilroy"; src: local("Gilroy Light"), url(/fonts/Gilroy-Light.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Gilroy"; src: local("Gilroy Regular"), url(/fonts/Gilroy-Regular.woff2) format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Gilroy"; src: local("Gilroy Bold"), url(/fonts/Gilroy-Bold.woff2) format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Gilroy"; src: local("Gilroy ExtraBold"), url(/fonts/Gilroy-ExtraBold.woff2) format("woff2"); font-weight: 800 900; font-display: swap; }

:root {
  --y: #ecf23d;          /* amarelo Junta */
  --paper: #f2f2f2;      /* cinza claro Junta */
  --y-dark: #c5cb12;
  --ink: #0d0d0d;        /* preto Junta */
  --panel: #181818;
  --line: rgba(255, 255, 255, .10);
  --muted: rgba(255, 255, 255, .72);
  --red: #e21b3c;
  --blue: #1368ce;
  --amber: #dd7a00;
  --green: #1f9d45;
  --pink: #cc3366;
  --title: "Stapel Semi Expanded", "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font: "Gilroy", "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: #fff;
  background:
    radial-gradient(900px 520px at 50% -8%, rgba(236, 242, 61, .17), transparent 62%),
    linear-gradient(#0d0d0d, #070707);
  background-attachment: fixed;
  min-height: 100vh;
  transition: background-color .4s;
}
body.bg-ok { background: linear-gradient(160deg, #22b04f, #14652e); }
body.bg-bad { background: linear-gradient(160deg, #e21b3c, #7d0d22); }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- marca ---------- */
.logo-img { height: 30px; width: auto; display: block; }          /* manual: mínimo digital 100x28 px */
.logo-lg .logo-img { height: 72px; }
.logo-md .logo-img { height: 46px; }
.mark { background: var(--y); color: var(--ink); padding: .02em .3em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.strip { background: var(--y); color: #000; text-align: center; font-weight: 800; font-size: .8rem; letter-spacing: .02em; text-transform: uppercase; padding: 9px 12px; }
.tape {
  position: fixed; left: -6vw; right: -6vw; bottom: 26px; transform: rotate(-1.6deg); overflow: hidden; z-index: 0;
  background: var(--y); color: #000; padding: 11px 0; pointer-events: none; box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
}
.tape div { display: inline-block; white-space: nowrap; font-weight: 900; text-transform: uppercase; font-size: 1.05rem; animation: marquee 38s linear infinite; }
.tape span { margin: 0 22px; }
.tape span::after { content: "◆"; margin-left: 44px; opacity: .55; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- shared ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 9px 18px; background: #000; border-bottom: 1px solid rgba(236, 242, 61, .28); font-weight: 700; font-size: .95rem;
}
.top .grow { flex: 1; text-align: center; color: var(--muted); }
.top .conn { font-size: 12px; opacity: .7; font-weight: 600; }
.link { background: none; border: 0; color: #fff; opacity: .75; text-decoration: underline; padding: 6px; font-weight: 600; }
.btn {
  border: 0; border-radius: 13px; padding: 13px 24px; font-weight: 700; font-size: 1.05rem;
  background: var(--y); color: #000; box-shadow: 0 4px 0 var(--y-dark);
  transition: transform .08s, box-shadow .08s, opacity .2s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--y-dark); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.big { font-size: 1.4rem; padding: 16px 38px; }
.btn.ghost { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; }
input[type=text], input[type=email], input[type=password], select {
  width: 100%; font: inherit; font-size: 1.1rem; font-weight: 700; padding: 14px 16px;
  border: 2px solid transparent; border-radius: 12px; background: var(--paper); color: var(--ink); text-align: center;
}
input:focus, select:focus { outline: none; border-color: var(--y); box-shadow: 0 0 0 3px rgba(236, 242, 61, .35); }
select { width: auto; font-size: 1rem; padding: 10px 12px; }
.err { min-height: 1.4em; color: #ff9db0; font-weight: 700; margin: 8px 0; }
.hl { color: var(--y); }

.c0 { background: var(--red); }
.c1 { background: var(--blue); }
.c2 { background: var(--amber); }
.c3 { background: var(--green); }
.shape { font-size: 1.8em; line-height: 1; width: 1.3em; text-align: center; flex: none; }

.timerbar { height: 12px; background: rgba(255, 255, 255, .14); border-radius: 99px; overflow: hidden; }
.timerbar i { display: block; height: 100%; width: 100%; background: var(--y); border-radius: 99px; }
.timerbar.low i { background: #ff4d67; }

#confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 50; }

/* ---------- landing ---------- */
.landing { min-height: calc(100vh - 34px); display: grid; place-items: center; padding: 20px; }
.card { width: min(440px, 100%); text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 30px 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.card .logo-md { margin-bottom: 4px; }
.card h1 { margin: 0; font-size: 1.9rem; line-height: 1.15; font-weight: 800; }
.card p { margin: 10px 0 22px; color: var(--muted); font-weight: 500; }
.card form { display: grid; gap: 12px; }
.card .btn { width: 100%; }
.tag { display: inline-block; background: var(--y); color: #000; font-weight: 900; font-size: .75rem; letter-spacing: .08em; padding: 4px 10px; border-radius: 6px; text-transform: uppercase; margin-bottom: 12px; }

/* ---------- host ---------- */
.hmain { max-width: 1500px; margin: 0 auto; padding: 22px; }
.lobby { text-align: center; padding-bottom: 90px; position: relative; z-index: 1; }
.lobby .logo-lg { margin-top: 6px; }
.brand { font-size: clamp(2.2rem, 5.5vw, 4.2rem); margin: 18px 0 0; font-weight: 900; letter-spacing: -.02em; line-height: 1.05; }
.sub { font-size: clamp(1.05rem, 2vw, 1.4rem); color: var(--muted); margin: 8px 0 24px; font-weight: 500; }
.joinbox { display: inline-block; background: var(--y); color: #000; border-radius: 16px; padding: 14px 34px; margin-bottom: 22px; }
.joinlabel { font-weight: 700; opacity: .7; }
.joinurl { font-size: clamp(1.5rem, 3.6vw, 2.8rem); font-weight: 900; }
.players { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: 110px; margin: 10px auto 24px; max-width: 1100px; }
.chip {
  background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 10px 18px; font-weight: 700; font-size: 1.2rem;
  animation: pop .35s cubic-bezier(.2, 1.6, .4, 1); display: inline-flex; gap: 8px; align-items: center;
}
.chip.off { opacity: .45; }
.chip button { background: none; border: 0; color: #fff; opacity: .5; font-size: 1rem; padding: 0 2px; }
.chip button:hover { opacity: 1; }
.empty { color: var(--muted); align-self: center; font-size: 1.2rem; }
.lobby-actions { display: flex; gap: 16px; justify-content: center; align-items: center; flex-wrap: wrap; }
.lobby-actions label { font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }

.qscreen { display: grid; gap: 18px; }
.qtop { display: flex; gap: 20px; align-items: center; justify-content: space-between; background: var(--y); color: #000; border-radius: 16px; padding: 22px 28px; }
.qtext { font-size: clamp(1.4rem, 3vw, 2.6rem); font-weight: 800; line-height: 1.2; }
.clock { flex: none; width: 96px; height: 96px; border-radius: 50%; background: #000; color: var(--y); display: grid; place-items: center; font-size: 3rem; font-weight: 900; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.opt {
  display: flex; align-items: center; gap: 14px; border: 0; border-radius: 12px; color: #fff; text-align: left; font-family: inherit;
  padding: 22px 24px; font-size: clamp(1.1rem, 2.1vw, 1.9rem); font-weight: 700; box-shadow: 0 5px 0 rgba(0, 0, 0, .35);
}
.qfoot { display: flex; justify-content: space-between; align-items: center; font-size: 1.3rem; font-weight: 700; }

.reveal { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; }
.reveal h3 { margin: 0 0 10px; font-size: 1.1rem; color: var(--muted); font-weight: 700; }
.rq { font-size: 1.35rem; font-weight: 800; margin-bottom: 12px; }
.ropt { position: relative; overflow: hidden; margin-bottom: 10px; padding: 14px 18px; font-size: 1.2rem; }
.ropt .fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255, 255, 255, .22); width: 0; transition: width 1s ease-out; }
.ropt > *:not(.fill) { position: relative; }
.ropt .count { margin-left: auto; font-size: 1.4rem; }
.ropt.right { outline: 5px solid var(--y); animation: pulse 1.1s ease-in-out 2; }
.ropt.wrong { opacity: .38; }
.ropt .tick { font-size: 1.6rem; color: var(--y); }
.winners { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.winners .chip { font-size: 1rem; padding: 8px 14px; background: rgba(31, 157, 69, .35); border-color: rgba(31, 157, 69, .6); }
.winners .chip b { color: var(--y); }
.nobody { font-weight: 800; font-size: 1.15rem; }

.board { position: relative; overflow: hidden; }
.row {
  position: absolute; left: 0; right: 0; height: 52px; display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; font-weight: 700; font-size: 1.1rem;
  transition: transform 1.1s cubic-bezier(.5, 0, .2, 1);
}
.row.ok { background: rgba(31, 157, 69, .3); border-color: rgba(31, 157, 69, .6); }
.row .pos { width: 2.2ch; text-align: center; color: var(--y); font-weight: 900; }
.row .nm { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .gain { color: var(--y); min-width: 5ch; text-align: right; }
.row .tot { min-width: 6ch; text-align: right; font-weight: 900; }
.row .delta { min-width: 4ch; text-align: right; font-size: .95rem; }
.up { color: #7dff9b; } .down { color: #ff8fb0; } .same { opacity: .5; }
.nextbar { margin-top: 22px; text-align: center; }

/* podium */
.podium-wrap { text-align: center; }
.podium-wrap h1 { font-size: clamp(2rem, 5vw, 3.6rem); margin: 6px 0 4px; font-weight: 900; letter-spacing: -.02em; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin: 26px auto 10px; max-width: 900px; min-height: 380px; }
.pslot { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; cursor: pointer; }
.pplayer { padding: 0 6px 10px; min-height: 130px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.pplayer .medal { font-size: clamp(2.6rem, 6vw, 4.5rem); }
.pplayer .pname { font-size: clamp(1.3rem, 3vw, 2.2rem); font-weight: 900; word-break: break-word; }
.pplayer .ptitle { font-size: 1rem; font-weight: 800; color: var(--y); text-transform: uppercase; letter-spacing: .03em; }
.pplayer .pscore { color: var(--muted); font-weight: 600; }
.pblock { width: 100%; border-radius: 14px 14px 0 0; display: grid; place-items: center; font-size: 3.4rem; font-weight: 900; color: rgba(0, 0, 0, .35); }
.r1 .pblock { height: 240px; background: linear-gradient(#f6fb62, var(--y-dark)); }
.r2 .pblock { height: 170px; background: linear-gradient(#e6e9ef, #a8b0bd); }
.r3 .pblock { height: 120px; background: linear-gradient(#e0a06a, #a8622b); }
.pslot.hidden .pblock { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .4); }
.pslot.hidden .pplayer { visibility: hidden; }
.pslot.pop .pplayer { animation: drop .9s cubic-bezier(.2, 1.4, .4, 1); }
.pslot.pop .pblock { animation: rise .7s ease-out; transform-origin: bottom; }
.r1.pop .medal { animation: spin 1.2s ease-out, wob 1.6s ease-in-out 1.2s infinite; }
.drum { font-size: 1.8rem; font-weight: 900; min-height: 2.4rem; }
.drum span { display: inline-block; animation: shake .25s infinite; }
.rest { max-width: 620px; margin: 22px auto 0; text-align: left; }
.rest .rrow { display: flex; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 6px; font-weight: 700; }
.rest .rrow .nm { flex: 1; }
.tip { color: var(--muted); font-size: .95rem; margin-top: 8px; }

/* ---------- player ---------- */
.pmain { max-width: 560px; margin: 0 auto; padding: 14px 14px 30px; min-height: calc(100vh - 46px); display: flex; flex-direction: column; }
.center { margin: auto; text-align: center; }
.center h1 { font-size: 2.1rem; margin: 8px 0; font-weight: 900; letter-spacing: -.02em; }
.center p { font-size: 1.1rem; color: var(--muted); font-weight: 500; }
.bigicon { font-size: 5rem; }
.pscreen { display: grid; gap: 14px; }
.pclock { text-align: center; font-size: 2.6rem; font-weight: 900; color: var(--y); }
.pqtext { background: var(--y); color: #000; border-radius: 14px; padding: 16px; font-size: 1.2rem; font-weight: 800; line-height: 1.25; }
.popts { display: grid; gap: 10px; }
.popts .opt { padding: 18px 16px; font-size: 1.15rem; width: 100%; }
.popts .opt.locked { opacity: .3; pointer-events: none; }
.popts .opt.picked { opacity: 1; outline: 5px solid #fff; }
.pstatus { text-align: center; font-weight: 700; font-size: 1.1rem; min-height: 1.6em; }
.pres h2 { font-size: 2.4rem; margin: 6px 0 0; font-weight: 900; }
.pres .quip { font-weight: 600; opacity: .9; margin: 4px 0 8px; }
.pres .gain { font-size: 2.2rem; font-weight: 900; color: var(--y); }
.pres .rankline { font-size: 1.4rem; font-weight: 800; margin: 12px 0 4px; }
.pres .score { opacity: .9; font-weight: 600; font-size: 1.05rem; }
.pres .right { margin-top: 18px; background: rgba(0, 0, 0, .3); padding: 12px 14px; border-radius: 12px; font-weight: 600; }

@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes pulse { 50% { transform: scale(1.03); } }
@keyframes drop { from { transform: translateY(-80px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes spin { from { transform: rotate(-360deg) scale(.2); } to { transform: none; } }
@keyframes wob { 50% { transform: rotate(10deg) scale(1.12); } }
@keyframes shake { 25% { transform: translate(-3px, 2px) rotate(-6deg); } 75% { transform: translate(3px, -2px) rotate(6deg); } }

@media (max-width: 900px) {
  .reveal { grid-template-columns: 1fr; }
  .opts { grid-template-columns: 1fr; }
  .qtop { flex-direction: column; text-align: center; }
  .podium { min-height: 300px; gap: 8px; }
  .r1 .pblock { height: 170px; } .r2 .pblock { height: 120px; } .r3 .pblock { height: 85px; }
}

/* títulos e destaques: Stapel Semi Expanded */
.card h1, .brand, .qtext, .pqtext, .clock, .pclock, .podium-wrap h1, .pname, .center h1, .pres h2, .pres .gain,
.joinurl, .strip, .tape div, .ptitle, .rq { font-family: var(--title); }
.pblock, .row .pos, .row .tot { font-family: var(--title); }
.brand, .podium-wrap h1, .center h1, .pres h2 { font-weight: 700; }
