/* FATO OU FAKE? — identidade visual */
:root {
  --bg: #0a1433;
  --bg2: #111e47;
  --card: #16245a;
  --line: rgba(255,255,255,.12);
  --text: #ffffff;
  --muted: #b7c2e6;
  --accent: #ffc928;
  --fato: #00c853;
  --fato-d: #009a40;
  --fake: #ff1f3d;
  --fake-d: #c90f28;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  font-size: 18px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, var(--bg2), var(--bg)) fixed;
  background-color: var(--bg);
  color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.hidden { display: none !important; }
.wrap { max-width: 560px; margin: 0 auto; padding: 18px 16px 40px; }
.wide { max-width: 1100px; }

/* logo */
.logo { text-align: center; margin: 10px 0 18px; user-select: none; }
.logo .word { font-weight: 900; letter-spacing: .5px; font-size: 2.3rem; line-height: 1; }
.logo .fato { color: var(--fato); }
.logo .ou { color: var(--text); font-size: .62em; vertical-align: middle; margin: 0 .2em; opacity: .9; }
.logo .fake { color: var(--fake); }
.logo .q { color: var(--accent); }
.logo .slogan { color: var(--muted); font-size: .95rem; margin-top: 6px; font-weight: 700; }
.logo.small .word { font-size: 1.5rem; }
.event-name { text-align: center; font-weight: 800; font-size: 1.25rem; color: var(--accent); margin: -6px 0 14px; }

/* cartões e textos */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card h2 { margin: 0 0 12px; font-size: 1.3rem; }
.center { text-align: center; }
.muted { color: var(--muted); }
.big { font-size: 1.5rem; font-weight: 900; }
.huge { font-size: 2.4rem; font-weight: 900; line-height: 1.1; }
.small { font-size: .85rem; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; }
.spacer { height: 12px; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.1); font-weight: 800; font-size: .85rem; }
.pill.accent { background: var(--accent); color: #1b1300; }

/* formulários */
label { display: block; font-weight: 800; margin: 12px 0 6px; }
input:not([type]), input[type=text], input[type=password], input[type=number], input[type=tel], select, textarea {
  width: 100%; padding: 16px; border-radius: 16px; border: 2px solid var(--line);
  background: rgba(0,0,0,.25); font-size: 1.15rem; outline: none;
}
textarea { min-height: 96px; resize: vertical; font-size: 1rem; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
.check { display: flex; align-items: center; gap: 12px; font-weight: 700; margin: 12px 0; }
.check input { width: 26px; height: 26px; accent-color: var(--accent); }

/* botões */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 64px; padding: 14px 18px; border: 0; border-radius: 18px;
  background: var(--accent); color: #1b1300; font-weight: 900; font-size: 1.2rem; cursor: pointer;
  box-shadow: 0 6px 0 rgba(0,0,0,.25); transition: transform .08s, filter .15s; text-decoration: none;
}
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: rgba(255,255,255,.1); color: var(--text); box-shadow: none; border: 2px solid var(--line); }
.btn.green { background: var(--fato); color: #fff; }
.btn.red { background: var(--fake); color: #fff; }
.btn.blue { background: #2f6bff; color: #fff; }
.btn.sm { min-height: 46px; font-size: 1rem; padding: 8px 14px; border-radius: 14px; width: auto; }
.btn + .btn { margin-top: 12px; }
.row .btn + .btn { margin-top: 0; }
.linkbtn { background: none; border: 0; color: var(--accent); font-weight: 800; text-decoration: underline; cursor: pointer; padding: 10px; font-size: 1rem; }

/* botões de voto */
.vote-grid { display: grid; gap: 16px; margin-top: 8px; }
.vote-btn {
  border: 0; border-radius: 28px; padding: 26px 16px; min-height: 30vh; color: #fff; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  box-shadow: 0 10px 0 rgba(0,0,0,.28); transition: transform .08s;
}
.vote-btn:active { transform: translateY(5px); box-shadow: 0 5px 0 rgba(0,0,0,.28); }
.vote-btn .ico { font-size: 4rem; line-height: 1; font-weight: 900; }
.vote-btn .w { font-size: 3rem; font-weight: 900; letter-spacing: 2px; line-height: 1; }
.vote-btn .s { font-size: 1.15rem; font-weight: 800; opacity: .95; }
.vote-btn.fato { background: linear-gradient(180deg, #19e06a, var(--fato-d)); }
.vote-btn.fake { background: linear-gradient(180deg, #ff4a62, var(--fake-d)); }
@media (min-height: 760px) { .vote-btn { min-height: 32vh; } }
@media (orientation: landscape) and (max-height: 600px) { .vote-grid { grid-template-columns: 1fr 1fr; } .vote-btn { min-height: 60vh; } }

/* tela cheia (exibição da escolha / revelação) */
.full {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px; animation: pop .35s ease-out;
}
.full.fato { background: var(--fato); }
.full.fake { background: var(--fake); }
.full.none { background: #39445f; }
.full .mark { font-size: 28vw; line-height: .9; font-weight: 900; }
.full .word { font-size: 21vw; font-weight: 900; letter-spacing: .03em; line-height: 1; text-shadow: 0 6px 0 rgba(0,0,0,.18); }
.full .sub { font-size: 1.4rem; font-weight: 900; margin-top: 12px; }
.full .tip { position: absolute; bottom: 18px; left: 0; right: 0; font-weight: 700; opacity: .85; font-size: .95rem; }
@media (min-width: 700px) { .full .mark { font-size: 12rem; } .full .word { font-size: 9rem; } }
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* confirmação */
.modal-bg { position: fixed; inset: 0; background: rgba(3,8,25,.8); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 18px; animation: pop .2s; }
.modal { background: var(--card); border-radius: 26px; padding: 24px; width: 100%; max-width: 440px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.modal h3 { margin: 0 0 14px; font-size: 1.5rem; text-align: center; }

/* status */
.pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); display: inline-block; animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,201,40,.6); } 70% { box-shadow: 0 0 0 16px rgba(255,201,40,0); } 100% { box-shadow: 0 0 0 0 rgba(255,201,40,0); } }
.netbar { position: fixed; top: 0; left: 0; right: 0; z-index: 80; background: #b26a00; color: #fff; text-align: center; font-weight: 800; padding: 6px; font-size: .9rem; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; background: #fff; color: #0a1433; padding: 14px 20px; border-radius: 16px; font-weight: 800; box-shadow: var(--shadow); max-width: 92vw; text-align: center; animation: pop .2s; }
.toast.err { background: var(--fake); color: #fff; }
.sound-toggle { position: fixed; top: 10px; right: 10px; z-index: 40; background: rgba(255,255,255,.1); border: 0; border-radius: 50%; width: 46px; height: 46px; font-size: 1.3rem; cursor: pointer; }

/* barras de resultado */
.bars { display: grid; gap: 12px; margin: 10px 0; }
.bar { position: relative; height: 58px; border-radius: 16px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar .fill { position: absolute; inset: 0 auto 0 0; border-radius: 16px; transition: width .9s cubic-bezier(.2,.8,.2,1); }
.bar.fato .fill { background: var(--fato); }
.bar.fake .fill { background: var(--fake); }
.bar .lbl { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; height: 100%; padding: 0 16px; font-weight: 900; font-size: 1.15rem; }
.bar.win { outline: 4px solid #fff; }

/* ranking */
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rank li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.06); font-weight: 800; }
.rank li.me { background: rgba(255,201,40,.18); outline: 2px solid var(--accent); }
.rank .pos { width: 38px; text-align: center; font-size: 1.1rem; }
.rank .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.rank .pts { font-size: 1.2rem; color: var(--accent); }
.rank .delta { font-size: .85rem; color: var(--fato); margin-left: 6px; }

/* pódio */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 10px; margin: 18px 0 8px; }
.podium .col { text-align: center; }
.podium .medal { font-size: 2.6rem; }
.podium .nm { font-weight: 900; font-size: 1rem; margin: 6px 0; word-break: break-word; }
.podium .pts { color: var(--accent); font-weight: 900; }
.podium .step { border-radius: 16px 16px 0 0; margin-top: 8px; display: flex; align-items: flex-start; justify-content: center; padding-top: 10px; font-size: 1.8rem; font-weight: 900; color: rgba(0,0,0,.45); }
.podium .p1 .step { height: 150px; background: linear-gradient(#ffe066, #e3a700); }
.podium .p2 .step { height: 110px; background: linear-gradient(#f1f4fb, #a9b3c8); }
.podium .p3 .step { height: 80px; background: linear-gradient(#f0b07a, #b0672e); }

.closing { font-size: 1.15rem; font-style: italic; text-align: center; line-height: 1.5; }
.closing .extra { margin-top: 12px; font-style: normal; color: var(--accent); font-weight: 700; white-space: pre-line; }

/* admin */
.tabs { scrollbar-width: none; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; position: sticky; top: 0; z-index: 20; background: var(--bg); padding-top: 8px; }
.tabs button { flex: 0 0 auto; border: 0; border-radius: 14px; padding: 12px 16px; background: rgba(255,255,255,.08); font-weight: 800; cursor: pointer; font-size: 1rem; }
.tabs button.on { background: var(--accent); color: #1b1300; }
.list { display: grid; gap: 8px; }
.item { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.06); }
.item .nm { flex: 1; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #64708f; flex: 0 0 auto; }
.dot.on { background: var(--fato); box-shadow: 0 0 8px var(--fato); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.08); margin: 4px; font-weight: 700; }
.chip.yes { background: rgba(0,200,83,.25); }
.phase-box { border: 3px solid var(--accent); }
.step-label { font-size: .9rem; font-weight: 900; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }
.truth-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.truth-pick .btn.sel { outline: 4px solid #fff; }
.truth-pick .btn:not(.sel) { opacity: .6; }
.qr-box { background: #fff; border-radius: 18px; padding: 14px; display: inline-block; }
.qr-box img, .qr-box canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { font-size: .95rem; padding: 12px; min-width: 0; flex: 1; }
.copy-field .btn { flex: 0 0 auto; }
table.hist { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.hist th, table.hist td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches button { width: 48px; height: 48px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.swatches button.on { border-color: #fff; }
.danger { border-color: rgba(255,31,61,.5); }

/* TV */
body.tv { overflow: hidden; }
.tv-root { height: 100vh; display: grid; grid-template-rows: auto 1fr auto; padding: 2.5vh 3vw; gap: 2vh; }
.tv-head { display: flex; align-items: center; justify-content: space-between; gap: 2vw; }
.tv-head .logo { margin: 0; text-align: left; }
.tv-head .logo .word { font-size: 4.2vh; }
.tv-head .ev { font-size: 3.4vh; font-weight: 900; color: var(--accent); text-align: center; flex: 1; }
.tv-head .meta { font-size: 2.6vh; font-weight: 800; text-align: right; color: var(--muted); }
.tv-main { display: flex; align-items: center; justify-content: center; min-height: 0; }
.tv-foot { display: flex; justify-content: space-between; align-items: center; font-size: 2.2vh; color: var(--muted); font-weight: 700; }
.tv-mini-qr { background: #fff; border-radius: 10px; padding: 6px; width: 11vh; }
.tv-mini-qr img { width: 100%; display: block; }
.tv-big { font-size: 9vh; font-weight: 900; line-height: 1.05; text-align: center; }
.tv-mid { font-size: 5vh; font-weight: 900; text-align: center; }
.tv-sub { font-size: 3.2vh; color: var(--muted); font-weight: 800; text-align: center; }
.tv-lobby { display: grid; grid-template-columns: auto 1fr; gap: 5vw; align-items: center; width: 100%; }
.tv-lobby .qr-box { width: 46vh; padding: 2vh; }
.tv-names { display: flex; flex-wrap: wrap; justify-content: center; max-height: 40vh; overflow: hidden; }
.tv-names .chip { font-size: 2.4vh; }
.tv-results { width: 100%; max-width: 1300px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 4vw; align-items: center; }
.tv .bar { height: 10vh; border-radius: 2vh; }
.tv .bar .lbl { font-size: 4.2vh; padding: 0 3vh; }
.tv .rank li { font-size: 3vh; padding: 1.3vh 2vh; }
.tv .rank .pts { font-size: 3.4vh; }
.tv .podium .medal { font-size: 8vh; }
.tv .podium .nm { font-size: 3.4vh; }
.tv .podium .pts { font-size: 3vh; }
.tv .podium .p1 .step { height: 26vh; } .tv .podium .p2 .step { height: 19vh; } .tv .podium .p3 .step { height: 13vh; }
.tv .closing { font-size: 3vh; }
.ring { width: 40vh; height: 40vh; }
.reveal-word { font-size: 18vh; font-weight: 900; line-height: 1; letter-spacing: .03em; }
.reveal-word.fato { color: var(--fato); } .reveal-word.fake { color: var(--fake); }
@media (max-width: 900px) {
  body.tv { overflow: auto; }
  .tv-root { height: auto; min-height: 100vh; }
  .tv-lobby, .tv-results { grid-template-columns: 1fr; justify-items: center; }
}

.tv-head .meta { padding-right: 120px; }
.tabs::-webkit-scrollbar { display: none; }
