/* TODO: clase para ocultar algo */
.hidden{
	display: none !important;
}

/* TODO: Menu del juego */
.gameMenuContainer{
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	flex-grow: 1;
	padding: 20px;
	position: relative;
}

.gameIntro h1{
	text-align: center;
	padding-bottom: 12px;
}
.gameInstruccions{
	color: #3e8ccd;
}

.difficultyOptions{
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 24px;
}

.cardDifficulty{
	color: #F0F0F0;
	border: none;
	display: flex;
	gap: 8px;
	flex-direction: column;
	text-align: center;
	width: 40%;
	padding: 12px;
	border-radius: 8px;
	background-color: rgb(60, 60, 60);
	transition: all .2s ease;
	cursor: pointer;
}
.cardDifficulty .livesInfo{
	color: rgb(213, 30, 30);
	font-size: 20px;
	font-weight: 400;
}

.cardDifficulty.facil:hover{
	background-color: #5b7e5b;
}
.cardDifficulty.normal:hover{
	background-color: #5f7585;
}
.cardDifficulty.dificil:hover{
	background-color: #7e5b5b;
}


.btnReturn{
	position: absolute;
	top: 20px;
	left: 20px;

	background-color: var(--color-acento-azul);
	color: var(--color-texto-principal);
	text-decoration: none;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 18px;
	box-shadow: 4px 4px 0 var(--color-estructura);
	cursor: pointer;
	transition: all .1s ease;
	user-select: none;
}

.btnReturn:hover{
	background-color: #3e8ccd;
}

.btnReturn:active{
	box-shadow: 1px 1px 0 var(--color-estructura);
	transform: translate(3px, 3px);
}

/** El contador de vidas y pares */
.gameUi{
	display: flex;
	width: 55%;
	font-size: 24px;
	justify-content: space-between;
}

/** Boton de volver al menu del minijuego */
.btnReturnMenu{
	font-size: 16px;
	padding: 16px;
	border: none;
	border-radius: 8px;
	cursor: pointer;

}
/* TODO:------------ MOSTRAR LA TABLA DE CARTAS --------------*/

.cardBoard{
	width: 70%;
	display: grid;
	gap: 16px;
	justify-items: center;
	align-items: center;
	perspective: 1000px; /* efecto 3d */
	padding: 32px;
}

.card{
	position: relative;
	width: 100px;
	height: 120px;
	cursor: pointer;
	transform-style: preserve-3d;
	transition: transform .6s ease;
}

.card.flipped{
	transform: rotateY(180deg);
}

/* caras de las cartas */
.card .front,
.card .back{
	position: absolute;
	width: 100%;
	height: 100%;
	border-radius: 8px;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 40px;
	font-weight: bold;
	color: white;
	backface-visibility: hidden;
}
/* Cara frontal (visible al inicio) */
.card .front {
	background-color: #3e8ccd;
}
.card .front::before{
	content: '?';
}

/* Cara trasera (mostrada al voltear) */
.card .back {
	background-color: #444;
	transform: rotateY(180deg);
}

/* TODO--------------  PANTALLA FINAL DEL JUEGO  ---------------- */
/* Pantalla final del juego */
#endGameScreen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(5px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}

#endGameScreen.hidden {
	display: none;
}

.endGameContent {
	background: #dad8d8;
	padding: 2rem 3rem;
	border-radius: 1rem;
	text-align: center;
	box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
	animation: popup 0.3s ease-in-out;
}

@keyframes popup {
	from { transform: scale(0.8); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

.endGameContent h2 {
	font-size: 2rem;
	margin-bottom: 1.5rem;
}

.endButtons {
	display: flex;
	gap: 1rem;
	justify-content: center;
}

.endButtons button {
	background-color: #333;
	color: white;
	border: none;
	padding: 0.7rem 1.5rem;
	border-radius: 0.5rem;
	cursor: pointer;
	font-size: 1rem;
	transition: background 0.2s;
}

.endButtons button:hover {
	background-color: #555;
}