/*!
 * Jeferson Luckas - Disinfect the virus
 * 
 * Copyright (c) 2020 Jeferson Luckas
 * Released under the MIT license
 * https://github.com/JefersonLucas/disinfect-the-virus/blob/master/LICENSE
 *
 */

/* Estilo do palco do jogo */

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}
/* Bottle cursor globally disabled */
body {
	align-items: center;
	background: linear-gradient(180deg, #167a5d, #009688, #167a5d);
	display: flex;
	justify-content: center;
	overflow: hidden;
	width: 100%;
	height: 100vh;
}
button,
div,
img,
select,
option {
	z-index: 9;
}

/* Painel do jogo */

.painel {
	background-color: rgba(255,255,255,0.3);
	border-bottom-right-radius: 10px;
	border-bottom-left-radius: 10px;
	position: absolute;
	opacity: 0.8;
	top: 0;
	width: 170px;
	height: 65px;
}
.vidas, 
.pontos,
.cronometro {
	align-items: center;
	display: flex;
	justify-content: center;
	position: relative;	
}
.vidas, 
.pontos {
	border-bottom: 1px solid #157a5d;
	margin-top: 5px;	
}
.vidas {
	border-right: 1px solid #157a5d;
	width: 100px;
	float: left;
}
.pontos {
	width: 70px;
	float: right;
	color: #343a40;
}
.coracao {
	animation: piscar 2.5s infinite;
	color: #f44336;
}
.cronometro {
	color: #343a40;
	margin-top: 33px; 
	width: 170px;
	font-family: Helvetica;
	font-size: 20px;
}

/* Tamanho aleatório */

.tamanho-1,
.tamanho-2,
.tamanho-3 {
	animation: aparece .5s;
	z-index: 10;
}
/* Hover cursor override removed */
.tamanho-1 {	
	width: 50px;
	height: 50px;
}
.tamanho-2 {
	width: 70px;
	height: 70px;
}
.tamanho-3 {
	width: 90px;
	height: 90px;
}

/* Lado aleatório */

.lado-A {
	transform: scaleX(1);
}
.lado-B {
	transform: scaleX(-1);
}

/* Círculos Animados */

.circulos li {
	animation: circulo 2s infinite alternate;
	background-color: rgba(43, 193, 154, 0.8);
	border-radius: 50%;
	bottom: -40px;
	display: block;
	position: absolute;
	width: 40px;
	height: 40px;
	z-index: 0;
}

/* Animações */

@keyframes circulo {
	0% {
		opacity: 0;
		transform: translateY(0);
	}
	50% {
		opacity: 1;
	}
	100% {
		opacity: 0;
		transform: translateY(-1000px);
	}
}
@keyframes piscar {
	0%,
	50%,
	100% {
		opacity: 0;
	}
	25%,
	75% {
		opacity: 1;
	}
}
@keyframes aparece {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Auto-start countdown timer */
#auto-start-countdown {
	position: fixed;
	top: 20px;
	left: 20px;
	z-index: 1000;
}

#countdown-number {
	color: #ffff00;
	font-size: 3rem;
	font-weight: bold;
	text-shadow: 0 0 20px #ffff00, 0 0 40px #ffff00, 3px 3px 6px rgba(0, 0, 0, 0.9);
	display: block;
	animation: countdown-pulse 1s ease-in-out infinite;
}

@keyframes countdown-pulse {
	0%, 100% {
		transform: scale(1);
		opacity: 1;
	}
	50% {
		transform: scale(1.1);
		opacity: 0.8;
	}
}

/* Mobile responsive countdown */
@media screen and (max-width: 768px) {
	#countdown-number {
		font-size: 2.5rem;
	}
}

@media screen and (max-width: 480px) {
	#countdown-number {
		font-size: 2rem;
	}
}

body.game-mode {
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Disable CSS cursor images during gameplay so clicks don't appear to move a bottle */
body.game-mode, body.game-mode * {
    cursor: auto !important;
}
body.game-mode .tamanho-1:hover,
body.game-mode .tamanho-2:hover,
body.game-mode .tamanho-3:hover {
    cursor: auto !important;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.loader-spinner {
    width: 56px;
    height: 56px;
    border: 6px solid rgba(255,255,255,0.25);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: loader-spin 1s linear infinite;
}

#loader-text {
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

@keyframes loader-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#touch-cursor {
    position: fixed;
    width: 60px;
    height: 60px;
    background-image: url("../img/alcool-01.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    pointer-events: none;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    will-change: transform;
    z-index: 9998;
    transform: translate(-9999px, -9999px);
    opacity: 0;
    transition: opacity .1s linear;
}

#touch-cursor.touch-cursor-active {
    opacity: 1;
}

#touch-cursor.pressing {
    background-image: url("../img/alcool-02.png");
}

@media (pointer: coarse) {
    html { cursor: auto; }
}