:root {
	--color-primary: #10378d;
	--color-primary-hover: #1d65ff;
	--color-accent: #9ed7e2;
	--color-accent-border: #b5dbe2;
	--color-bg: #ecf7f9;
	--color-links: #10378d;
	--color-th: #9ed7e2;
	--color-td: white;
}

@font-face {
	font-family: 'Pixelated';
	src: url('/fonts/PixeloidSans.ttf') format('truetype');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

* {
	box-sizing: border-box;
	cursor: url("/cursors/talonflame.cur"), auto;
}

body {
	font-family: 'Pixelated';
	margin-left: 20%;
	margin-right: 20%;
	text-align: center;
	background-color: #b5dbe27a;
}

.menu a {
	padding: 10px;
	/* margin-right: 10px; */
	border-radius: 5px;
	text-decoration: none;
	color: #ffffff;
	background-color: var(--color-primary);
	flex: 1 1 0;
}

.menu a:hover {
	background-color: var(--color-primary-hover);
}

.menu {
	margin-top: 40px;
	margin-bottom: 30px;
	padding: 30px;
	background-color: var(--color-accent);
	border-radius: 5px;
	display: flex;
	overflow: auto;
	justify-content: center;
	flex-wrap: wrap;
	gap: 5px;
}

footer {
	margin-top: 30px;
	margin-bottom: 30px;
	padding: 30px;
	background-color: var(--color-accent);
	border-radius: 5px;
	font-size: smaller;
	display: flex;
	flex-flow: wrap;
	justify-content: center;
}

footer img {
	image-rendering: pixelated;
	margin-top: 10px;
	margin-right: 5px;
}

footer span {
	width: 100%;
}

div.main {
	padding: 50px;
	/*background-color: #f6fbfc;*/
	background-color: var(--color-bg);
	border-radius: 5px;
	position: relative;
}

div.sprites img {
	/* border: 5px double #10378d; */
	border: 5px double var(--color-accent-border);
	border-radius: 5px;
	width: 128px;
	margin-bottom: 5px;
	aspect-ratio: 1 / 1;
	object-fit: scale-down;
	image-rendering: pixelated;
}

div.sprites-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

div.sprites a {
	font-size: small;
	padding: 5px;
	background: var(--color-primary);
	color: white;
	border-radius: 5px;
	text-decoration: none;
	margin: 2px;
}

div.sprites a:hover {
	background: var(--color-primary-hover);
}

div.search {}

div.search div {
	width: 100%;
	display: flex;
	flex-wrap: wrap;
	justify-content: safe center;
}

div.search div a {
	margin-bottom: 10px;
	color: var(--color-links);
	transition: color 0.5s, transform 0.5s;
}

div.search div a:hover,
div.search div a:active {
	color: transparent;
	transition-duration: 0.5s;
	transform: scale(2);
}

div.search_bar {
	margin-bottom: 50px;
	display: flex;
	justify-content: safe center;
}

div.privacy {
	text-align: left;
	font-family: Arial, Helvetica, sans-serif;
}

div.privacy code {
	overflow: auto;
	display: block;
	unicode-bidi: embed;
	white-space: pre;
}

.sound-btn {
	vertical-align: super;
	margin: 0;
	width: 16px;
	transform: translateY(-5px);
	transform: translateX(-8px);
}

.sound-btn:hover {
	filter: brightness(0) saturate(100%) invert(13%) sepia(95%) saturate(7003%) hue-rotate(223deg) brightness(110%) contrast(102%);
}

.pokemon-title {
	transform: translateX(11px);
}

div.types {
	/* border: 2px solid #10378d; */
	border-radius: 5px;
	margin-bottom: 30px;
}

div.types img.types {
	width: 40px;
	margin-top: 5px;
}

div.types h1 {
	padding: 0;
	margin: 0;
}

div.types span {
	font-size: small;
	margin-top: 10px;
	display: block;
}

div.corner {
	margin-bottom: 15px;
}

div.evolutions span {
	margin-bottom: 5px;
}

a {
	color: var(--color-links);
	transition: 0.3s;
}

div.evolutions {
	font-size: small;
	/* margin: 5px; */
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 2px;
	margin-top: 5px;
}

div.evolutions a {
	padding: 2.5px 5px;
	border-radius: 5px;
	color: white;
	text-decoration: none;
	background-color: var(--color-primary);
}

div.evolutions a:hover {
	background-color: var(--color-primary-hover);
}

a:hover {
	text-decoration: none;
}

.modal {
	position: fixed;
	inset: 0;
	display: grid;
	place-items: center;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9999;
}

.modal[hidden] {
	display: none;
}

.modal-inner {
	background: #fff;
	padding: 1rem;
	max-width: 480px;
	width: 90%;
	border-radius: 6px;
}

.modal-actions {
	margin-top: 0.75rem;
	display: flex;
	gap: .5rem;
	justify-content: flex-end;
}

.switch-wrapper input[type="checkbox"] {
	visibility: hidden;
	display: none;
}

.switch-wrapper *,
.switch-wrapper ::after,
.switch-wrapper ::before {
	box-sizing: border-box;
}

.switch-wrapper .rocker {
	display: inline-block;
	position: relative;
	font-size: 2em;
	font-weight: bold;
	text-align: center;
	text-transform: uppercase;
	color: #888;
	width: 7em;
	height: 4em;
	overflow: hidden;
	border-bottom: 0.5em solid #eee;
}

.switch-wrapper .rocker-small {
	font-size: 0.75em;
}

.switch-wrapper .rocker::before {
	content: "";
	position: absolute;
	top: 0.5em;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #999;
	border: 0.5em solid #eee;
	border-bottom: 0;
}

.switch-wrapper .switch-left,
.switch-wrapper .switch-right {
	cursor: pointer;
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 2.5em;
	width: 3em;
	transition: 0.2s;
	user-select: none;
}

.switch-wrapper .switch-left {
	height: 2.4em;
	width: 2.75em;
	left: 0.85em;
	bottom: 0.4em;
	background-color: #ddd;
	transform: rotate(15deg) skewX(15deg);
}

.switch-wrapper .switch-right {
	right: 0.5em;
	bottom: 0;
	background-color: #ff6761;
	color: #fff;
}

.switch-wrapper .switch-left::before,
.switch-wrapper .switch-right::before {
	content: "";
	position: absolute;
	width: 0.4em;
	height: 2.45em;
	bottom: -0.45em;
	background-color: #ccc;
	transform: skewY(-65deg);
}

.switch-wrapper .switch-left::before {
	left: -0.4em;
}

.switch-wrapper .switch-right::before {
	right: -0.375em;
	background-color: transparent;
	transform: skewY(65deg);
}

.switch-wrapper input:checked+.switch-left {
	background-color: #2d9e00;
	color: #fff;
	bottom: 0px;
	left: 0.5em;
	height: 2.5em;
	width: 3em;
	transform: rotate(0deg) skewX(0deg);
}

.switch-wrapper input:checked+.switch-left::before {
	background-color: transparent;
	width: 3.0833em;
}

.switch-wrapper input:checked+.switch-left+.switch-right {
	background-color: #ddd;
	color: #888;
	bottom: 0.4em;
	right: 0.8em;
	height: 2.4em;
	width: 2.75em;
	transform: rotate(-15deg) skewX(-15deg);
}

.switch-wrapper input:checked+.switch-left+.switch-right::before {
	background-color: #ccc;
}

.switch-wrapper input:focus+.switch-left {
	color: #333;
}

.switch-wrapper input:checked:focus+.switch-left {
	color: #fff;
}

.switch-wrapper input:focus+.switch-left+.switch-right {
	color: #fff;
}

.switch-wrapper input:checked:focus+.switch-left+.switch-right {
	color: #333;
}

input {
	font-family: 'Pixelated';
	border-radius: 5px;
	border: 2px solid var(--color-primary);
	padding: 10px;
	width: 100%;
	text-align: center;
	margin-bottom: 10px;
}

a.a-btn-1 {
	font-size: small;
	padding: 5px;
	background: var(--color-primary);
	color: white;
	border-radius: 5px;
	text-decoration: none;
	margin: 2px;
}

a.a-btn-2 {
	font-size: small;
	padding: 12px;
	background: var(--color-primary);
	color: white;
	border-radius: 5px;
	text-decoration: none;
	display: inline-block;
	min-width: 80px;
}

a.a-btn-1:hover {
	background-color: var(--color-primary-hover);
}

a.a-btn-2:hover {
	background-color: var(--color-primary-hover);
}

div.guess img {
	width: 256px;
	image-rendering: pixelated;
}

button {
	font-family: 'Pixelated';
	font-size: small;
	padding: 12px;
	background-color: var(--color-primary);
	border-radius: 5px;
	color: #ffffff;
	border: none;
	transition: 0.3s;
	min-width: 80px;
}

button:hover {
	padding: 12px;
	background-color: var(--color-primary-hover);
	border-radius: 5px;
	transition: 0.3s;
}

div.flavour {}

div.info {
	margin-top: 30px;
}

div.damage_taken table img {
	width: 32px;
}

div.damage_taken {
	justify-content: safe center;
	overflow: auto;
	display: flex;
	margin-top: 10px;
}

div.damage {
	border: 5px double var(--color-accent-border);
	border-radius: 5px;
	padding: 10px;
	margin-top: 30px;
}

div.damage_taken td {
	font-size: small;
}

div.about {
	text-align: justify;
}

a.corner {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 10;
	padding: 5px;
	font-size: 12px;
	margin-left: 10px;
	margin-bottom: 20px;
	border-radius: 5px;
	text-decoration: none;
	color: #ffffff;
	background-color: var(--color-primary);
	width: 110px;
}

a.corner:hover {
	background-color: var(--color-primary-hover);
}

div.damage span {
	font-size: 10px;
	margin-bottom: 10px;
}

div.damage h3 {
	margin-bottom: 0px;
}

a.current {
	background-color: black !important;
}

p.block {
	text-align: justify;
}

div.diff-hint {
	font-size: small;
}

form.save-in-leaderboard {
	display: flex;
	gap: 10px;
	align-items: baseline;
}

form.save-in-leaderboard button,
form.save-in-leaderboard a {
	width: 50%;
}

.full {
	width: 100%;
}

div.game-start-buttons {
	display: flex;
	gap: 5px;
	flex-wrap: wrap;
	flex: 0 0 1;
	justify-content: center;
}

div.game-start-buttons a {
	flex: 1 1 0;
	flex-basis: auto;
}

select,
::picker(select) {
	appearance: base-select;
}

select {
	-webkit-appearance: none;
	text-align-last: center;
	font-family: 'Pixelated';
}

select#lang-select {
	top: 0.5rem;
	right: 0.5rem;
	appearance: none;
	text-align: center;
	justify-content: center;
	border-radius: 5px;
	background-color: var(--color-primary);
	padding: 5px;
	color: white;
	position: absolute;
	margin-right: 10px;
	margin-bottom: 20px;
	z-index: 10;
	width: 110px;
	border: none;
	font-size: 12px;
}

select#difficulty,
select#generation {
	padding: 10px 20px 10px 20px;
	border-radius: 5px;
	text-align: center;
	background-color: var(--color-primary);
	color: white;
	width: 200px;
	margin-top: 10px;
}

.difficulty-select {
	border: 5px double var(--color-accent-border);
	border-radius: 5px;
	padding: 10px;
}

.username-select {
	border: 5px double var(--color-accent-border);
	border-radius: 5px;
	padding: 15px;
	text-align: center;
	font-weight: bold;
	background-color: white;
}

div.leaderboard {
	max-height: 500px;
	overflow: auto;
	display: inline-block;
}

div.leaderboard table {
	table-layout: fixed;
	width: 100%;
}

div.leaderboard th {
	padding: 10px;
	background-color: var(--color-th);
	border-radius: 5px;
}

div.leaderboard td {
	background-color: var(--color-td);
	border-radius: 5px;
	padding: 10px;
}

div.leaderboard th:nth-of-type(3) {
	width: 50%;
}

div.leaderboard th:nth-of-type(2) {
	width: 30%;
}

div.leaderboard th:nth-of-type(1) {
	width: 25%;
}

div.pokemon-list {
	justify-content: safe center;
	height: 500px;
	overflow-y: auto;
	border: 5px double var(--color-accent-border);
	border-radius: 5px;
	display: flex;
	flex-wrap: wrap;
}

input.username {
	width: 80%;
}

form {
	margin-top: 5px;
}

.continue {
	width: 45%;
}

.game-results {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
}

.game-results .guess-results {
	flex: 0 0
}

.guess-results p {
	margin: 0;
	font-size: small;
}

.print {
	width: 50%;
}

.download {
	display: flex;
	gap: 10px;
}

div.difficulty-select a.a-btn-2 {
	margin-top: 5px;
}

.game-buttons {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
}

.guess-results img {
	image-rendering: pixelated;
	width: 128px;
}

summary {
	background-color: var(--color-primary);
	padding: 5px;
	border-radius: 5px;
	color: white;
	margin-bottom: 10px;
	transition: 0.5s;
}

summary:hover {
	transition: 0.5s;
	background-color: var(--color-primary-hover);
}

@media (prefers-color-scheme: dark) {

	body,
	.modal-inner {
		background-color: black;
	}

	.sound-btn {
		filter: invert(100);
	}

	.sound-btn:hover {
		filter: brightness(0) saturate(100%) invert(79%) sepia(14%) saturate(4587%) hue-rotate(326deg) brightness(82%) contrast(85%);
	}

	:root {
		--color-primary: #96311d;
		--color-primary-hover: #c58043;
		--color-accent: #162225;
		--color-accent-border: #b5dbe2;
		--color-bg: #162225;
		--color-links: #c58043;
		--color-th: #96311d;
		--color-td: black;
	}

	select.username-select {
		background-color: black;
		color: white;
	}

	p,
	span,
	h1,
	h2,
	h3,
	tr,
	a.current,
	div.privacy {
		color: white;
	}

	input {
		background-color: black;
		color: white;
	}
}

@media screen and (max-width: 900px) {
	body {
		margin-left: 10%;
		margin-right: 10%;
	}

	div.flavour,
	p.ability {
		text-align: justify;
	}

	div.main {
		padding: 30px;
	}
}

@media screen and (max-width: 500px) {
	div.sprites img {
		width: 116px;
	}
}