
* {
    padding: 0;
    margin: 0;
}

body{
    height: 100vh;
    background: #584040;
    display: flex;
    align-items: center;
}

.contenedor {
    width: 960px;
    height: 360px;
    margin: 0 auto;
    
    position: relative;

    background: linear-gradient(#b7d6c7 0%, transparent 60%, transparent 80%,  #6d757e 100%) #ffe2d1;/*linear-gradient(#90ebff, white);*/
    transition: background-color 1s linear;
    overflow: hidden;
}

.mediodia {
    background-color: #ffdcf3;
}

.tarde {
    background-color: #ffadad;
}

.noche {
    background-color: #aca8c7;
}

.dino {
    width: 84px;
    height: 84px;

    position: absolute;
    bottom: 50px;
    left: 42px;
    z-index: 2;

    background: url(../img/dino.png) repeat-x 0px 0px;
    background-size: 336px 84px;
    background-position-x: 0px;

}

.dino-corriendo {
    animation: animarDino 0.25s steps(2) infinite;
}
.dino-estrellado {
    background-position-x: -252px;
}

.suelo {
    width: 200%;
    height: 130px;

    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 3;

    background: url(../img/mar.png) repeat-x 0px 0px;
    background-size: 48px 258px;
    animation: oleaje 1.5s ease-in-out infinite;

}

.obstaculo{
    width: 48px;
    height: 48px;

    position: absolute;
    left: 600px;
    z-index: 1;

}
.obstaculo-flotante{
    bottom: 90px;
    background: url(../img/obstaculo2.png)  no-repeat;
    animation: abanear 1s ease-in-out infinite;
}

.obstaculo-hundido{
    bottom: 0px;
    background: url(../img/obstaculo1.png)  no-repeat;
}

.nube{
    width: 92px;
    height: 26px;

    position: absolute;
    z-index: 0;

    background: url(../img/nube.png) no-repeat;
    background-size: 92px 26px;
}

.moneda{
    width: 48px;
    height: 48px;
    position: absolute;
    z-index: 1;
    
    background: url(../img/moneda.png) no-repeat center center;
}

.score-text {
    width: 100px;
    height: 30px;

    position: absolute;
    top: 5px;
    right: 70px;
    z-index: 10;

    color: #d48871;
    font-family: Verdana;
    font-size: 30px;
    font-weight: bold;
    text-align: right;
}

.score{
    width: 100px;
    height: 30px;

    position: absolute;
    top: 5px;
    right: 15px;
    z-index: 10;

    color: #d48871;
    font-family: Verdana;
    font-size: 30px;
    font-weight: bold;
    text-align: right;
}

.game-over{
    display: none;

    width: 100%;
    position: absolute;
    z-index: 10;


    text-align: center;
    color: #7e928b;
    font-size: 30px;
    font-family: Verdana;
    font-weight: 700;
}

@keyframes animarDino{
    from{
        background-position-x: -84px;
    }
    to{
        background-position-x: -252px;
    }
}

@keyframes abanear{
    0%,100%{
        bottom: 90px;
    }
    50%{
        bottom: 84px;
    }
}

@keyframes oleaje{
    0%,100%{
        bottom: 0px;
    }
    50%{
        bottom: -10px;
    }
}
