@charset "utf-8";
/* CSS Document */

main {
	background: linear-gradient(180deg, rgba(1,128,61,0.5046393557422969) 0%, rgba(1,127,128,0.5046393557422969) 100%);
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
	font-size: medium;
}

@media (max-width: 500px) {	
	main {
		font-size: small;
	}
}

.record {
	position: absolute;
	width: calc(100vw - 250px);
	top: 0;
	left: 0px;
	text-align: center;
	background-color: rgba(1,127,128,1);
	color: #fefefe;
	display: none;
}

#record {
	font-weight: bolder;
}

h1 {
	text-decoration: underline;
	text-decoration-color: var(--base-color);
}

#game-container {
    width: calc(0.8*(100vw - 250px));
    height: 525px;
    margin: calc(0.5*(100vh - 500px) - 50px) calc(0.1*(100vw - 250px));
    text-align: center;
    position: relative;
}

#count {
    position: absolute;
    top: 10px;
    left: 10px;
}

@media (max-width: 1175px) {
	#game-container {
		width: 90vw;
        margin: calc(0.5*(100vh - 500px) - 50px) calc(0.05*(100vw));
	}

	.record {
		width: 100vw;
		top: auto;
		bottom: 0;
	}
}

#field, #settings, #end {
    width: 100%;
    height: 100%;
    border: 1px solid var(--base-color);
    position: absolute;
    overflow: hidden;
    background-color: #fefefe;
    top: 0;
    left: 0;
}

#settings, #end {
    background-color: rgba(254, 254, 254, 1);
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#end {
    display: none;
}

#end h1 {
    transform: translateY(-50%);
}

#count-end {
    color: var(--base-color);
}

#settings .variants {
    display: flex;
    justify-content: space-evenly;
    width: 100%;
    margin: 50px 0;
}
/*
#settings label {
    font-size: 14pt;
}
*/
#answer {
    padding: 10px;
    width: 100px;
    margin-top: 20px;
    z-index: 2;
    position: absolute;
    bottom: 10px;
    left: 50%;
    margin-left: -50px;
}

#hearts {
    position: absolute;
    top: 10px;
    right: 20px;
}

.heart-svg {
    width: 24px;
    height: 24px;
    fill: red;
}

.shake {
    animation: shake 0.5s ease-in-out;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
    text-align: center;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

#startButton, #startAgain {
	width: 200px;
	padding: 15px 40px;
	margin: 40px auto 10px;
	background-color: var(--base-color);
	color: white;
	border: none;
	font-weight: bolder;
	/*font-size: 14pt;*/
	cursor: pointer;
	transition: .1s;
	width: 250px;
	display: flex;
	justify-content: center;
	align-items: center;
	text-align: center;
}

/* CONFETI */

.confetti {
	display: none;
}

.confetti-piece {
	position: absolute;
	width: 8px;
	height: 16px;
	background: #ffd300;
	top: 0;
	opacity: 0;
	z-index: 5;
}
.confetti-piece:nth-child(1) {
	left: 7%;
	transform: rotate(-43deg);
	-webkit-animation: makeItRain 1000ms infinite ease-out;
		  animation: makeItRain 1000ms infinite ease-out;
	-webkit-animation-delay: 209ms;
		  animation-delay: 209ms;
	-webkit-animation-duration: 1163ms;
		  animation-duration: 1163ms;
}
.confetti-piece:nth-child(2) {
	left: 14%;
	transform: rotate(-49deg);
	-webkit-animation: makeItRain 1000ms infinite ease-out;
		  animation: makeItRain 1000ms infinite ease-out;
	-webkit-animation-delay: 193ms;
		  animation-delay: 193ms;
	-webkit-animation-duration: 1110ms;
		  animation-duration: 1110ms;
}
.confetti-piece:nth-child(3) {
	left: 21%;
	transform: rotate(-69deg);
	-webkit-animation: makeItRain 1000ms infinite ease-out;
		  animation: makeItRain 1000ms infinite ease-out;
	-webkit-animation-delay: 110ms;
		  animation-delay: 110ms;
	-webkit-animation-duration: 901ms;
		  animation-duration: 901ms;
}
.confetti-piece:nth-child(4) {
	left: 28%;
	transform: rotate(34deg);
	-webkit-animation: makeItRain 1000ms infinite ease-out;
		  animation: makeItRain 1000ms infinite ease-out;
	-webkit-animation-delay: 157ms;
		  animation-delay: 157ms;
	-webkit-animation-duration: 916ms;
		  animation-duration: 916ms;
}
.confetti-piece:nth-child(5) {
	left: 35%;
	transform: rotate(-13deg);
	-webkit-animation: makeItRain 1000ms infinite ease-out;
		  animation: makeItRain 1000ms infinite ease-out;
	-webkit-animation-delay: 417ms;
		  animation-delay: 417ms;
	-webkit-animation-duration: 1191ms;
		  animation-duration: 1191ms;
}
.confetti-piece:nth-child(6) {
	left: 42%;
	transform: rotate(10deg);
	-webkit-animation: makeItRain 1000ms infinite ease-out;
		  animation: makeItRain 1000ms infinite ease-out;
	-webkit-animation-delay: 28ms;
		  animation-delay: 28ms;
	-webkit-animation-duration: 1022ms;
		  animation-duration: 1022ms;
}
.confetti-piece:nth-child(7) {
	left: 49%;
	transform: rotate(72deg);
	-webkit-animation: makeItRain 1000ms infinite ease-out;
		  animation: makeItRain 1000ms infinite ease-out;
	-webkit-animation-delay: 233ms;
		  animation-delay: 233ms;
	-webkit-animation-duration: 1066ms;
		  animation-duration: 1066ms;
}
.confetti-piece:nth-child(8) {
	left: 56%;
	transform: rotate(-36deg);
	-webkit-animation: makeItRain 1000ms infinite ease-out;
		  animation: makeItRain 1000ms infinite ease-out;
	-webkit-animation-delay: 26ms;
		  animation-delay: 26ms;
	-webkit-animation-duration: 706ms;
          animation-duration: 706ms;
}
.confetti-piece:nth-child(9) {
	left: 63%;
	transform: rotate(-12deg);
	-webkit-animation: makeItRain 1000ms infinite ease-out;
		  animation: makeItRain 1000ms infinite ease-out;
	-webkit-animation-delay: 404ms;
		  animation-delay: 404ms;
	-webkit-animation-duration: 860ms;
		  animation-duration: 860ms;
}
.confetti-piece:nth-child(10) {
	left: 70%;
	transform: rotate(46deg);
	-webkit-animation: makeItRain 1000ms infinite ease-out;
		  animation: makeItRain 1000ms infinite ease-out;
	-webkit-animation-delay: 456ms;
		  animation-delay: 456ms;
	-webkit-animation-duration: 876ms;
          animation-duration: 876ms;
}
.confetti-piece:nth-child(11) {
	left: 77%;
	transform: rotate(64deg);
	-webkit-animation: makeItRain 1000ms infinite ease-out;
		  animation: makeItRain 1000ms infinite ease-out;
	-webkit-animation-delay: 342ms;
		  animation-delay: 342ms;
	-webkit-animation-duration: 920ms;
          animation-duration: 920ms;
}
.confetti-piece:nth-child(12) {
	left: 84%;
	transform: rotate(-28deg);
	-webkit-animation: makeItRain 1000ms infinite ease-out;
		  animation: makeItRain 1000ms infinite ease-out;
	-webkit-animation-delay: 173ms;
		  animation-delay: 173ms;
	-webkit-animation-duration: 1100ms;
          animation-duration: 1100ms;
}
.confetti-piece:nth-child(13) {
	left: 91%;
	transform: rotate(-45deg);
	-webkit-animation: makeItRain 1000ms infinite ease-out;
		  animation: makeItRain 1000ms infinite ease-out;
	-webkit-animation-delay: 457ms;
		  animation-delay: 457ms;
	-webkit-animation-duration: 1124ms;
          animation-duration: 1124ms;
}
.confetti-piece:nth-child(odd) {
	background: #17d3ff;
}
.confetti-piece:nth-child(even) {
	z-index: 5;
}
.confetti-piece:nth-child(4n) {
	width: 5px;
	height: 12px;
	-webkit-animation-duration: 2000ms;
		  animation-duration: 2000ms;
}
.confetti-piece:nth-child(3n) {
	width: 3px;
	height: 10px;
	-webkit-animation-duration: 2500ms;
		  animation-duration: 2500ms;
	-webkit-animation-delay: 1000ms;
		  animation-delay: 1000ms;
}
.confetti-piece:nth-child(4n-7) {
	background: #ff4e91;
}

@-webkit-keyframes makeItRain {
	from {
		opacity: 0;
	}
	50% {
		opacity: 1;
	}
	to {
		transform: translateY(200px);
	}
}

@keyframes makeItRain {
	from {
		opacity: 0;
	}
	50% {
		opacity: 1;
	}
	to {
		transform: translateY(200px);
	}
}
