@-webkit-keyframes crossScreen {
    0% {
        left: -10%;
    }
    100% {
        left: 100%;   
    }
}

@-webkit-keyframes pop {
    0% {
        -webkit-transform: scale(1);   
    }
    50% {
        -webkit-transform: scale(1.6);   
    }
    100% {
        -webkit-transform: scale(1);   
    }
}
@keyframes crossScreen {
    0% {
        left: -10%;
    }
    100% {
        left: 100%;   
    }
}

@keyframes pop {
    0% {
        transform: scale(1);   
    }
    50% {
        transform: scale(1.6);   
    }
    100% {
        transform: scale(1);   
    }
}

@font-face {
  font-family: 'HelveticaRounded';
  src: url('../fonts/HelveticaRoundedLTStd-Black.eot'); /* IE9 Compat Modes */
  src: url('../fonts/HelveticaRoundedLTStd-Black.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('../fonts/HelveticaRoundedLTStd-Black.woff') format('woff'), /* Modern Browsers */
       url('../fonts/HelveticaRoundedLTStd-Black.ttf')  format('truetype'), /* Safari, Android, iOS */
       url('../fonts/HelveticaRoundedLTStd-Black.svg#101eba6fcd2b57dd88e7b115935987df') format('svg'); /* Legacy iOS */
       
  font-style:   bold;
  font-weight:  700;
}

body {
    position: relative;
    z-index: 0;
	margin: 0;
	height: 100vh;
}

canvas {
	position: relative;
	width: 100%;
    height: 100%;
    z-index: -100;
    pointer-events: auto;
}

iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    border: none;
    padding: 0;
    margin: 0;
    z-index: 5;
    -webkit-user-select: auto;
    pointer-events: all;
}

.gameSelect {
    width: 30%;
    margin: 1.5%;
    padding: 0;
    float: left;
	cursor: pointer;
    position: relative;
}

.gameSelect img {
    width: 100%;
    height: auto;
	display: block;
    -webkit-transition:  all 0.2s cubic-bezier(0.49, 0.25, 0.36, 2.46);
    transition:  all 0.2s cubic-bezier(0.49, 0.25, 0.36, 2.46);
	-webkit-transform: scale(1);
	transform: scale(1);
}

/*.gameSelect:hover img {
    display: block;
	-webkit-transform: scale(1.3) rotate(5deg);
    -ms-transform: scale(1.3) rotate(5deg);
	transform: scale(1.3) rotate(5deg);
    opacity: 1;
}*/

.gameSelect.hovering img {
    opacity: 1;
}

.gameSelect .pinata {
    width: 60%;
    margin-left: 20%;
}

.game-title {
    position: absolute;
    top: 0;
    opacity: 1;
    -webkit-transition:  all 0.2s cubic-bezier(0.49, 0.25, 0.36, 2.46);
    transition:  all 0.2s cubic-bezier(0.49, 0.25, 0.36, 2.46);
}

.game-background {
	overflow: hidden;
	position: absolute;
	top: -50%;
	right: 0;
	bottom: 0;
	left: 50%;
	width: 200%;
	height: 200%;
	z-index: 0;
	margin-left: -100%;
	background: url(../images/background.png) 50% / contain no-repeat;
	pointer-events: none;

    -webkit-transition:  all 0.5s cubic-bezier(0.46, 0.03, 0.52, 0.96);
    transition:  all 0.5s cubic-bezier(0.46, 0.03, 0.52, 0.96);
}

#cloud1 {
    z-index: 1;
    position: absolute;
    top: 20%;
    animation: crossScreen 25s linear -15s infinite;   
    width: 10%;
}

#cloud2 {
    z-index: 1;
    top: 8%;
    position: absolute;
    animation: crossScreen 35s linear -5s infinite;
    width: 7%;
}

#loader {
	position: relative;
	height: 500px;
    max-height: 100vh;
	width: 100%;
	max-width: 750px;
	margin: 0 auto;
    overflow: hidden;
	
	background: #07d4fa; /* Old browsers */
	background: -moz-linear-gradient(top,  #07d4fa 0%, #a2e8f0 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#07d4fa), color-stop(100%,#a2e8f0)); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top,  #07d4fa 0%,#a2e8f0 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top,  #07d4fa 0%,#a2e8f0 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top,  #07d4fa 0%,#a2e8f0 100%); /* IE10+ */
	background: linear-gradient(to bottom,  #07d4fa 0%,#a2e8f0 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#07d4fa', endColorstr='#a2e8f0',GradientType=0 ); /* IE6-9 */
}

#gameWrapper {
    overflow: hidden;
	position: relative;
	height: 500px;
	width: 100%;
	max-width: 750px;
	margin: 0 auto;
	opacity: 0;
    -webkit-user-select: all;
	
	-webkit-transition: opacity 0.5s ease;
	transition: opacity 0.5s ease;
}

#gameWrapper.loaded {
	opacity: 1;	
}

#selectRow {
    width: 100%;
    left: 60px;
	position: absolute;
	bottom: 7%;
}

#callToAction {
    position: absolute;
    top: 40%;
    width: 90%;
    left: 5%;
    font-family: HelveticaRounded;
    color: #fff;
    text-align: center;
    font-size: 1em;
    text-shadow: -1px -1px 0 #402172, 1px -1px 0 #402172, -1px 1px 0 #402172, 1px 1px 0 #402172;
    text-shadow: 2px 2px 6px #402172;
}

#pollyDecoration {
    position: absolute;
    left: -45%;
    width: 60%;
    top: 0;
    pointer-events: none;
}

#pollyDecoration.smaller{
    display: none;
}

#spiceDecoration.smaller{
    right: 20%;
    bottom: 0;
}

#spiceDecoration {
    position: absolute;
    right: 30%;
    width: 10%;
    bottom: 10%;
    pointer-events: none;
}

#petparty {
    width: 50%;
	display: block;
    margin: 0 auto;
}

#gameLoadContainer {
    position: absolute;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100%;
    z-index: 2;
    -webkit-transition:  all 0.5s cubic-bezier(0.46, 0.03, 0.52, 0.96);
    transition:  all 0.5s cubic-bezier(0.46, 0.03, 0.52, 0.96);
}

#gameLoadContainer.offset {
    -webkit-transform: translateX(-100%);
    -ms-transform: translateX(-100%);
    transform: translateX(-100%);
}

#gameSquare.offset {
    -webkit-transform: translateX(-150%);
    -ms-transform: translateX(-150%);
    transform: translateX(-150%);
}

.game-background.offset {
    -webkit-transform: translateX(-5%);
    -ms-transform: translateX(-5%);
    transform: translateX(-5%);
}

#gameWrapper > canvas {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: -999;
    display: none !important;
}

#gameSquare {
    position: relative;
	padding: 1em;
    left: 0;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	z-index: 2;
    -webkit-transition:  all 0.5s cubic-bezier(0.46, 0.03, 0.52, 0.96);
    transition:  all 0.5s cubic-bezier(0.46, 0.03, 0.52, 0.96);
}



#gameSelectWrapper {
    float: left;
    width: 100%;
}

.gameArrow {
    display: none;   
    position: absolute;
    top: 68%;
    width: 20%;
    height: auto;
    -webkist-transition: opacity 0.2s ease;
	transition: opacity 0.2s ease;
}

#leftGameArrow {
    left: 0;
}

#rightGameArrow {
    right: 0;
}

#foreground {
	position: absolute;
	top: -50%;
	right: 0;
	bottom: 0;
	left: -50%;
	width: 200%;
	height: 200%;
	z-index: 998;
	margin-left: 0;
	pointer-events: none;
}

#background {
	position: absolute;
	top: -50%;
	right: 0;
	bottom: 0;
	left: -50%;
	width: 200%;
	height: 200%;
	z-index: 1;
	margin-left: 0;
	pointer-events: none;
}

.fontPreload {
    position:absolute;
    left: -100px;
}

.gameArrow {
	display: none;
	cursor: pointer;
	opacity: 1;
}

.gameArrow.hide {
	opacity: 0;
}

#spinner {
	width: 120px;
	position: absolute;
	top: 50%;
	left: 50%;
	margin-left: -60px;
	margin-top: -60px;
	z-index: 0;
}

@media all and (max-width: 750px) {
    #pollyDecoration {
        display: none;
    }

    #selectRow {
        /* left: 0; */
    }
}

@media all and (max-width: 500px) {
    .gameSelect {
        width: 24%;
        margin: 0 4.65%;
    }

    #gameLoadContainer {
        -webkit-transform: translateY(-100%) translateX(-100%);
        transform: translateY(-100%) translateX(-100%);
    }

    #gameLoadContainer.offset {
        -webkit-transform: translateY(0) translateX(-100%);
        transform: translateY(0) translateX(-100%);
    }
    #gameSquare {
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
    #gameSquare.offset {
        -webkit-transform: translateY(200%);
        transform: translateY(200%);
    }

    .game-background.offset {
        -webkit-transform: translateY(-5%);
        transform: translateY(-5%);
    }
    #petparty {
        position: relative;
        top: -30px;
    }

    #callToAction {
        top: -45px;
        position: relative;
    }
	
	#selectRow {
    	transition: margin-left 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
		width: 300%;
		bottom: -40px;
		left: 0;
	}
	
	.gameArrow {
		display: block;
	}

    .gameSelect img {
        width: 60%;
        margin: 30% 20% 10% 20%;
    }

    .gameSelect:hover img {
        display: block;
	    -webkit-transform: none;
        -ms-transform: none;
        transform: none;
    }

    .game-title {
        opacity: 1;
    }

    .gameSelect .pinata {
        width: 40%;
        margin-left: 30%;
    }
}

@media all and (max-width: 500px), (max-height: 500px) {
    #callToAction {
        font-size: 3.5vmin;   
        font-size: 3.5vm; /* IE9 */
    }   
}

.ui {
	position: absolute;
	top: 1em;
	right: 1em;
}

.ui img {
    position: relative;
    float: right;
    height: 40px;
    margin: 0 auto;
    z-index: 999;
    padding: 5px;
	display: block;
	cursor: pointer;
	
	-webkit-transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.25);
	transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.25);
	-webkit-transform: scale(1);
	transform: scale(1);
}

.ui img:hover {
    -webkit-transform: scale(1.2);
	transform: scale(1.2);
}