html * {
	box-sizing: border-box;
	background-color: #222;
	position: relative;
	user-select: none;
	-webkit-user-select: none;     
	-moz-user-select: none;
	-ms-user-select: none;
}

body {
	overflow: hidden;
}

a {
	color: #555;
	font-weight: 400;
	text-decoration: none;
}

a:hover {
	color: #fff;
}

/* UI */

#main,
#inputblocker {
	position: absolute;
	width: 900px;
	height: calc(600px + 241.5px + 70px + 3px);
	top: 50vh;
	left: 50vw;
	margin: calc((-586px - 241.5px - 70px - 3px) /2) 0 0 calc(-900px/2);
}

#inputblocker {
	display: none;
	background-color: rgba(0, 0, 0, 0);
	z-index: 100;
}

#field,
#hand,
#stats {
	width: 900px;
	position: relative;
	border-bottom: 1px solid #555;
	border-left: 1px solid #555;
	border-right: 1px solid #555;
	padding: 20px;
	opacity: 1;
}

#field {
	border-top: 1px solid #555;
	height: 601px;
}

#hand {
	height: 241.5px;
}

#stats {
	height: 70px;
}

#log {
	display: block;
	position: absolute;
	width: 200px;
	height: 915px;
	top: 0;
	left: -200px;
	padding: 15px;
	border-top: 1px solid #555;
	font-family: "Roboto Mono";
	font-weight: 400;
	font-size: 13px;
	line-height: 16px;
	color: #777;
}

#logtext {
	display: block;
	overflow-y: auto;
	height: 100%;
}

#logtext::-webkit-scrollbar {
	width: 0 !important;
}

#instructions {
	display: none;
	position: fixed;
	width: 860px;
	height: 872px;
	top: calc(50% - 430px);
	left: calc(50% - 430px);
	padding: 15px;
	border-radius: 6px;
	border: 1px solid #555;
	font-family: "Roboto Mono";
	font-weight: 400;
	font-size: 15px;
	line-height: 22px;
	color: #777;
	z-index: 3;
}

#instructionsbutton,
#logbutton {
	position: absolute;
	width: 120px;
	bottom: 2px;
	right: -130px;
	font-family: "Roboto Mono";
	font-weight: 400;
	font-size: 15px;
	color: #555;
}

#logbutton {
	bottom: 27px;
}

#instructionsbutton:hover {
	color: #fff;
}

#logbutton:hover {
	color: #fff;
}

#win, #lose {
	display: none;
	position: fixed;
	width: 160px;
	height: 60px;
	top: calc(50% - 30px);
	left: calc(50% - 80px);
	text-align: center;
	padding: 15px;
	border-radius: 6px;
	border: 1px solid #555;
	font-family: "Roboto Mono";
	font-weight: 400;
	font-size: 18px;
	line-height: 22px;
	color: #777;
	z-index: 5;
}

.stat {
	display: inline-block;
	vertical-align: top;
	width: calc((900px - 40px - 2px - 10px) / 3);
	height: 100%;
	font-family: "Roboto Mono";
	font-weight: 400;
	font-size: 13px;
	color: #555;
}

.stat.statmiddle {
	text-align: center;
	font-size: 24px;
}

.stat.statright {
	text-align: right;
}

.statlink {
	display: inline-block;
	width: 100px;
	height: 29px;
	text-align: center;
	padding: 5px;
	border-radius: 6px;
	border: 1px solid #555;
}

.statlink:hover {
	background-color: #555;
	color: #fff;
}

/* Cardslots */

.cardslot {
	display: inline-block;
	position: relative;
	width: calc(((900px - 2px - 40px - (20px * 3)) / 4));
	height: 260px;
	margin: 0 20px 20px 0;
	border-radius: 6px;
	border: 1px solid #555;
	opacity: 1;
	z-index: 2;
}

.cardslot.end {
	margin: 0 0 20px 0;
}

.cardslot.hidden {
	position: relative;
	width: calc(((900px - 2px - 40px - (20px * 3)) / 4));
	bottom: 268px;
	margin-right: 20px;
	z-index: 1;
	border: 1px solid #555;
}

.cardslot.hidden.end {
	margin-right: 0;
}

.handslot {
	display: inline-block;
	width: calc(((900px - 2px - 40px - (20px * 4)) / 5));
	height: 200.5px; /*0.75 ratio*/
	margin: 0 20px 0 0;
	border-radius: 6px;
	border: 1px solid #555;
}

.handslot.end {
	margin: 0;
}

/* Cards */

.hover {
	cursor: pointer;
}

.hover:hover {
	box-shadow: inset 0 0 0 1px #fff;
}

.card {
	position: absolute;
	background-color: #000;
	border-radius: 6px;
	padding: 15px;
	z-index: 2;
}

.monsterhealth {
	position: relative;
	font-family: "Rubik";
	color: #fff;
	font-size: 30px;
	background-color: rgba(0,0,0,0);
	pointer-events: none;
}

.monsterimage {
	width: 100%;
	top: 0;
	pointer-events: none;
	background-color: rgba(0,0,0,0);
}

.monsterelement {
	position: absolute;
	background-color: rgba(0,0,0,0);
	right: 15px;
	top: 16px;
	width: 15%;
	pointer-events: none;
}

.attackpole,
.attackopole {
	position: absolute;
	font-family: "Rubik";
	color: #fff;
	font-size: 20px;
	background-color: rgba(0,0,0,0);
	pointer-events: none;
	z-index: inherit;
}

.attackopole {
	bottom: 12px;
	right: 15px;
}

.poleimage,
.opoleimage {
	position: absolute;
	width: 40%;
	background-color: rgba(0,0,0,0);
	pointer-events: none;
	z-index: inherit;
}

.opoleimage {

}

.attackdivider {
	width: 100%;
	height: 1px;
	background-color: #fff;
	pointer-events: none;
	z-index: inherit;
}

@media all and (max-width: 1100px), all and (max-height: 900px) {
	#main,
	#inputblocker,
	#instructions,
	#cards .card {
		transform: scale(0.6);
	}

	#instructionsbutton,
	#logbutton {
		transform-origin: right;
	}

	#cards .card {
		transform-origin: top left;
	}
}