html {
	font-family: verdana, sans-serif;
	font-size: 10px;
	
	--color-health: #f00;
	--color-energy: #A38800;
	--color-knowledge: #004CE5;
	--color-might: #FF6A00;
	--color-resolve: #7F0037;
	--color-good: #060;
	
	--color-border: #3D1F0C;
	--color-border-half: #3D1F0Cdd;
	--color-gui: #FBFBF4;
}
body {
	font-size: 1.3rem;
	position: relative;
	min-height: 100vh;
	box-sizing: border-box;
	margin: 0;
	background: url(assets/bglight.jpg);
	background-size: cover;
}
table {
	font-size: 1.3rem;
}
h1 {
	font-size: 2.1rem;
	text-align: center;
	margin: 20px 0;
}
h2 {
	font-size: 1.7rem;
}
ul {
	padding-left: 20px;
	margin-top: 0;
}
li {
	margin-bottom: 3px;
}

/* main menu */
#main-menu {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 50px;
}
#languages-select {
	margin-bottom: 20px;
	font-size: 1.5rem;
	padding: 3px 5px;
}
#main-menu-image {
	position: relative;
	border: 2px solid var(--color-border);
	box-shadow: 2px 2px 8px var(--color-border-half);
}
#main-menu-image > img {
	max-width: 650px;
}
.door-button {
	position: absolute;
	border: none;
	font-size: 1.8rem;
	text-transform: uppercase;
	color: white;
	transition: 0.2s;
}
.door-button:hover {
	filter: saturate(3);
}
.door-button:disabled {
	filter: grayscale(1);
	cursor: unset;
}
.door-button span {
	padding: 5px;
	background: #0009;
	display: block;
}
.door-left {
	top: 52px;
	left: 101px;
	width: 141px;
	height: 301px;
	background: url(assets/introdoor1.png) no-repeat;
	background-size: 100%;
}
.door-right {
	top: 51px;
	left: 390px;
	width: 139px;
	height: 301px;
	background: url(assets/introdoor2.png) no-repeat;
	background-size: 100%;
}

/* search */
input.found {
	font-weight: bold;
	color: var(--color-resolve);
}
.wikidata-search {
	width: fit-content;
}
.centered > .wikidata-search {
	margin-left: auto;
	margin-right: auto;
}
.search-results {
	border: 1px solid #ccc;
	border-bottom: none;
	position: absolute;
	background: white;
	box-shadow: 0 0 10px black;
	max-width: 90vw;
	text-align: left;
	z-index: 100;
}
.search-results > div {
	border-bottom: 1px solid #ccc;
	padding: 10px;
	cursor: pointer;
	transition: 0.1s;
	background: white;
}
.search-results > div:hover {
	background: var(--color-might);
}
.search-results > div h4 {
	margin: 0;
	margin-bottom: 5px;
}
.search-results > div p {
	margin: 0;
}

/* build creation */
.build-creation-row {
	display: flex;
	gap: 20px;
}
.build-creation-row label {
	display: block;
	font-weight: bold;
	font-size: 1.1rem;
	margin-bottom: 4px;
}
#loading-screen {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 200px;
}
.grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

section {
	border: 2px solid var(--color-border);
	box-shadow: 2px 2px 8px var(--color-border-half);
	background: var(--color-gui);
	padding: 15px;
	margin: 10px;
}
section h2 {
	margin-top: 0;
}
button {
	cursor: pointer;
}

h3 a.id {
	font-size: 0.5em;
	margin-left: 12px;
	font-weight: normal;
	vertical-align: middle;
	text-decoration: none;
}
input {
	margin-right: 10px;
}
button.letsgo {
	display: block;
	margin: 10px auto;
	text-transform: uppercase;
}
.inventory {
	display: grid;
	grid-template-columns: 1fr 1fr;
}
article {
	display: flex;
	gap: 10px;
	position: relative
}
article p {
	margin: 0 0 10px;
}
article h3 {
	margin-top: 0;
	margin-bottom: 10px;
}
article img {
	display: block;
	width: 120px;
	height: 120px;
	object-fit: cover;
	object-position: center;
	flex-shrink: 0;
}
article .overlay { 
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
}
.distraction-item {
	position: absolute;
	top: -10px;
	left: -10px;
	width: 40px;
	height: auto;
	z-index: 3;
}
.good {
	color: var(--color-good);
}
.bad {
	color: var(--color-health);
}
.energy {
	color: var(--color-energy);
}
.knowledge {
	color: var(--color-knowledge);
}
.might {
	color: var(--color-might);
}
.resolve {
	color: var(--color-resolve);
}

.bar {
	border: 1px solid black;
	background: white;
	transition: 0.3s;
	display: block;
}
.bar-inner {
	height: 10px;
	border: 1px solid white;
	transition: 0.3s;
	box-sizing: border-box;
}
.bar-inner:not(:last-child) {
	border-right: 0;
}
.bar-inner + .bar-inner {
	border-left: 0;
}
.freebar .bar {
	display: flex;
	gap: 0;
	width: fit-content;
}
.danger {
	animation: blinking infinite 1s;
}
@keyframes blinking {
	0% {
		color: var(--color-health);
	}
	50% {
		color: #000;
	}
	100% {
		color: var(--color-health);
	}
}

/* FIGHT */
main {
	display: flex;
	flex-direction: column;
	align-items: center;
}
header {
	padding: 10px;
}
header table td {
	min-width: 150px;
}
#modifiers {
	position: absolute;
	right: 15px;
	top: 20%;
	font-size: 1.1rem;
	min-width: 200px;
}
#modifiers td {
	padding-left: 5px;
}
#modifiers th {
	font-size: 1.1rem;
	font-weight: normal;
	margin: 8px 0 2px;
}
#modifiers td hr {
	height: 1px;
	background: #ccc;
	border: none;
	margin: 3px 0;
}
.separator + .separator {
	display: none;
}
.freebar {
	display: flex;
	gap: 10px;
	align-items: center;
}
.freebar-centered {
	justify-content: center;
}

footer {
	position: absolute;
	bottom: 0;
	width: 100%;
}
footer .actions {
	text-align: center;
	margin: 20px auto;
	width: fit-content;
}
.actions nav {
	display: flex;
	gap: 20px;
}
.big-button {
	padding: 10px;
	text-transform: uppercase;
	font-size: 2rem;
}
.actions > div {
	position: relative;
}
.collapsible {
	position: absolute;
	bottom: 100px;
	left: 0;
	width: 100%;
}
.collapsible .inventory {
	text-align: left;
	margin: 0 auto;
	width: fit-content;
	background: var(--color-gui);
	border: 2px solid var(--color-border);
	box-shadow: 2px 2px 8px var(--color-border-half);
	padding: 15px;
	
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
}
.collapsible .inventory article {
	width: 400px;
}
.hidden {
	display: none!important;
}

.strike-button {
	border-color: var(--color-might);
}
.assess-button {
	border-color: var(--color-energy);
}
.consume-button {
	border-color: var(--color-good);
}
.evoke-button {
	border-color: var(--color-knowledge);
}

.item-actions {
	margin-bottom: 10px;
}
.item-actions > strong {
	margin-left: 5px;
}
.item-desc {
	font-size: 1.2rem;	
}

#popup-container {
	position: absolute;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: end;
	justify-content: center;
	top: 0;
	left: 0;
}
#popup-container.centered {
	align-items: center;
}
#popup {
	background: white;
	border: 1px solid #ccc;
	width: 800px;
	box-shadow: 0 0 10px black;
	padding: 10px 20px 20px 20px;
	margin-bottom: 20px;
	position: relative;
}
#popup-container.centered #popup {
	min-height: 50vh;
	padding-bottom: 60px;
}
#popup-container.centered .popup-nav {
	position: absolute;
	bottom: 20px;
}
#popup h1 {
	text-align: center;
}
#popup .centered {
	text-align: center;
}
#popup .big-margin {
	margin-top: 100px;
}

/* REWARDS */
.levelup-input {
	width: 55px;
}
.stat-name {
	min-width: 100px;
	text-align: right;
}
.freebar-centered .stat-name {
	min-width: unset;
}
.item-shortlist {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 30px;
	margin-bottom: 30px;
}
.item-shortlist article {
	border: 3px solid var(--color-border-half);
	flex-basis: 150px;
	flex-grow: 1;
	background: var(--color-gui);
	box-shadow: 0 0 2px var(--color-border-half);
	align-items: center;
	cursor: pointer;
	transition: 0.1s;
	padding-right: 10px;
}
.item-shortlist-poofy article {
	padding: 10px 15px;
}
.item-shortlist article:hover {
	border-color: var(--color-might);
}
.item-shortlist article.selected {
	background: var(--color-might);
}
.item-shortlist article p {
	margin-bottom: 0;
}
.item-shortlist article img {
	width: 50px;
	height: 50px;
}

/* ENEMY SPRITES */
#enemysprite {
	position: relative;
	margin-top: 30px;
}
#enemysprite > .bone { /* we don't want the first bone to be absolute otherwise it's not centered */
	position: relative;
}
.bone {
	position: absolute;
}

/* LANDSCAPE DISPLAY */
#landscape-screen {
	display: flex;
	align-items: flex-start;
	height: 100vh;
	gap: 20px;
	padding: 20px;
	box-sizing: border-box;
}
.landscape-padding {
	flex-grow: 1;
}
.central-landscape {
	position: relative;
	border: 2px solid var(--color-border);
	box-shadow: 2px 2px 8px var(--color-border-half);
	flex-shrink: 1;
}
.central-landscape img.background {
	max-width: 100%;
	max-height: calc(100vh - 44px);
}
.landscape-menu {
	flex-grow: 1;
}
.landscape-asset, .asset-sprite {
	position: absolute;
	cursor: pointer;
	transition: 0.2s;
	width: fit-content;
}
.asset-sprite:hover {
	filter: saturate(3);
}