.jsload {
	display: flex;
	flex-direction: column;
	align-items: center;
	background-color: #f0f0f0;
	margin: 0;
	padding: 20px;
	/* overflow: hidden; removed */
}

.jsload h4 {
	color: #333;
	margin-bottom: 10px;
}

.game-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	background-color: white;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
	margin-bottom: 20px;
	width:95%;
}

.game-board {
	display: grid;
	gap: 2px;
	margin-bottom: 20px;
	border: 2px solid #333;
}

.cell {
	width: 30px;
	height: 30px;
	border-radius: 3px;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.cell.obstacle {
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30"><rect width="30" height="30" fill="black"/><text x="10" y="20" fill="white" font-size="15">X</text></svg>');
	cursor: not-allowed;
}

.cell.special {
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30"><text x="10" y="20" fill="black" font-size="15">★</text></svg>');
}

.controls {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 20px;
	width: 100%;
	max-width: 500px;
}

.control-group {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.game-info {
	display: flex;
	justify-content: space-between;
	width: 100%;
	margin-bottom: 10px;
}

.jsload button {
	padding: 8px 16px;
	background-color: #4CAF50;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	transition: background-color 0.3s;
}

.jsload button:hover {
	background-color: #45a049;
}

select,
input {
	padding: 6px;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	justify-content: center;
	align-items: center;
	z-index: 100;
}

.modal-content {
	background-color: white;
	padding: 20px;
	border-radius: 10px;
	text-align: center;
	width: 60%;
	height: 30%;
	overflow-y: auto;
	position: relative;
}

.modal-buttons {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 20px;
	height: 2.5rem;
}
.button-group button,
.modal-buttons button{
	font-size: 1.3rem;
}

.help-button {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: #2196F3;
	color: white;
	font-size: 20px;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.help-button:hover {
	background-color: #0b7dda;
}

.rules-section {
	text-align: left;
	margin-bottom: 15px;
}

.rules-section h3 {
	margin-bottom: 5px;
	color: #2196F3;
}

.rules-section ul {
	padding-left: 20px;
}

.invalid-move {
	animation: shake 0.5s;
}

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

.button-group {
	display: flex;
	gap: 10px;
	margin-top: 10px;
}

.infinite-moves {
	color: #FF5252;
	font-weight: bold;
}