@charset "UTF-8";

@font-face {
	font-family: "BPreplay";
	src: url("/fonts/BPreplay/BPreplay.otf") format("opentype");
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-family: "BPreplay";
	src: url("/fonts/BPreplay/BPreplayBold.otf") format("opentype");
	font-weight: bold;
	font-style: normal;
}


* {
	margin: 0;
	padding: 0;
	border: 0;
	box-sizing: border-box;
	font-family: "BPreplay";
	font-weight: bold;
	user-select: none;
	-moz-user-select: none;
}

body {
	position: fixed;
	width: 100%;
	height: 100%;
	background-color: #222222;
}

#board {
	position: absolute;
	display: grid;
	width: calc(100vh - 304px);
	height: calc(100vh - 304px);
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	grid-gap: 2vh 2vh;
	grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
	grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
}

div.square {
	background-color: #333333;
	cursor: pointer;
	border-radius: 0.25vh;
	transition: 50ms;
	animation: none;
	animation-duration: 350ms;
	animation-direction: alternate;
	/* animation-fill-mode: forwards; */
}

div.square.filled-left {
	background-color: #ff3525;
	box-shadow: 0 0 12px #ff3525;
}

div.square.filled-right {
	background-color: yellow;
	box-shadow: 0 0 12px yellow;
}

@keyframes done-left {
	0% {
		background-color: #ff3525;
		box-shadow: 0 0 12px #ff3525;
	}
	100% {
		background-color: #333333;
		box-shadow: 0 0 0 #333333;
	}
}

body[data-state=done] div.square.filled-left {
	animation-name: done-left;
	animation-iteration-count: infinite;
}

body[data-state=ready] div.square.filled-left {
	animation-name: done-left;
	animation-iteration-count: 1;
	animation-direction: normal;
}

@keyframes done-right {
	0% {
		background-color: yellow;
		box-shadow: 0 0 12px yellow;
	}
	100% {
		background-color: #333333;
		box-shadow: 0 0 0 #333333;
	}
}

body[data-state=done] div.square.filled-right {
	animation-name: done-right;
	animation-iteration-count: infinite;
}

body[data-state=ready] div.square.filled-right {
	animation-name: done-right;
	animation-iteration-count: 1;
	animation-direction: normal;
}


#score {
	position: absolute;
	top: 0;
	width: 100%;
	font-size: 104px;
	line-height: 152px;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.125rem;
	color: #FFFFFF;
	text-shadow: 0 0 16px #40e0d0;
}

#status {
	position: absolute;
	bottom: 0;
	width: 100%;
	font-size: 24px;
	line-height: 152px;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.25rem;
	color: #FFFFFF;
	text-shadow: 0 0 8px #40e0d0;
}
