* {
	box-sizing: border-box;
	font-family: "JetBrains Mono", monospace;
	text-transform: uppercase;
}

body {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	min-height: 100svh;
	margin: 0;
	background-color: white;
	color: black;
}

.game-container {
	text-align: center;
	border: 3px solid black;
	background: white;
	box-shadow: 8px 8px 0px black;
	margin-block: 1rem;
}

.cmd-bar {
	background-color: black;
	color: white;
	padding: 0.5rem 1rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-weight: bold;
	font-size: 0.85rem;
}

.title {
	display: flex;
	align-items: center;
	justify-content: center;
}

.cmd-icon {
	width: 16px;
	height: 16px;
	margin-right: 8px;
}

.cmd-controls {
	display: flex;
	font-size: 1.2rem;
	height: 1.75rem;
}

.cmd-controls button {
	color: white;
	background-color: black;
	cursor: pointer;
	border: none;
	font-size: 1.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
}

.cmd-controls button:hover {
	color: black;
	background-color: white;
}

#maximize {
	padding-bottom: 0.295rem;
}

#minimize {
	padding-bottom: 0.95rem;
}

#close {
	font-size: 1.5rem;
}

.board {
	display: grid;
	margin: 2.5rem;
	border-top: 3px solid black;
	border-left: 3px solid black;
}

.cell {
	background-color: white;
	border: none;
	border-right: 3px solid black;
	border-bottom: 3px solid black;
	font-size: 5rem;
	font-family: "JetBrains Mono", monospace;
	font-weight: bold;
	color: black;
	cursor: pointer;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 0;
}

.cell:hover {
	background-color: black;
	color: white;
}

.game-info {
	padding: 1.25rem;
	border-top: 3px solid black;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.9375rem;
}

.status {
	font-size: 1.35rem;
	font-weight: bold;
	margin: 0;
}

#restart-btn,
#start-game-btn {
	background: white;
	color: black;
	border: 3px solid black;
	padding: 0.625rem 1.25rem;
	font-size: 1.1rem;
	font-weight: bold;
	cursor: pointer;
	box-shadow: 3px 3px 0px black;
}

#restart-btn:hover,
#start-game-btn:hover {
	background: black;
	color: white;
	box-shadow: 0px 0px 0px black;
	transform: translate(3px, 3px);
}

footer {
	width: min(400px, 100%);
	text-align: center;
}

footer a {
	color: black;
	font-weight: 900;
	text-decoration: none;
	letter-spacing: 0.06em;
}

footer a:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

#game-modal {
	padding: 0;
	box-shadow: 8px 8px 0px black;
	outline: none;
}

#modal-bar {
	padding-block: 1rem;
}

.modal::backdrop {
	background: white;
}

[tabindex="-1"]:focus {
	outline: none;
}

h3 {
	margin: 0;
	font-size: 1.5rem;
}

.settings-group {
	padding-inline: 1.5rem;
	padding-block: 0.5rem;
	border-top: 3px solid black;
}

.modal-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	padding-block: 1.25rem;
	padding-inline: 1.25rem;
	border-top: 3px solid black;
	margin-top: 1rem;
}

#start-game-btn {
	min-width: 100%;
}

.button-group {
	display: flex;
	gap: 1rem;
	margin-block: 1rem;
}

.button-group label {
	flex: 1;
	display: flex;
}

.button-group input[type="radio"] {
	position: absolute;
	opacity: 0;
	cursor: pointer;
	height: 0;
	width: 0;
}

.button-group label span {
	background: white;
	color: black;
	border: 3px solid black;
	padding: 0.625rem 1.25rem;
	font-size: 1.1rem;
	font-weight: bold;
	cursor: pointer;
	box-shadow: 3px 3px 0px black;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	text-align: center;
	user-select: none;
}

.button-group label:hover input:not(:checked) ~ span {
	background: black;
	color: white;
}

.button-group input:checked ~ span {
	background: black;
	color: white;
	box-shadow: 0px 0px 0px black;
	transform: translate(3px, 3px);
	transition: all 0.1s ease;
}

.custom-size-group {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1.25rem;
	font-weight: bold;
}

#custom-size {
	font-size: 1.1rem;
	font-weight: bold;
	color: black;
	border: 3px solid black;
	padding: 0.5rem;
	box-shadow: 3px 3px 0px black;
	width: 100px;
	outline: none;
	transition: all 0.1s ease;
}

#custom-size:focus {
	box-shadow: 0px 0px 0px black;
	transform: translate(3px, 3px);
}
