* {
	box-sizing: border-box;
}

html {
	width: 100%;
	height: 100%;
	font-size: 20pt;
}

body {
	margin: 0;
	padding: 0;
	font-family: arial, helvetica, sans-serif;
	-webkit-user-select: none;
	-moz-user-select: none;
				console.log(i + '+' + j);

	width: 100%;
	height: 100%;
}

#mineblaster {
	background-size: cover;
	background-position: center;
	width: 100%;
	height: 100%;
}

#controls_box {
	top: 0px;
	background: rgba(255,255,255,0.5);
	z-index: 2000;
	position: fixed;
	width: 100%;
	text-align: center;
}

#controls {
	padding: 10px;
	padding-bottom: 0px;
	background: rgba(0, 0, 0, 0.6);
	color: rgba(255, 255, 255, 0.5);
}

#regenerate {
	margin-top: 30px;
}

#settings {
	margin-right: 0px;
	display: inline-block;
	width: 2em;
	height: 2em;
	border-radius: 3px;
	color: #000;
	background-color: rgba(255, 255, 255, 0.7);
	background-image: url('../imgs/menu.svg');
	background-position: center;
	background-repeat: no-repeat;
	background-size: 50%;
}

.option {
	margin-top: 10px;
}

#settings, input[type='button'] {
	cursor: pointer;
}

#parameters {
	border-bottom: 2px rgba(255, 255, 255, 0.2) solid;
	padding: 20px;
}

#parameters .parameter {
	display: inline-block;
	margin: 0px 5px;
}

#parameters .parameter label {
	display: block;
	margin-bottom: 0.1em;
	font-size: 0.6em;
	text-transform: uppercase;
}

#indicators_box {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

#indicators {
	padding-top: 20px;
	padding-bottom: 20px;
}

#indicators span.indicator {
	display: inline-block;
	padding: 5px 15px;
	background: rgba(255, 255, 255, 0.6);
	border-radius: 99px;
	font-size: 1em;
	color: #000;
}

input[type='number'] {
	width: 4em;
	text-align: center;
	padding: 0.2em;
	border: none;
	border-radius: 99px;
	font-size: 1em;
}

input[type='button'] {
	padding: 10px 20px;
	margin: 10px 0px;
	background: rgba(0, 0, 0, 0.3);
	color: rgba(255, 255, 255, 0.9);
	border: 2px rgba(255, 255, 255, 0.9) solid;
	border-radius: 99px;
	font-weight: bold;
	font-size: 1em;
	text-transform: uppercase;
}

input[type='button']:hover {
	background: #fff;
	color: #000;
}

div#field {
	position: absolute;
	z-index: 1000;
	display: grid;
}

.cell {
	position: relative;
	display: inline;
	float: left;
	cursor: default;
	text-align: center;
	font-weight: bold;
	width: 100%;
	height: 100%;
	transform-style: preserve-3d;
	background-position: center;
	background-repeat: no-repeat;
	background-size: 40%;
	border: 1px rgba(0,0,0,0) solid;
}

#field.animated .cell {
	transition: 0.6s;

}

.cell.no_transition {
	transition: none !important;
}

.cell .front, .cell .back {
	background: rgba(255, 255, 255, 0.8);
	border: 1px rgba(0,0,0,0) solid;
	border-radius: 3px;
	backface-visibility: hidden;
	position: absolute;
	left: 0;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	padding-top: 2vmin;
	font-size: 3vmin;
	background-position: center;
	background-repeat: no-repeat;
	background-size: 40%;
}

.cell .front {
	z-index: 2;
}

.open_cell {
	transform: rotateY(180deg);
}

.open_cell .back {
	background-color: rgba(255,255,255,0.95);
}


.back {
	transform: rotateY(180deg);
}

.mine_1 .back { background-image: url('../imgs/1.svg'); }
.mine_2 .back { background-image: url('../imgs/2.svg'); }
.mine_3 .back { background-image: url('../imgs/3.svg'); }
.mine_4 .back { background-image: url('../imgs/4.svg'); }
.mine_5 .back { background-image: url('../imgs/5.svg'); }
.mine_6 .back { background-image: url('../imgs/6.svg'); }
.mine_7 .back { background-image: url('../imgs/7.svg'); }
.mine_8 .back { background-image: url('../imgs/8.svg'); }
.mined:not(.open_cell) { background-image: url('../imgs/mined.svg'); }
.unknown:not(.open_cell) { background-image: url('../imgs/unknown.svg'); }

.cell .back.mine {
	background-color: #900;
	background-image: url('../imgs/mineblaster_icon.svg');
	background-size: 80%;
}
.cell .front.demined {
	background-color: #696;
	background-image: url('../imgs/mine.svg');
	background-size: 50%;
}
.wrong_mine {
	background-image: url('../imgs/wrong_mine.svg');
	background-size: 50%;
}

.cell .front.demined,
.cell .front.wrong_mine,
.back.mine {
	padding-top: 1vmin;
	font-size: 7vmin;
	background-position: center;
	background-repeat: no-repeat;
}



/* Message box */

#message_box {
	padding: 30px 0px;
	text-align: center;
	background-color: rgba(255, 255, 255, 0.5);
	color: #000;
	font-size: 20pt;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	box-sizing: border-box;
	z-index: 3000;
}

#message_box input[type='button'] {
	background: rgba(255, 255, 255, 0.9);
	color: rgba(0, 0, 0, 0.9);
	border: 2px rgba(0, 0, 0, 0.9) solid;
}

#message_box input[type="button"]:hover {
	background: #000;
	color: #fff;
}


#message_text {
	box-sizing: border-box;
	position: absolute;
	width: 100%;
}

#msg_new_game {
	display: block;
	margin: auto;
	margin-top: 20px;
	position: relative;
}



/* Small screens */

@media screen and (max-width: 480px)
{
	#controls {
		margin-bottom: 0px;
	}

	#regenerate {
		margin: 10px;
		margin-top: 5px;
	}

	#settings {
		width: 40px;
		height: 40px;
		flex-shrink: 0;
		flex-grow: 0;
	}

	#parameters .parameter {
		display: block;
		margin-bottom: 1em;
	}

	input[type="button"] {
		margin-left: 0px;
	}

	#indicators span.indicator {
		margin-top: 3px;
		margin-bottom: 3px;
		text-align: left;
		font-size: 0.7em;
	}

	#indicators {
		padding-top: 10px;
		padding-bottom: 10px;
	}

}
