/* CHEFE MUNDIAL (js/ui/mundial.js) — mesmo kit --mi-* do css/jogo.css. Animação só com transform/opacity. */
body.em-mundial #hud-golpes, body.em-mundial #hud-lugar { display: none; }

#mundial-hud { position: absolute; inset: 0; pointer-events: none; }   /* sem z-index: cada peça escolhe o seu (os botões ficam por cima do chat) */
#mundial-hud > * { z-index: 8; }
#mundial-hud > .mh-botoes { z-index: 11; }
#mundial-hud > *:not(.mh-prep) { pointer-events: auto; }

.mh-topo { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); width: min(560px, calc(100% - 32px)); padding: 8px 14px 6px; text-align: center; }
.mh-nome { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mh-nome b { font-size: 15px; letter-spacing: .5px; color: #fecaca; }
.mh-nome small, .mh-topo > small { color: var(--mi-txt2); font-size: 11px; }
.mh-vida { position: relative; height: 16px; margin: 5px 0 3px; border-radius: 99px; background: #1a0508; border: 1px solid #7f1d1d; overflow: hidden; }
.mh-vida i { position: absolute; inset: 0; background: linear-gradient(#f87171, #b91c1c); transform-origin: left; transition: transform .35s linear; }
.mh-vida span { position: relative; font: 800 11px/16px var(--mi-fonte); text-shadow: 0 1px 2px #000; }

.mh-rank { position: absolute; right: 14px; top: 64px; width: 210px; padding: 8px 10px; }
.mh-rank .secao { margin: 0 0 4px; }
.mh-rank ol { margin: 0; padding: 0 0 0 20px; font-size: 12px; }
.mh-rank li { padding: 1px 0; }
.mh-rank li b, #mh-eu b { display: inline-block; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; font-weight: 600; }
.mh-rank li span, #mh-eu span { float: right; color: var(--mi-txt2); font-variant-numeric: tabular-nums; }
.mh-rank li.eu b, #mh-eu .eu b { color: var(--mi-ouro); }
#mh-eu { margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--mi-fio); font-size: 12px; }
#mh-eu small { color: var(--mi-txt2); font-size: 11px; }

.mh-prep { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); text-align: center; pointer-events: none; animation: mh-pulsa .5s ease-in-out infinite alternate; }
.mh-prep b { display: block; font: 900 30px/1.1 var(--mi-fonte); color: #fecaca; text-shadow: 0 2px 0 #7f1d1d, 0 0 18px #ef4444; }
.mh-prep small { font: 800 13px var(--mi-fonte); color: #fff; letter-spacing: 1px; text-shadow: 0 1px 3px #000; }
@keyframes mh-pulsa { from { transform: translateX(-50%) scale(1); } to { transform: translateX(-50%) scale(1.06); } }

.mh-botoes { position: absolute; left: 50%; bottom: 86px; transform: translateX(-50%); display: flex; gap: 6px; padding: 6px; align-items: stretch; }
.mh-minha { width: 120px; padding: 2px 6px; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.mh-minha small { color: var(--mi-txt2); font-size: 10.5px; }
.mh-minha #mh-caido { color: var(--mi-perigo); }
.mh-bt { position: relative; min-width: 74px; padding: 6px 8px 14px; border-radius: var(--mi-r); border: 1px solid var(--mi-fio-luz); background: var(--mi-vidro2); color: var(--mi-txt);
  font: 700 12px var(--mi-fonte); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.mh-bt small { color: var(--mi-txt2); font-size: 10.5px; font-weight: 600; }
.mh-bt kbd { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); font: 700 9px var(--mi-fonte); color: var(--mi-mudo); }
.mh-bt:hover:not(:disabled) { border-color: var(--mi-ciano); }
.mh-bt:disabled { opacity: .45; cursor: default; }
.mh-bt.esp b { color: #7dd3fc; }
.mh-bt.esq b { color: #a7f3d0; }
.mh-bt.sz b { color: #86efac; }
.mh-bt.sai b { color: var(--mi-txt2); }
.mh-bt.esq.brilha { border-color: #fca5a5; animation: mh-chama .35s ease-in-out infinite alternate; }
@keyframes mh-chama { from { transform: scale(1); } to { transform: scale(1.08); } }

#mundial-alerta { position: absolute; left: 50%; top: 92px; transform: translateX(-50%); z-index: 9; display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px;
  border-radius: 99px; border-color: #b91c1c; color: var(--mi-txt); font: 13px var(--mi-fonte); cursor: pointer; white-space: nowrap; }
#mundial-alerta b { color: #fecaca; }
#mundial-alerta small { color: var(--mi-txt2); font-size: 11px; }
#mundial-alerta span { padding: 4px 10px; border-radius: 99px; background: #b91c1c; font-weight: 800; font-size: 12px; animation: mh-chama .6s ease-in-out infinite alternate; }

.mundial-card { justify-content: space-between; }
table.premios td { white-space: nowrap; }

@media (max-width: 1200px) {
  .mh-topo { top: 96px; width: min(440px, calc(100% - 32px)); }
  .mh-rank { top: 170px; }
}
@media (max-width: 700px) {
  .mh-topo { top: 132px; }
  .mh-rank { top: auto; bottom: 150px; right: 8px; width: 170px; }
  .mh-botoes { bottom: 76px; width: calc(100% - 16px); justify-content: center; flex-wrap: wrap; }
  .mh-minha { width: 100%; }
  #mundial-alerta { top: 132px; }
}
