* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;

	display: flex;
	justify-content: center;
	align-items: center;

	font-family: Arial, sans-serif;

	background: #f5f5f5;
}

/**
 * Design
 */
.page {
	width: 100%;
	max-width: 700px;

	text-align: center;
}

h1 {
	margin-bottom: 40px;
}

.roulette {
	width: 600px;
	max-width: 90vw;
	height: 180px;

	margin: 0 auto;

	overflow: hidden;

	border: 4px solid #222;
	border-radius: 16px;

	background: white;
}

.color-group {
	display: flex;

	width: 100%;
	height: 100%;
}

.color {
	flex: 1;
	height: 100%;
}

.controls {
	display: flex;
	justify-content: center;
	gap: 15px;

	margin-top: 30px;
}

button {
	padding: 12px 30px;

	border: none;
	border-radius: 8px;

	font-size: 16px;

	cursor: pointer;
}

button:hover {
	opacity: 0.8;
}

#status {
	margin-top: 20px;

	font-size: 18px;
	font-weight: bold;
}

/**
 * For Button hiding
 */

[hidden] {
	display: none !important;
}

/**
 * Cool zoom animation
 */

.color-explosion {
	position: fixed;
	inset: 0;
	z-index: 200;
	pointer-events: none;
	overflow: hidden;
}

.color-explosion-piece {
	position: absolute;
	transition:
		left 1.8s cubic-bezier(0.7, 0, 0.2, 1),
		top 1.8s cubic-bezier(0.7, 0, 0.2, 1),
		width 1.8s cubic-bezier(0.7, 0, 0.2, 1),
		height 1.8s cubic-bezier(0.7, 0, 0.2, 1);
}

.roulette.exploding {
	border-color: transparent;
	transition: border-color 1.2s ease;
}

/**
* Celebration animation confettig
*/

/**
 * Celebration
 */

#celebration {
	position: fixed;
	inset: 0;

	width: 100vw;
	height: 100vh;

	pointer-events: none;
	overflow: hidden;

	z-index: 9999;
}

.celebration-sparkle {
	position: absolute;

	border-radius: 50%;

	animation:
		sparkle-fall var(--duration) linear forwards;
}

@keyframes sparkle-fall {
	0% {
		transform:
			translate(0, 0)
			rotate(0deg);

		opacity: 0;
	}

	10% {
		opacity: 1;
	}

	90% {
		opacity: 1;
	}

	100% {
		transform:
			translate(var(--drift), 110vh)
			rotate(var(--rotation));

		opacity: 0;
	}
}