:root {
	--gap: 1rem;
	--card-size: 142px;
	--columns-on-mobile: 3;

	--page-background: white;
	--default-text-color: black;
	--box-background: white;
	--box-border-color: #999999;
	--box-shadow-color: black;
	--box-text-color: black;
	--box-alt-text-color: #999;
	--image-border: none;

	--nav-background: white;
	--nav-active-color: #990000;
	--nav-text-color: black;
	--nav-interactive-color: #999;
}

body {
	font-family: sans-serif;
	font-size: 16px;
	font-stretch: extra-condensed;
	background: white;
	background: var(--page-background);
	background-attachment: fixed;
	color: black;
	color: var(--default-text-color);
	margin: 0;
}

nav {
	background: white;
	background: var(--nav-background);
	position: sticky;
	top: 0;
	left: 0;
	right: 0;
	padding: 8px 25px 6px 25px;
	font-size: 20px;
	color: black;
	color: var(--nav-text-color);
	z-index: 22;
}

nav a.active {
	color: #990000;
	color: var(--nav-active-color);
}
nav a {
	text-decoration: none;
	text-decoration: none;
	color: #999;
	color: var(--nav-interactive-color);
	line-height: 1.2em;
}
.sorting, .filtering {
	display: flex;
	flex-wrap: wrap;
	column-gap: 15px;
	align-items: flex-start;
}
.filtering input[type="text"] {
	border: 1px solid #999;
	border-color: var(--nav-interactive-color);
	border-radius: 3px;
	opacity: 0.5;
}
.filtering input[type="text"]:hover, .filtering input[type="text"]:focus {
	opacity: 1;
}


.comment {
	display: none;
}

.comments {
	font-size: 0.8em;
	font-weight: normal;
	letter-spacing: 1px;
	text-align: left;
	position: absolute;
	font-family: sans-serif;
	margin-top: 18px;
	margin-left: -17px;
	width: calc(100% - 20px);
	white-space: pre-wrap;
	box-shadow: 2px 2px 10px black;
	box-shadow: 2px 2px 10px var(--box-shadow-color);
}
.comments:empty {
	display: none;
}
.game-list {
	margin: 8px;
	gap: var(--gap);
	font-size: 0.8rem;
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: center;
}

.game, .subGame {
	vertical-align: top;
	text-align: center;
	letter-spacing: 1px;
	position: relative;
	flex-grow: 0;
	flex-shrink: 0;
	flex-basis: 142px;
	flex-basis: var(--card-size);
	box-sizing: border-box;
}

.game .image {
	border: var(--image-border);
}
.game .name {
	font-weight: bold;
}
.game .year {
	color: #999;
	color: var(--box-alt-text-color);
	font-size: 0.8em;
}
.game .cleared-by label {
	color: #999;
	color: var(--box-alt-text-color);
	margin-right: 5px;
}


.game.cleared:after {
	content: '';
	display: block;
	position: absolute;
	right: -5%;
	bottom: -3%;
	width: 33%;
	top: 0;
	background-image: url(/cleared.png);
	background-repeat: no-repeat;
	background-size: contain;
	background-position: bottom;
	opacity: 0.75;
}

.box {
	border: 1px solid #999999;
	border-color: var(--box-border-color);
	background: white;
	background: var(--box-background);
	padding: 1em;
	cursor: default;
	color: black;
	color: var(--box-text-color);
}

	.clone {
		z-index: 20;
		box-shadow: 2px 2px 10px black;
		box-shadow: 2px 2px 10px var(--box-shadow-color);
		font-size: 15px;
		max-width: 610px;
	}
	.game.clone.expanded {
		font-size: 2em;
		transition: all 300ms;
		left: 10px;
		top: 10px;
		width: calc(100% - 20px);
		height: calc(100% - 20px);
		max-width: none;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		z-index: 22;
	}
	img.horizontal {
		aspect-ratio: 4 / 3;
	}
	img.vertical {
		aspect-ratio: 3 / 4;
	}
	.game.clone .image {
		border: none;
	}
	.game.clone .image img {
		display: block;
		border: var(--image-border);
		margin: 0 auto;
		max-width: 100%;
	}
	.game.clone.expanded .image {
		flex: 1 1 auto;
		max-height: none;
		max-width: 100%;
		display: flex;
		min-height: 25px;
	}
	.game.clone.expanded .image img {
		image-rendering: pixelated;
	}
	.game.clone.expanded .image img {
		width: auto !important;
	}
	.game.clone.expanded .comments {
		box-shadow: none;
		position: static;
		padding: 20px;
		margin: 0 auto;
		max-width: 800px;
	}
	.game.clone.expanded.disappearing {
		transition: all 100ms;
		top: calc(100% - 10px);
		width: 0px;
		height: 0px;
	}


@media only screen and (max-width: 1000px) {
	.game-list {
		font-size: 0.6em;
		display: grid;
		grid-template-columns: 1fr 1fr 1fr;
		grid-template-columns: repeat(var(--columns-on-mobile), 1fr);
	}
	nav {
		position: static;
		padding: 10px;
	}
	.game.clone {
		left: 10px !important;
		right: 10px !important;
		max-width: none;
	}
	.game.clone .image {
		max-height: 25vh;
	}
	.game.clone.expanded .image {
		display: block;
	}
	.game.clone .image img, .game.clone.expanded .image img {
		width: 100% !important;
	}
	.filtering input[type="text"] {
		padding: 5px 2px;
	}
}
