/* LIDERAR AS TROPAS (16/11/2026): batalha 3D em tela cheia por cima do jogo (js/lead-battle.js) + dialogo de entrada (js/lead.js) */
#lead-battle { position: fixed; inset: 0; z-index: 9000; background: #0b1424; color: #e8e4d4; font: 14px system-ui, sans-serif; user-select: none; -webkit-user-select: none; }
#lead-battle * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
#lead-battle .lb-hide { display: none !important; }
#lb-cv { display: block; width: 100%; height: 100%; touch-action: none; }
#lb-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #9aa6b8; font: 16px Georgia, serif; background: rgba(8,14,26,.85); }
#lb-hud { position: absolute; inset: 0; pointer-events: none; }
#lb-placar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: min(560px, 76vw); text-align: center; }
#lb-placar .t { font: 13px Georgia, serif; color: #fff7e0; text-shadow: 0 1px 4px #000; margin-bottom: 4px; }
#lb-barra { display: flex; height: 22px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(0,0,0,.6); background: #111; font: 600 12px system-ui; }
#lb-barra .a { background: linear-gradient(#3b8cff, #1c5bc0); display: flex; align-items: center; padding: 0 8px; white-space: nowrap; transition: width .3s; }
#lb-barra .e { background: linear-gradient(#ff5a4d, #b3241a); display: flex; align-items: center; justify-content: flex-end; padding: 0 8px; flex: 1; white-space: nowrap; overflow: hidden; }
#lb-placar .obj { margin-top: 4px; font-size: 12px; color: #dfe6f0; text-shadow: 0 1px 3px #000; }
#lb-placar .obj b { color: #f0c040; }
#lb-mira { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
#lb-mira i { position: absolute; background: rgba(255,255,255,.9); box-shadow: 0 0 2px #000; }
#lb-mira .c { width: 3px; height: 3px; left: -1.5px; top: -1.5px; border-radius: 50%; }
#lb-hit { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px; opacity: 0; transition: opacity .15s; }
#lb-hit::before, #lb-hit::after { content: ''; position: absolute; left: 12px; top: 0; width: 2px; height: 26px; background: #fff; transform: rotate(45deg); box-shadow: 0 0 3px #000; }
#lb-hit::after { transform: rotate(-45deg); }
#lb-hit.kill::before, #lb-hit.kill::after { background: #ff3b30; }
#lb-dano { position: absolute; inset: 0; box-shadow: inset 0 0 160px rgba(200,0,0,.9); opacity: 0; }
#lb-luneta { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, transparent 0 32vmin, #000 32.3vmin); }
#lb-vida { position: absolute; left: 16px; bottom: 16px; width: 250px; }
#lb-vida .n { font: 12px system-ui; color: #dfe6f0; text-shadow: 0 1px 3px #000; margin-bottom: 3px; display: flex; justify-content: space-between; }
#lb-vida .b { height: 10px; background: rgba(0,0,0,.55); border-radius: 5px; overflow: hidden; border: 1px solid rgba(255,255,255,.15); }
#lb-vida .b i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #3ecf6e, #9be86a); transition: width .15s; }
#lb-lider { font-size: 12px; color: #f0c040; margin-top: 5px; text-shadow: 0 1px 3px #000; white-space: pre-line; }
#lb-arma { position: absolute; right: 16px; bottom: 16px; text-align: right; text-shadow: 0 1px 4px #000; }
#lb-arma .n { font-size: 12px; color: #dfe6f0; }
#lb-arma .m { font: 30px Georgia, serif; color: #fff; }
#lb-arma .m small { font-size: 15px; color: #9aa6b8; }
#lb-arma .r { font-size: 12px; color: #f0c040; }
#lb-ordens { position: absolute; right: 16px; bottom: 96px; font-size: 12px; color: #dfe6f0; text-align: right; text-shadow: 0 1px 3px #000; line-height: 1.6; }
#lead-battle kbd { background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.3); border-radius: 4px; padding: 0 5px; font: 11px ui-monospace, monospace; color: #e8e4d4; }
#lb-feed { position: absolute; right: 14px; top: 76px; text-align: right; font-size: 13px; }
#lb-feed div { background: rgba(0,0,0,.45); padding: 3px 8px; border-radius: 4px; margin-bottom: 3px; transition: opacity .5s; }
#lb-feed .a { color: #8fbaff; } #lb-feed .e { color: #ff9a90; } #lb-feed .eu { color: #f0c040; font-weight: 600; }
#lb-toast { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); font: 22px Georgia, serif; color: #fff3c8; text-shadow: 0 2px 8px #000; opacity: 0; transition: opacity .3s; text-align: center; }
#lb-toast.on { opacity: 1; }
#lb-dica { position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%); background: rgba(10,16,28,.8); border: 1px solid rgba(240,192,64,.28); border-radius: 8px; padding: 8px 14px; font-size: 13px; color: #fff3c8; }
/* quadros por segundo, no mesmo lugar e jeito do contador do mapa (#map-fps) */
#lb-fps { position: absolute; left: 6px; bottom: 1px; font: 10px/1.2 monospace; color: rgba(255,255,255,0.78); text-shadow: 0 0 2px #000, 0 0 2px #000; }
#lb-menu-btn { position: absolute; left: 14px; top: 12px; width: 40px; height: 40px; border-radius: 10px; background: rgba(15,26,46,.7); border: 1px solid rgba(255,255,255,.25); color: #fff; font-size: 18px; pointer-events: auto; cursor: pointer; }
.lb-sobre { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: transparent; }
.lb-cartao { width: min(440px, 92vw); background: rgba(15,26,46,.95); border: 1px solid rgba(240,192,64,.28); border-radius: 12px; padding: 18px; box-shadow: 0 10px 40px rgba(0,0,0,.6); max-height: 92vh; overflow-y: auto; }
.lb-cartao h2 { font: 24px Georgia, serif; margin: 0 0 4px; color: #fff7e0; }
.lb-cartao p { color: #cfd6e0; line-height: 1.5; margin: 6px 0; }
.lb-cartao .cont { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; background: rgba(0,0,0,.25); border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.lb-cartao .cont b { text-align: right; }
.lb-cartao .ctl { font-size: 13px; color: #9aa6b8; line-height: 1.8; margin: 8px 0 12px; }
.lb-cartao.der { border-color: #ff4a3d; } .lb-cartao.der h2 { color: #ff8a80; }
.lb-cartao .act-btn { display: block; width: 100%; margin: 0 0 6px; }
#lb-toque { position: absolute; inset: 0; pointer-events: none; }
#lb-toque .bt { position: absolute; pointer-events: auto; width: 62px; height: 62px; border-radius: 50%; background: rgba(15,26,46,.55); border: 2px solid rgba(255,255,255,.3); color: #fff; font: 600 11px system-ui; display: flex; align-items: center; justify-content: center; text-align: center; touch-action: none; }
#lb-toque .bt.on { border-color: #f0c040; background: rgba(90,70,10,.6); }
#lb-toque .bt.q { border-radius: 10px; width: 74px; height: 40px; }
#lb-t-fogo { right: 26px; bottom: 120px; width: 82px !important; height: 82px !important; background: rgba(160,30,20,.55) !important; }
#lb-t-mira { right: 122px; bottom: 150px; } #lb-t-agacha { right: 122px; bottom: 74px; } #lb-t-rec { right: 30px; bottom: 30px; }
#lb-t-avanca { right: 26px; top: 120px; } #lb-t-comigo { right: 26px; top: 168px; }
#lb-stick { position: absolute; width: 110px; height: 110px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); background: rgba(0,0,0,.15); display: none; }
#lb-stick i { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px; border-radius: 50%; background: rgba(255,255,255,.35); }
@media (max-width: 768px) {
    #lb-vida { width: 160px; left: 12px; bottom: auto; top: 64px; }
    #lb-arma { right: auto; left: 12px; bottom: auto; top: 112px; text-align: left; }
    #lb-arma .m { font-size: 22px; }
    #lb-ordens { display: none; }
    #lb-feed { top: 220px; font-size: 12px; }
    #lb-placar { width: 70vw; }
}
/* dialogo de entrada (showConfirmDialog) e Loja de armas */
.lead-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lead-chip { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.15); color: #e8e4d4; border-radius: 999px; padding: 6px 11px; cursor: pointer; font: 13px system-ui, sans-serif; }
.lead-chip.on { border-color: #f0c040; color: #fff3c8; background: #2a2410; }
/* caixa "Liderar as tropas" do dialogo de ataque */
.lead-check { display: flex; align-items: center; gap: 10px; margin: 10px 0 8px; padding: 9px 11px; border: 1px solid rgba(240,192,64,.45); border-radius: 9px; background: rgba(240,192,64,.08); cursor: pointer; color: #fff3c8; font-size: 14px; }
.lead-check input { width: 18px; height: 18px; accent-color: #f0c040; flex: none; cursor: pointer; }
.lead-check small { display: block; color: #cfc6a8; font-size: 12px; }
.lead-check.off { opacity: .5; cursor: not-allowed; border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.03); }
.lead-check.off input { cursor: not-allowed; }
.act-btn.lead-btn { background: linear-gradient(90deg, #6b4d0e, #3a2a08); border-color: #f0c040; color: #fff3c8; }
.wp-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 9px 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; background: rgba(255,255,255,.03); margin-bottom: 6px; }
.wp-row b { color: #fff7e0; }
.wp-row small { color: #9aa6b8; display: block; font-size: 12px; }
.wp-row .wp-buy { display: flex; gap: 6px; align-items: center; }
.wp-row input { width: 70px; padding: 6px; border-radius: 6px; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.3); color: #fff; font: 13px system-ui; }
.wp-row .act-btn { width: auto; margin: 0; padding: 6px 10px; }
.wp-pow { display: inline-block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #f0c040, #ff7a3d); vertical-align: middle; margin-left: 6px; }
/* APP ANDROID (16/11/2026): batalha desenhada pelo app (js/lead-native.js) por baixo da pagina transparente: some o fundo e o
   canvas, e o resto do jogo fica escondido enquanto a batalha esta aberta */
#lead-battle.lb-nativo { background: transparent; }
#lead-battle.lb-nativo #lb-cv { background: transparent; } /* fica: recebe os toques (andar/olhar); sem WebGL, nao pinta nada */
body.lb-nativo-on > *:not(#lead-battle) { visibility: hidden !important; }
