@charset "UTF-8";

@font-face {
    font-family:"Raleway";
    font-weight:100;
    src:url('../fonts/Raleway-Thin.ttf');
}
@font-face {
    font-family:"Raleway";
    font-weight:200;
    src:url('../fonts/Raleway-ExtraLight.ttf');
}
@font-face {
    font-family:"Raleway";
    font-weight:400;
    src:url('../fonts/Raleway-Regular.ttf');
}
@font-face {
    font-family:"Raleway";
    font-weight:700;
    src:url('../fonts/Raleway-Bold.ttf');
}

* {
    margin:0;
    padding:0;
    border:none;
    font-size:small;
}
*:not(input,textarea) {
    -webkit-touch-callout:none;
    -moz-user-select:none;
    -webkit-user-select:none;
    -ms-user-select:none;
    user-select:none;
}

html,
body {
    width:100%;
    height:100%;
    font-family:"Raleway";
    font-weight:700;
    color:#fff;
    overflow:hidden;
}
#canvas {
    position:absolute;
    top:100%;
    right:0;
    bottom:0;
    left:0;
    overflow:hidden;
}
#canvas.animate {
    top:0%;
    animation: snap-up-on 1600ms;
}
#background-intro {
    position:absolute;
    z-index:0;
    top:0%;
    width:100%;
    height:100%;
    background-image:url('../images/background-intro.png');
    background-repeat:repeat-x;
    background-size:auto 100%;
    background-position:bottom;
}
#background-intro.animate {
    top:-100%;
    animation: snap-up-off 1600ms;
}

#title {
    position:absolute;
    z-index:10;
    top:0%;
    left:50%;
    width:640px;
    height:531px;
    margin-left:-320px;
    background-image:url('../images/hangry-shark.png');
    background-repeat:no-repeat;
    background-size:100% auto;
    background-position:top;
}
#title.animate {
    top:100%;
    animation: snap-up-off 300ms;
}

#mode {
    position:absolute;
    z-index:20;
    top:50%;
    left:50%;
    display:block;
    width:300px;
    transform:translateX(-50%);
}
#mode.animate {
    display:none;
}
#mode .radio-label {
    display:block;
    float:left;
    width:50%;
    text-align:center;
}
#mode .radio-field {
    position:absolute;
    left:-9999px;
    display:block;
}
#mode .radio-text {
    box-sizing:border-box;
    padding:2rem;
    display:block;
    font-size:20px;
    text-transform:uppercase;
    background-color:#006dba;
    transition:background-color 300ms, box-shadow 300ms;
}
#mode .radio-label:first-of-type .radio-text {
    border-radius:5px 0 0 5px;
}
#mode .radio-label:last-of-type .radio-text {
    border-radius:0 5px 5px 0;
}
#mode .radio-field:checked ~ .radio-text {
    background-color:#014c82;
    box-shadow:0 0 10px 0 rgba(0, 0, 0, 0.3) inset;
}
#mode .radio-text:hover,
#mode .radio-text:focus {
    cursor:pointer;
    background-color:#0088e8;
    box-shadow:0 0 10px 0 rgba(0, 0, 0, 0.2);
}

#play {
    position:absolute;
    z-index:30;
    left:50%;
    width:261px;
    height:219px;
    margin-left:-130px;
    background-image:url('../images/button-play.png');
    background-repeat:no-repeat;
    background-size:100% auto;
    background-position:top;
    cursor:pointer;
}
#play.initial {
    top:75%;
    animation: play-on 1600ms, oscillate-vertical 1600ms infinite;
}
#play.animate {
    top:100%;
    animation: play-off 300ms;
}

#age-container {
    position:absolute;
    top:20px;
    left:20px;
    width:200px;
    height:26px;
    border:2px solid #2c235f;
    border-radius:3px;
}
#age-container.initial {
    left:-250px;
}
#age-container.animate {
    left:20px;
    animation: health-age-on 2400ms;
}
#age {
    position:absolute;
    z-index:1;
    left:23px;
    top:-7px;
    width:53px;
    height:41px;
    background-image:url('../images/ui-age-background.png');
    font-size:26px;
    line-height:41px;
    text-align:center;
}
#age-bar {
    position:absolute;
    left:0;
    top:0;
    width:100%;
    height:100%;
    background-color:#4e4386;
    font-size:18px;
    line-height:26px;
    text-indent:83px;
}

#health-container {
    position:absolute;
    top:76px;
    width:200px;
    height:26px;
    border:2px solid #5d0101;
    border-radius:3px;
}
#health-container.initial {
    left:-250px;
}
#health-container.animate {
    left:20px;
    animation: health-age-on 2400ms;
}
#health {
    position:absolute;
    z-index:1;
    left:20px;
    top:-14px;
    width:59px;
    height:58px;
    background-image:url('../images/ui-health-background.png');
    font-size:26px;
    line-height:54px;
    text-align:center;

}
#health-bar {
    position:absolute;
    left:0;
    top:0;
    border-radius:1px;
    width:100%;
    height:100%;
    background-color:#ba3838;
}

#timer {
    position:absolute;
    top:40px;
    left:50%;
    left:calc(50% - 100px);
    width:200px;
    height:100px;
    font-size:48px;
    text-align:center;
    line-height:54px;
    color:#fff;
}

#score {
    position:absolute;
    z-index:40;
    top:20px;
    width:250px;
    height:54px;
    line-height:54px;
    font-size:36px;
    text-align:right;
    padding-right:10px;
    text-transform:uppercase;
    border:2px solid #ffb430;
    border-radius:3px;
    background-color:rgba(255,240,128, 0.3);
}
#score.initial {
    right:-300px;
}
#score.animate {
    right:20px;
    animation: score-on 2400ms;
}

#stats {
    position:absolute;
    z-index:40;
    left:10%;
    right:10%;
    text-align:center;
    border:10px solid rgba(255, 255, 255, 0.4);
    border-radius:20px;
    overflow:hidden;
}
#stats.initial {
    top:-85%;
    bottom:100%;
    animation: stats-off 300ms;
}
#stats.animate {
    top:15%;
    animation: stats-on 300ms;
}
#stats #button-score,
#stats #button-high-score,
#stats #button-leaderboard {
    float:left;
    width:31.333333%;
    margin:1%;
    font-size:22px;
    line-height:80px;
    border-radius:10px;
    background-color:#006dba;
}
#stats #stats-score,
#stats #stats-high-score,
#stats #stats-leaderboard {
    position:absolute;
    width:100%;
    top:100px;
    overflow-y:auto;
}
#stats #stats-score.active {
    left:0%;
    animation: stats-left-on 300ms;
}
#stats #stats-score.inactive {
    left:-100%;
    animation: stats-left-off 300ms;
}
#stats #stats-high-score.active-left {
    left:0%;
    animation: stats-left-on 300ms;
}
#stats #stats-high-score.inactive-left {
    left:-100%;
    animation: stats-left-off 300ms;
}
#stats #stats-high-score.active-right {
    left:0%;
    animation: stats-right-on 300ms;
}
#stats #stats-high-score.inactive-right {
    left:100%;
    animation: stats-right-off 300ms;
}
#stats #stats-leaderboard.active {
    left:0%;
    animation: stats-right-on 300ms;
}
#stats #stats-leaderboard.inactive {
    left:100%;
    animation: stats-right-off 300ms;
}
#stats table {
    width:100%;
    clear:both;
}
#stats tr:nth-child(2n) {
    background-color:rgba(255, 255, 255, 0.2);
}
#stats td.stats-label {
    text-align:right;
    white-space:normal;
    font-size:18px;
    color:#fff;
}
#stats td {
    font-size:28px;
    line-height:1.5;
    white-space:nowrap;
    padding-left:1em;
    padding-right:1em;
    text-align:left;
}
#stats #stats-table td.high-score {
    color:#ffce41;
}
#stats #stats-alltime-table td {
    color:#ffce41;
}
#stats-leaderboard p {
    font-size:24px;
    margin-top:48px;
}
#stats-leaderboard label {
    padding:10px;
    font-size:24px;
}
#stats-leaderboard input[type="text"] {
    padding:20px;
    margin:20px;
    font-size:24px;
    border:2px solid #006dba;
    border-radius:10px;
}
#stats-leaderboard input[type="submit"] {
    padding:20px;
    margin:20px;
    font-size:24px;
    background-color:#006dba;
    border-radius:10px;
    color:#fff;
}

#splash {
    position:absolute;
    left:0%;
    z-index:1000;
    width:100%;
    height:100%;
    background-color:#121212;
    opacity:1;
}
#splash.animate {
    opacity:0;
    left:-100%;
    animation: splash-off 2400ms;
    animation-fill-mode:both;
}
#splash-logo {
    position:absolute;
    top:50%;
    left:50%;
    padding:1rem;
    display:block;
    color:transparent;
    font-size:3rem;
    font-weight:200;
    background:linear-gradient(#3cd7ed, #006dba);
    -webkit-background-clip:text;
    background-clip:text;
    transform:translateX(-50%);
}
#orientation-warning {
    position:absolute;
    z-index:100;
    display:none;
    width:100%;
    height:100%;
    font-size:60px;
    text-align:center;
    background-color:rgba(255, 255, 255, 1);
    color:#3388cc;
    padding-top:25%;
}

@keyframes oscillate-vertical {
    0% {margin-top:0px;}
    50% {margin-top:40px;}
    100% {margin-top:0px;}
}
@keyframes snap-up-off {
    0% {top:0%;}
    100% {top:-100%;}
}
@keyframes snap-up-on {
    0% {top:100%;}
    100% {top:0%;}
}
@keyframes play-on {
    0% {top:100%;}
    75% {top:100%;}
    100% {top:75%;}
}
@keyframes play-off {
    0% {top:75%;}
    100% {top:100%;}
}
@keyframes health-age-on {
    0% {left:-250px;}
    75% {left:-250px;}
    76% {left:20px;}
    100% {left:20px;}
}
@keyframes score-on {
    0% {right:-300px;}
    75% {right:-300px;}
    76% {right:20px;}
    100% {right:20px;}
}
@keyframes stats-on {
    0% {top:-855%;}
    100% {top:15%;}
}
@keyframes stats-off {
    0% {top:15%;}
    100% {top:-85%;}
}
@keyframes stats-left-off {
    0% {left:0%;}
    100% {left:-100%;}
}
@keyframes stats-left-on {
    0% {left:-100%;}
    100% {left:0%;}
}
@keyframes stats-right-off {
    0% {left:0%;}
    100% {left:100%;}
}
@keyframes stats-right-on {
    0% {left:100%;}
    100% {left:0%;}
}
@keyframes splash-off {
    0% {opacity:1; left:0%;}
    75% {opacity:1; left:0%;}
    99% {opacity:0; left:0%;}
    100% {opacity:0; left:-100%;}
}

/* iPhone 4 and 4s */
@media (device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 2) {
    #stats td {
        line-height:1.4;
    }
}
@media (orientation: landscape) {
    #orientation-warning {
        /* display:block; */
    }
}
