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

body {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	font-family: 'Arial', sans-serif;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.container {
	background: rgba(255, 255, 255, 0.95);
	border-radius: 20px;
	padding: 40px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
	backdrop-filter: blur(10px);
	max-width: 800px;
	width: 90%;
}

.canvas-div {
	text-align: center;
	margin-bottom: 30px;
}

.canvas-div canvas {
	border: 3px solid #333;
	border-radius: 15px;
	background: linear-gradient(to bottom, #87CEEB 0%, #98FB98 100%);
	display: block;
	margin: 0 auto 20px auto;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.btn {
	background: linear-gradient(45deg, #FF6B6B, #4ECDC4);
	color: white;
	border: none;
	padding: 15px 30px;
	margin: 0 10px;
	border-radius: 50px;
	font-size: 16px;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
	text-transform: uppercase;
	letter-spacing: 1px;
}

.btn:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
	background: linear-gradient(45deg, #FF5252, #26A69A);
}

.btn:active {
	transform: translateY(-1px);
}

#fit-btn {
	background: linear-gradient(45deg, #4CAF50, #45a049);
}

#fit-btn:hover {
	background: linear-gradient(45deg, #45a049, #3d8b40);
}

#reset-btn {
	background: linear-gradient(45deg, #f44336, #d32f2f);
}

#reset-btn:hover {
	background: linear-gradient(45deg, #d32f2f, #b71c1c);
}

#pause-btn {
	background: linear-gradient(45deg, #FF9800, #F57C00);
}

#pause-btn:hover {
	background: linear-gradient(45deg, #F57C00, #E65100);
}

/* Modal Styles */
.modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(5px);
	animation: fadeIn 0.3s ease;
}

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

@keyframes slideIn {
	from { 
		opacity: 0;
		transform: translate(-50%, -60%);
	}
	to { 
		opacity: 1;
		transform: translate(-50%, -50%);
	}
}

.modal-content {
	background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
	margin: 15% auto;
	padding: 0;
	border-radius: 20px;
	width: 90%;
	max-width: 500px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	animation: slideIn 0.4s ease;
	overflow: hidden;
}

.modal-header {
	background: linear-gradient(45deg, #667eea, #764ba2);
	color: white;
	padding: 25px;
	text-align: center;
	border-radius: 20px 20px 0 0;
}

.modal-header #modal-icon {
	font-size: 3em;
	display: block;
	margin-bottom: 10px;
}

.modal-header h2 {
	margin: 0;
	font-size: 1.8em;
	font-weight: bold;
}

.modal-body {
	padding: 30px;
	text-align: center;
}

.modal-body #modal-message {
	font-size: 1.3em;
	color: #333;
	margin-bottom: 20px;
	line-height: 1.5;
}

.modal-stats {
	display: flex;
	justify-content: space-around;
	margin: 20px 0;
	flex-wrap: wrap;
	gap: 15px;
}

.stat-item {
	background: rgba(102, 126, 234, 0.1);
	padding: 15px;
	border-radius: 15px;
	min-width: 120px;
}

.stat-label {
	display: block;
	font-size: 0.9em;
	color: #666;
	margin-bottom: 5px;
}

.stat-value {
	display: block;
	font-size: 1.4em;
	font-weight: bold;
	color: #333;
}

.modal-footer {
	padding: 20px 30px 30px;
	text-align: center;
	display: flex;
	gap: 15px;
	justify-content: center;
	flex-wrap: wrap;
}

.btn-success {
	background: linear-gradient(45deg, #4CAF50, #45a049) !important;
}

.btn-success:hover {
	background: linear-gradient(45deg, #45a049, #3d8b40) !important;
}

.btn-secondary {
	background: linear-gradient(45deg, #6c757d, #5a6268) !important;
}

.btn-secondary:hover {
	background: linear-gradient(45deg, #5a6268, #495057) !important;
}

.game-title {
	text-align: center;
	color: #333;
	font-size: 2.5em;
	margin-bottom: 20px;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
	background: linear-gradient(45deg, #667eea, #764ba2);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.game-instructions {
	text-align: center;
	color: #666;
	font-size: 1.1em;
	margin-bottom: 30px;
	line-height: 1.6;
}

.game-stats {
	display: flex;
	justify-content: space-around;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 10px;
}

.score-display, .lives-display, .level-display {
	text-align: center;
	font-size: 1.2em;
	color: #333;
	font-weight: bold;
	background: rgba(255, 255, 255, 0.8);
	padding: 10px 20px;
	border-radius: 25px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	min-width: 120px;
}

.lives-display {
	font-size: 1.1em;
}

.level-display {
	background: linear-gradient(45deg, #FFD700, #FFA500);
	color: white;
}

.output-div {
	width: 45%;
	display: none;
	background-color: #fff;
	float: left;
	border-radius: 10px;
	padding: 20px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.clearfix {
	clear: both;
}

/* Responsive Design */
@media (max-width: 768px) {
	.container {
		padding: 20px;
		margin: 10px;
	}
	
	.game-title {
		font-size: 2em;
	}
	
	.canvas-div canvas {
		width: 100%;
		max-width: 600px;
		height: auto;
	}
	
	.game-stats {
		flex-direction: column;
		align-items: center;
	}
	
	.score-display, .lives-display, .level-display {
		margin: 5px 0;
		min-width: auto;
		width: 200px;
	}
	
	.btn {
		padding: 12px 20px;
		margin: 5px;
		font-size: 14px;
	}
	
	.modal-content {
		width: 95%;
		margin: 10% auto;
	}
	
	.modal-stats {
		flex-direction: column;
		align-items: center;
	}
	
	.modal-footer {
		flex-direction: column;
	}
}

@media (max-width: 480px) {
	.game-title {
		font-size: 1.8em;
	}
	
	.game-instructions {
		font-size: 1em;
	}
	
	.btn {
		padding: 10px 15px;
		font-size: 12px;
		margin: 3px;
	}
	
	.modal-header #modal-icon {
		font-size: 2.5em;
	}
	
	.modal-header h2 {
		font-size: 1.5em;
	}
}

/* Animation classes */
.bounce {
	animation: bounce 0.6s ease;
}

@keyframes bounce {
	0%, 20%, 50%, 80%, 100% {
		transform: translateY(0);
	}
	40% {
		transform: translateY(-10px);
	}
	60% {
		transform: translateY(-5px);
	}
}

.pulse {
	animation: pulse 1s infinite;
}

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