@font-face {
    font-family: 'Novecentosanswide-Book';
    src: url('fonts/Novecentosanswide-Book-webfont.woff2') format('woff2'),
         url('fonts/Novecentosanswide-Book-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Novecentosanswide-Medium';
    src: url('fonts/Novecentosanswide-Medium-webfont.woff2') format('woff2'),
         url('fonts/Novecentosanswide-Medium-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

[class*="entypo-"]:before {
	font-family: 'entypo', sans-serif;
}

html {
	width: 100%;
	height: 100%;
	overflow: hidden;
	font-family: 'Open Sans', sans-serif;
	font-weight: 300;
}
body {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 50px;
	background: #111;
	box-sizing: border-box;
	font-size: 16px;
}
body * {
	box-sizing: border-box;
}
h1, h2, h3, h4 {
	font-family: 'Novecentosanswide-Medium';
	text-transform: uppercase;
	letter-spacing: 2px;
}
.game:before {
	content: '';
	position: absolute;
	width: 100%;
	height: 100%;
	left: 0;
	top: 0;
	/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#5e6979+0,404752+100 */
	background: rgb(94,105,121); /* Old browsers */
	background: -moz-radial-gradient(center, ellipse cover, rgb(94,105,121) 0%, rgb(64,71,82) 100%); /* FF3.6-15 */
	background: -webkit-radial-gradient(center, ellipse cover, rgb(94,105,121) 0%,rgb(64,71,82) 100%); /* Chrome10-25,Safari5.1-6 */
	background: radial-gradient(ellipse at center, rgb(94,105,121) 0%,rgb(64,71,82) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5e6979', endColorstr='#404752',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}
.game {
	overflow: hidden;
	position: relative;
	width: 100%;
	height: 100%;
}



/* Buttons */
.button {
	background: #6baac4;
	border-radius: 20px;
	color: #fff;
	display: inline-block;
	line-height: 40px;
	padding: 0 30px;
	margin: 5px;
	text-transform: uppercase;
	cursor: pointer;
	text-decoration: none;
}
.button:hover {
	background: #5d5d5d;
	color: #fff;
}
/* Rotate screen */
.game .rotate_screen {
	display: none;
	position: absolute;
	width: 100%;
	top: 50%;
	margin-top: -50px;
	left: 0;
	text-align: center;
}
.game .rotate_screen img {
	width: 50px;
}
.game .rotate_screen p {
	color: #fff;
}

/* Controls */
.game > .controls.hide {
	top: -400px;
	margin-top: 0;
}
.desktop .game > .controls {
	width: 500px;
	margin-left: -250px;
}
.game > .controls {
	text-align: center;
	width: 360px;
	height: 400px;
	background: rgba(255,255,255,0.9);
	border-radius: 2px;
	position: absolute;
	left: 50%;
	top: 50%;
	margin-left: -180px;
	margin-top: -200px;
	z-index: 500;
	transition: all 1s;
	border: 2px solid #111;
}
.game > .controls .lug {
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 60px;
	margin-left: -30px;
	height: 20px;
	background: #111;
	color: #fff;
	cursor: pointer;
	text-align: center;
	transition: bottom 1s;
}
.game > .controls.hide .lug {
	bottom: -20px;
}
.game > .controls .lug span {
	line-height: 20px;
	height: 20px;
	display: inline-block;
	vertical-align: top;
	transform: rotate(0);
	transition: transform 1s;
}
.game > .controls.hide .lug span {
	transform: rotate(180deg);
}
.game > .controls .button {
	margin-top: 10px;
}
.game > .controls .hidden {
	display: none;
}
.game > .controls .template h2 {
	background: #9ab41d;
	color: #fff;
	width: 100%;
	text-align: center;
	padding: 20px;
	margin: 0 0 20px 0;
	line-height: 40px;
}
.game > .controls .template.numerix_crash h2 {
	background: #941918;
}
.game > .controls .template .text {
	padding: 0 10px;
}
.desktop .game > .controls .template .text {
	padding: 0 40px;
}
.game > .controls .template .text .label,
.game > .controls .template .text .value {
	display: inline-block;
	white-space: nowrap;
	text-align: left;
}
.game > .controls .template .text .label {
	width: 150px;
}
.game > .controls .template .text .value {
	width: 70px;
	font-weight: 400;
}


/* Splash */

.game.init .splash {
	opacity: 1;
	visibility: visible;
}
.game .splash {
	opacity: 0;
	visibility: hidden;
	text-align: center;
	position: absolute;
	width: 100%;
	height: 100%;
	z-index: 1000;
	color: #fff;
	
	transition: opacity 0.5s, visibility 0.5s;
	background: #024698;
}
.game .splash:before {
	content: '';
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#000000+0,000000+100&0+0,0.3+100 */
	background: -moz-radial-gradient(center, ellipse cover, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%); /* FF3.6-15 */
	background: -webkit-radial-gradient(center, ellipse cover, rgba(0,0,0,0) 0%,rgba(0,0,0,0.3) 100%); /* Chrome10-25,Safari5.1-6 */
	background: radial-gradient(ellipse at center, rgba(0,0,0,0) 0%,rgba(0,0,0,0.3) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#4d000000',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}
.game .splash .text {
	top: 25%;
	width: 100%;
	position: relative;
	padding: 0 10px;
}
.game .splash .text h1 {
	margin-bottom: 40px;
}
.game .splash .text .button {
	margin-top: 40px;
	background: #fff;
	color: #5d5d5d;
}
.game .splash .text .button:hover {
	background: #5d5d5d;
	color: #fff;
}
.game .splash .logo {
	left: 50%;
	margin-left: -80px;
	width: 160px;
	position: absolute;
	bottom: 50px;
}
.game .splash .no-support {
	display: none;
}

/* Multitasking */
.multitasking {
	width: 100%;
	height: 100%;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
}
.multitasking > * {
	visibility: hidden;
	opacity: 0;
	transform: translate(0, 0);
	transition: all 0.5s;
}
.multitasking .description {
	z-index: 200;
	top: 0;
	position: absolute;
	width: 100%;
	height: 100%;
	background: rgba(255,255,255,0.9);
	padding: 20px;
	visibility: visible;
	opacity: 1;
	transition: all 0.5s;
}
.multitasking .started .description,
.multitasking[data-show-games='both'] .description {
	visibility: hidden;
	opacity: 0;
}
.multitasking[data-show-games='both'] > * {
	visibility: visible;
	opacity: 1;
}
.multitasking[data-show-games='numerix'] .numerix {
	visibility: visible;
	opacity: 1;
	transform: translate(50%, 0);
}
.multitasking[data-show-games='tube'] .tube {
	visibility: visible;
	opacity: 1;
	transform: translate(-50%, 0);
}

/* Numerix */
.numerix {
	margin: 10px;
	position: relative;
	width: 300px;
	height: 460px;
	background: #fff;
	box-shadow: 0 0 10px #454e5b;
}
.numerix .grid {
	position: absolute;
	width: 100%;
	height: 100%;
}
.numerix .grid .row {
	border-top: 1px solid #ccc;
	width: 100%;
}
.numerix .grid .row .column {
	border-left: 1px solid #ccc;
	height: 100%;
	display: inline-block;
}
.numerix .grid .row:first-child {
	border-top: none;
}
.numerix .grid .row .column:first-child {
	border-left: none;
}
.numerix .numbers {
	position: absolute;
	width: 100%;
	height: 100%;
}
.numerix .numbers .number {
	background: #6baac4;
	display: block;
	position: absolute;
}
.numerix .numbers .number.red {
	background: #821012;
}
.numerix .numbers .number.green {
	background: #9ab41d;
}
.numerix .numbers .number .value {
	width: 80%;
	height: 80%;
	color: #fff;
	margin: 10%;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255,255,255,0.2);
	border-radius: 100%;
}

/* Tube */
.tube {
	margin: 10px;
	position: relative;
	width: 300px;
	height: 460px;
	background: #fff;
	box-shadow: 0 0 10px #454e5b;
}
.tube .window {
	position: relative;
	width: 250px;
	height: 250px;
	background: #9ab41d;
	margin: 25px;
	overflow: hidden;
}
.tube .window.off-track {
	background: #821012;
}
.tube .window.off-track:after {
	content: 'OFF TRACK';
	position: absolute;
	bottom: 0;
	width: 100%;
	line-height: 50px;
	text-align: center;
	left: 0;
	color: #fff;
	font-size: 20px;
}
.tube canvas {
	display: none;
}
.tube .multitube {
	position: absolute;
	width: 6000px;
	height: 4500px;
}
.tube .plane {
	width: 100px;
	height: 100px;
	position: absolute;
	left: 50%;
	top: 50%;
	margin-left: -50px;
	margin-top: -50px;
	z-index: 100;
	transition: transform;
	transition-timing-function: linear;
}
.tube .controls {
	width: 100%;
	text-align: center;
}
.tube .controls span {
	width: 70px;
	height: 70px;
	margin: 10px;
	display: inline-block;
	/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#5e6979+0,404752+100 */
	background: rgb(94,105,121); /* Old browsers */
	background: -moz-radial-gradient(center, ellipse cover, rgb(94,105,121) 0%, rgb(64,71,82) 100%); /* FF3.6-15 */
	background: -webkit-radial-gradient(center, ellipse cover, rgb(94,105,121) 0%,rgb(64,71,82) 100%); /* Chrome10-25,Safari5.1-6 */
	background: radial-gradient(ellipse at center, rgb(94,105,121) 0%,rgb(64,71,82) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5e6979', endColorstr='#404752',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
	border-radius: 100%;
	position: relative;
	cursor: pointer;
}
.tube .controls span:hover {
	background: #6baac4;
}
.tube .controls span:before {
	content: '';
	display: block;
	position: absolute;
	left: 50%;
	top: 50%;
	margin-top: -10px;
}
.tube .controls .left:before {
	border-top: 10px solid transparent;
	border-bottom: 10px solid transparent;
	border-right: 14px solid #fff;
	margin-left: -10px;
}
.tube .controls .right:before {
	border-top: 10px solid transparent;
	border-bottom: 10px solid transparent;
	border-left: 14px solid #fff;
	margin-left: -4px;
}

/* Statistics */
.statistics {
	position: absolute;
	left: 0;
	top: 50%;
	color: #fff;
	font-size: 14px;
	transition: margin 0.5s;
}
.statistics .label {
	text-transform: uppercase;
	font-style: italic;
	padding-right: 20px;
}
.statistics .label:after {
	content: ':';
}
.statistics .time {
	border-top: 1px solid #fff;
}
.statistics .time,
.statistics .score,
.statistics .rows-turns {
	padding: 30px;
	border-bottom: 1px solid #fff;
	margin: 0;
}
.statistics .score .value,
.statistics .time .value {
	font-size: 40px;
	display: block;
}
.statistics .time .value .minutes:after {
	content: ':';
}
.statistics .time .value > * {
	display: inline-block;
	float: left;
}
.statistics .time .value:after {
	content: '.';
	display: block;
	clear: both;
	visibility: hidden;
	height: 0;
}
.statistics .score .value .minutes:after {
	content: ':';
}
.statistics .rows-turns > span {
	display: block;
}
.statistics .rows-turns .value {
	font-size: 20px;
}
.statistics .rows-turns .label {
	display: inline-block;
	width: 65px;
}


.instructions {
	position: absolute;
	right: 0;
	top: 50%;
	color: #fff;
	font-size: 14px;
	transition: margin 0.5s;
}
.instructions .label {
	text-transform: uppercase;
	font-style: italic;
	padding-right: 20px;
	display: block;
}
.instructions .label:after {
	content: ':';
}
.instructions .options {
	border-top: 1px solid #fff;
	padding: 30px;
	border-bottom: 1px solid #fff;
	margin: 0;
}
.instructions .options .button {
	margin: 20px 0 0 0;
}

.keys,
.circles {
	font-size: 0;
}
.key {
	width: 20px;
	height: 20px;
	position: relative;
	border: 1px solid #000;
	display: inline-block;
	margin: 0 2px;
	font-size: 16px;
}
.circle {
	border-radius: 15px;
	width: 30px;
	height: 30px;
	position: relative;
	border: 1px solid #000;
	display: inline-block;
	margin: 0 2px;
	font-size: 16px;
}
.key:before,
.circle:before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
}
.key.left:before,
.circle.left:before {
	border-top: 5px solid transparent;
	border-bottom: 5px solid transparent;
	border-right: 5px solid #000;
	margin-left: -2.5px;
	margin-top: -5px;
}
.key.right:before,
.circle.right:before {
	border-top: 5px solid transparent;
	border-bottom: 5px solid transparent;
	border-left: 5px solid #000;
	margin-left: -2.5px;
	margin-top: -5px;
}
.key.down:before {
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 5px solid #000;
	margin-left: -5px;
	margin-top: -2.55px;
}

/* Links */
.links {
	position: absolute;
	right: 50px;
	bottom: 20px;
	font-size: 14px;
}
.links a {
	color: #fff;
	text-decoration: none;
}


/* Tablet */
@media screen and (max-width: 980px) {
	
	
}

/* Mobile */
@media screen and (max-width: 812px) {

	body {
		padding: 10px;
		font-size: 14px;
	}
	.game .splash:before {
		background-size: 500px;
	}
	.game > .controls.hide {
		top: -340px;
	}
	.game > .controls {
		height: 340px;
		margin-top: -170px;
	}
	.game .splash .logo {
		bottom: 10px;
	}
	.game .splash .text {
		top: 0;
	}
	.game .splash .text h1 {
		margin-bottom: 20px;
	}
	.game .splash .text .button {
		margin-top: 10px;
	}
	.multitasking {
		justify-content: flex-end;
	}
	.tube,
	.numerix {
		width: 250px;
		height: 100%;
		margin: 0;
		box-shadow: none;
	}
	.tube .window {
		margin: 0;
	}
	
	.multitasking .description {
		padding: 0 10px;
		line-height: 18px;
	}
	
	.statistics {
		margin-top: 0 !important;
		top: 0;
	}
	.statistics .time {
		border-top: none;
	}
	.instructions {
		left: 0;
		right: auto;
		top: auto;
		bottom: 10px;
	}
	.instructions .options {
		padding: 10px;
		border-top: none;
		border-bottom: none;
	}
	
	.statistics .time,
	.statistics .score,
	.statistics .rows-turns {
		padding: 10px;
	}
	.statistics .score .value,
	.statistics .time .value {
		font-size: 30px;
	}
	.not_mobile {
		display: none;
	}
	.links {
		display: none;
	}
}

@media screen and (orientation: landscape) {
	
	.game .rotate_screen {
		display: none;
	}
}

@media screen and (max-width: 414px) and (orientation: portrait) {
	
	
	.game .rotate_screen {
		display: block;
	}
	.multitasking,
	.statistics,
	.instructions {
		display: none !important;
	}
}

/* iPhone 5/5S/SE */
@media only screen 
and (min-device-width : 320px) 
and (max-device-width : 568px) 
and (orientation : landscape) {
	
	.statistics .score .value,
	.statistics .time .value {
		font-size: 20px;
		display: inline-block;
	}
	.statistics .label,
	.statistics .label:after,
	.statistics .score .value,
	.statistics .time .value {
		vertical-align: top;
		line-height: 20px;
	}
	.statistics .time .label {
		padding-right: 5px;
	}
	
	.tube,
	.numerix {
		width: 220px;
		overflow: hidden;
	}
	.tube .window {
		left: -15px;
	}
	.keys, .circles {
		display: none;
	}
	.tube .controls {
		position: absolute;
		bottom: 0;
		background: #fff;
	}
	.tube .controls span {
		width: 50px;
		height: 50px;
	}
}

@-ms-keyframes spin { 
	from { 
		-ms-transform: rotate(0deg); 
	} to { 
		-ms-transform: rotate(360deg); 
	}
}
@-moz-keyframes spin { 
	from { 
		-moz-transform: rotate(0deg); 
	} to { 
		-moz-transform: rotate(360deg); 
	}
}
@-webkit-keyframes spin { 
	from { 
		-webkit-transform: rotate(0deg); 
	} to { 
		-webkit-transform: rotate(360deg); 
	}
}
@keyframes spin { 
	from { 
		transform: rotate(0deg); 
	} to { 
		transform: rotate(360deg); 
	}
}
