@font-face {
	font-family: 'Magical';
	src: url('./fonts/magical-world.regular.otf');
}
@font-face {
	font-family: 'RETROACTIVE';
	src: url('fonts/RETROACTIVE.otf');
}

*::-webkit-scrollbar {
	width: 0;
}

*::-webkit-scrollbar-thumb {
	background-color: transparent;
}

.d-none {
	display: none !important;
}

.d-flex {
	display: flex !important;
}

.d-block {
	display: block !important;
}

.inline {
	display: inline-flex !important;
}

body {
	margin: 0;
	box-sizing: border-box;
	background-color: #051316;
	font-family: 'Magical', sans-serif;
}

main {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100vw;
	max-width: 1280px;
	height: 100vh;
	margin: 0 auto;
	overflow: hidden;
}

button {
	font-family: 'Magical', sans-serif;
	cursor: pointer;
}

span,
p {
	margin: 0;
	padding: 0;
}

h1 {
	font-size: 4.125rem;
	font-weight: 500;
	color: #74e0ec;
	text-shadow: 2px 2px 12px #8adee1a5;
}

h2 {
	font-family: 'RETROACTIVE';
	color: #45c7d5;
	margin-top: 2rem;
	text-shadow: 2px 2px 12px #5edceaac;
	line-height: 100%;
}

#start-screen {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 100%;
	max-width: 1280px;
	height: 100%;
	background-color: #0b2025;
	background-image: url(img/frame.png);
	background-size: 100% 100%;
	background-repeat: no-repeat;
	background-position: center;

	display: flex;
	flex-direction: column;
	align-items: center;
	color: #fff;
	z-index: 9999;
	overflow-y: auto;
}

.heading {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1rem;
}

.heading img {
	height: 40%;
	object-fit: contain;
	border-radius: 50%;
	border: 1px solid #45c7d5;
	box-shadow: 0px 0px 16px 2px #45c7d5;
}

.spacer {
	width: 100%;
	height: 4px;
	border-radius: 50%;
	margin-bottom: 1rem;
	background-image: radial-gradient(circle, #0098c696 0%, #0098c68b 100%);
	filter: blur(2px);
}

.chapter {
	display: flex;
	justify-content: center;
	width: 72%;
	gap: 3rem;
	margin-bottom: 2rem;
}

.chapter button {
	padding: 0.8rem 1.25rem;
	font-size: 1.25rem;
	background-color: #1d5b61;
	box-shadow: 0px 0px 16px 4px #2c828c9a;
	color: #fff;
	border: none;
	border-radius: 4px;
	text-shadow: 2px 2px 2px #0f282b1b;
	cursor: pointer;
	transition: all 0.125s ease-in-out;
}

.active {
	outline: 1px white solid;
	text-shadow: 2px 2px 2px #0f282b76 !important;
}

.inactive {
	background-color: #1d5b61;
	outline: none;
}

.chapter button:hover {
	text-shadow: 2px 2px 2px #0f282b76;
	background-color: #38abb8;
	box-shadow: 0px 0px 16px 2px #2de3bf97;
}

@keyframes fadeIn {
	0% {
		opacity: 0;
		display: none;
	}
	100% {
		opacity: 1;
		display: flex;
	}
}

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

.fade-in {
	animation: fadeIn 0.2s ease forwards;
}

.fade-out {
	animation: fadeOut 0.2s ease forwards;
}

.intro {
	flex-direction: column;
	max-width: 72%;
	padding-bottom: 4rem;
}

.read-intro {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 2rem;
}

#play-intro-btn {
	width: fit-content;
	background-color: #1d5b61;
	box-shadow: 0px 0px 16px 4px #2c828c9a;
	border: unset;
	border-radius: 4px;
	padding: 0.5rem 0.75rem;
	transition: all 0.075s ease-in-out;
}

#play-intro-btn img {
	width: 2.5rem;
	object-fit: contain;
	transition: all 0.075s ease-in-out;
}

.read-intro div {
	opacity: 0;
	transition: all 0.125s ease-in-out;
}

#play-intro-btn:hover {
	background-color: #38abb8;
	box-shadow: 0px 0px 16px 2px #2de3bf97;
}

#play-intro-btn:hover img {
	content: url(/img/intro/read-loud.png);
}

.read-intro:hover div {
	opacity: 1;
}

@keyframes outlinePulse {
	0% {
		outline: solid transparent 0px;
	}
	25% {
		outline: solid white 3px;
	}
	50% {
		outline: solid white 3px;
	}
	75% {
		outline: solid white 3px;
	}
	100% {
		outline: solid transparent 0px;
	}
}

.outlined {
	animation: outlinePulse infinite 1.25s ease-in-out;
	background-color: #38abb8 !important;
}

.part {
	display: flex;
	gap: 1rem;
	align-items: center;
	overflow: hidden;
}

.part img {
	float: right;
	width: 20%;
	object-fit: contain;
	border-radius: 50%;
	background-image: radial-gradient(circle, #0098c696 0%, #ffffff00 75%);
}

.intro p,
.how-to-play {
	font-family: 'RETROACTIVE';
	font-size: 1.25rem;
	color: #d1edff;
	line-height: 120%;
	margin-bottom: 1rem;
}

.intro span {
	font-size: 1.25rem;
	color: #aa45d5;
	line-height: 112.5%;
}

.how-to-play {
	flex-direction: column;
	max-width: 72%;
	padding-bottom: 4rem;
}

.books {
	display: flex;
	margin-top: 0.75rem;
}

.enemies,
.natural-enemies {
	display: flex;
	justify-content: space-between;
	height: fit-content;
	color: #aa45d5;
}

.natural-enemies img {
	height: 15%;
	object-fit: contain;
}

.blobs,
.plants {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 50%;
	height: fit-content;
	background-position-y: center;
	background-repeat: no-repeat;
}

.plants {
	background-image: radial-gradient(circle, #0098c696 0%, #ffffff00 65%);
}

.blobs {
	background-image: radial-gradient(circle, #0098c696 0%, #ffffff00 57.5%);
}

.blobs p {
	margin-top: 0.375rem;
	text-align: center;
}

.blobs img {
	width: 66%;
	object-fit: contain;
}

.plants img {
	width: 37.5%;
	object-fit: contain;
}

.poison-note {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.poison-note img {
	float: right;
	max-height: 120px;
	object-fit: contain;
	border-radius: 50%;
	background-image: radial-gradient(circle, #0098c696 0%, #ffffff00 75%);
}

.items,
.controls {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.potion {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	margin-top: 0.75rem;
}

.potion span,
.scroll span {
	color: #aa45d5;
}

.scroll {
	display: flex;
	align-items: center;
	gap: 0.875rem;
}

.books img,
.items img {
	width: 48px;
	object-fit: contain;
	border-radius: 50%;
	background-image: radial-gradient(circle, #0098c6d9 0%, #ffffff00 75%);
}

.key {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-shrink: 0;
	text-align: center;
	min-width: 24px;
	width: fit-content;
	min-height: 24px;
	border-radius: 4px;
	border: 1px white solid;
	background-color: #3c3c3c;
	color: white;
	font-size: 1.25rem;
	font-family: 'Magical';
}
.padding {
	padding: 0 0.35rem;
}

.control-entry-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.control-entry-row:last-of-type {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 2rem;
}

.control-entry {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	margin-top: 0.75rem;
}

.spell {
	height: 120px;
	object-fit: contain;
	border-radius: 50%;
	background-image: radial-gradient(circle, #0098c6aa 0%, #ffffff00 65%);
}

.control-entry span {
	color: #45c7d5;
}

#start-button {
	padding: 10px 20px;
	margin-bottom: 4rem;
	font-size: 24px;
	background-color: #2c838c;
	color: #fff;
	border: none;
	border-radius: 4px;
	text-shadow: 2px 2px 2px #0f282b1b;
	box-shadow: 0px 0px 16px 4px #b341d9a1;
	cursor: pointer;
	transition: all 0.125s ease-in-out;
}

#start-button:hover {
	text-shadow: 2px 2px 2px #0f282b76;
	background-color: #45c7d5;
	box-shadow: 0px 0px 16px 2px #2de3bf97;
}

#quick-start {
	font-size: 1.5rem;
	color: #74e0ec;

	margin-top: 1rem;
	margin-bottom: 1.5rem;
}

#winning-screen,
#game-over-screen,
#pause-screen {
	position: absolute;
	z-index: 99;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: center;
	width: calc(1024px - 8rem);
	max-width: 38rem;
	/* max-height: 82%; */
	margin: 1rem;
	padding: 1.25rem;
	object-fit: contain;
	border: #72e8ffe8 solid 1px;
	border-radius: 1rem;
	box-shadow: #58f1ff96 0px 0px 16px 0px;
	background-color: rgba(216, 228, 236, 0.125);
	backdrop-filter: blur(6px);
	color: white;
	font-size: 1.125rem;
}

#winning-screen h2,
#game-over-screen h2,
#pause-screen h2 {
	font-family: 'Magical' !important;
	font-size: 3rem;
	text-shadow: none;
	margin-top: 0;
	margin-bottom: 1.25rem;
}

#winning-screen p,
#game-over-screen p,
#pause-screen p {
	font-family: 'RETROACTIVE';
	text-align: center;
	text-wrap: balance;
}

.game-score {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
}

#winning-screen span {
	font-family: 'Magical' !important;
	font-size: 1.25rem;
	font-weight: bold;
	color: #ffd900;
}

.input-box {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1.25rem;
	margin-top: 1.75rem;
}

.input-box input {
	width: 8rem;
	border-radius: 0.25rem;
	border: unset;
	padding: 0.4rem 0.8rem;
	outline: 1px solid #075861b6;
	background-color: #b3e2e8;
	color: #063f45;
	font-family: 'RETROACTIVE';
	font-size: 1.125rem;
}

.input-box button {
	padding: 0.4rem 0.8rem;
	font-size: 1rem;
	background-color: #1d5b61;
	box-shadow: #58f1ff2d 0px 0px 16px 0px;
	color: #fff;
	font-size: 1.125rem;
	border: none;
	outline: 1px solid #103b3f7b;
	border-radius: 4px;
	text-shadow: 2px 2px 2px #0f282b1b;
	cursor: pointer;
	transition: all 0.1s ease-in-out;
}

::placeholder {
	color: #7d979a;
	font-size: 1rem;
}

.game-score img {
	height: 48px;
	object-fit: contain;
}

.btn-bar {
	display: flex;
	justify-content: space-evenly;
	/* gap: 2rem; */
	width: 100%;
	margin-top: 1.25rem;
}

.btn-bar button {
	padding: 0.8rem 1.25rem;
	font-size: 1.25rem;
	background-color: #1d5b61;
	box-shadow: #58f1ff2d 0px 0px 16px 0px;
	color: #fff;
	border: none;
	outline: 1px solid #103b3f7b;
	border-radius: 8px;
	text-shadow: 2px 2px 2px #0f282b1b;
	cursor: pointer;
	transition: all 0.1s ease-in-out;
}

.btn-bar button:hover,
.input-box button:hover {
	text-shadow: 2px 2px 2px #0f282b76;
	background-color: #38abb8;
	outline: 1px solid #075861b6;
	box-shadow: #58f1ff96 0px 0px 16px 0px;
}

.btn-bar button:active,
.input-box button:active {
	outline: 1px solid white;
}

#pause-screen .btn-bar {
	justify-content: space-between;
}

#pause-screen h3 {
	margin: 0;
	margin-bottom: 0.75rem;
}

.pause-screen-columns {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
}

.quest-log,
.control-sheet {
	display: flex;
	align-items: flex-start;
}

.quest-log {
	width: fit-content;
	justify-content: space-between;
	width: 100%;
	margin-bottom: 1rem;
}

.quest-log span {
	font-family: 'Magical' !important;
	font-size: 1.25rem;
	font-weight: bold;
	color: #ffd900;
}

.control-sheet {
	width: 100%;
	gap: 4rem;
}

.m-right {
	margin-right: 0.375rem;
}

.m-left {
	margin-left: 0.375rem;
}

li {
	list-style-type: none;
	margin-bottom: 0.5rem;
	width: fit-content;
	align-items: center;
}

.control-sheet ul:last-of-type > li {
	margin: 0;
}

li strong {
	color: #ffd900;
}

li img {
	height: 32px;
	margin-left: 0.25rem;
	object-fit: contain;
	border-radius: 50%;
	background-image: radial-gradient(circle, #259bced9 0%, #ffffff00 55%);
}

ul {
	width: 33%;
	margin-block-end: 0;
	margin-block-start: 0;
	padding-inline-start: 0;
}

.leaderboard {
	width: 72%;
	font-family: 'RETROACTIVE';
	font-size: 1rem;
	color: white;
	margin-bottom: 3rem;
}

.leaderboard h2 {
	font-size: 2.25rem;
	width: 100%;
	text-align: center;
}

.leaderboard table {
	width: 100%;
	border-collapse: collapse;
}

.highlight {
	font-size: 1.25rem;
	font-weight: bold;
	letter-spacing: 0.0375rem;
}

.leaderboard th {
	color: #ffd900;
	font-size: 1.375rem;
	border-bottom: 1px solid #ffd90080;
	padding: 0;
}

.leaderboard th img,
.leaderboard td img {
	width: 3rem;
}

.leaderboard tr {
	width: 100%;
	padding: 0.75rem;
}

.leaderboard tr:nth-of-type(1) td,
.leaderboard tr:nth-of-type(2) td,
.leaderboard tr:nth-of-type(3) td {
	padding: 0 !important;
	color: #b2adf3;
	font-size: 1.175rem;
}

.leaderboard tr:nth-of-type(1) td:last-of-type,
.leaderboard tr:nth-of-type(2) td:last-of-type,
.leaderboard tr:nth-of-type(3) td:last-of-type {
	padding-right: 1.25rem !important;
}

.leaderboard td {
	padding: 0.625rem 0;
	width: 16%;
	text-align: center;
}

.leaderboard th:first-of-type {
	text-align: left;
	padding-left: 1.25rem;
}

.leaderboard td:first-of-type {
	display: inline-flex;
	align-items: center;
	text-align: left;
	width: fit-content !important;
}

.leaderboard th:last-of-type,
.leaderboard td:last-of-type {
	text-align: right;
	padding-right: 1.25rem;
	width: fit-content !important;
}

.leaderboard td:first-of-type:not(.highlight) {
	padding-left: 3rem;
}

.leaderboard tbody tr {
	border-bottom: 1px solid #2c828c80 !important;
}

canvas {
	display: block;
	border: #0a2222e8 solid 1px;
	border-radius: 1rem;
	box-shadow: #537a7796 0px 0px 16px 0px;
	transition: filter 0.125s ease;
	aspect-ratio: 2/1;
}

canvas.filtered {
	filter: blur(4px) brightness(0.4);
}

@media only screen and (max-width: 1024px) {
	canvas {
		width: 100%;
	}
}

@media only screen and (max-height: 512px) {
	canvas {
		width: 100%;
	}
}

#game-panel {
	justify-content: center;
	align-items: flex-start;
}

#HUD-wrapper {
	position: relative;
	top: 0;
	left: 0;
	right: 0;
}

#mobile-actions-wrapper {
	position: relative;
	display: flex;
	bottom: 0;
}

#HUD {
	position: absolute;
	top: 0;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	width: calc(1024px - 2rem);
	height: 3.5rem;
	padding: 0.75rem 1rem 0 1rem;
	border-radius: 1rem;
	background-image: linear-gradient(180deg, #0a2222e8 0%, #ffffff00 100%);
	pointer-events: none;
}

.bars {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

#health-bar,
#spellpower-bar {
	display: flex;
	justify-content: space-between;
	width: 12rem;
	height: 1rem;
	border-radius: 0.25rem;
	font-size: 1.375rem;
}

#health-bar-wrapper,
#spellpower-bar-wrapper {
	width: 100%;
	height: 1rem;
	border-radius: 0.25rem;
	border: 1px solid #191a19;
	overflow: hidden;
	transition: width 0.5s ease;
}

#health-bar-fill {
	width: 7.5rem;
	height: 1rem;
	background: linear-gradient(90deg, #8c2509 0%, #0cc054 100%);
}

#spellpower-bar-fill {
	width: 7.5rem;
	height: 1rem;
	background: linear-gradient(90deg, #032069 0%, #00e8ff 100%);
}

#health-bar-text {
	width: 6rem;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding-left: 0.75rem;
	color: #0cc054;
	font-weight: bold;
}

#spellpower-bar-text {
	width: 6rem;
	display: flex;
	align-items: center;
	padding-left: 0.75rem;
	color: #00e8ff;
	font-weight: bold;
	justify-content: flex-end;
}

#potions-container {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: #ffd900;
	font-weight: bold;
	font-size: 1rem;
	margin-top: -0.5rem;
}

#potions-container > div {
	display: flex;
	flex-direction: column;
	align-items: center;
}

#potions-container img {
	width: 40px;
	height: 40px;
	margin-left: -0.5rem;
}

#potions-container span {
	margin-left: -0.575rem;
	margin-top: -0.325rem;
}

#books-container {
	position: relative;
	display: flex;
	gap: -2rem;
	justify-content: space-between;
	align-items: center;
	margin-top: -0.2rem;
}

#books-container img {
	width: 36px;
	height: 36px;
	margin-left: -0.5rem;
}

#goldenBook,
#blueBook,
#redBook,
#greenBook {
	filter: grayscale(1);
}

.collected {
	filter: grayscale(0) !important;
}

#specials-container {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: -0.5rem;
	color: #ffd900;
	font-weight: bold;
	font-size: 1.25rem;
	letter-spacing: 0.325rem;
}

#specials-container img {
	width: 44px;
	height: 44px;
	margin-left: -0.5rem;
}

#gem-score {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	width: fit-content;
	margin-top: -1rem;
	color: #ffd900;
	font-weight: bold;
}

#gem-score img {
	width: 56px;
	height: 56px;
}

#blue-and-red {
	display: flex;
	gap: 0.75rem;
	font-size: 1.25rem;
}

#blue-gem-score-container,
#red-gem-score-container,
#total-gem-score-container,
.blue-gem-score-container,
.red-gem-score-container,
.total-gem-score-container {
	display: flex;
	align-items: center;
	width: inherit;
	height: inherit;
}

#total-gem-score-container {
	width: 100%;
	justify-content: flex-end;
	margin-top: -0.5rem;
	font-size: 1.5rem;
}

#total-gem-score {
	margin-left: 2.25rem;
}
