:root {
	--cursor-width: 130px;
}

body, html {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;

	/*font-family: "Orbitron";*/
	font-family: "Luckiest Guy", cursive;
}

img.qr{
	position: absolute;
	bottom: 10px;
	right: 10px;
	border-radius: 10px;
	width: 10%;
	min-width: 100px;
	z-index: 200;
}

img.qrAbove{
	bottom: 55px;
	right: 10px;
}

/* ############################################ */
/* ###############    START    ################ */
/* ############################################ */
#startScreen, #endScreen{
	height: 100%;
	display: flex;
	flex-direction: column;

	header, footer {
		padding: 15px 30px;
		display: flex;
		justify-content: space-between;
		align-items: center;
		/*background: rgba(255, 255, 255, 0.05);*/
		/*background: #00d4ff;*/
		background: #12c4e8;
		color: #fff;
		backdrop-filter: blur(10px);
	}

		header a, footer a {
		color: #fff;
		text-decoration: none;
		margin-right: 15px;
		font-size: 0.9rem;
		transition: color 0.3s;
	}

	header a:hover, footer a:hover {
		color: #ffffff;
	}

	/* cant be display none otherwise it wont load */
	.preload{
		width: 0px;
		height: 0px;
		background-image: url('../img/hand_closed_silhouette.png');
	}

	#startBackground{
		position: absolute;
        top: 50%;
        left: 50%;
		width: 100%;
		height: 100vh;
        object-fit: cover;
        transform: translate(-50%, -50%);
        filter: brightness(0.5);
        z-index: 0;
	}

	#instructions{
		position: absolute;
        top: 100px;
        left: 50px;
		height: 60%;
	}

	#mainLogo{
		/*width: 45%;*/
		/*width: 36%;*/
		height: 29%;
	}

	.center {
		flex: 1;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		text-align: center;
		color: #fff;
		/*background: url("../img/start-background.jpg");*/
		background-size: cover;
		background-position: 50% 100%;
		z-index: 5;
	}

	h1 {
		font-size: 3rem;
		margin-bottom: 10px;
		letter-spacing: 2px;
	}

	p {
		margin-bottom: 30px;
		opacity: 0.8;
	}
	p.instruction{
		font-size: 30px;
	}

	.btnMain {
		width: 270px;
		padding: 30px;
		font-size: 2rem;
		border: none;
		border-radius: 50px;
		/*background: linear-gradient(45deg, #ff4e50, #f9d423);*/
		/*background: linear-gradient(45deg, #00d4ff, #14619a);*/
		background:linear-gradient(45deg, #faaf6a, #efcc47);
		color: #fff;
		transition: transform 0.2s, box-shadow 0.2s;

	}

	.btnMain:disabled{
		background: linear-gradient(45deg, #cacaca, #575757);
	}

	.btnMain:not(:disabled):hover, .btnMain:not(:disabled).highlighted {
		cursor: pointer;
		transform: scale(1.1);
		box-shadow: 0 0 20px rgba(255,255,255,0.5);
	}

	.logo {
		font-weight: bold;
		font-size: 1.2rem;
		color: #fff;
	}
}

.thumb{
	height: 30px;
}

/* ############################################ */
/* #################    END    ################ */
/* ############################################ */
#endScreen{
	h1{
		margin-bottom: 30px;
    	margin-top: -30px;
	}

	.subtitle{
		font-size: 32px;
	}

	.finalScore{
		font-size: 26px;
	}

	table{
		background: #0f253a;
	    border-radius: 28px;
	    min-width: 400px;
	    max-width: 650px;
	    font-size: 26px;
	    border: 1px solid #6db4df;
	    border-collapse: separate;
	    border-spacing: 0px;
		margin-bottom: 30px;
	}

	table thead{
		color: #5d9fd5;
	    padding: 20px 10px;
	}

	table thead tr{
		padding: 20px 10px;
	    border: 1px solid #6db4df;
	}

	table thead tr th{
		padding: 21px 5px 15px 5px;
	}

	table tbody tr{
		border: 2px solid #7bbae3;
	    height: 33px;
	    line-height: 35px;
	    vertical-align: super;
	    background-color: #2e4861;
	}

	table tbody tr.footer td{
		padding-top: 0px;
		text-align: right;
	}

	table tbody tr.footer img{
		height: 33px;
		margin-top: 8px;
		margin-right: 20px;
	}

	table tbody tr:nth-child(odd) {
		background-color: #263b53;
	}

	table tbody tr.footer{
		background-color: unset;
	}

	table tbody td{
		border-top: 1px solid #6db4df;
        vertical-align: super;
        padding-top: 6px;
        padding-bottom: 0px;
	}

	.textHighlight{
		color: #fbda59;
	}

	#tableStats .textHighlight{
		font-size: 50px;
		line-height: 56px;
	}

	#tableStats .textHighlight td{
		padding-top: 14px;
	}

	p{
		opacity: 1;
	}

	#btnReStart{
		margin-top: 100px;
		font-size: 20px;
	    padding: 11px 30px;
	    display: block;
	    width: unset;
	}

	#registerContainer{
	    display: grid;
	    width: 400px;
	    font-size: 22px;
	}
	
	#registerContainer input{
		width: 89%;
		padding: 17px 20px;
        border-radius: 40px;
        margin-top: 18px;
        font-size: 23px;
        color: #595959;
	}

	#btnSubmitForm{
		padding: 25px 20px;
	    width: 357px;
	    margin-top: 20px;
	}

}

/* ############################################ */
/* ################    GAME    ################ */
/* ############################################ */
/* Background content */
.behind {
	position: fixed;
	top: 0; left: 0;
	width: 100%;
	height: 100%;
	background: url('../img/background.jpg') center/cover;
	z-index: 1;

	/*margin: auto;
	text-align: center;
	align-content: center;
	align-items: center;*/
}

/* Covering mask */
.mask {
	position: fixed;
	top: 0; left: 0;
	width: 100%; height: 100%;
	background-color: rgba(0, 0, 0, 1); /* Mask color */
	z-index: 2;
	pointer-events: none; /* Allows interaction behind */

	/* Dynamic Mask Property */
	--x: 50%;
	--y: 50%;
	/*-webkit-mask-image: radial-gradient(circle 100px at var(--x) var(--y), transparent 100%, black 100%);*/
	/*mask-image: radial-gradient(circle 100px at var(--x) var(--y), transparent 100%, black 100%);*/

	-webkit-mask-image: radial-gradient(circle var(--cursor-width) at var(--x) var(--y), transparent 70%, black 115%);
	mask-image: radial-gradient(circle var(--cursor-width) at var(--x) var(--y), transparent 70%, black 115%);
	/*transition: all 0.5s;*/
	transition: all 5s;
}

#cursor{
	position: fixed;
	top: 50%;
	left: 50%;
	width: calc(var(--cursor-width) * 2);
	z-index: 99;
}

.cursorImg{
	width: 100%;
	height: 100%;
	/*filter: invert(1) brightness(0.6);*/
	filter: brightness(0.6);
}

.cursorImg, .target{
	transform: translate(-50%, -50%);
}

#pointsPopup{
	position: absolute;
	/*top: 0;*/
	top: calc(-1 * (var(--cursor-width) + 42px));
	left: 0;
	font-size: 48px;
	color: white;
	transform: translate(-50%, -50%);
	text-align: center;
	animation: moveUp 1s forwards;
	z-index: 99;
}

#overlayGestures{
	width: 100%;
	height: 100%;
	position: fixed;
	top:0;
	left: 0;
	z-index: 9999;
}

#overlayGestures, #cursor, #mask{
	pointer-events: none;	
}

.mask:hover, .behind:hover {
	cursor: pointer;
}


#inputVideo{
	/*width: 300px;*/
	width: 13%;
	/*height: 100%;*/
	transform: scaleX(-1);
	position: absolute;
	bottom: 10px;
	left: 10px;
	border: 2px solid white;
	border-radius: 10px;
	z-index: 9999;
}

.debugCursor{
	position: absolute;
}

.debugCursor.closed{
	border: 2px solid red;
}
.debugCursor.open{
	border: 2px solid green;
}

.target{
	position: relative;
	width: 50px;
	height: 50px;
	box-shadow: -4px 5px 31px 9px #d9d9d9;
	border-radius: 200px;
	transition: all 0.5s ease-in;
	z-index: 99;
}

#handCursor{
	position: absolute;
	top: 86%;
    left: 50%;
	width: 0px;
    height: 0px;
    background-image: url('../img/hand_open_silhouette.png');
    background-size: contain;
    background-repeat: no-repeat;
    padding: 80px 80px;
    border-style: none;
    transform: translate(-50%, -50%);
    z-index: 10;
}

#handCursor.closed{
    background-image: url('../img/hand_closed_silhouette.png');
}


.card{
	position: absolute;
}

.semi-transparent{
	background-color: rgba(0, 0, 0, 0.85);
}
.semi-transparent-easy{
	background-color: rgba(0, 0, 0, 0.75);
}

#HUDContainer{
	position: absolute;
	top: 35px;
	left: 45px;
	width: 305px;
	aspect-ratio: 2;
	color: #fff;
	background-image: url(../img/score.svg);
	background-repeat: no-repeat;
	font-size: 40px;
	font-weight: 400;
	font-style: normal;
	z-index: 999;
}

#lblScore{
    position: absolute;
    top: 90px;
    left: 138px;
    font-size: 30px;
    color: black;
}

#scoreVal{
    left: 38px;
    top: 87px;
    position: absolute;
    font-size: 36px;
    width: 72px;
    text-align: center;
}

#timer{
    display: inline-block;
    position: absolute;
    top: 41px;
    left: 50px;
    font-size: 27px;
    width: 78px;
    text-align: center;
}

#timerBonus{
    display: block;
    color: white;
    position: absolute;
    top: 20%;
    left: 136px;
    background: #e52626;
    border-radius: 10px 10px 10px 0px;
    width: 65px;
    line-height: 40px;
    z-index: 0;
    padding: 0px;
    margin: 0px;
    height: 43px;
    line-height: 130%;
    text-align: center;
}



@media only screen and (max-width: 2600px){
	#handCursor{
		top: 84%;
	}
}

@media only screen and (max-width: 1800px){
	#startScreen #instructions{
		height: 54%;
	}
}

@media only screen and (max-width: 1550px){
	#startScreen #mainLogo{
		width: 39%;
		height: 23%;
	}
	#startScreen #instructions{
		height: 41%;
	}
	#handCursor{
		top: 82%;
	}
}

@media only screen and (max-width: 1200px){
	#handCursor{
		top: 78%;
	}
}

@media only screen and (max-width: 970px){
	#startScreen #instructions{
		height: 40%;
	}
}

@media only screen and (max-width: 750px){
	#startScreen #instructions{
		height: 35%;
	}
}

@keyframes moveUp {
  0%   { margin-top: 0px }
  100% { margin-top: -50px }
};





