/* Bug Faminto */

.placar {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin: 0 auto 14px;
	padding: 12px 16px;
	max-width: 560px;
	background: var(--painel);
	border: 3px solid var(--roxo);
	font: 700 13px/1.6 var(--pixel);
}

.placar b {
	color: var(--neon);
	font-weight: normal;
	display: inline-block
}

.placar b.pulo {
	animation: pulo .35s
}

.arena {
	position: relative;
	width: min(100%, 480px);
	margin: 0 auto;
}

#tabuleiro {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	image-rendering: pixelated;
	border: 3px solid var(--neon);
	box-shadow: 0 0 22px #39ff8844, 8px 8px 0 #000;
	touch-action: none; /* gestos no tabuleiro não rolam a página */
	background: #0d0b1a;
}

#tabuleiro:focus-visible {
	outline: 3px dashed var(--amarelo);
	outline-offset: 4px
}

.sobreposicao {
	position: absolute;
	inset: 3px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px;
	background: #0d0b1acc;
}

.sobreposicao .tela {
	width: 100%;
	padding: 20px 14px
}

.exe {
	font: 700 clamp(20px, 4.4vw, 30px) var(--pixel);
	color: var(--neon);
	margin: 0 0 12px
}

.dica-teclas {
	font-size: 18px;
	color: var(--muted);
	margin-top: 12px !important
}

/* controle direcional na tela */
.dpad {
	display: grid;
	grid-template-columns: repeat(3, 64px);
	grid-template-rows: repeat(2, 56px);
	gap: 8px;
	justify-content: center;
	margin: 20px auto 0;
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
}

.dpad button {
	font: 700 18px var(--pixel);
	color: var(--neon);
	background: var(--painel);
	border: 3px solid var(--roxo);
	box-shadow: 4px 4px 0 #000;
	cursor: pointer;
	touch-action: none;
}

.dpad button:active {
	transform: translate(3px, 3px);
	box-shadow: 1px 1px 0 #000;
	border-color: var(--neon)
}

.dpad [data-dir=cima] {
	grid-column: 2;
	grid-row: 1
}

.dpad [data-dir=esquerda] {
	grid-column: 1;
	grid-row: 2
}

.dpad [data-dir=baixo] {
	grid-column: 2;
	grid-row: 2
}

.dpad [data-dir=direita] {
	grid-column: 3;
	grid-row: 2
}

@keyframes pulo {
	50% {
		transform: scale(1.5);
		color: var(--amarelo)
	}
}

/* no computador com mouse, o controle na tela é opcional e fica menor */
@media (hover: hover) and (pointer: fine) {
	.dpad {
		grid-template-columns: repeat(3, 48px);
		grid-template-rows: repeat(2, 42px);
		opacity: .75
	}
}

@media (max-width: 560px) {
	.placar {
		font-size: 11px
	}

	.dica-teclas {
		display: none
	}
}
