@import url("https://fonts.googleapis.com/css2?family=VT323&display=swap");

* {
	padding: 0;
	margin: 0;
	box-sizing: border-box;
}

body {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100vh;
	background-image: url("../images/background.jpeg");
	background-size: 45%;
	color: white;
	font-family: "VT323", monospace;
	position: relative;
	overflow: hidden;
}

/* Intro */

.intro {
	display: flex;
	flex-direction: column;
	text-align: center;
	justify-content: center;
	gap: 50px;
	transition: 0.5s ease-out;
	position: absolute;
	bottom: 140px;
	animation: slide-in 4s ease-in-out;
}

.div-out {
	animation: slide-out 3s ease-in-out;
}

.bubblelogo {
	width: 40%;
	height: 40%;
	margin-inline: auto;
}

h1 {
	font-size: 90px;
	letter-spacing: 5px;
}

.names,
.year {
	font-size: 25px;
	letter-spacing: 2px;
	margin-bottom: 30px;
	position: absolute;
	bottom: 5px;
	text-align: center;
}

.names {
	left: 30px;
}

.year {
	right: 30px;
}

@keyframes slide-in {
	0% {
		bottom: -100%;
	}

	100% {
		bottom: 140px;
	}
}

/* Button */

button {
	width: max-content;
	margin-inline: auto;
	padding: 20px 80px;
	font-size: 20px;
	border: 5px solid #ff00ff;
	border-radius: 2px;
	background-color: #1f001b;
	color: #ff00ff;
	font-weight: bold;
	letter-spacing: 2px;
	box-shadow: 0 0 25px peachpuff;
	animation: btn 0.5s ease-in, glow 1s linear alternate infinite;
	transition: 0.5s ease-in-out;
}

button:hover {
	color: #1f001b;
	background-color: #ff00ff;
	transition: 0.5s ease-in-out;
}

@keyframes glow {
	0% {
		box-shadow: 0 0 0 peachpuff;
	}
	100% {
		box-shadow: 0 0 25px peachpuff;
	}
}

@keyframes btn {
	0% {
		scale: 0;
	}
	100% {
		scale: 1;
	}
}

/* Canvas */

canvas {
	animation: game 4s ease-in-out, slide-in-game 3s ease-in-out;
	z-index: 2;
}

@keyframes game {
	0% {
		opacity: 0;
	}
	100% {
		opacity: 1;
	}
}

@keyframes slide-in-game {
	0% {
		padding-top: 100%;
	}

	100% {
		padding-top: 0;
	}
}

@keyframes slide-in-us {
	0% {
		bottom: -100%;
	}

	100% {
		bottom: 80px;
	}
}

@keyframes slide-out {
	0% {
		bottom: 140px;
	}

	100% {
		bottom: 1000px;
	}
}

.hidden {
	display: none;
}

/* Stars */

.stars {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	z-index: -2;
	animation: starry-sky 5s linear;
}

span {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1), 0 0 0 8px rgba(255, 255, 255, 0.1), 0 0 20px rgba(255, 255, 255, 1);
	animation: animate 3s linear infinite;
}

span::before {
	content: "";
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 300px;
	height: 2px;
	background: linear-gradient(90deg, #fff, transparent);
}

@keyframes starry-sky {
	0% {
		opacity: 0;
	}
	100% {
		opacity: 1;
	}
}

@keyframes animate {
	0% {
		opacity: 0;
	}
	10% {
		transform: translateX(0);
		rotate: 315deg;
	}
	70% {
		opacity: 1;
	}
	100% {
		transform: translateX(-1000px);
		rotate: 315deg;
		opacity: 0;
	}
}

span:nth-child(1) {
	top: 0;
	right: 0;
	left: initial;
	animation-delay: 0.4s;
	animation-duration: 1s;
}

span:nth-child(2) {
	top: 800px;
	right: 1400px;
	left: initial;
	animation-delay: 0.2s;
	animation-duration: 1.75s;
}

span:nth-child(3) {
	top: 0px;
	right: 1200px;
	left: initial;
	animation-delay: 0.4s;
	animation-duration: 2s;
}

span:nth-child(4) {
	top: 200px;
	right: 1080px;
	left: initial;
	animation-delay: 0.8s;
	animation-duration: 2.25s;
}

span:nth-child(5) {
	top: 300px;
	right: 400px;
	left: initial;
	animation-delay: 0.8s;
	animation-duration: 1.5s;
}

span:nth-child(6) {
	top: 0px;
	right: 600px;
	left: initial;
	animation-delay: 1s;
	animation-duration: 2s;
}

span:nth-child(7) {
	top: 300px;
	right: 0px;
	left: initial;
	animation-delay: 1.2s;
	animation-duration: 1.75s;
}

span:nth-child(8) {
	top: 750px;
	right: 700px;
	left: initial;
	animation-delay: 1.4s;
	animation-duration: 1.25s;
}
span:nth-child(9) {
	top: 550px;
	right: 1000px;
	left: initial;
	animation-delay: 0.75s;
	animation-duration: 2.25s;
}
span:nth-child(10) {
	top: 600px;
	right: 300px;
	left: initial;
	animation-delay: 0.25s;
	animation-duration: 1.75s;
}
