* {
	margin: 0;
	padding: 0;
}

html, body {
	height: 100%;
}

.cover {
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
}

.transition(@string) {
  -webkit-transition: @string;
  -moz-transition: @string;
  -o-transition: @string;
  transition: @string;
}

.transform(@string) {
	-webkit-transform:@string;
	-moz-transform: @string;
	-o-transform: @string;
	-ms-transform: @string;
	transform: @string;
}

#viewport {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #eee;
	
	&.bw {
		.transition(all 4s linear);
		-webkit-filter: grayscale(100%);
	}
	
	#map {
		position: absolute;
		top: 0px;
		left: 0px;
		
		.cell {
			position: absolute;
			width: 100px;
			height: 120px;
			
		}
		.object {
			position: absolute;
			/*-webkit-transition: all 0.4s linear;*/
			
			.texture {
				position: absolute;
				width: 100%;
				height: 100%;
			}
			&[data-class="good"] .texture {
				background-position: center center;
				background-repeat: no-repeat;
			}
			
			&.taken {
				.transition(all 1.5s ease);
				.transform(scale(1.2) translateY(-20px));
				opacity: 0;
			}
		}
		
	}
}

#ui {
	#coord {
		display: none;
		position: fixed;
		display: inline-block;
		left: 0px;
		top: 0px;
		line-height: 32px;
		padding: 0 6px;
		background: #000;
		color: #fff;
		font-family: 'Courier';
		z-index: 9999999;
	}
	.create {
		display: none;
		position: fixed;
		top: 0px;
		left: 50%;
		width: 192px;
		margin-left: -100px;
		text-align: center;
		z-index: 9999999;
		
		.icon {
			display: inline-block;
			width: 32px;
			height: 32px;
			background: #000;
			color: #fff;
			text-align: center;
			line-height: 32px;
		}
		.container {
			display: none;
			background: #000;
			padding: 4px;
			
			.item {
				float: left;
				width: 32px;
				height: 32px;
				text-align: center;
				line-height: 32px;
				color: #fff;
				background: #444;
				cursor: pointer;
				
				&:hover {
					background: #777;
				}
			}
			.clear {
				clear: both;
			}
		}
		&:hover {
			.container {
				display:block;
			}
		}
	}
	
	#code {
		display: none;
		position: fixed;
		top: 32px;
		left: 0px;
		width: 400px;
		z-index: 9999999;
		
		.icon {
			display: inline-block;
			width: 32px;
			height: 32px;
			background: #000;
			color: #fff;
			text-align: center;
			line-height: 32px;
			cursor: pointer;
		}
		.container {
			display: none;
			background: #000;
			padding: 4px;
			
			textarea {
				display: block;
				border: none;
				font-size: 8px;
				font-family: Courier;
				width: 100%;
				height: 300px;
				
				&:focus {
					outline:none;
				}
			}		
		}
		&:hover {
			.container {
				display:block;
			}
		}
	}
	
	.bottom-menu {
		min-width: 1000px;
		position: fixed;
		bottom: 0px;
		width: 100%;
		height: 160px;
		margin: 0 auto;
		z-index: 99999;
		
		#states, #dialogs, #inventory {
			position: absolute;
			height: 100%;
			background: rgba(255,255,255,0.3);
		}
		#states {
			background: url(../images/stats.png);
			left: 0%;
			width: 216px;
			height: 160px;
			
			.state {
				position: relative;
				height: 40px;
				margin-bottom: 10px;
				
				.bar {
					position: relative;
					margin-left: 90px;
					margin-right: 18px;
					height: 12px;
					top: 23px;
					border-radius: 100px;
					border: 1px solid rgba(0, 0, 0, 0.4);
					overflow: hidden;
					
					i {
						display: block;
						height: 100%;
						background: #da301f;
						width: 0%;
					}
				}
			}
			.mana {
				.bar i {
					background: #0a85c3;
				}
				.circles i.active {
					background: url(../images/blue.png);
				}
			}
			.exp {
				.bar i {
					background: #ffcf2c;
					box-shadow: inset 0px 2px 9px rgba(255,255,255,0.8);
					border-radius: 100px;
					border-right: 1px solid rgba(0, 0, 0, 0.4);
				}
				.bar {
					box-shadow: inset 0px 2px 6px rgba(0, 0, 0, 0.4)
				}
			}
		}
		#inventory {
			right: 10px;
			bottom: 10px;
			height: 150px;
			width: 150px;
			background: url(../images/inventory.png) no-repeat left bottom;
			border-radius: 5px;
			overflow: hidden;
			
			.item {
				float: left;
				width: 50px;
				height: 50px;
				background: rgba(0,0,0,0.1);
				
				i {
					display: block;
					width: 32px;
					height: 32px;
					padding: 9px;
					background-position: center center;
					background-repeat: no-repeat;
				}
			}
		}
		#dialogs {
			left: 50%;
			bottom: -5px;
			padding-bottom: 5px;
			width: 600px;
			background: url(../images/grad.png) no-repeat left bottom;
			border-radius: 5px;
			margin-left: -300px;
			height: auto;
			
			.container {
				
			}
			.question {
				font-family: ProximaNova-Extrabld;
				font-size: 16px;
				line-height: 19px;
				color: #2a5bd3;
				border-bottom: 2px solid #2a5bd3;
				padding: 15px 30px;
				
				&:empty {
					display: none;
				}
			}
			.answers:empty {
				display: none;
			}
			
			.answers .item {
				font-family: ProximaNova-Regular;
				font-size: 14px;
				line-height: 17px;
				font-family: Helvetica;
				cursor: pointer;
				padding: 15px 30px;
				border-bottom: 1px solid #c0c0c0;
				
				&:hover, &.hover {
					background: #f1ec2c;
				}
				&.right {
					background: #deef9e;
				}
			}
			
			.result {
				font-size: 20px;
				line-height: 24px;
				padding: 15px 30px;
				font-family: ProximaNova-Regular;
			}
		}
	}

}

.circles {
	height: 17px;
	position: relative;
	top: 21px;
	margin: 0 18px 0 90px;
	
	i {
		display: inline-block;
		margin-right: 6px;
		width: 16px;
		height: 17px;
		background: url(../images/grey.png);
		
		&.active {
			background: url(../images/green.png);
		}
	}
	i:last-child {
		margin-right: 0px;
	}
}

.object-delete {
	position: absolute;
	width: 32px;
	height: 32px;
	text-align: center;
	line-height: 32px;
	background: #000;
	color: #fff;
	cursor: pointer;
	z-index: 10;
	left: 50%;
	margin: 0 0 0 -16px;
}

.states {
	position: absolute;
	.transform(scale(0) translateY(0px));
	.transition(-webkit-transform 3s ease);
	text-align: center;
	width: 75px;
	left: -6px;
	top: 0px;
	z-index: 99999;
	
	span {
		display: inline-block;
		width: 25px;
		font-weight: bold;
		font-size: 20px;
		
		&.h {
			color: #65ef66;
			text-shadow: 0px 0px 10px #65ef66;
		}
		&.m {
			color: #0299ec;
			text-shadow: 0px 0px 10px #0299ec;
		}
		&.e {
			color: #ffd547;
			text-shadow: 0px 0px 10px #ffd547;
		}
	}
	span:empty {
		display: none;
	}
	&.active {
		.transform(scale(2) translateY(-20px));
	}
}

#screen {
	position: fixed;
	top: 0px;
	left: 0px;
	width: 100%;
	height: 100%;
	background: #f5f5f5 url('../images/bg.jpg') no-repeat left top;
	z-index: 9999999;
	.cover;
	.transition(top 1.0s ease);
	
	.container {
		position: absolute;
		left: 50%;
		top: 70px;
		margin: 0 0 0 -450px;
		width: 600px;
		background: url(../images/grad.png) no-repeat left bottom;
		border-radius: 20px;
		
		&.transparent {
			background: none;
		}
	}
	.logos {
		position: absolute;
		right: 0px;
		top: 0px;
		width: 200px;
		height: 100%;
		background: #fff;
		
		a {
			display: block;
			padding: 40px 0px;
			height: 15%;
			text-align: center;
		}
	}
	.fntPR {
		font-family: ProximaNova-Regular;
	}
	.fntPB {
		font-family: ProximaNova-Extrabld;
		font-weight: normal;
	}
	.start {
		padding: 30px;
		color: #fff;
		text-align: center;
		
		h1 {
			font-size: 42px;
			line-height: 50px;
			.fntPB;
			
			span {
				.fntPR;
			}
		}
		p {
			font-size: 16px;
			line-height: 20px;
			.fntPR;
		}
		.loader {
			display: inline-block;
			width: 258px;
			height: 60px;
			background: url(../images/loading.png);
			margin: 30px 0;
			padding-bottom: 4px;
			
			.circles {
				height: 17px;
				position: relative;
				top: 17px;
				margin: 0 18px 0 72px;
			}
			&.hide {
				display: none;
			}
		}
		.play {
			display: inline-block;
			width: 258px;
			height: 60px;
			margin: 30px 0;
			cursor: pointer;
			background: url(../images/start.png);
			
			&.hide {
				display: none;
			}
		}
		.credits {
			position: absolute;
			right: -150px;
			width: 130px;
			font-size: 12px;
			line-height: 20px;
			opacity: 0.6;
			.fntPR;
			text-align: left;
		}
	}
	.choose {
		padding: 60px 30px;
		text-align: center;
		
		p {
			.fntPR;
			font-size: 30px;
			line-height: 36px;
			padding-bottom: 40px;
		}
		
		.player {
			display: inline-block;
			width: 64px;
			height: 168px;
			cursor: pointer;
			margin: 0 25px;
			&.boy {
				background: url(../images/boy.png);
				&:hover {background: url(../images/boy_hover.png);}
			}
			&.girl {
				background: url(../images/girl.png);
				&:hover {background: url(../images/girl_hover.png);}
			}
			&:active {
				position: relative;
				top: 1px;
			}
		}
	}
	.finish, .gameover {
		padding: 60px 30px 30px 30px;
		text-align: center;
		
		h2 {
			.fntPR;
			font-weight: normal;
			font-size: 30px;
			line-height: 36px;
			padding-bottom: 40px;
		}
		p {
			.fntPR;
			font-size: 16px;
			line-height: 19px;
		}
		.border {
			display: inline-block;
			border: 3px solid #2a5bd3;
			padding: 10px 15px;
			margin: 40px 0 10px 0;
			font-size: 18px;
			line-height: 22px;
			.fntPR;
		}
	}
	.gameover {
		.border {
			color: #2a5bd3;
			cursor: pointer;
			
			&:hover {
				background: rgba(255,255,255,0.2);
			}
			&:active {
				position: relative;
				top: 1px;
			}
		}
	}
	&.hidden {
		top: -200%;
	}
}

#help {
	position: fixed;
	width: 100%;
	height: 100%;
	left: 0px;
	top: 0px;
	z-index: 999999;
	background: url(../images/arrows.png) no-repeat center center;
}

.share-it {
	width: 100%;
	bottom: 0px;
	left: 0px;
	z-index: 5;
	text-align: center;
	padding: 30px 0 0 0;
	
	.button {
		cursor: pointer;
		display: inline-block;
	}
	.button[data-social="vk"] {
		background: url(/plugins/Global/images/ui/shares/vk.png);
		
		&:hover {
			background: url(/plugins/Global/images/ui/shares/vk_hover.png);
		}
	}
	.button[data-social="fb"] {
		background: url(/plugins/Global/images/ui/shares/fb.png);
		
		&:hover {
			background: url(/plugins/Global/images/ui/shares/fb_hover.png);
		}
	}
	.button[data-social="tw"] {
		background: url(/plugins/Global/images/ui/shares/tw.png);
		
		&:hover {
			background: url(/plugins/Global/images/ui/shares/tw_hover.png);
		}
	}
}

.preloader {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

#mute {
	position: fixed;
	right: 15px;
	top: 15px;
	width: 70px;
	height: 70px;
	cursor: pointer;
	z-index: 100;
	opacity: 0.8;
	z-index: 99999;
	
	&:hover {
		opacity:1;
	}
}
#mute {
	&.off {
		background: url(../images/sound_off.png);
	}
	&.on {
		background: url(../images/sound_on.png);
	}
}

.social-share.pie {
	display: block;
	position: fixed;
	left: 10px;
	top: 10px;
	z-index: 99999999;
}