/*SET UP*/

html, body{
    margin:0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Russo One', sans-serif;
    perspective: 1000px;
    background-color: #333;
    overflow: hidden;
}
canvas{
    margin: 0 auto;
    position: absolute;
    left: 0;
    right: 0;
    top:0;
    width: 100%;
    height: 100%;
}

/*HUD*/
.hud-wrap{
    width: 100%;
    height: 100%;
    position: relative;
    margin: 0 auto;
    z-index: 2;
    font-size: 36px;
    transform: rotateY(0deg);
    transition: transform 0.6s ease-in-out;
    display: none;
}
.hud-wrap > *{
    position: absolute;
    width: 400px;
}
.hud-wrap.right{
    transform: rotateY(-4deg);
}
.hud-wrap.left{
    transform: rotateY(4deg);
}
.hud-wrap.show{
    display: block;
}
#speed{
    width: 300px;
    bottom: 50px;
    left: 50px;
    transform: rotate3d(-0.5,1,0,40deg);
}
#distance{
    bottom: 50px;
    right: -20px;
    transform: rotate3d(0.5,1,0,40deg);
}
#score{
    top: 50px;
    right: -20px;
    transform: rotate3d(0.5,-1,0,40deg);
}

/*INITIAL*/

#initial{
    width: 100%;
    height: 100%;
    position: relative;
    margin: 0 auto;
    z-index: 3;
    font-size: 36px;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to right, #1e5799 0%, #2ce0bf 19%, #76dd2c 40%, #dba62b 60%, #e02cbf 83%, #1e5799 100%);
    background-size: 10000px 100%;
    animation: bg 35s linear infinite;
}

#initial.hide{
    display: none;
}
#initial .title{
    width: 250px;
    height: 420px;
    background: url('images/ironRush_logo.svg') no-repeat center;
    background-size: cover;
    margin-bottom: 100px;
}
#initial .tooltip{
    font-size: 20px;
    animation: fade 2s ease-in-out infinite;
}



/*GAMEOVER*/

#gameover{
    width: 100%;
    height: 100%;
    position: relative;
    margin: 0 auto;
    z-index: 3;
    font-size: 36px;
    
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
}
#gameover .final-data-wrap{
    background-color: rgba(255, 255, 255, 1);
    color: #000;
    width: 420px;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-size: 30px;
    text-align: center;
}
#gameover .final-data-wrap .title{
    font-size: 50px;
    border-bottom: 6px solid black;
    margin-bottom: 40px;
}
#gameover .final-data-wrap .play-again{
    font-size: 20px;
    margin-top: 35px;
}
#gameover.hide{
    display: none;
}

@keyframes fade {
    0%{
        opacity: 0;
    }
    33%{
        opacity: 1;
    }
    66%{
        opacity: 1;
    }
    100%{
        opacity: 0;
    }
}

@keyframes bg {
    0% {
      background-position-x: 0;
    }
    100% {
      background-position-x: 10000px;
    }
  }