html, body{
	margin:0;
	padding:0;
	background:#274059;
	touch-action: manipulation;
	scrollbar-gutter: stable;
	text-align:center;
}
* {
	box-sizing:border-box;
}
.center{
	position:relative;
	text-align:center;
	display:inline-block;
	margin:auto;
}
#status-indicator{
	display:inline-block;
	position:absolute;
	top:20px;
	left:20px;
}
.status{
	width: 42px;
	height: auto;
}
#levels-indicator{
	background: #00000077;
	border:solid 1px #38557e;
	color: #FFFFFFDD;
	font-family: sans-serif;
	font-size: 12px;
	padding: 4px 8px;
	border-radius: 50px;
	display:inline-block;
	position:absolute;
	top:26px;
	right:20px;
	user-select: none;
}
#reset{
	width: 42px;
	height: 42px;
	padding: 5px;
	opacity:0.4;
	cursor:pointer;
}
#reset:hover{
	opacity:0.8;
}
#logo{
	height:60px;
	width:auto;
	margin:0;
	margin-top:16px;
}
#header{
	margin:10px;
	display:flex;
	justify-content:center;
	align-items:center;
	gap:10px;
}
#title{
	height:48px;
	max-width:256px;
	width:calc(100% - 126px);
	display:flex;
	align-items:center;
	justify-content:center;
	padding:4px 8px;
	gap:24px;
	background:transparent;
	border:solid 3px #812B1B;
	border-radius:8px;
	background: linear-gradient(270deg, #FB3E00 0%, #FB3E00 100%);
	overflow:hidden;
}
#box {
	height:28px;
	width:28px;
	display:flex;
	align-items:center;
	justify-content:center;
	flex-shrink:0;
}
#box img {
	height:100%;
	width:auto;
}
#icon {
	height:24px;
	width:28px;
	display:flex;
	align-items:center;
	justify-content:center;
	flex-shrink:0;
}
#icon img {
	height:100%;
	width:auto;
}
#level-container{
	position:relative;
	height:40px;
	width:26px;
	display:flex;
	flex: 1;
	align-items:center;
	justify-content:center;
}
#status.error{
	background: radial-gradient(circle, #FF0000 0%, #BB0000 100%);
	border:solid 1px #990000;
}
#status.success{
	background: radial-gradient(circle, #00DD00 0%, #009900 100%);
	border:solid 1px #007700;
}
#level-text{
	position: relative;
	font-size:22px;
	font-weight:bold;
	padding:1px 10px;
	border-radius:36px;
	background: #00000099;
	color:white;
	box-shadow: 0 0 2px 2px rgba(255, 255, 255, 0.15);
}
#level{
	background:transparent;
	opacity:0;
	position:absolute;
	top:0;
	left:0;
	right:0;
	bottom:0;
}
#game{
	position:relative;
	margin:auto;
	touch-action: none;
}
.board{
	position:absolute;
	cursor:pointer;
}
#controls{
	display:inline-grid;
	grid-template-columns: repeat(6, 1fr);
	justify-content:center;
	align-items:center;
	gap:5px;
	margin:10px auto;
	flex-wrap:wrap;
}
#licence{
	font-size:0.8em;
	opacity:0.3;
	color:white;
	min-height:16px;
	padding:0 8px;
	margin:16px auto;
	margin-top: 8px;
}
#licence a{
	color:white;
}
.HG{
	top:0;
	left:0;
}
.HD{
	top:0;
	left:50%;
}
.BG{
	top:50%;
	left:0;	
}
.BD{
	top:50%;
	left:50%;
}
.drag{
	z-index:1000;
}
.btn {
	cursor: pointer;
	height: 48px;
	width: 48px;
}
.btn img {
	width: 100%;
	height: 100%;
}
.btn-no{
	opacity:0.5;
	cursor:default;
}

.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}
.modal-overlay.show {
	opacity: 1;
	visibility: visible;
}
.modal {
	background: linear-gradient(180deg, #F0D8B2 0%, #f1d3a1 100%);
	font-family: "Boogaloo", sans-serif;
	border-radius: 20px;
	padding: 30px;
	text-align: center;
	max-width: 400px;
	width: 90%;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
	transform: scale(0.7);
	transition: transform 0.3s ease;
	position: relative;
}
.modal-overlay.show .modal {
	transform: scale(1);
}
.modal-title {
	color: #3f2a16;
	font-size: 36px;
	font-weight: bold;
	margin-top: 0;
	margin-bottom: 16px;
}
.modal-close-button {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	background: none;
	border: none;
	font-size: 16px;
	cursor: pointer;
	border-radius: 12px;
	color: #3f2a16;
	padding: 4px;
}
.modal-close-button:hover {
	background: #3f2a16;
	color: #F0D8B2;
}
.modal-message {
	color: #3f2a16;
	font-size: 24px;
	margin-top: 0px;
	margin-bottom: 24px;
	line-height: 1.2;
}
#modal-input {
	margin-bottom: 24px;
	width: 100%;
	padding: 12px;
	font-size: 18px;
	font-weight: bold;
	background: white;
	border: solid 3px #654323;
	color: #3f2a16;
	border-radius: 12px;
}
#modal-buttons {
	display: flex;
	justify-content: center;
	gap: 10px;
}
.modal-button {
	background: linear-gradient(180deg, #654323, #3f2a16);
	border: none;
	border-radius: 25px;
	color: #F0D8B2;
	padding: 12px 30px;
	font-size: 16px;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.3s ease;
}
.modal-button:hover {
	background: linear-gradient(180deg, #513419, #2d1d0e);
}
.modal-secondary-button {
	background: transparent;
	border: 3px solid #654323;
	color: #654323;
	padding: 9px 25px;font-size: 16px;
	font-weight: bold;
	cursor: pointer;
	border-radius: 25px;
	transition: all 0.3s ease;
}
.modal-secondary-button:hover {
	background: #B58B63;
	border: 3px solid #513419;
	color: #3f2a16;
}
.modal-icon {
	display: inline-flex;
	margin: auto;
}
.modal-icon img {
	height: 64px;
	width: 64px;
	margin-bottom: 8px;
}
/* Responsive */
@media (max-width: 300px) {
	#box {
		display:none;
	}
	#icon {
		display:none;
	}
	#logo {
		height:40px;
	}
	#status-indicator {
		left: 12px;
		top: 12px;
	}
	#status {
		width: 32px;
	}
	#levels-indicator {
		right: 12px;
		top: 17px;
		font-size: 9px;
		font-weight: 300;
	}
	#reset {
		width: 32px;
		height: 32px;
		padding: 4px;
	}
}
@media (max-width: 350px) {
	#controls {
		grid-template-columns: repeat(3, 1fr);
	}
}
@media (min-width: 375px) {
	#controls {
		gap:10px;
	}
}