* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	display: flex;
	flex-direction: column;
	height: 100vh;
}

h3 {
	padding-top: 1.5em;
}

p {
	padding-bottom: 1em;
}

a {
	color: #D6B76C;
}

img {
	display: block;
	margin: auto;
	width: 70%;
	height: 70%;
}

figcaption {
	display: block;
	margin: auto;
	width: 70%;
	height: 70%;
  
	padding-bottom: 1.5em;
}


.title-banner {
	background-color: #0F1B0E;
	color: #E3DEC3;
	padding: 2em 2em 3em;
}

.main {
	display: flex;
	flex: 1;
	min-height: 0;
}

.centered {
	display: flex;
	justify-content: center;
}

.split {
	width: 50%;
	overflow: auto;
}

/* Control the left side */
.left {
	background-color: #0F1B0E;
}

/* Control the right side */
.right {
	background-color: #414535;
	color: #E3DEC3;
}

.board-row {
	display: flex;
	align-items: flex-start;
	width: 100%;
	min-width: 0;
}

.board-area {
	padding-top: 2em;
	width: 100%;
	min-width: 0;
	max-width: 44.5em;
	margin-inline: auto;
}

#board {
	width: 100%;
	max-width: 40em;
	border: 0.5em outset #414535;
	
	margin-bottom: 0.8em;
	flex-shrink: 1;
	
	touch-action: none;
	-webkit-user-select: none;
	user-select: none;
}

.move-list {
	display: block;
	width: 100%;
	max-width: 40em;
	font-family: inherit;
	font-size: 16px;
	background-color: #414535;
	
	border: 0.2em solid #E3DEC3;
	border-radius: 0.4em;
	
	color: #E3DEC3;
	
	padding: 0.3em;
	padding-top: 0.15em;
	font-weight: bold;
	white-space: nowrap;
	overflow-x: auto;
	scrollbar-width: thin;
	scrollbar-color: #E3DEC3 transparent; 
}

.game-controls {
	display: flex;
	flex-direction: column;
	align-items: center;

}

.item {
	list-style-type: none;
	margin: 0;
	padding: 0;
}

.icon-button {
	background-color: #C4B599;
	color: #0F1B0E;
	font-weight: 900;
	border-radius: 50%;
	border: 0.2em ridge #414535;
	font-size: 20px;
	padding: 1em;
	margin: 10px;
	
	transition: 0.1s;
}

.icon-button:active {
	background-color: #414535;
	transform: translateY(0.1em);
}

.promotion-options {
	display: none;
}

.menu-items {
	list-style: none;
}

.tab {
	overflow: hidden;
	border: 1px solid #414535;
	background-color: #C4B599;
}

.tab button {
	background-color: inherit;
	color: #0F1B0E;
	
	font-family: inherit;
	font-size: 16px;
	
	float: left;
	border: none;
	outline: none;
	cursor: pointer;
	padding: 14px 16px;
	transition: 0.2s;
}

.tab button:hover {
	background-color: #414535;
	color: #E3DEC3;
	
}

.tab button.active {
	background-color: #414535;
	color: #E3DEC3;
	
}

.tab-contents {
	display: none;
	padding: 1em;
	border-top: none;
}

.all-messages {
	padding-top: 2em;
	padding-bottom: 2em;
	
	font-size: 1.5em;
	
	text-align: center;
	align-items: center;
	justify-content: center;
}

.subsection {
	padding-left: 0.5em;
}

.game-explorer-table {
	width: 100%;
	border-collapse: collapse;
}

#game-explorer-body td, th, button {
	text-align: center;
    white-space: pre-line;
	
	padding: 0.25em;
	
	border: 0.05em solid #0F1B0E;
	border-collapse: collapse;
}

#game-explorer-body button {
	text-align: center;
	background-color: #414535;
	color: #E3DEC3;
	
	width: 100%;
	
	border: none;
	border-collapse: collapse;
	cursor: pointer;
	
	transition: 0.2s;
}

#game-explorer-body button:hover {
	background-color: #E3DEC3;
	color: #414535;
}


.statistics-list div {
	padding: 2.5em;
	display: flex;
	justify-content: center;
	align-items: center;
	text-align: center;
    white-space: pre-line;
	
	font-size: 1.25em;
}


.search-settings {
	margin-bottom: 0.5em;
}

.search-settings select {
	background-color: #E3DEC3;
}

.game-table {
	width: 100%;
	border-collapse: collapse;
}

#games-body td, th {
	text-align: center;
    white-space: pre-line;
	
	padding: 0.25em;
	
	border: 0.05em solid #0F1B0E;
	border-collapse: collapse;
}

#games-body td:nth-child(5) {
    width: 60%;
}

.played-move {
	color: #D6B76C;
}

.latest-move {
	font-weight: 900;
}

.page-controls {
	margin-top: 1em;
	margin-bottom: 1em;
	
	max-width: fit-content;
	margin-left: auto;
	margin-right: auto;
	
}

.page-controls button {
	padding: 0.5em 1em;
	
	margin-left: 1em;
	margin-right: 1em;
}

/*Mobile Layout*/

@media screen and (max-width: 850px) {
	body {
		height: auto;
		min-height: 100vh;
	}
	
	.main {
		flex-direction: column;
		flex: 1 0 auto;
		min-height: 0;
	}
	
	.split {
		width: 100%;
		overflow: visible;
	}
	
	.left {
		flex: 0 0 auto;
		padding: 0 12px 20px;
	}
	
	.board-area {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding-top: 1em;
    margin: 0;
	}
	
	#board,
	.move-list	{
		width: 85%;
	}
	
	.game-controls {
		padding-left: 1em;
		flex: 0 0 auto;
		width: 60px;
		align-items: center;
	}
	
	.icon-button {
		padding: 0.7em;
		margin: 5px;
	}
}

