/**
 * Email Gate Overlay Styles
 * Unlimited Mario
 */

#email-gate {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.9);
	z-index: 9999;
	justify-content: center;
	align-items: center;
	font-family: 'Press Start 2P', 'Courier New', monospace;
}

#email-gate-content {
	background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
	padding: 40px;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 
	            0 0 0 4px #fbbf24,
	            0 0 0 8px #1e3a8a;
	text-align: center;
	max-width: 450px;
	width: 90%;
	animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(-50px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

#email-gate h1 {
	color: #fbbf24;
	font-size: 28px;
	margin: 0 0 10px 0;
	text-shadow: 3px 3px 0 #1e3a8a, 
	             4px 4px 0 rgba(0, 0, 0, 0.5);
	letter-spacing: 2px;
}

#email-gate h2 {
	color: #ffffff;
	font-size: 14px;
	margin: 0 0 30px 0;
	font-weight: normal;
	line-height: 1.6;
	text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

#email-form {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

#email-input {
	padding: 15px;
	font-size: 16px;
	border: 3px solid #fbbf24;
	border-radius: 8px;
	background: #ffffff;
	color: #1e3a8a;
	font-family: 'Courier New', monospace;
	transition: all 0.3s ease;
	outline: none;
}

#email-input:focus {
	border-color: #f59e0b;
	box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.3);
	transform: scale(1.02);
}

#email-input:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

#email-submit {
	padding: 15px 30px;
	font-size: 16px;
	font-weight: bold;
	background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
	color: #1e3a8a;
	border: 3px solid #1e3a8a;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 1px;
	box-shadow: 0 4px 0 #92400e, 0 6px 12px rgba(0, 0, 0, 0.3);
}

#email-submit:hover:not(:disabled) {
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	transform: translateY(-2px);
	box-shadow: 0 6px 0 #92400e, 0 8px 16px rgba(0, 0, 0, 0.4);
}

#email-submit:active:not(:disabled) {
	transform: translateY(2px);
	box-shadow: 0 2px 0 #92400e, 0 4px 8px rgba(0, 0, 0, 0.3);
}

#email-submit:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none;
}

#email-error {
	display: none;
	color: #fca5a5;
	font-size: 12px;
	margin-top: -5px;
	padding: 10px;
	background: rgba(220, 38, 38, 0.2);
	border: 2px solid #f87171;
	border-radius: 6px;
	text-align: center;
	animation: shake 0.5s ease;
}

@keyframes shake {
	0%, 100% { transform: translateX(0); }
	10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
	20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.mario-sprite {
	width: 64px;
	height: 64px;
	margin: 0 auto 20px;
	background-image: url('../images/mariosheet.png');
	background-position: 0 0;
	background-size: 400% 400%;
	image-rendering: pixelated;
	animation: marioWalk 0.5s steps(2) infinite;
}

@keyframes marioWalk {
	0% { background-position: 0 0; }
	50% { background-position: -64px 0; }
	100% { background-position: 0 0; }
}

/* Responsive Design */
@media (max-width: 600px) {
	#email-gate-content {
		padding: 30px 20px;
	}
	
	#email-gate h1 {
		font-size: 20px;
	}
	
	#email-gate h2 {
		font-size: 12px;
	}
	
	#email-input,
	#email-submit {
		font-size: 14px;
		padding: 12px;
	}
}

/**
 * Game Over Overlay Styles
 * Unlimited Mario
 */

#game-over-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.95);
	z-index: 10000;
	justify-content: center;
	align-items: center;
	font-family: 'Press Start 2P', 'Courier New', monospace;
	animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

#game-over-content {
	background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
	padding: 40px;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 
	            0 0 0 4px #fbbf24,
	            0 0 0 8px #dc2626;
	text-align: center;
	max-width: 500px;
	width: 90%;
	animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
	from {
		opacity: 0;
		transform: scale(0.8);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

#game-over-overlay h1 {
	color: #fbbf24;
	font-size: 32px;
	margin: 0 0 30px 0;
	text-shadow: 4px 4px 0 #7f1d1d, 
	             5px 5px 0 rgba(0, 0, 0, 0.8);
	letter-spacing: 2px;
	animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.05);
	}
}

#distance-display {
	background: rgba(0, 0, 0, 0.3);
	padding: 25px;
	border-radius: 8px;
	margin-bottom: 30px;
	border: 3px solid #fbbf24;
}

#distance-display h2 {
	color: #ffffff;
	font-size: 14px;
	margin: 0 0 15px 0;
	font-weight: normal;
	text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

#final-distance-container {
	display: flex;
	justify-content: center;
	align-items: baseline;
	gap: 10px;
}

#final-distance {
	color: #fbbf24;
	font-size: 48px;
	font-weight: bold;
	text-shadow: 3px 3px 0 #7f1d1d, 
	             4px 4px 0 rgba(0, 0, 0, 0.5);
	animation: countUp 0.5s ease-out;
}

@keyframes countUp {
	from {
		opacity: 0;
		transform: scale(0.5);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.distance-unit {
	color: #ffffff;
	font-size: 18px;
	text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

#game-over-buttons {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.game-over-btn {
	padding: 15px 30px;
	font-size: 16px;
	font-weight: bold;
	border: 3px solid #1e3a8a;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-family: 'Press Start 2P', 'Courier New', monospace;
}

.primary-btn {
	background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
	color: #ffffff;
	box-shadow: 0 4px 0 #15803d, 0 6px 12px rgba(0, 0, 0, 0.3);
}

.primary-btn:hover {
	background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
	transform: translateY(-2px);
	box-shadow: 0 6px 0 #15803d, 0 8px 16px rgba(0, 0, 0, 0.4);
}

.primary-btn:active {
	transform: translateY(2px);
	box-shadow: 0 2px 0 #15803d, 0 4px 8px rgba(0, 0, 0, 0.3);
}

.secondary-btn {
	background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
	color: #ffffff;
	box-shadow: 0 4px 0 #1e40af, 0 6px 12px rgba(0, 0, 0, 0.3);
}

.secondary-btn:hover {
	background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
	transform: translateY(-2px);
	box-shadow: 0 6px 0 #1e40af, 0 8px 16px rgba(0, 0, 0, 0.4);
}

.secondary-btn:active {
	transform: translateY(2px);
	box-shadow: 0 2px 0 #1e40af, 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Responsive Design for Game Over */
@media (max-width: 600px) {
	#game-over-content {
		padding: 30px 20px;
	}
	
	#game-over-overlay h1 {
		font-size: 24px;
	}
	
	#distance-display h2 {
		font-size: 12px;
	}
	
	#final-distance {
		font-size: 36px;
	}
	
	.distance-unit {
		font-size: 14px;
	}
	
	.game-over-btn {
		font-size: 14px;
		padding: 12px 24px;
	}
}
