/* 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 );
}

html, body {
	height: 100%;
	width: 100%;
}

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

@width: 1100px;
@height: 550px;

.page {
	min-width: @width;
	font-family: 'trivia-grotesk';
	font-size: 16px;
	line-height: 22px;
	height: 100%;
	width: 100%;
	
	.container {
		position: absolute;
		width: @width;
		height: @height;
		left: 50%;
		top: 50%;
		margin-left: -@width / 2;
		margin-top: -@height / 2;
	}
	
	.start, .action {
		position: relative;
		height: 100%;
		display: none;
		overflow: hidden;
		width: 100%;
		
		a {
			color: inherit;
			text-decoration: underline;
		}
		
		.another {
			display: block;
			width: 281px;
			height: 93px;
			margin: 0 auto;
			background-image: url(../images/a1.png);
			background-position: 0px 0px;
			
			&:hover {
				background-position: 0px -93px;
			}
		}
		
		.shares {
			width: 500px;
			margin:  0 auto;
		
			.share {
				width: 150px;
				height: 45px;
				float: left;
				background-image: url(../images/btnShare.png);
				margin-left: 25px;
				cursor: pointer;
			
				&.fb {
					background-position: 0px 0px;
					margin-left: 0;
					
					&:hover {
						background-position: 0px -46px;
					}
				}
				
				&.vk {
					background-position: -330px 0px;
					
					&:hover {
						background-position: -330px -46px;
					}
				}
				
				&.tw {
					background-position: -165px 0px;
					
					&:hover {
						background-position: -165px -46px;
					}
				}
			}		
		}
		
		&.shown {
			display: block;
		}
	}
	
	.start {
		background-image: url(../images/1.jpg);
		color: #ffffff;
		.cover;
		
		.title {
			text-align: center;
			font-size: 60px;
			line-height: 1.2;
		}
		
		.authors {
			width: 700px;
			margin: 0 auto;
			margin-top: 50px;
			margin-bottom: 11px;
		}
		
		.description {
			width: 700px;
			margin: 0 auto;
		}
		
		.button {
			border: 5px solid #ffffff;
			padding: 5px 10px;
			width: 240px;
			font-size: 60px;
			line-height: 1.2;
			margin: 0 auto;
			cursor: pointer;
			margin-top: 50px;
			text-transform: uppercase;
			text-align: center;
			
			&:hover {
				background-color: #ffffff;
				color: #44403F;
			}
		}
	}
	
	.action {
		.cover;
		
		&.bad {
			font-size: 50px;
			line-height: 1.2;
			color: #ffffff;
			background-image: url(../images/4.jpg);
		
			.title {
				text-align: center;
				margin: 0 auto;
				margin-bottom: 10px;
				width: 600px;
			}
			
			.button {
				border: 5px solid #ffffff;
				padding: 5px 10px;
				width: 400px;
				font-size: 50px;
				line-height: 1.2;
				margin: 0 auto;
				cursor: pointer;
				margin-top: 50px;
				text-transform: uppercase;
				text-align: center;
				
				&:hover {
					background-color: #ffffff;
					color: #505B57;
				}
			}
		}
		
		&.good {
			background-image: url(../images/3.jpg);
			font-size: 36px;
			line-height: 1.3;
			color: #ffffff;
			
			.title {
				font-family: 'trivia-serif';
				text-align: center;
				margin-bottom: 10px;
			}
			
			.subtitle {
				text-align: center;
				width: 400px;
				margin: 0 auto;
			}
			
			.shares {
				margin-top: 50px;
			}
			
			.another {
				margin-top: 100px;
			}
		}
		
		&.second {
			background-image: url(../images/4.jpg);
			
			.label {
				text-align: center;
				width: 300px;
				margin: 0 auto;
				color: #ffffff;
			}
			
			.pairs {
				position: relative;
				width: 500px;
				margin: 0 auto;
				margin-top: 100px;
				overflow: hidden;
				height: 200px;
			}
			
			.buttons {
				width: 100%;
				height: 100%;
				position: absolute;
				opacity: 0;
				top: -200px;
				.transition(@duration: 400ms, @target: opacity);
				
				.or {
					width: 100px;
					float: left;
					height: 200px;
					line-height: 200px;
					text-align: center;
					color: #ffffff;
					font-size: 26px;
				}
			
				.button {
					width: 200px;
					height: 200px;
					text-align: center;
					line-height: 200px;
					background-color: #ffffff;
					.border-radius;
					.scale(0.8);
					opacity: 0.8;
					.transition(@duration: 200ms);
					cursor: pointer;
					font-size: 22px;	
					text-transform: capitalize;			
					&.left {
						float: left;
					}
					
					&.right {
						float: right;
					}
					
					&:hover {
						.scale(1);
						opacity: 1;
					}
				}
				
				&.shown {
					opacity: 1;
					top: 0;
				}
			}
		}
		
		&.finish {
			background-image: url(../images/5.jpg);
			line-height: 1.3;
			color: #ffffff;
			
			.result {
				display: none;
				
				&.shown {
					display: block;
				}
			}
			
			.title {
				font-family: 'trivia-serif';
				text-align: center;
				margin-bottom: 10px;
				font-size: 36px;
			}
			
			.text {
				width: 770px;
				margin: 0 auto;
				font-size: 24px;
			}
			
			.shares {
				margin-top: 50px;
			}
			
			.another {
				margin-top: 50px;
			}
		}
		
		&.first {
			@n: 14;
			@w: 600px;
			@p: 20px;
			@m: 2px;
			
			background-image: url(../images/2.jpg);
			
			.label {
				text-align: center;
			}
			
			.questions {
				width: @w;
				margin: 0 auto;
				position: relative;
				margin-top: 50px;
				overflow: visible;
				height: 200px;
			
				.belt {
					position: absolute;
					width: (@w + 2 * @p) * @n + @m * (@n - 1);
					left: 0;
					top: 0;
					.transition(@duration: 400ms, @target: left);
				}
			
				.question {
					width: @w;
					padding: @p;
					margin-left: @m;
					background-color: #ffffff;
					font-size: 36px;
					line-height: 1.2;
					opacity: 0.8;
					float: left;
					
					&.active {
						opacity: 1;
					}
					
					&:first-child {
						margin-left: 0;
					}
				}
			}
			
			.answers {
				width: 500px;
				margin: 0 auto;
			
				.answer {
					width: 200px;
					height: 200px;
					text-align: center;
					line-height: 200px;
					background-color: #ffffff;
					.border-radius;
					.scale(0.8);
					opacity: 0.8;
					.transition(@duration: 200ms);
					cursor: pointer;
					font-size: 46px;				
					&.yes {
						float: left;
					}
					
					&.no {
						float: right;
					}
					
					&:hover {
						.scale(1);
						opacity: 1;
					}
				}
			}
		}
	}
}

.page-mobile {
	font-family: 'trivia-grotesk';
	height: 100%;

	.start, .action {
		width: 100%;
		min-height: 100%;
		display: none;
		
		&.shown {
			display: block;
		}
		
		.shares {
			margin: 0 auto;
		
			.share {
				margin: 0 auto;
				width: 150px;
				height: 45px;
				background-image: url(../images/btnShare.png);
				margin-bottom: 5px;
				cursor: pointer;
			
				&.fb {
					background-position: 0px 0px;
					
					&:hover {
						background-position: 0px -46px;
					}
				}
				
				&.vk {
					background-position: -330px 0px;
					
					&:hover {
						background-position: -330px -46px;
					}
				}
				
				&.tw {
					background-position: -165px 0px;
					
					&:hover {
						background-position: -165px -46px;
					}
				}
			}		
		}
	}
	
	.action {
		background-color: #E3E3E3;
		
		&.finish {
			.up {
				height: 200px;
				background-image: url(../images/5.jpg);
				.cover;
			}
			
			.down {
				.box-sizing;
				padding: 15px;
				background-color: #E3E3E3;
			}
			
			.title {
				font-size: 36px;
				padding-top: 5px;
				padding-bottom: 20px;
				text-align: center;
			}
			
			.text {
				font-size: 18px;
				line-height: 1.2;
				margin-bottom: 40px;
			}
			
			.result {
				display: none;
				
				&.shown {
					display: block;
				}
			}
		}
		
		&.second {
			height: 100%;
		
			.up {
				height: 200px;
				background-image: url(../images/4.jpg);
				.cover;
			}
			
			.down {
				.box-sizing;
				padding: 15px;
				background-color: #E3E3E3;
			}
		
			.label {
				text-align: center;
				margin-bottom: 20px;
				font-size: 16px;
				line-height: 1.2;
			}
			
			.buttons {
				display: none;
				
				&.shown {
					display: block;
				}
			}
			
			.pairs {
				padding-bottom: 50px;
			}
			
			.button {
				border: 5px solid #000000;
				text-align: center;
				font-size: 32px;
				padding: 22px 15px;
				text-transform: capitalize;
			}
			
			.or {
				margin: 10px 0;
				text-align: center;
			}
		}
		
		&.bad {
			height: 100%;
		
			.up {
				height: 200px;
				background-image: url(../images/4.jpg);
				.cover;
			}
			
			.down {
				.box-sizing;
				padding: 15px;
				background-color: #E3E3E3;
			}
		
			.title {
				text-align: center;
				margin-bottom: 20px;
				font-size: 20px;
				line-height: 1.2;
			}
			
			.button {
				border: 5px solid #000000;
				text-align: center;
				font-size: 32px;
				padding: 22px 15px;
			}
		}
		
		&.good {
			height: 100%;
		
			.up {
				height: 200px;
				background-image: url(../images/3.jpg);
				.cover;
			}
			
			.down {
				.box-sizing;
				padding: 15px;
				background-color: #E3E3E3;
			}
			
			.title {
				text-align: center;
				margin-bottom: 20px;
				font-size: 20px;
				line-height: 1.2;
			}
		}
	
		&.first {
			height: 100%;
		
			.up {
				height: 200px;
				background-image: url(../images/2.jpg);
				.cover;
			}
			
			.down {
				.box-sizing;
				padding: 15px;
				background-color: #E3E3E3;
			}
			
			.questions {
				padding-top: 10px;
				margin-bottom: 20px;
			
				.question {
					display: none;
					font-size: 22px;
					line-height: 1.3;
					
					&.active {
						display: block;
					}
				}
			}
			
			.answers {
				.answer {
					border: 5px solid #000000;
					text-align: center;
					font-size: 42px;
					padding: 36px 26px;
				
					&.yes {
						float: left;
					}
					
					&.no {
						float: right;
					}
				}
			}
		}
	}
	
	.start {
		.up {
			height: 150px;
			background-image: url(../images/1.jpg);
			.cover;
			color: #ffffff;
			text-align: center;
		}
		
		.label {
			padding-top: 30px;
			font-size: 18px;
			line-height: 1;
		}
		
		.title {
			margin-top: 20px;
			font-size: 24px;
			line-height: 1;
		}
		
		.subtitle {
			text-align: center;
			margin-bottom: 20px;
			font-size: 18px;
			line-height: 1.2;
		}
		
		.authors {
			margin-bottom: 10px;
			
			a {
				text-decoration: underline;
			}
		}
		
		.description {
			font-size: 16px;
			line-height: 1.2;
		}
		
		.button {
			text-align: center;
			padding: 30px 0px;
			background-color: #FB636B;
			color: #ffffff;
			font-size: 36px;
			margin: 30px 0;
		}
		
		.down {
			.box-sizing;
			padding: 15px;
			background-color: #E3E3E3;
		}
	}
}