html, body {
	margin: 0;
	padding: 0;
	height: 100%;
	overflow: hidden;
	background: #14141a;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #f4f4f6;
	touch-action: manipulation;
	-webkit-user-select: none;
	user-select: none;
}

canvas#game {
	display: block;
	width: 100%;
	height: 100%;
}

#hud {
	position: fixed;
	top: 14px;
	right: 18px;
	text-align: right;
	pointer-events: none;
}

#hud .hud-row {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-bottom: 4px;
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: rgba(10, 10, 14, 0.38);
	border-radius: 999px;
	padding: 3px 10px;
	font-size: 0.85rem;
	font-weight: 700;
	backdrop-filter: blur(2px);
	transition: transform 0.15s ease;
}

#combo-badge {
	color: #ffd166;
}

#hud #score {
	display: block;
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

#toast {
	position: fixed;
	top: 18%;
	left: 50%;
	transform: translate(-50%, 0);
	font-size: 1.1rem;
	font-weight: 800;
	color: #ffd166;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.15s ease, transform 0.4s ease;
}
#toast.show {
	opacity: 1;
	transform: translate(-50%, -14px);
}

#top-controls {
	position: fixed;
	top: 14px;
	left: 18px;
	display: flex;
	gap: 8px;
}

.icon-btn {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: rgba(10, 10, 14, 0.38);
	color: #f4f4f6;
	font-size: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	backdrop-filter: blur(2px);
}
.icon-btn:active { transform: translateY(1px); }

.hidden { display: none !important; }

.overlay {
	position: fixed;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	text-align: center;
	background: rgba(10, 10, 14, 0.72);
	backdrop-filter: blur(3px);
	padding: 24px;
}

.overlay h1 {
	margin: 0 0 4px;
	font-size: 2rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #fff;
}

.overlay p {
	margin: 0;
	color: #c7c8d1;
	max-width: 360px;
	font-size: 0.95rem;
}

.overlay .hint { font-size: 0.85rem; color: #9a9ba7; }
.overlay kbd {
	background: #24242e;
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 4px;
	padding: 1px 7px;
	font-size: 0.8rem;
}

.score-line { font-size: 1.1rem; color: #fff; font-weight: 700; margin: 2px 0; }
.score-line.best { font-size: 0.9rem; color: #9a9ba7; font-weight: 500; }

.btn {
	margin-top: 10px;
	background: #8b5cf6;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 12px 28px;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease;
}
.btn:hover { background: #7c3aed; }
.btn:active { transform: translateY(1px); }
