:root {
	--game-window-width: 350px;
	--game-window-height: 544px;
	--sky-height: 466px;
	--ground-height: calc(var(--game-window-height) - var(--sky-height));
}

* {
	margin: 0;
	padding: 0;
	font-family: Verdana, Geneva, Tahoma, sans-serif;

	/* border: 1px solid black; */
}

body {
	background-color: #202124;
	color: #d3d3d3;
}

.main {
	display: flex;
	flex-direction: column;
	padding-top: 20px;
	overflow: hidden;
}

.border-left {
	position: absolute;
	background-color: #202124;
	height: var(--game-window-height);
	width: calc((100vw - var(--game-window-width)) / 2);
	z-index: 30;
	left: 0;
}

.border-right {
	position: absolute;
	background-color: #202124;
	z-index: 30;
	height: var(--game-window-height);
	left: calc(var(--game-window-width) + (100vw - var(--game-window-width)) / 2);
	width: calc((100vw - var(--game-window-width)) / 2);
}

.game-board {
	position: relative;
	height: var(--game-window-height);
	width: var(--game-window-width);
	left: calc((100vw - var(--game-window-width)) / 2);
}

h1 {
	position: absolute;
	color: #000;
	font-size: 20px;
	left: 10px;
	top: 10px;
	z-index: 22;
}

p {
	position: absolute;
	color: #000;
	font-size: 16px;
	left: calc(var(--game-window-width) - 90px);
	top: 10px;
	z-index: 22;
}

.sky {
	height: var(--sky-height);
	width: var(--game-window-width);
	background-image: url('assets/sky.png');
}

.ground {
	height: var(--ground-height);
	width: var(--game-window-width);
	background-image: url('assets/bottom.png');
	position: relative;
}

.jump {
	background-image: url('assets/jump.png');
	position: absolute;
	z-index: 20;
	width: 80px;
	height: 31px;
	left: calc(var(--game-window-width) / 2 - 40px);
	top: calc(var(--ground-height) / 2 - 8px);
	cursor: pointer;
}

.jump:active {
	transform: translateY(2px);
}

.bird {
	background-image: url('assets/bird.png');
	background-size: cover;
	position: absolute;
	z-index: 21;
}

.pipe {
	background-image: url('assets/pipe.png');
	background-size: cover;
	position: absolute;
	z-index: 20;
}

.pipe.top {
	transform: scaleY(-1);
}

.overlay {
	position: absolute;
	top: 220px;
	width: var(--game-window-width);
	height: 40px;
	z-index: 22;
	text-align: center;
	color: #000;
	font-size: 20px;
}

.click-to-start {
	background-color: #ffb638;
	font-size: 18px;
	width: fit-content;
	margin: 0 auto;
	padding: 8px;
	border-radius: 8px;
	border: 2px solid #000;
	cursor: pointer;
}

.click-to-start:active {
	transform: translateY(2px);
}

.retry {
	background: #ffb638 url('assets/retry.png') no-repeat center;
	padding: 5px;
	border: 2px solid #000;
	border-radius: 4px;
	position: absolute;
	z-index: 20;
	width: 24px;
	height: 24px;
	margin-top: 10px;
	left: calc((var(--game-window-width) / 2) - 19px);
	cursor: pointer;
}

.retry:active {
	transform: translateY(2px);
}

@media screen and (min-width: 480px) {
	:root {
		--game-window-width: 450px;
		--game-window-height: 700px;
		--sky-height: 600px;
		--ground-height: calc(var(--game-window-height) - var(--sky-height));
	}

	.overlay {
		top: 280px;
		font-size: 25px;
	}
}
