/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   games.css                                          :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: hubourge <hubourge@student.42.fr>          +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2024/08/20 11:23:41 by edbernar          #+#    #+#             */
/*   Updated: 2024/11/19 15:14:06 by hubourge         ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

@keyframes fadeInGames {
	from {
		filter: brightness(1);
	}
	to {
		filter: brightness(0);
	}
}

@keyframes fadeOutGames {
	from {
		filter: brightness(0);
	}
	to {
		filter: brightness(1);
	}
}

@keyframes fadeOutStartGames {
	0% {
		filter: brightness(0);
	}
	70% {
		filter: brightness(0);
	}
	100% {
		filter: brightness(1);
	}
}

@keyframes fadeInTextGames {
	from {
		color: rgb(255, 255, 255, 0.1);
	}
	to {
		color: rgb(255, 255, 255, 1);
	}
}

@keyframes fadeOutTextGames {
	from {
		color: rgb(255, 255, 255, 1);
	}
	to {
		color: rgb(255, 255, 255, 0.1);
	}
}

@keyframes end {
	0% {
		opacity: 1;
	}

	75% {
		opacity: 0;
	}

	100% {
		opacity: 1;
	}
}

body {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	user-select: none;
}

#score {
	line-height: 1.75;
	vertical-align: top;
	font-family: 'Poppins';
	position: absolute;
	font-size: 30vh;
	top: 0;
	bottom : 50%;
	left: 50%;
	transform: translate(-50%, 50%);
	z-index: 800;
	margin: 0;
	padding: 0;
	white-space: nowrap;
	color: rgb(255, 255, 255, 0.1);
}

.gamePad {
	display: none;
	position: absolute;
	z-index: 800;
	width: 100%;
	height: 100%;
}

.gamePad #fullscreen {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 50px;
	height: 50px;
	background-repeat: no-repeat;
	background-size: 80% 80%;
	background-position: center;
	border: none;
	opacity: 0.5;
}

.gamePad .gamePadLeft {
	display: flex;
	position: absolute;
	left: 30px;
	bottom: 30px;
	user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    touch-action: none;
}


.gamePad .gamePadRight {
	display: flex;
	position: absolute;
	flex-direction: column;
	right: 30px;
	bottom: 30px;
	user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    touch-action: none;
}

.gamePad .buttonGamePad
{
	width: 100px;
	height: 100px;
	background-color: rgba(255, 255, 255, 0.1);
	background-repeat: no-repeat;
	background-size: 80% 80%;
	background-position: center;
	border: none;
	user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    touch-action: none;
}

.gamePadLeft #padRight {
	margin-left: 10px;
	transform: rotate(180deg);
	user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    touch-action: none;
}

.gamePadRight #padTop {
	margin-bottom: 10px;
	transform: rotate(90deg);
	user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    touch-action: none;
}

.gamePadRight #padBottom {
	transform: rotate(270deg);
	user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    touch-action: none;
}

#canvasMultiGameOnline {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    touch-action: none;
}

.pingDiv {
	position: absolute;
	left: 10px;
	top: 10px;
	font-size: 20px;
	color: white;
	z-index: 800;
	display: flex;
	flex-direction: row;
	background-color: rgba(0, 0, 0, 0.329);
	user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    touch-action: none;
}

#ping {
	font-size: 20px;
	color: white;
	border: 1px solid rgba(255, 255, 255, 0.123);
	padding: 5px 10px 5px 10px;
}

#fps {
	padding: 5px 10px 5px 10px;
	border: 1px solid rgba(255, 255, 255, 0.123);
	border-right: none;
}

#endGameDiv {
	display: none;
	flex-direction: column;
	position: absolute;
	justify-content: center;
	align-items: center;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.9);
	backdrop-filter: blur(5px);
	z-index: 900;
	transition: all 0.5s;
	animation: fadeOutGames 0.5s;
}

#endGameText {
	font-size: 100px;
	color: white;
	text-align: center;
}

#endGameScore {
	font-size: 75px;
	color: white;
	text-align: center;
}

#endGameSimpleText {
	font-size: 25px;
	color: white;
	text-align: center;
	margin-top: 50px;
}

#newButtonVr {
	position: absolute;
	left: 10px;
	top: 55px;
	width: 152px;
	height: 40px;
	z-index: 900;
	padding: 0;
	color: white;
	background-color: rgba(0, 0, 0, 0.367);
}

.imgScoreBoard {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
}
