body {
	margin: 0px;
	min-height: 100vh;
	max-height: 100vh;
	min-width: 100vw;
	max-width: 100vw;
	overflow: hidden;
	display: flex;
	flex-direction: row;
	font-family: system-ui;
	background: var(--background-color);
	color: var(--text-color);
}

aside {
	font-size: 16pt;
	display: flex;
	flex-direction: column;
	user-select: none;
}

a {
	color: black;
	text-decoration: none;
}

aside h1 {
	padding-top: 0px;
	margin-top: 0px;
	font-size: 24pt;
	background: linear-gradient(2.5rad, var(--secondary-color), var(--accent-color));
	background-clip: text;
	-webkit-background-clip: text;
	color: transparent;
	font-weight: bolder;
	font-size: 28pt;
	width: fit-content;
	animation: gradient-move 5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
	background-size: 300% 100%;
}

@keyframes gradient-move {
	0% { background-position: 300% 50%; }
	70% { background-position: 150% 50%; }
	100% { background-position: 0% 50%; }
}

aside div.scroll {
	padding: 8px;
	overflow-y: scroll;
	flex: 1;
}

#searchbar {
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	margin-bottom: 2rem;
}

#searchbar input {
	background: none;
	color: var(--text-color);
}

#searchbar input::placeholder {
	color: color-mix(in srgb, var(--text-color) 75%, transparent);
}

#searchbar #search-query {
	flex: 1;
	margin: 0px 4px;
}

#searchbar label {
	display: flex;
	place-content: center;
	margin: 0px 4px;
}

form {
	display: flex;
	flex-direction: column;
}

form input[type="search"] {
	font-size: 16pt;
	outline: none;
	border: 2px solid var(--accent-color);
	padding: 4px;
}

fieldset {
	display: flex;
	flex-direction: column;
}

fieldset > div > * {
	margin-bottom: 4px;
}

legend {
	width: 50%;
	align-self: center;
	justify-self: center;
	float: center;
}

legend label {
	user-select: none;
	display: flex;
	flex-direction: row;
	width: 100%;
	align-items: center;
	justify-content: center;
}

legend label input[type="checkbox"] {
	opacity: 0;
	display: none;
	margin: 0px;
}

fieldset {
	border-color: var(--accent-color);
}

fieldset:has(> legend input[type="checkbox"]:checked) > :not(legend) {
	display: none;
}

main {
	flex: 3;
	display: flex;
	flex-direction: column;
}

main div.no-query {
	flex: 0.7;
	display: flex;
	place-content: center;
	place-items: center;
	flex-direction: column;
	animation: shaking 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes shaking {
	0% { transform: translate(10px) scale(1.0) rotate(0deg); }
	25% { transform: translate(-100px, 2px) scale(1.1) rotate(2deg); }
	50% { transform: translate(10px, -4px) scale(0.95) rotate(-4deg); }
	75% { transform: translate(-100px, 20px) scale(0.87) rotate(6deg); }
	100% { transform: translate(10px) scale(1.0) rotate(0deg); }
}

main div.no-query h2 {
	margin: 0px;
	user-select: none;
	color: color-mix(in srgb, var(--accent-color) 70%, black);
}

main div.no-query h2 svg {
	transform: scale(1.5);
}

svg {
	filter: var(--svg-filter);
}

aside .searchbar-button {
	margin-left: 16px !important;
	transform: scale(1.4);
}

button.search-close {
	background: none;
	outline: none;
	border: none;
	padding: 0px;
	display: flex;
}

button.search-close a {
	flex: 1;
}

aside svg {
	filter: var(--svg-filter);
}

main div.query {
	max-width: 100vw;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-around;
}

main div.scroll {
	overflow-y: scroll;
	flex: 1;
}

.search-results-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem;
}

.search-results-controls svg {
	transform: scale(1.5);
}

.search-results-controls input, .search-results-controls button {
	outline: none;
	border: none;
	background: none;
	font-size: 16pt;
	text-align: center;
}

.search-results-controls input {
	padding-bottom: 4px;
	text-align: right;
	min-width: 3rem;
	max-width: 3rem;
	color: var(--text-color);
}

.search-results-controls span {
	min-width: 3rem;
	max-width: 3rem;
}

.search-results-controls .space {
	min-width: 2rem;
}

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance:textfield;
}

input[type=color] {
	padding: 0px;
	margin: 0px;
	outline: none;
	border: 1px solid var(--text-color);
	max-height: 1rem;
	min-height: 1rem;
	max-width: 2rem;
}

input[type=checkbox] {
	opacity: 0;
	position: absolute;
}

input[type=checkbox] + label {
	position: relative;
	cursor: pointer;
	padding: 0;
	margin-bottom: 2px;
	display: flex;
	align-items: center;
}

input[type=checkbox] + label:before {
	width: 1rem;
	height: 1rem;
	transform: scale(0.8);
	background: var(--background-color);

	content: "";
	margin-right: 10px;
	display: inline-block;
	border: 3px solid transparent;
	outline: 2px solid var(--text-color);
	padding: 1px;
}

input[type=checkbox]:checked + label:before {
	background: var(--accent-color);
	border: 3px solid var(--background-color);
	outline: 2px solid var(--text-color);
}


input[type=radio] {
	opacity: 0;
	position: absolute;
}

input[type=radio] + label {
	position: relative;
	cursor: pointer;
	padding: 0;
	margin-bottom: 2px;
	display: flex;
	align-items: center;
}

input[type=radio] + label:before {
	width: 1rem;
	height: 1rem;
	transform: scale(0.8);
	background: var(--background-color);

	content: "";
	margin-right: 10px;
	display: inline-block;
	border: 3px solid transparent;
	outline: 2px solid var(--text-color);
	padding: 1px;
	border-radius: 100%;
}

input[type=radio]:checked + label:before {
	background: var(--accent-color);
	border: 3px solid var(--background-color);
	outline: 2px solid var(--text-color);
}

.query a {
	display: flex;
	justify-content: center;
	align-items: center;
}

img {
	flex: 1;
	height: 100% !important;
	width: auto !important;
	max-width: 100% !important;
	object-fit: contain !important;
}