@font-face {
	font-family: 'Poppins';
	font-weight: 500;
	font-style: normal;
	src: url('/fonts/Poppins-Medium.ttf');
}

@font-face {
	font-family: 'Poppins';
	font-weight: 600;
	font-style: normal;
	src: url('/fonts/Poppins-SemiBold.ttf');
}

@font-face {
	font-family: 'Poppins';
	font-weight: 700;
	font-style: normal;
	src: url('/fonts/Poppins-Bold.ttf');
}

@font-face {
	font-family: 'Poppins';
	font-weight: 800;
	font-style: normal;
	src: url('/fonts/Poppins-ExtraBold.ttf');
}

@font-face {
	font-family: 'Poppins';
	font-weight: 900;
	font-style: italic;
	src: url('/fonts/Poppins-BlackItalic.ttf');
}

:root {
	--background: beige;
	--foreground: #555;
}

* {
	padding: 0;
	margin: 0;
	-webkit-touch-callout: none;
	-webkit-user-callout: none;
	-webkit-user-select: none;
	-webkit-user-drag: none;
	-webkit-user-modify: none;
	-webkit-highlight: none;
	user-select: none;
	touch-action: none;
}

body {
	background-color: var(--background);
	color: var(--foreground);
	font-family: 'Poppins';
	font-weight: 700;
	font-size: 18px;
	text-align: center;
	letter-spacing: 1px;
	text-transform: uppercase;
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

canvas {
	display: block;
}

.snake {
	border: solid 10px #CCC;
	position: relative;
	background-color: white;
	transition: all .2s;
	pointer-events: none;

	&[data-preview="true"] {
		border-color: var(--poison);
	}
}

.game-over {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	padding: 20px;
	transition: opacity 0.2s;
	backdrop-filter: blur(5px);
	background-image: linear-gradient(transparent, white, transparent);
	font-size: 10px;

	[data-scale="true"] & {
		font-size: 20px;
	}

	.game-over-body {
		display: flex;
		flex-direction: column;
		gap: 30px;
		text-shadow: 0 0 10px white;
		line-height: 1;
	}

	h1 {
		font-style: italic;
		font-weight: 900;
		font-size: 3.8em;
		text-transform: uppercase;
	}

	.score {
		font-size: 6em;
		font-weight: 600;
		padding-bottom: 5px;
	}

	.best {
		font-size: 2em;
	}

	.continue {
		font-size: 1.8em;
	}

	&[data-active="false"] {
		opacity: 0;
		pointer-events: none;
	}
	
}
