html {
	scroll-behavior: smooth;
	width: 100%;
	height: 100%;
}

body {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;

	background-color: var(--theme-background);
	color: var(--theme-foreground);

	font-family: Lexend, serif;
	font-weight: 300;
	line-height: 1;
}

svg {
	min-width: 1rem;
	min-height: 1rem;
}

#root {
	width: 100%;
	height: 100%;

	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	overflow-x: scroll;
	overflow-y: hidden;
}

#root > * {
	transition: min-width 200ms;
	scroll-snap-align: start;
	min-width: var(--aside-width);
}

/* Hide scrollbar for Chrome, Safari and Opera */
.hide-scrollbar::-webkit-scrollbar {
	display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.hide-scrollbar {
	-ms-overflow-style: none; /* IE and Edge */
	scrollbar-width: none; /* Firefox */
}

aside {
	min-height: 100%;
	width: var(--aside-width);
}

aside > header {
	font-weight: 400;
	padding: 1rem;
}

aside > header img {
	width: 2rem;
	height: 2rem;
	border-radius: 0.5rem;
}

aside > header a {
	font-size: 1.5rem;
	text-decoration: none;
	color: inherit;
	font-weight: 600;
}

aside > header a:hover,
aside > header a:focus {
	color: var(--palette-blue);
	outline: none;
	text-decoration: underline;
}

aside > header button {
	margin-left: auto;
}

aside > section {
	padding: 1rem;
}

aside > section a {
	color: inherit;
	text-decoration: none;
	font-weight: 400;
	background-color: transparent;
	padding: 0.5rem;
	border-radius: 0.5rem;
}

aside > section a.selected,
aside > section a[data-selected="true"],
aside > section a:hover {
	background-color: var(--theme-section);
}

aside > hr {
	border: none;
	min-height: 2px;
	background-color: var(--theme-border);
	margin: 1rem 1rem 0 1rem;
}

aside > div {
	display: grid;
	grid-template-columns: auto auto;
	gap: 0.5rem;
	margin: 0 1rem;
}

aside > div a {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	background-color: var(--theme-section);
	color: var(--theme-text);
	padding: 0.5rem 1rem;
}

aside > div a:nth-child(1) {
	border-radius: 1rem 0 0 1rem;
}

aside > div a:nth-child(2) {
	border-radius: 0 1rem 1rem 0;
}

aside > div a.selected,
aside > div a[data-selected="true"],
aside > div a:hover,
aside > div a:focus {
	color: var(--theme-foreground);
	background-color: var(--theme-hover);
}

main {
	position: relative;
	background-color: var(--theme-section);
	color: var(--theme-text);
	border-radius: 1rem;
	padding: 1rem;
	min-height: 100%;
	width: var(--max-width);
	margin-right: var(--aside-width);
	gap: 1rem;
	line-height: 1.5;
	overflow-y: auto;
}

main > header {
	position: relative;
	justify-content: center;
	font-weight: 400;
	color: var(--theme-foreground);
	line-height: 1;
}

main > header > button {
	position: absolute;
	left: 0;
}

main > hr {
	width: 100%;
	height: 2px;
	min-height: 2px;
	background-color: var(--theme-border);
	border: none;
}

main a {
	color: var(--palette-blue);
	text-decoration: none;
	outline: none;
	border: none;
}

main a:hover,
main a:focus {
	text-decoration: underline;
}

main a.archive-link {
	opacity: 0.5;
	font-size: 0.75rem;
	font-weight: 300;
	line-height: 0.75;
}

main h2 {
	text-align: center;
	color: var(--theme-foreground);
}

main h2 + h4 {
	margin: 0;
}

main h4 {
	font-size: 1rem;
	font-weight: 700;
	line-height: 0.75;
	margin-top: 1rem;
	color: var(--theme-foreground);
}

main h4 + ul {
	margin-top: -0.5rem;
}

main ul {
	margin: 0;
	padding-left: 1rem;
}

main h5 {
	line-height: 0.5;
	font-size: 0.75rem;
	font-weight: 300;
	color: var(--theme-shade);
}

main em {
	font-style: normal;
	opacity: 0.33;
}

main > img,
.carousell img {
	width: 100%;
	border: 2px solid #000000;
	border-radius: 0.5rem;
}

main > .logo {
	background: url("/assets/images/tile.svg") repeat 0.5rem 0.5rem;
	justify-content: center;
	padding: 1rem;
	width: 100%;
	border-radius: 0.5rem;
	gap: 2rem;
}

main > .logo svg {
	width: 2rem;
	height: 2rem;
}

main > .logo img {
	background-color: #2d2d2d;
	border: 2px solid #000000;
	border-radius: 0.5rem;
}

main .row {
	display: flex;
}

main .row > div {
	margin-right: auto;
}

main .row > a {
	display: flex;
	flex-direction: row;
	gap: 0.5rem;
	align-items: center;
	background-color: var(--palette-blue-alpha);
	padding: 0.5rem 1rem;
	border-radius: 1rem;
	font-weight: 400;
}

button:focus,
aside > section a:focus,
main a:focus,
.mobile-button:focus {
	outline: 2px solid var(--theme-foreground);
}

.grid-2 {
	display: grid;
	grid-template-columns: auto auto;
	gap: 0.5rem;
}

.grid-2 > *:first-child {
	border-radius: 1rem 0 0 0;
}

.grid-2 > *:nth-child(2) {
	border-radius: 0 1rem 0 0;
}

.grid-2 > *:last-child {
	border-radius: 0 0 1rem 0;
}

.grid-2 > *:nth-last-child(2) {
	border-radius: 0 0 0 1rem;
}

.grid-2 > article {
	background-color: var(--theme-section);
	padding: 0.5rem 0.5rem 0.5rem 1rem;
	color: var(--theme-foreground);
	gap: 1rem;
}

.grid-2 > article strong {
	font-weight: 500;
}

.grid-2 > article span {
	font-weight: 300;
	opacity: 0.5;
}

.grid-2 > article > div {
	margin-right: auto;
}

.grid-2 > article a {
	color: inherit;
	padding: 0.5rem;
	border-radius: 0.5rem;
}

.grid-2 > article a:hover,
.grid-2 > article a:focus {
	background-color: var(--theme-section);
}

.sign-warn,
.sign-info {
	padding-left: 1rem;
	font-weight: 400;
}

.sign-warn {
	color: var(--palette-orange);
	border-left: 0.25rem solid var(--palette-orange);
}

.sign-info {
	color: var(--theme-foreground);
	border-left: 0.25rem solid var(--theme-foreground);
}

.mobile-button {
	border: none;
	padding: 0.5rem;
	border-radius: 0.5rem;
	background-color: transparent;
	color: inherit;
	cursor: pointer;
}

.mobile-button:hover {
	background-color: var(--theme-section);
}

.touch-only {
	display: none;
}

.carousell > header {
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	overflow-x: scroll;
	justify-content: start;
}

.carousell > header > * {
	min-width: 100%;
	width: 100%;
	height: 100%;
	scroll-snap-align: start;
	aspect-ratio: 16 / 9;
}

.carousell > footer {
	gap: 1rem;
}

.carousell > footer > div {
	gap: 1rem;
}

.carousell > footer > div span {
	background-color: var(--theme-section);
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 0.5rem;
}

.carousell > footer > div span.selected {
	background-color: var(--theme-foreground);
}

input[type="file"] {
	color: inherit;
}

#replays {
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

#replays > *:first-child {
	border-top-right-radius: 1rem;
	border-top-left-radius: 1rem;
}

#replays > *:last-child {
	border-bottom-left-radius: 1rem;
	border-bottom-right-radius: 1rem;
}

#replays > span,
#replays > section {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	background-color: var(--theme-section);
	padding: 0.5rem 1rem;
	color: var(--theme-shade);
	gap: 0.5rem;
}

#replays > section:not(:last-child) {
	border-bottom: 2px solid var(--theme-shade);
}

#replays > section > header {
	display: flex;
	flex-direction: row;
	align-items: center;
	color: var(--theme-foreground);
	gap: 0.5rem;
}

#replays > section > header > *,
#replays > section > footer {
	max-height: 2rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#replays > section > header strong {
	font-weight: 600;
}

#replays > section > header span {
	color: var(--theme-shade);
	margin-left: auto;
}

#replays > section > footer {
	font-size: 0.75rem;
}

.icons {
	display: flex;
	flex-direction: row;
	gap: 1rem;
	flex-wrap: wrap;
}

.icons svg {
	color: var(--theme-foreground);
	min-width: var(--size);
	min-height: var(--size);
	width: var(--size);
	height: var(--size);
}

.icons[data-size="12"] > * {
	--size: 12px;
}

.icons[data-size="16"] > * {
	--size: 16px;
}

.icons[data-size="24"] > * {
	--size: 24px;
}

.icons[data-size="32"] > * {
	--size: 32px;
}

.icons[data-size="48"] > * {
	--size: 48px;
}

.icons[data-size="64"] > * {
	--size: 64px;
}

.eyecons-icon {
	display: flex;
	flex-direction: row;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border: none;
	padding: 0;
	margin: 0;
	background-color: transparent;
	cursor: pointer;
}

.eyecons-icon:hover svg {
	color: var(--palette-blue);
}

#copied-popup {
	position: absolute;
	background-color: var(--theme-background);
	font-size: 2rem;
	left: 50%;
	top: 50%;
	transform: translateX(-50%) translateY(-50%);
	padding: 0.5em 1em;
	border-radius: 1rem;
	color: var(--palette-green);
}
