/* Emoji Charada — estilo das telas. Sem roxo (regra da casa; um teste confere). */
:root {
  --traco: #2A1A12;
  --sol: #FFB627;
  --sol-claro: #FFE08A;
  --creme: #FFF8E7;
  --coral: #FF7F6B;
  --jeans: #4A7DB5;
  --jeans-claro: #6FA3D8;
  --verde: #2BB673;
  --branco: #FFFFFF;

  /* ÁREAS QUE O TIKTOK COBRE (Jogo para celular, tela deitada), medidas do palco 1920×1080.
     Conferir na live de teste (Tarefa 11). Ali só vai fundo — nunca charada, tempo, instrução nem dica. */
  --tiktok-chat-largura: 600px;   /* faixa de baixo à esquerda: o chat */
  --tiktok-chat-altura: 400px;
  --tiktok-botoes-largura: 150px; /* coluna da direita: os botões */
  --tiktok-topo-altura: 30px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif; font-weight: 800; color: var(--traco); }

/* ---------- tela da live ---------- */
.tela-live { background: var(--sol); overflow: hidden; touch-action: manipulation; user-select: none; }
.palco {
  position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px;
  transform: translate(-50%, -50%) scale(var(--escala, 1)); transform-origin: center;
  background:
    radial-gradient(circle at 20% 15%, #FFD25C 0 180px, transparent 181px),
    radial-gradient(circle at 88% 80%, #FFC83D 0 260px, transparent 261px),
    radial-gradient(circle at 60% 110%, #FFD25C 0 300px, transparent 301px),
    linear-gradient(160deg, #FFC02E, #FF9F1C);
  overflow: hidden;
}
.cartao { background: var(--creme); border: 6px solid var(--traco); border-radius: 36px; box-shadow: 0 10px 0 #0000002e; }

/* placar */
.topo { position: absolute; left: 620px; top: calc(var(--tiktok-topo-altura) + 14px); display: flex; gap: 16px; align-items: center; }
.pilula { background: var(--creme); border: 5px solid var(--traco); border-radius: 60px; padding: 8px 26px; font-size: 38px; line-height: 1.2; white-space: nowrap; box-shadow: 0 6px 0 #0000002e; }
.pilula b { font-size: 46px; }
.pilula.nivel { background: var(--jeans-claro); color: var(--branco); text-shadow: 0 3px 0 var(--traco); }
.pilula.tema { background: var(--coral); color: var(--branco); text-shadow: 0 3px 0 var(--traco); }
.coracoes { letter-spacing: 6px; }
.coracoes span { display: inline-block; transition: transform .35s, opacity .35s, filter .35s; }
.coracoes span.vazio { opacity: .28; filter: grayscale(1); transform: scale(.8); }

/* ranking (em cima do chat do TikTok, nunca dentro dele) */
.ranking { position: absolute; left: 30px; top: 150px; width: 520px; height: calc(1080px - 150px - var(--tiktok-chat-altura) - 30px); padding: 14px 24px; overflow: hidden; }
.ranking h2 { margin: 0 0 6px; font-size: 40px; text-align: center; }
.ranking ol { list-style: none; margin: 0; padding: 0; }
.ranking li { display: flex; align-items: center; gap: 12px; font-size: 36px; padding: 7px 14px; border-radius: 18px; }
.ranking li:nth-child(odd) { background: #FFEFC2; }
.ranking li .posicao { width: 52px; text-align: center; }
.ranking li .nome { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking li .pontos { background: var(--verde); color: var(--branco); border: 4px solid var(--traco); border-radius: 30px; padding: 0 16px; }
.ranking li.subiu { animation: pulo .5s; }
.ranking .vazio { font-size: 32px; text-align: center; opacity: .7; margin: 60px 20px; }

/* o celular gigante */
.celulao { position: absolute; left: 620px; top: 150px; width: 600px; height: 560px; background: #1F3A4D; border: 7px solid var(--traco); border-radius: 60px; padding: 46px 26px 30px; box-shadow: 0 12px 0 #0000002e; }
.alto-falante { position: absolute; top: 18px; left: 50%; width: 130px; height: 12px; margin-left: -65px; border-radius: 8px; background: #5B6B78; }
.visor { height: 100%; background: var(--creme); border: 5px solid var(--traco); border-radius: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; overflow: hidden; padding: 12px; text-align: center; }
.emojis { font-size: 150px; line-height: 1.1; white-space: nowrap; font-weight: 400; display: flex; justify-content: center; gap: 14px; max-width: 100%; }
.emojis.tres { font-size: 118px; }
.emojis.muitos { font-size: 92px; }
.emojis.demais { font-size: 72px; gap: 8px; }
.emojis span { display: inline-block; animation: entra .45s cubic-bezier(.2, 1.6, .4, 1) both; }
.aviso { font-size: 62px; line-height: 1.1; }
.aviso:empty { display: none; }
.dica { font-size: 50px; letter-spacing: 4px; white-space: pre-wrap; line-height: 1.15; font-family: "Consolas", "Courier New", monospace; font-weight: 800; background: var(--sol-claro); border: 4px solid var(--traco); border-radius: 18px; padding: 4px 18px; max-width: 100%; overflow: hidden; }
.dica.longa { font-size: 30px; letter-spacing: 1px; }
.dica.enorme { font-size: 21px; letter-spacing: 0; }
.dica b { color: #D8432B; display: inline-block; animation: pulo .6s; }
.resposta { font-size: 64px; line-height: 1.05; color: var(--branco); background: var(--verde); border: 5px solid var(--traco); border-radius: 24px; padding: 8px 24px; text-shadow: 0 3px 0 var(--traco); animation: entra .4s both; max-width: 100%; }
.resposta.longa { font-size: 40px; }

/* tempo: canto de cima do celular */
.tempo { position: absolute; left: -46px; top: -46px; width: 132px; height: 132px; background: var(--creme); border: 6px solid var(--traco); border-radius: 50%; box-shadow: 0 6px 0 #0000002e; }
.tempo svg { position: absolute; inset: 6px; transform: rotate(-90deg); }
.tempo circle { fill: none; stroke-width: 11; }
.tempo .trilho { stroke: #F1DFAE; }
.tempo .arco { stroke: var(--verde); stroke-linecap: round; stroke-dasharray: 276.5; transition: stroke .3s; }
.tempo.acabando .arco { stroke: #E4572E; }
.tempo b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 56px; }
.tempo.acabando { animation: pulsa .5s infinite alternate; }

/* valendo N pontos */
.valendo { position: absolute; right: -52px; top: -40px; width: 190px; height: 150px; background: var(--coral); color: var(--branco); border: 6px solid var(--traco); border-radius: 30px; transform: rotate(8deg); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 26px; line-height: 1; text-shadow: 0 3px 0 var(--traco); box-shadow: 0 6px 0 #0000002e; }
.valendo b { font-size: 78px; line-height: .95; }
.valendo.cresceu { animation: pulo .5s; }

/* instrução fixa */
.instrucao { position: absolute; left: 600px; top: 736px; width: 640px; text-align: center; font-size: 42px; color: var(--branco); background: var(--traco); border-radius: 50px; padding: 12px 10px; box-shadow: 0 8px 0 #0000002e; white-space: nowrap; }

/* torcida */
.torcida { position: absolute; left: 620px; top: 836px; width: 600px; display: flex; flex-direction: column; gap: 14px; }
.barra { position: relative; height: 62px; background: var(--creme); border: 5px solid var(--traco); border-radius: 40px; overflow: hidden; box-shadow: 0 5px 0 #0000002e; }
.barra i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--sol-claro); transition: width .4s; }
#barra-curtidas i { background: #FFB3A7; }
.barra span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; white-space: nowrap; }

/* a Mia (deixa a coluna dos botões do TikTok livre) */
.mia { position: absolute; right: calc(var(--tiktok-botoes-largura) + 4px); bottom: -40px; width: 540px; height: 720px; transform-origin: 50% 100%; }
.mia img { position: absolute; inset: 0; width: 100%; height: 100%; }
.mia.pulinho { animation: pulinho .6s; }
.mini-tela { position: absolute; display: grid; place-items: center; font-size: 44px; font-weight: 400; line-height: 1.05; text-align: center; overflow: hidden; }
.balao { position: absolute; right: calc(var(--tiktok-botoes-largura) + 20px); top: 150px; width: 460px; min-height: 110px; background: var(--branco); border: 6px solid var(--traco); border-radius: 36px; padding: 16px 22px; font-size: 38px; line-height: 1.15; text-align: center; display: grid; place-items: center; box-shadow: 0 8px 0 #0000002e; animation: entra .3s both; overflow-wrap: anywhere; }
.balao::after { content: ""; position: absolute; left: 50%; bottom: -34px; margin-left: -20px; border: 20px solid transparent; border-top: 30px solid var(--traco); border-bottom: 0; }

/* estados */
.fase-espera .instrucao, .fase-espera .torcida { opacity: .45; }
.religando { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); background: var(--traco); color: var(--branco); font-size: 26px; padding: 4px 22px; border-radius: 30px; opacity: .85; }

/* confete do recorde (curto) */
.confete { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confete i { position: absolute; top: -40px; width: 22px; height: 34px; border: 3px solid var(--traco); border-radius: 6px; animation: cai 2.4s ease-in forwards; }

/* TOQUE AQUI */
.toque { position: fixed; inset: 0; z-index: 10; border: 0; background: #2A1A12E6; color: var(--branco); font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1vh; cursor: pointer; }
.toque b { font-size: min(14vh, 11vw); background: var(--sol); color: var(--traco); border: .8vh solid var(--branco); border-radius: 4vh; padding: 1vh 5vw; }
.toque span { font-size: min(6vh, 5vw); }
.toque-emoji { font-size: min(16vh, 12vw) !important; animation: pulsa .6s infinite alternate; }
.toque[hidden] { display: none; }

@keyframes entra { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes pulo { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes pulsa { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes pulinho { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-46px) scale(1.02, .98); } 60% { transform: translateY(0) scale(.98, 1.02); } }
@keyframes cai { to { transform: translateY(1200px) rotate(540deg); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01s !important; } }

/* ---------- painel do celular (em pé) ---------- */
.tela-painel { background: linear-gradient(160deg, #FFC02E, #FF9F1C) fixed; min-height: 100%; font-weight: 700; }
.painel { max-width: 520px; margin: 0 auto; padding: 14px 14px 90px; display: flex; flex-direction: column; gap: 14px; }
.tela-painel .cartao { border-width: 4px; border-radius: 22px; box-shadow: 0 6px 0 #0000002e; padding: 14px; }
.painel-topo { text-align: center; color: var(--traco); }
.painel-topo h1 { margin: 0 0 8px; font-size: 26px; }
.situacao { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.situacao span { background: var(--creme); border: 3px solid var(--traco); border-radius: 30px; padding: 4px 12px; font-size: 16px; white-space: nowrap; }
.fase { margin-top: 8px; font-size: 16px; }
.passo h2, .alerta h2 { margin: 0 0 10px; font-size: 21px; display: flex; align-items: center; gap: 10px; }
.passo h2 i { font-style: normal; width: 36px; height: 36px; border-radius: 50%; background: var(--traco); color: var(--branco); display: grid; place-items: center; flex: none; }
.linha { display: flex; gap: 8px; margin-bottom: 10px; }
.linha input { flex: 1; min-width: 0; }
.tela-painel input { font: inherit; font-size: 18px; padding: 12px 14px; border: 3px solid var(--traco); border-radius: 14px; background: var(--branco); color: var(--traco); width: 100%; }
.botao { font: inherit; font-size: 16px; font-weight: 800; color: var(--branco); background: var(--traco); border: 3px solid var(--traco); border-radius: 14px; padding: 12px 14px; min-height: 50px; cursor: pointer; text-align: center; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.botao.grande { width: 100%; font-size: 20px; min-height: 62px; background: var(--verde); text-shadow: 0 2px 0 #00000055; box-shadow: 0 5px 0 var(--traco); }
.botao.claro { background: var(--branco); color: var(--traco); }
.botao.perigo { background: #E4572E; color: var(--branco); width: 100%; margin-top: 10px; }
.botao:active { transform: translateY(3px); box-shadow: none; }
.aviso { font-size: 14px; font-weight: 600; margin: 10px 0 0; opacity: .85; line-height: 1.35; }
.estado-chat { margin: 10px 0 0; font-size: 16px; padding: 8px 12px; border-radius: 12px; background: #F1DFAE; }
.estado-chat[data-situacao="lendo"] { background: #BFEBD3; }
.estado-chat[data-situacao="caiu"], .estado-chat[data-situacao="sem_live"] { background: #FFC9BD; }
.alerta { background: #FFC9BD !important; }
.alerta p { margin: 0 0 10px; font-size: 15px; }
.mais summary { font-size: 20px; cursor: pointer; padding: 4px; }
.mais h3 { margin: 20px 0 8px; font-size: 17px; border-top: 3px dashed #2A1A1233; padding-top: 14px; }
.grade { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gabarito { font-size: 22px; background: var(--sol-claro); border: 3px solid var(--traco); border-radius: 14px; padding: 10px; text-align: center; margin: 10px 0 0; }
.regras { margin: 0; padding-left: 20px; font-size: 15px; font-weight: 600; line-height: 1.4; }
.regra-fixa { font-size: 15px; background: var(--sol-claro); border-radius: 12px; padding: 10px; margin: 10px 0 0; }
.live { background: #FFEFC2; border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; font-size: 14px; }
.live p { margin: 3px 0 0; font-weight: 600; }
.recado { position: fixed; left: 14px; right: 14px; bottom: 14px; margin: 0 auto; max-width: 492px; background: var(--traco); color: var(--branco); border-radius: 16px; padding: 14px; text-align: center; font-size: 17px; box-shadow: 0 6px 16px #0006; }
.recado.ruim { background: #C13B1B; }
.entrada { max-width: 380px; margin: 8vh auto 0; text-align: center; padding: 22px !important; }
.entrada-mia { position: relative; width: 170px; height: 170px; margin: 0 auto; border-radius: 50%; background: var(--sol-claro); border: 4px solid var(--traco); overflow: hidden; }
/* as camadas da Mia empilhadas (corpo, olhos, boca), mostrando do peito para cima */
.entrada-mia img { position: absolute; left: -8%; top: -4%; width: 116%; }
.campo-chave { position: relative; }
.campo-chave input { padding-right: 62px; }
.campo-chave button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 48px; height: 44px; border: 0; background: none; font-size: 26px; cursor: pointer; border-radius: 10px; }
.entrada h1 { margin: 10px 0 4px; }
.entrada form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.erro { color: #C13B1B; font-size: 16px; }
