/***
*
* GLOBAL **
*
***/

html {
    height: 100%;
    min-width: 960px;
}

body {
    font: 13px/22px Lora, Times New Roman, Times, serif;
    color: #666;
    height: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-font-smoothing: antialiased;
    -o-font-smoothing: antialiased;
}
body.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;
}

h1 {
    font-size: inherit;
    margin: 0;
    display: inline;
    font-weight: normal;
    position: relative;
    z-index: 2;
}

p, ul, li {
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: #3c9;
}

button {
    font-family: inherit;
    font-style: italic;
    font-size: 16px;
    padding: 9px 70px;
    border: 1px solid #33cc99;
    background-color: #fff;
    color: #33cc99;
    outline: none;
}
button:hover {
    background-color: #33cc99;
    color: #fff;
}

#mobile-inter {
    display: none;
}

.value {
    font-size: 24px;
    color: #666;
}

.value-label {
    color: #999;
}

.logo-link {
    z-index: 100;
    position: absolute;
    top: 35px;
    left: 50%;
    margin-left: -69px;
    outline: none !important;
    -webkit-transition: top 0.7s, left 0.7s, margin-left 0.7s;
    transition:  top 0.7s, left 0.7s, margin-left 0.7s;
    -webkit-transition-timing-function: ease-out;
    transition-timing-function: ease-out;
}
.logo-link.intro {
    top: 150px;
    margin-left: -150px;
}
.logo-link.final {
    top: 730px;
}
.logo-link.toggle-final {
    -webkit-transition: top 0s, left 0s, width 0s, margin-left 0s;
    transition:  top 0s, left 0s, width 0s, margin-left 0s;
}


.logo {
    width: 138px;
    -webkit-transition: width 0.7s;
    transition:  width 0.7s;
    -webkit-transition-timing-function: ease-out;
    transition-timing-function: ease-out;
}
.logo-link.intro .logo {
    width: 301px;
}
.logo.toggle-final {
    -webkit-transition: top 0s, left 0s, width 0s, margin-left 0s;
    transition:  top 0s, left 0s, width 0s, margin-left 0s;
}

.instant {
    -webkit-transition: width 0s, height 0s;
    transition: width 0s, height 0s;
}

@-webkit-keyframes marching-ants-anim {
  0% {
    background-position: 0 0,  0 100%,  0 0,  100% 0;
  }
  100% {
    background-position: 12px 0, -12px 100%, 0 -12px, 100% 12px;
  }
}
@keyframes marching-ants-anim {
  0% {
    background-position: 0 0,  0 100%,  0 0,  100% 0;
  }
  100% {
    background-position: 40px 0, -40px 100%, 0 -40px, 100% 40px;
  }
}

.marching-ants {
    background-size: 6px 1px, 6px 1px, 1px 6px, 1px 6px;
    background-position: 0 0,  0 100%,  0 0,  100% 0;
    background-repeat: repeat-x,  repeat-x,  repeat-y,  repeat-y;
    -webkit-animation: marching-ants-anim 1s;
    animation: marching-ants-anim 1s;
    -webkit-animation-timing-function: linear;
    animation-timing-function: linear;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
    -webkit-animation-play-state: running;
    animation-play-state: running;
    background-image: -webkit-linear-gradient(left, #808080 50%, rgba(255,255,255,.5) 50%), -webkit-linear-gradient(left, #808080 50%, rgba(255,255,255,.5) 50%), -webkit-linear-gradient(top, #808080 50%, rgba(255,255,255,.5) 50%), -webkit-linear-gradient(top, #808080 50%, rgba(255,255,255,.5) 50%);
    background-image: linear-gradient(to right, #808080 50%, rgba(255,255,255,.5) 50%), linear-gradient(to right, #808080 50%, rgba(255,255,255,.5) 50%), linear-gradient(to bottom, #808080 50%, rgba(255,255,255,.5) 50%), linear-gradient(to bottom, #808080 50%, rgba(255,255,255,.5) 50%);
}

@-webkit-keyframes color-change {
    0% { color: #f26d7d; }
    100% { color: #666666; }
}
@-moz-keyframes color-change {
    0% { color: #f26d7d; }
    100% { color: #666666; }
}
@-ms-keyframes color-change {
    0% { color: #f26d7d; }
    100% { color: #666666; }
}
@-o-keyframes color-change {
    0% { color: #f26d7d; }
    100% { color: #666666; }
}
@keyframes color-change {
    0% { color: #f26d7d; }
    100% { color: #666666; }
}

.color-change {
    color: #f26d7d;
    -webkit-animation: color-change 1s linear 1s 1;
    -moz-animation: color-change 1s linear 1s 1;
    -o-animation: color-change 1s linear 1s 1;
    -ms-animation: color-change 1s linear 1s 1;
    animation: color-change 1s linear 1s 1;
    -webkit-animation-fill-mode:forwards;
}







/***
*
* HUD **
*
***/

#hud {
    border-top: 5px solid #f26d7d;
    box-sizing: border-box;
    position: relative;
    z-index: 20;
}

.hud-inner {
    padding: 37px 0 12px;
    background-color: #f5f5f5;
    box-shadow: 0px 1px 3px #bfbfbf;
    -webkit-transition: all 0.75s linear 0.25s;
    transition: all 0.75s 0.25s;
}
.hud-inner.intro {
    opacity: 0;
}

.score-round-wrapper {
    width: 960px;
    height: 38px;
    margin: 0 auto;
    position: relative;
    border: 0;
    border-bottom: 2px solid transparent;
    border-image: url(../img/hud-border.gif) 0 0 2;
}

.score-copy-wrapper {
    float: right;
    position: relative;
}

.score-copy, .round-copy {
    line-height: 20px;
    float: left;
}

#best-score {
    position: absolute;
    right: 0;
    top: 62px;
}

#best-score .value {
    font-size: 13px;
}

.score-copy .value {
    color: #f26d7d;
}

#score-deets {
    width: 34px;
    height: 34px;
    padding: 0;
    margin-top: -6px;
    margin-right: 10px;
    background: #fff url(../img/arrow-sprite.png) no-repeat center 14px;
    float: left;
    z-index: 20;
    position: relative;
}
#score-deets:hover {
    background-position: center -46px;
    background-color: #33cc99;
}
#score-deets.open {
    background-position: center -17px;
    border-bottom: none;
}
#score-deets.open:hover {
    background-position: center -77px;
}

#round-scores {
    list-style: none;
    padding: 14px 20px 12px;
    border: 1px solid #3c9;
    min-width: 100%;
    box-sizing: border-box;
    background-color: white;
    position: absolute;
    top: 27px;
    left: 0;
    z-index: 10;
    display: none;
}

#round-scores li {
/*    padding: 0 10px;*/
    white-space: nowrap;
}

#round-scores .value {
    font-size: 16px;
    margin-left: 5px;
}
#round-scores .value.scored {
    color: #f26d7d;
}
#round-scores .value.percent {
    margin-left: 0;
}

#height-width {
    text-align: center;
    margin: 18px 0 1px;
}

.width-copy, .height-copy {
    display: inline;
}

.width-copy {
    margin-right: 60px;
}




/***
*
* INTRO **
*
***/

#intro {
    margin: 124px auto 80px;
    width: 480px;
    text-align: center;
    position: relative;
    z-index: 0;
}

.intro-text {
    text-align: center;
    margin-bottom: 25px;
    display: inline;
    position: relative;
    z-index: 2;
}

.nuoy-text {
    text-align: center;
    background: linear-gradient(-45deg, #124063, #41898B, #FCC530);
        background-size: 400% 400%;
        animation: gradient 10s ease infinite;
        -webkit-background-clip: text;
        color: transparent;
    padding-top: 25px;
    margin-bottom: 25px;
    display: inline;
    position: relative;
    z-index: 2;
}

    @keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
    }


#enter {
    margin: 27px auto 0;
    display: block;
    position: relative;
    z-index: 1;
}

.caveats {
    font-size: 9px;
    line-height: 14px;
    margin: 40px 0px;
    position: relative;
    z-index: 2;
}

.squares-wrapper {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
}

/* Thanks to @saran5h linkedin.com/in/saranshsinha */

.squares {
    background: transparent;
    -webkit-animation: animSquare 100s linear infinite;
    animation: animSquare 100s linear infinite;
}

.squares:after {
    content: " ";
    position: absolute;
    top: 2000px;
    background: transparent;
}

#squares1 {
    width: 4px;
    height: 4px;
/*    border-radius: 2px;*/
    -webkit-animation-duration: 330s;
    animation-duration: 330s;
}
#squares1:after {
    width: 4px;
    height: 4px;
/*    border-radius: 2px;*/
}

#squares2 {
    width: 6px;
    height: 6px;
/*    border-radius: 1px 1px 3px 3px;*/
    -webkit-animation-duration: 180s;
    animation-duration: 160s;
}
#squares2:after {
    width: 6px;
    height: 6px;
/*    border-radius: 1px 1px 3px 3px;*/
}

#squares3 {
    width: 10px;
    height: 10px;
/*    border-radius: 1px 1px 4px 4px;*/
    -webkit-animation-duration: 80s;
    animation-duration: 70s;
}
#squares3:after {
    width: 10px;
    height: 10px;
/*    border-radius: 1px 1px 4px 4px;*/
}

@-webkit-keyframes animSquare {
    from {
        transform: translateY(0px);
    }
    to {
        transform: translateY(-2000px);
    }
}

@keyframes animSquare {
    from {
        transform: translateY(0px);
    }
    to {
        transform: translateY(-2000px);
    }
}




/***
*
* CANVAS **
*
***/

#canvas {
    position: relative;
    height: 100%;
    height: calc( 100% - 139px );
    /*height: 100%;
    margin-top: -139px;*/
    cursor: url(../img/cursor.png) 10 10, auto;
    overflow: hidden;
    display: none;
/*    z-index: 10;*/
}
.draw-text {
    font-size: 48px;
    font-style: italic;
    font-weight: bold;
    line-height: normal;
    color: #f26d7d;
    margin: 283px 0 0;
    text-align: center;
    position: relative;
    z-index: 70;
}

#user-rect {
    border: 1px solid #7fd6f7;
    box-sizing: border-box;
    background-color: rgba(109,207,246,.2);
    position: absolute;
    z-index: 40;
    left: 0;
    top: 0;
}

#system-rect {
    /*border: 1px dashed #808080;*/
    width: 1px;
    height: 1px;
    box-sizing: border-box;
    /*background-color: rgba(255,255,255,.5);*/
    margin: -1px 0 0 -1px;
    -webkit-transition: width 0.4s ease-out, height 0.6s ease-in;
    transition: width 0.4s ease-out, height 0.6s ease-in;
    opacity: 0;
    position: absolute;
    left: 0;
    top: 0;
}

.round-feedback {
    display: none;
    font-size: 16px;
    width: 500px;
    text-align: center;
    position: absolute;
    top: 130px;
    left: 50%;
    padding: 20px;
    margin-left: -250px;
    z-index: 60;
    box-sizing: border-box;
    cursor: auto;
}

.unicorn {
    display: none;
    margin: -240px 0 13px;
    position: relative;
    z-index: 120;
}

#round-feedback-message {
    font-size: 48px;
    font-style: italic;
    font-weight: bold;
    line-height: normal;
    color: #f26d7d;
    margin-bottom: 4px;
}

.round-score {
    font-size: 24px;
    margin-bottom: 13px;
}

.round-width-height-copy {
/*    margin-bottom: 10px;*/
}

.round-width-height-copy .value {
    font-size: 16px;
}

.round-width-copy {
    margin-right: 25px;
}

.round-width-score, .round-height-score {
    color: #f26d7d;
}

.round-accuracy {
    margin-top: 10px;
    display: none;
}

.round-accuracy .value {
    font-size: 16px;
}

.canvas-button {
    display: none;
    margin-top: 34px;
}




/***
*
* FINAL RESULTS **
*
***/

#results {
    margin: -31px auto 70px;
    width: 960px;
    text-align: center;
    display: none;
}

#results .score-info {
    margin: 0 auto 0;
    text-align: center;
}

#results .total-score-title {
    font-size: 24px;
    text-align: center;
}

#results .total-score-readout {
    font-size: 72px;
    margin-top: 15px;
    line-height: normal;
    color: #f26d7d;
    font-weight: bold;
    font-style: italic;
    text-align: center;
}

#results .total-accuracy-readout {
    margin-top: -4px;
    font-size: 16px;
    display: none;
}

#results .total-accuracy-readout .value {
    font-size: inherit;
    color: #f26d7d;
}

#results .scores-readout {
    list-style: none;
    margin-top: 27px;
/*    width: 700px;*/
    display: inline-block;
    overflow: hidden;
}

#results .scores-readout li {
    font-size: 16px;
    line-height: 26px;
    margin: 0 17px;
    display: inline-block;
    white-space: nowrap;
}

#results .scores-readout li .value {
    font-size: 16px;
    color: #f26d7d;
    padding-left: 5px;
}
#results .scores-readout li .value.tight {
    padding: 0;
}

#results .score-record {
    font-size: 16px;
    line-height: 26px;
    margin: 10px 0 0;
}

#results .score-record .value {
    font-size: 16px;
    color: #f26d7d;
}
#results .score-details {
    margin: 22px 0 55px;
    line-height: 18px;
}

#results .score-details .value-label {
    color: #666;
    font-weight: bold;
}

#results .score-details .value {
    font-size: 16px;
    color: #f26d7d;
}

.sociall-wrapper {
    margin: 60px 0 100px;
    padding-bottom: 53px;
    border-bottom: 1px solid #f5f4f0;
}

.sociall-wrapper p {
    font-size: 24px;
    text-align: center;
}

.sociall-wrapper .socialize {
    text-align: center;
    margin-top: 37px;
}

.sociall-wrapper .socialize .sociall-button {
    display: inline-block !important;
    width: 40px;
    height: 40px;
    background: transparent no-repeat top left;
    font-size: 1px;
    text-indent: -100px;
    overflow: hidden;
}

.sociall-wrapper .socialize .sociall-button.tweett-button {
    background-image: url(../img/tweet.gif);
    margin-right: 25px;
}

.sociall-wrapper .socialize .sociall-button.fbb-button {
    background-image: url(../img/fbb.gif);
}




/***
*
* RESTART **
*
***/

#restart-confirm {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 100;
}

#restart-confirm p {
    font-size: 48px;
    font-style: italic;
    font-weight: bold;
    line-height: normal;
    color: #f26d7d;
    text-align: center;
    margin-top: 183px;
}

#restart-confirm .restart-button {
    display: block;
    width: 200px;
    margin: 20px auto 0;
}
#restart-confirm .restart-button#restart-yes {
    margin-top: 47px;
}

.ad-wrapper {
    margin: 40px 0 -41px;
}

.ad-landing {
    margin-top: 40px;
}


/***
*
* FOOTER **
*
***/

footer {
    bottom: 15px;
    width: 100%;
    line-height: 16px;
    text-align: center;
    position: fixed;
    z-index: -1;
}

.version {
    margin-left: 12px;
}

#feedback {
    background-color: #ffc;
    border: 1px solid #ccc;
    padding: 2px 5px;
    border-radius: 2px;
    font-size: 10px;
    white-space: nowrap;
    position: absolute;
    z-index: 200;
    display: none;
}


/***
*
* TABLET **
*
***/

@media only screen and (max-width : 959px) {
    
    html.mobi {
        min-width: 0;
    }
    
    #mobile-inter {
        width: 100%;
        border-top: 5px solid #f26d7d;
        padding: 250px 30px 0;
        text-align: center;
        box-sizing: border-box;
        display: block;
        position: absolute;
    }
    
    .mobi #hud, .mobi #intro, .mobi footer {
        display: none;
    }
    
    .mobi .logo {
        display: none;
    }
    
    .mobi .logo.mobi-inter {
        width: 120px;
        margin-left: -60px;
        display: block;
        position: fixed;
        top: auto;
        bottom: 23px;
        left: 50%;
    }
    
    .mobi p {
        font-size: 16px;
        line-height: 24px;
        text-align: center;
        width: 440px;
        margin: 0 auto;
    }
    
    .mobi p.mobi-title {
        font-size: 48px;
        font-style: italic;
        font-weight: bold;
        line-height: 92px;
        color: #f26d7d;
        margin: 0 auto;
    }
    
    #mobi-close {
        margin-top: 48px;
    }
    
}

@media only screen and (max-width : 959px) and (orientation : landscape) {
    
    #mobile-inter {
        padding-top: 150px;
    }
    
}




/***
*
* MOBILE **
*
***/

@media only screen and (max-width : 640px) {
    
    #mobile-inter {
        width: auto;
        padding: 0 30px;
        position: absolute;
    }
    
    .mobi p {
        font-size: 16px;
        line-height: 24px;
        width: auto;
        margin: 0;
    }
    
    .mobi p.mobi-title {
        font-size: 48px;
        line-height: 92px;
        margin: 30px 0 0;
    }
    
    #mobi-close {
        margin-top: 48px;
    }
    
}

@media only screen and (max-width : 640px) and (orientation : landscape) {
    
    #mobi-close {
        margin-top: 15px;
    }
    
    .mobi p.mobi-title {
        line-height: 80px;
        color: #f26d7d;
        margin: 5px 0 0;
    }
    
    .mobi p.mobi-title {
        line-height: 80px;
        color: #f26d7d;
        margin: 5px 0 0;
    }
    
    .mobi .logo.mobi-inter {
        bottom: 10px;
    }
    
}















