@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400..900&display=swap');

:root {
	--color-blue-base: #00aeef;
	--color-black-base: #05070a;
	--color-gray-base: #8a9ba8;
}

:root {
	--rem: calc(1rem / 16);
}

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

html {
	font-family: 'Orbitron', sans-serif;
	font-size: 100%;
}

body {
	background: var(--color-black-base);
	color: var(--color-gray-base);
	overflow: hidden;
	position: relative;
}

#starfield-container {
	position: relative;
	min-width: 450px;
	box-shadow: 0 30px 60px var(--color-gray-base);
	width: 60vw;
	height: 100vh;
	margin: 0 auto;
	overflow: hidden;

	.hidden {
		display: none;
	}
}

#starfield {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	background: var(--color-black-base);
}

.splash-screen {
	width: 100%;
	height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;

	.title {
		font-size: clamp(calc(64 * var(--rem)), 10vw, calc(84 * var(--rem)));
		letter-spacing: 0.3em;
		text-align: center;
		text-transform: uppercase;
		color: var(--color-blue-base);
		text-shadow: 0 0 10px var(--color-blue-base);
		margin-bottom: 1em;
		margin-top: -20vh;
		animation: subtlePulse 4s ease-in-out infinite;
	}

	.menu {
		display: flex;
		flex-direction: column;
		gap: 15px;

		button {
			width: calc(250 * var(--rem));
			background: transparent;
			border: 1px solid #1c2a35;
			color: var(--color-gray-base);
			padding: 12px 30px;
			letter-spacing: 2px;
			cursor: pointer;
			position: relative;
			overflow: hidden;
			transition: all 0.2s ease;

			&:hover {
				color: var(--color-blue-base);
				border-color: var(--color-blue-base);
				box-shadow: 0 0 10px var(--color-blue-base);
				padding-left: 40px;
				transform: translateX(2px);
			}

			/* Left arrow indicator */
			&::before {
				content: '>';
				position: absolute;
				left: 10px;
				opacity: 0;
				color: #00aeef;
				transition: 0.2s;
			}

			/* Scan line effect */
			&::after {
				content: '';
				position: absolute;
				top: 0;
				left: -100%;
				width: 100%;
				height: 100%;
				background: linear-gradient(
					120deg,
					transparent,
					rgba(0, 174, 239, 0.4),
					transparent
				);
				transition: 0.4s;
			}

			/* Show arrow */
			&:hover::before {
				opacity: 1;
			}

			/* Sweep animation */
			&:hover::after {
				left: 100%;
			}
		}
	}
}

@keyframes subtlePulse {
	0%,
	100% {
		text-shadow: 0 0 6px #00aeef;
		opacity: 0.85;
	}
	50% {
		text-shadow: 0 0 14px #00aeef;
		opacity: 1;
	}
}

/* ======================== */

/* Panel overlay */
.panel-screen-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(5, 7, 10, 0.85);
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(6px);
	z-index: 10;

	&.hidden {
		display: none;
	}
}

.panel-screen {
	width: 400px;
	padding: 30px;
	background: rgba(10, 15, 20, 0.9);
	border: 1px solid var(--color-blue-base);
	box-shadow: 0 0 20px rgba(0, 174, 239, 0.3);
	color: var(--color-gray-base);
	animation: panelEnter 0.4s ease;
	position: relative;
	overflow: hidden;

	h2 {
		color: var(--color-blue-base);
		margin-bottom: 10px;
		letter-spacing: 3px;
	}

	article {
		margin-top: 15px;

		h3 {
			color: var(--color-blue-base);
			font-size: calc(14 * var(--rem));
			margin: 16px 0 5px;
		}

		.keys {
			display: grid;
			grid-template-columns: repeat(3, 50px);
			gap: 8px;
			justify-content: center;
			margin-top: 10px;
		}

		.key {
			width: 50px;
			height: 50px;
			border: 1px solid var(--color-blue-base);
			display: flex;
			align-items: center;
			justify-content: center;
			color: var(--color-blue-base);
			font-size: 18px;
			box-shadow: 0 0 8px rgba(0, 174, 239, 0.3);
			transition: 0.2s;

			&:hover {
				background: var(--color-blue-base);
				color: var(--color-black-base);
				box-shadow: 0 0 15px var(--color-blue-base);
			}
		}

		.spacebar {
			margin-top: 15px;
			border: 1px solid var(--color-blue-base);
			padding: 10px;
			text-align: center;
			color: var(--color-blue-base);
			letter-spacing: 2px;
			box-shadow: 0 0 8px rgba(0, 174, 239, 0.3);
		}

		.enemy {
			color: #39ff14;
		}
	}

	#btn-close-panel {
		display: block;
		margin-left: auto;
		background: transparent;
		border: 1px solid var(--color-blue-base);
		color: var(--color-blue-base);
		padding: 10px;
		cursor: pointer;
		transition: 0.2s;

		&:hover {
			background: var(--color-blue-base);
			color: var(--color-black-base);
			box-shadow: 0 0 10px var(--color-blue-base);
		}
	}
}
