:root {
	--primary-bg-color: #131862;
	--button-color: #2e4482;
	--hovered-button-color: #3f5593;
	--cell-color: #bea9de;
	--selected-cell-color: #cfbaef;

	--p1-color: #eb5353;
	--p2-color: #187498;
	--p3-color: #36ae7c;
	--p4-color: #f9d923;
}

body { 
	background-color: var(--primary-bg-color);
	font-family: Andale Mono, monospace;
	color: #ffffff;
}

body h1 { 
	text-align: center;
}

temp {
	outline: 1px solid red;
}

#bodyContainer {
	display: grid;
	margin: auto;
	width: 840px;
}

#headerContainer {
	grid-column: 1 / span 2;
}

#gameInfoContainer {
	margin-left: 20px;
	grid-row: 2;
	grid-column: 2;
	width: 120px;
	display: grid;
}

#gameContainer {
	display: grid;
	column-gap: 20px;
	grid-row: 2;
	grid-column: 1;
}

#playerScoreContainer {
	margin-bottom: auto;
	gap: 10px;
	grid-column: 1;
	grid-row: 1;
	display: grid;
}

#buttonContainer {
	margin-top: auto;
	gap: 10px;
	display: grid;
	grid-column: 1;
	grid-row: 2;
}

#boardContainer {
	grid-column: 1;
	grid-row: 1;
	width: 440px;
}

#sidePanel {
	grid-column: 2;
	grid-row: 1;
}

#playerLabel {
	margin-left: 60px;
}

#pieceContainer {
	width: 240px;
	height: 340px;

	margin-top: 20px;

	display: grid;
	grid-template-columns: repeat(12, 20px);
	grid-template-rows: repeat(17, 20px);
}

.piece {
	display: grid;
	grid-auto-columns: 20px;
	grid-auto-rows: 20px;
}

#settingsContainer {
	width: 600px;
	height: 440px;
}

#tilesetOptionsContainer {
	width: 600px;
	height: 440px;
}

#game {
	background-color: #ffffff;
	box-sizing: border-box;
	border: 20px solid var(--button-color);
	display: grid;
	grid-template-columns: repeat(20, 20px);
	grid-template-rows: repeat(20, 20px);
}

.piece .cell {
	background-color: #904fba;
}

#cursor-piece {
	position: fixed;
	pointer-events: none;
	z-index: 10;
	display: none;
}

#cursor-piece .piece {
	pointer-events: none;
}

#cursor-piece.invalid {
	filter: grayscale(80%);
	opacity: 0.5;
}

.piece.selected {
	opacity: 0.5;
}

.piece.used {
	opacity: 0.5;
	filter: grayscale(1);
}

.cell {
	width: 20px;
	height: 20px;
	position: relative;
	background-color: var(--cell-color);
	box-sizing: border-box;
}

.cell.empty {
	background: transparent;
	background-color: var(--cell-color);
}

.cell.p1 {
	background-color: var(--p1-color);
}

.cell.p2 {
	background-color: var(--p2-color);
}

.cell.p3 {
	background-color: var(--p3-color);
}

.cell.p4 {
	background-color: var(--p4-color);
}

#game .cell:not(.ghost):hover {
	border: 2px solid #ffffff;
	box-sizing: border-box;
}

.cell.ghost {
	position: relative;
	border-color: #ffffff;
}

.cell.ghost-top {
	border-top: 2px solid;
}

.cell.ghost-bottom {
	border-bottom: 2px solid;
}

.cell.ghost-left {
	border-left: 2px solid;
}

.cell.ghost-right {
	border-right: 2px solid;
}

.cell.frontier {
	background-color: #00ff0099;
}

.blokus-button {
	height: 40px;
	width: 120px;
	color: #ffffff;
	font-weight: bold;
	background-color: var(--button-color);
	cursor: default;
	display: flex;
	align-items: center;
	justify-content: center;
}

.blokus-button.hoverable:hover {
	background-color: var(--hovered-button-color);
	cursor: pointer;
}

.blokus-button:has(.cell) {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	padding-left: 10px;
	box-sizing: border-box;
}

.player-highlight {
	box-sizing: border-box;
	border: 2px solid #ffffff;
}