/* RESET */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0}

.clear {
	clear: both;
}

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

.transition( @target: all, @duration: 400ms, @type: ease, @delay: 0s ) {
	-webkit-transition: @target @duration @type @delay;
	-moz-transition: @target @duration @type @delay;
	-ms-transition: @target @duration @type @delay;
	-o-transition: @target @duration @type @delay;
	transition: @target @duration @type @delay;
}

.border-radius( @value: 1000px ) {
	-webkit-border-radius: @value;
	border-radius: @value;
	-webkit-background-clip: padding-box; 
	-moz-background-clip: padding; 
	background-clip: padding-box;
}

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

.rotate( @value: 0deg ) {
	-webkit-transform: rotate( @value );
	-moz-transform: rotate( @value );
	-ms-transform: rotate( @value );
	-o-transform: rotate( @value );
	transform: rotate( @value );
}

.box-sizing {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

.scale( @value: 1 ) {
	-webkit-transform: scale( @value );
	-moz-transform: scale( @value );
	-ms-transform: scale( @value );
	-o-transform: scale( @value );
	transform: scale( @value );
}

.no-select {
	-webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

html, body {
}

/*================================*/

.page {
	@color: #FF5A02;
	@dur: 300ms;

	font-family: 'trivia-serif';

    .container {
    	position: relative;
    	width: 759px;
    	margin: 0 auto;
    }
    
    .start, .action, .finish {
    	display: none;
    	
    	&.shown {
    		display: block;
    	}
    }
    
    .start {
    	background-image: url(../images/bg.jpg);
    	.cover;
    	background-position: center bottom;
    	padding-top: 40px;
    	height: 1410px;
    	
    	.container {
    		background-image: url(../images/start.png);
    		height: 1299px;
    	}
    	
    	p {
    		position: absolute;
    		width: 550px;
    		left: 220px;
    		color: #fff;
    		font-weight: normal !important;
    		
    		a {
    			color: #fff;
    			text-decoration: underline;
    		}
    		
    		&.authors, &.b, &.d {
    			font-size: 16px;
    			line-height: 20px;
    		}
    		
    		&.a, &.c {
    			font-size: 28px;
    			line-height: 1.1;
    		}
    		
    		&.authors {
    			top: 660px;
    		}
    		
    		&.a {
    			top: 740px;
    		}
    		
    		&.b {
    			top: 830px;
    		}
    		
    		&.c {
    			top: 1040px;
    		}
    		
    		&.d {
    			top: 1100px;
    		}
    	}
    }
    
    .action {
    	padding-top: 20px;
    
    	.container {
    		height: 600px;
    		width: 759px;
    	}
    	
    	.bar {
    		position: absolute;
    		top: 30px;
    		left: 50%;
    		margin-left: -175px;
    		height: 16px;
    		width: 350px;
    		border: 1px solid #D4D4D4;
    		
    		&:before, &:after {
    			content: '';
    			position: absolute;
    			top: -9px;
    			height: 35px;
    		}
    		
    		&:before {
    			width: 35px;
    			left: -50px;
    			background-image: url(../images/f1.png);
    		}
    		
    		&:after {
    			width: 36px;
    			right: -50px;
    			background-image: url(../images/f2.png);
    		}
    		
    		.line {
    			position: absolute;
    			height: 100%;
    			width: 0%;
    			background-color: #DB2A3A;
    			left: 0;
    			top: 0;
    			.transition(@target: width, @duration: @dur);
    		}
    		
    		p {
    			font-family: 'trivia-grotesk';
    			position: absolute;
    			text-align: center;
    			line-height: 1;
    			font-size: 14px;
    			width: 100%;
    			left: 0;
    			top: -24px;
    			color: #B0B0B0;
    		}
    	}
    	
    	.question, .answer, .after, .head {
    		pointer-events: none;
    		opacity: 0;
    		.transition(@target: opacity, @duration: @dur);
    	}
    	
    	.question {
    		position: absolute;
    		color: @color;
    		width: 100%;
    		left: 0;
    		top: 90px;
    		text-align: center;
    		font-size: 20px;
    		line-height: 26px;
    		
    	}
    	
    	.answer {
    		position: absolute;
    		width: 250px;
    		cursor: pointer;
    		font-size: 16px;
    		line-height: 20px;
    		text-align: center;
    		
    		&:hover {
    			color: @color;
    		}
    		
    		&:empty {
    			display: none;
    		}
    	
    		&--0 {
    			left: 0px;
    			top: 280px;
    		}
    		
    		&--1 {
    			left: 50%;
    			margin-left: -125px;
    			top: 435px;
    		}
    		
    		&--2 {
    			right: 0px;
    			top: 280px;
    		}
    	}
    	
    	.head {
    		position: absolute;
    		width: 133px;
    		height: 241px;
    		left: 50%;
    		margin-left: -74px;
    		top: 160px;
    		
    		&__face {
    			position: absolute;
    			z-index: 4;
    			left: 0;
    			top: 0;
    			width: 100%;
    			height: 100%;
    			background-image: url(../images/head.png);
    		}
    	
    		&__eye {
    			position: absolute;
    			z-index: 2;
    			width: 5px;
    			height: 5px;
    			background-color: #000;
    			.border-radius;
    		
    			&--left {
    				left: 0;
    				top: 0;
    			}
    			
    			&--right {
    				left: 0;
    				top: 0;
    			}
    		}
    	}
    	
    	.after {
    		position: absolute;
    		width: 500px;
    		left: 50%;
    		margin-left: -250px;
    		top: 90px;
    	
    		.res {
    			font-size: 16px;
    			line-height: 20px;
    		}
    		
    		.next {
    			cursor: pointer;
    			margin: 0 auto;
    			width: 220px;
    			line-height: 50px;
    			background-color: @color;
    			color: #fff;
    			margin-top: 40px;
    			text-align: center;
    			font-size: 16px;
    			
    			&:hover {
    				background-color: #2E7539;
    			}
    		}
    	}
    	
    	&.s1 {
    		.question, .answer, .head {
    			pointer-events: auto;
    			opacity: 1;
    		}
    	}
    	
    	&.s2 {
    		.after {
    			pointer-events: auto;
    			opacity: 1;
    		}
    	}
    }
    
    .finish {
    	.cover;
    	
    	.container {
    		width: 580px;
    		min-height: 500px;
    	}
    
    	&.win {
    		background-image: url(../images/nic.jpg);
    	}
    	
    	&.lose {
    		background-image: url(../images/len.jpg);
    	}
    	
    	.result {
    		width: 100%;
    		position: absolute;
    		top: 50%;
    		.box-sizing;
    		border: 2px solid #000;
    		background-color: #fff;
    		font-size: 16px;
    		line-height: 20px;
    		padding: 40px;

			.title {
				font-size: 28px;
				line-height: 1;
				text-align: center;
				margin-bottom: 20px;
			}
    		
    		.text {
    			margin-bottom: 40px;
    		}
    		
    		.again {
    			margin-top: 40px;
    			text-align: center;
    			
    			a {
    				color: @color;
    				font-size: 16px;
    				text-decoration: underline;
    				
    				&:hover {
    					color: #2E7539;
    				}
    			}
    		}
    	}
    
    	.shares {
    		font-size: 0;
    	
    		.share {
    			display: inline-block;
    			margin-left: 20px;
    			cursor: pointer;
    			background-image: url(../images/btnShare.png);
    			width: 150px;
    			height: 45px;
    		
    			&.vk {
    				margin-left: 0;
    				background-position: -330px 0px;
    				
    				&:hover {
    					background-position: -330px -46px;
    				}
    			}
    			
    			&.fb {
    				background-position: 0px 0px;
    				
    				&:hover {
    					background-position: 0px -46px;
    				}
    			}
    			
    			&.tw {
    				background-position: -165px 0px;
    				
    				&:hover {
    					background-position: -165px -46px;
    				}
    			}
    		}
    	}
    }
}