/* =========================================
   PIZZA SLAVE — bizarrely amazing styles
   ========================================= */

:root {
	--cheese: #ffcc33;
	--sauce: #d63031;
	--crust: #e8a33d;
	--void: #0a0a1a;
	--neon: #39ff14;
	--magenta: #ff00ff;
	--cyan: #00f0ff;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html, body {
	height: 100%;
	overflow-x: hidden;
	font-family: "Bangers", "Comic Sans MS", cursive, sans-serif;
	background: radial-gradient(circle at center, #1a1a3a 0%, var(--void) 70%);
	color: #fff;
	cursor: crosshair;
}

/* animated starfield background */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	background-image:
		radial-gradient(2px 2px at 20% 30%, #fff, transparent),
		radial-gradient(2px 2px at 60% 70%, #fff, transparent),
		radial-gradient(1px 1px at 80% 20%, #fff, transparent),
		radial-gradient(1px 1px at 40% 90%, #fff, transparent),
		radial-gradient(2px 2px at 90% 60%, #fff, transparent),
		radial-gradient(1px 1px at 10% 50%, #fff, transparent);
	background-size: 200px 200px;
	opacity: 0.6;
	animation: starScroll 60s linear infinite;
	pointer-events: none;
	z-index: 0;
}

@keyframes starScroll {
	from { background-position: 0 0; }
	to { background-position: 0 200px; }
}

.container {
	position: relative;
	z-index: 2;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	text-align: center;
}

/* the big title */
h1 {
	font-size: clamp(3rem, 12vw, 8rem);
	font-weight: 900;
	letter-spacing: 2px;
	background: linear-gradient(90deg, var(--cheese), var(--sauce), var(--magenta), var(--cyan), var(--cheese));
	background-size: 300% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	animation: titleRainbow 4s linear infinite, titleWobble 2.5s ease-in-out infinite;
	filter: drop-shadow(0 0 12px rgba(255, 204, 51, 0.6));
	text-transform: uppercase;
	margin-bottom: 1rem;
}

@keyframes titleRainbow {
	to { background-position: 300% 0; }
}

@keyframes titleWobble {
	0%, 100% { transform: rotate(-2deg) scale(1); }
	50% { transform: rotate(2deg) scale(1.05); }
}

/* floating pizza emoji hero */
.pizza-hero {
	font-size: clamp(5rem, 18vw, 12rem);
	display: inline-block;
	filter: drop-shadow(0 0 20px var(--cheese));
	user-select: none;
	cursor: pointer;
}

.pizza-hero:hover {
	filter: drop-shadow(0 0 40px var(--magenta));
}

.tagline {
	font-size: clamp(1.5rem, 5vw, 3rem);
	color: var(--neon);
	text-shadow: 0 0 8px var(--neon), 0 0 20px var(--neon);
	animation: taglinePulse 1.2s ease-in-out infinite alternate;
	margin: 1.5rem 0;
}

@keyframes taglinePulse {
	from { opacity: 0.7; transform: scale(1); }
	to { opacity: 1; transform: scale(1.08); }
}

.excellent {
	font-size: clamp(2rem, 7vw, 4rem);
	color: var(--magenta);
	text-shadow: 3px 3px 0 var(--cyan), 0 0 15px var(--magenta);
	letter-spacing: 4px;
	animation: excellentShake 0.4s ease-in-out infinite;
	margin: 1rem 0 2rem;
}

@keyframes excellentShake {
	0%, 100% { transform: translateX(0) rotate(0deg); }
	25% { transform: translateX(-3px) rotate(-1deg); }
	75% { transform: translateX(3px) rotate(1deg); }
}

/* the dominos link as a glorious button */
.pizza-button {
	display: inline-block;
	padding: 1.2rem 3rem;
	font-size: clamp(1.3rem, 4vw, 2rem);
	font-weight: bold;
	text-decoration: none;
	color: var(--void);
	background: linear-gradient(45deg, var(--cheese), var(--crust));
	border: 4px solid #fff;
	border-radius: 50px;
	box-shadow: 0 0 20px var(--cheese), inset 0 0 15px rgba(255,255,255,0.5);
	transition: transform 0.15s, box-shadow 0.15s;
	animation: buttonGlow 2s ease-in-out infinite alternate;
}

.pizza-button:hover {
	transform: scale(1.15) rotate(-3deg);
	box-shadow: 0 0 40px var(--magenta), inset 0 0 20px rgba(255,255,255,0.8);
}

.pizza-button:active {
	transform: scale(0.95);
}

@keyframes buttonGlow {
	from { box-shadow: 0 0 20px var(--cheese), inset 0 0 15px rgba(255,255,255,0.5); }
	to { box-shadow: 0 0 35px var(--sauce), inset 0 0 20px rgba(255,255,255,0.7); }
}

/* floating pizzas spawned by JS */
.floating-pizza {
	position: fixed;
	font-size: 3rem;
	pointer-events: none;
	z-index: 1;
	animation: floatUp linear forwards;
}

@keyframes floatUp {
	from { transform: translateY(0) rotate(0deg); opacity: 1; }
	to { transform: translateY(-120vh) rotate(720deg); opacity: 0; }
}

/* click burst particles */
.burst {
	position: fixed;
	font-size: 1.5rem;
	pointer-events: none;
	z-index: 3;
	animation: burstOut 0.8s ease-out forwards;
}

@keyframes burstOut {
	from { transform: translate(0, 0) scale(1); opacity: 1; }
	to { transform: translate(var(--dx), var(--dy)) scale(0.3); opacity: 0; }
}

/* counter */
.counter {
	margin-top: 2rem;
	font-size: 1.2rem;
	color: var(--cyan);
	text-shadow: 0 0 8px var(--cyan);
}

/* screen shake on big events */
.shake {
	animation: screenShake 0.4s;
}

@keyframes screenShake {
	0%, 100% { transform: translate(0, 0); }
	20% { transform: translate(-10px, 5px); }
	40% { transform: translate(10px, -5px); }
	60% { transform: translate(-8px, -8px); }
	80% { transform: translate(8px, 8px); }
}
