* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #163a1c; color: #fff; touch-action: none; user-select: none; -webkit-user-select: none;
  font-family: "Baloo 2", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 14px; padding: 8px 16px; font-weight: 800; color: #fff; background: rgba(255,255,255,.16); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button:active { transform: translateY(2px); }
button.grande { font-size: 22px; padding: 12px 22px; background: linear-gradient(#8ee34b, #3fae1c); box-shadow: 0 5px 0 #1d5e08; }
button.verde { background: linear-gradient(#8ee34b, #3fae1c); box-shadow: 0 4px 0 #1d5e08; }
button.azul { background: linear-gradient(#58a8ff, #2a6fd6); box-shadow: 0 5px 0 #133f87; }
button.claro { background: rgba(255,255,255,.9); color: #1d3a12; }
button.zap { background: #25d366; box-shadow: 0 4px 0 #128c4a; }
h2 { font-size: 30px; font-weight: 900; color: #ffd23f; -webkit-text-stroke: 1px #3a2a05; }
.linhaBotoes { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.mini { font-size: 13px; opacity: .85; }

.tela { position: fixed; inset: 0; display: none; }
.tela.ativa { display: flex; animation: aparece .3s ease-out; }
@keyframes aparece { from { opacity: 0; } }

/* menu */
#menu { flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 20px; text-align: center; }
.fundoMenu { position: absolute; inset: 0; background: url(../assets/parques/vacabrava.jpg) center/cover; }
.fundoMenu::before { content: ''; position: absolute; inset: 0; background: url(../assets/parques/vacabrava.jpg) center/cover; filter: grayscale(1) brightness(.45); clip-path: polygon(0 0, 55% 0, 35% 100%, 0 100%); }
.fundoMenu::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(10,30,10,.15), rgba(10,30,10,.65)); }
.logo { position: relative; display: flex; flex-direction: column; line-height: .85; filter: drop-shadow(0 6px 0 rgba(0,0,0,.35)); animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.logo .l1 { font-size: clamp(32px, 7vw, 64px); font-weight: 900; color: #fff; -webkit-text-stroke: 2.5px #12301d; }
.logo .l2 { font-size: clamp(58px, 14vw, 140px); font-weight: 900; color: #7dff4a; -webkit-text-stroke: 4px #12401a; letter-spacing: 2px; }
.logo .l3 { font-size: clamp(15px, 2.6vw, 24px); font-weight: 800; color: #ffe7ff; -webkit-text-stroke: 1px #2a0a3a; margin-top: 6px; }
.heroina { position: absolute; right: 6%; bottom: 6%; height: 34vh; filter: drop-shadow(0 8px 10px rgba(0,0,0,.4)); animation: bob 2s ease-in-out infinite; }
.botoesMenu { position: relative; display: flex; flex-direction: column; gap: 10px; width: min(420px, 92vw); }
.botoesMenu > button { width: 100%; flex-direction: column; line-height: 1.05; }
.botoesMenu small { font-size: 13px; font-weight: 700; opacity: .92; }
#difs { display: flex; gap: 6px; } #difs button { flex: 1; background: rgba(0,0,0,.45); }
#difs button.sel { background: #ef7f18; box-shadow: 0 3px 0 #8a3c06; }
@media (max-width: 700px) { .heroina { height: 22vh; right: 2%; bottom: 2%; opacity: .9; } }

/* mapa */
#mapa { flex-direction: column; align-items: center; gap: 12px; padding: 16px; overflow-y: auto; touch-action: pan-y; background: radial-gradient(ellipse at top, #2a6a35, #0f2a14); }
#mundos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; width: min(1100px, 100%); }
.mundo { background: rgba(0,0,0,.35); border-radius: 18px; overflow: hidden; border: 3px solid var(--c); }
.mundo .foto { height: 120px; background: center/cover; }
.mundo .info { display: flex; justify-content: space-between; padding: 6px 10px; font-size: 18px; }
.niveis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0 8px 10px; }
.nivel { flex-direction: column; padding: 6px 2px; background: rgba(255,255,255,.15); border-radius: 12px; line-height: 1; min-height: 58px; }
.nivel b { font-size: 22px; } .nivel span { color: #ffd23f; font-size: 13px; letter-spacing: 1px; } .nivel i { font-style: normal; font-size: 10px; color: #ffb0a0; }
.nivel.chefe { background: rgba(160,40,30,.45); }
.nivel.trancado { opacity: .45; cursor: not-allowed; font-size: 20px; }

/* jogo */
#jogo { flex-direction: column; background: #10260f; }
.hud { display: flex; align-items: center; gap: 10px; padding: 6px 10px; flex: none; min-height: 52px; }
.hud .esq { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.1; }
.hud .esq b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #vidas { font-size: 16px; } #efeitos { font-size: 13px; color: #bfe0ff; }
.hud .meio { flex: 2; display: flex; align-items: center; gap: 8px; }
#barra { position: relative; flex: 1; height: 20px; background: #3c3a36; border-radius: 10px; border: 2px solid rgba(255,255,255,.4); }
#barra i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #3fae1c, #8ee34b); border-radius: 8px; transition: width .4s; }
#barra.pulsa { animation: pula .4s; }
@keyframes pula { 50% { transform: scaleY(1.35); } }
#barra .marca { position: absolute; top: -5px; bottom: -5px; width: 3px; background: #ffd23f; transform: translateX(-50%); border-radius: 2px; }
#barra .marca.meta { background: #fff; }
#barra .marca em { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); font-style: normal; font-size: 10px; line-height: 1; font-weight: 900; color: #ffd23f; white-space: nowrap; text-shadow: 0 1px 2px #000, 0 0 3px #000; pointer-events: none; }
#barra .marca.meta em { color: #fff; }
#pct { font-size: 22px; font-weight: 900; min-width: 70px; text-align: right; }
.hud .dir { display: flex; align-items: center; gap: 6px; } #pontos { font-size: 18px; font-weight: 900; color: #ffd23f; min-width: 60px; text-align: right; }
.hud .dir button { padding: 6px 10px; }
#area { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 4px; }
#tela { border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.5); touch-action: none; cursor: crosshair; }
.dicaRodape { text-align: center; font-size: 12px; opacity: .7; padding: 2px 0 6px; flex: none; }
#faixa { position: absolute; top: 40%; left: 0; right: 0; text-align: center; pointer-events: none; opacity: 0; }
#faixa.on { animation: faixa 3s ease-out forwards; }
#faixa .n { font-size: clamp(28px, 5vw, 56px); font-weight: 900; color: #7dff4a; -webkit-text-stroke: 2px #12401a; }
#faixa .s { font-size: clamp(14px, 2.2vw, 22px); font-weight: 800; text-shadow: 0 2px 4px #000; padding: 0 10px; }
@keyframes faixa { 0% { opacity: 0; transform: scale(1.4); } 12% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }

.painel { position: fixed; inset: 0; background: rgba(5,15,5,.6); display: none; align-items: center; justify-content: center; z-index: 20; padding: 14px; }
.painel.on { display: flex; }
.caixa { background: linear-gradient(#2f6a2a, #173d16); border: 4px solid #7dff4a; border-radius: 24px; padding: 18px 22px; text-align: center; max-width: min(560px, 96vw); max-height: 92vh; overflow-y: auto; box-shadow: 0 16px 40px rgba(0,0,0,.5); animation: caixa .4s cubic-bezier(.2,1.6,.4,1); }
@keyframes caixa { from { transform: scale(.6); opacity: 0; } }
.caixa ul { text-align: left; display: flex; flex-direction: column; gap: 6px; padding-left: 4px; list-style: none; font-size: 15px; }
.caixa .grande { font-size: 30px; font-weight: 900; }
.estrelas { display: flex; justify-content: center; gap: 8px; font-size: 62px; line-height: 1; margin: 6px 0; }
.estrelas span { color: rgba(255,255,255,.2); transform: scale(.6); transition: transform .3s cubic-bezier(.2,1.8,.4,1), color .2s; }
.estrelas span.pop { color: #ffd23f; transform: scale(1); text-shadow: 0 4px 0 #8a5a06; }
#flash { position: fixed; inset: 0; background: #ff5a3a; opacity: 0; pointer-events: none; z-index: 15; }
#flash.on { animation: fl .4s ease-out; } @keyframes fl { 0% { opacity: .4; } 100% { opacity: 0; } }
#toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px); background: rgba(10,25,10,.92); padding: 10px 16px; border-radius: 14px; font-weight: 700; opacity: 0; transition: .3s; z-index: 30; pointer-events: none; max-width: 92vw; text-align: center; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#carregando { position: fixed; inset: 0; z-index: 40; background: #163a1c; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; transition: opacity .5s; }
#carregando.some { opacity: 0; pointer-events: none; }
@media (max-width: 700px) {
  .hud { flex-wrap: wrap; gap: 4px 8px; } .hud .esq { flex: 1 1 45%; } .hud .meio { order: 3; flex: 1 1 100%; } .hud .dir { flex: 0 0 auto; }
  .dicaRodape { display: none; }
}
/* telas baixas (celular deitado) */
@media (max-height: 500px) {
  .dicaRodape { display: none; }
  .hud { min-height: 40px; padding: 3px 8px; } .hud .esq b { font-size: 13px; } #vidas { font-size: 13px; }
  #menu { gap: 8px; padding: 8px; }
  .logo .l1 { font-size: 26px; } .logo .l2 { font-size: 64px; -webkit-text-stroke-width: 3px; } .logo .l3 { font-size: 14px; margin-top: 2px; }
  #menu button { padding-top: 6px; padding-bottom: 6px; }
  .heroina { height: 58vh; }
}
@media (max-width: 900px) { #barra .marca:not(.meta) em { display: none; } #barra .marca.meta em { font-size: 9px; } }
/* celular em pé: sugere girar */
#gire { display: none; }
@media (orientation: portrait) and (max-width: 700px) {
  #jogo.ativa #gire { display: flex; position: absolute; left: 0; right: 0; margin: 0 auto; width: max-content; max-width: 92vw; bottom: 14px; z-index: 6; align-items: center; gap: 8px; background: rgba(10,25,10,.9); padding: 8px 14px; border-radius: 14px; font-weight: 800; font-size: 14px; white-space: nowrap; animation: pula 1.4s infinite; pointer-events: none; }
}
