html, body {
	height: 100%;
	max-height: 100%;

	overscroll-behavior: contain;
  	touch-action: none;

	overflow-y: hidden;
}

body {
	font-family: 'Segoe UI', sans-serif;
	max-width: 600px;
	margin: 0 auto;
	padding: 10px;
	text-align: center;
}

.upper {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
}

.overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0,0,0,0.5);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 1000;
}

.settings {
	background: white;
	width: 80%;
	height: 80%;
	margin: 20px;
	box-sizing: border-box;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
	overflow: auto;
}

.board-container {
	width: 100%;
	display: flex;
	justify-content: center;
}

#board {
	width: 100%;
	max-width: 500px;
  	aspect-ratio: 1/1;
}

button {
	padding: 10px 20px;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 16px;
}

button:hover {
	filter: brightness(90%);
}

.stats {
	margin: 20px 0;
	font-size: 20px;
}

.animate-score {
	animation: scoreBounce 1s ease;
	display: inline-block;
}

@keyframes scoreBounce {
	30% { transform: scale(1.2); }
	40%, 60% { transform: rotate(-20deg) scale(1.2); }
	50% { transform: rotate(20deg) scale(1.2); }
	70% { transform: rotate(0deg) scale(1.2); }
	100% { transform: scale(1); }
}

.controls {
	margin: 20px 0;
	display: flex;
	flex-direction: row;
	gap: 15px;
	align-items: center;
	justify-content: center;
}

.slider-container {
	width: 100%;
	max-width: 300px;
}

.piece-bank {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 20px 0;
	padding: 10px;
	background: #f5f5f5;
	border-radius: 4px;
}

.piece-bank img {
	width: 40px;
	height: 40px;
	cursor: pointer;
}

#board {
	margin: 0 auto;
}

label {
	display: block;
	margin-bottom: 5px;
	font-weight: bold;
}

input[type="range"] {
	width: 100%;
}