body {
    background: url(../pics/outerspace-55.gif) no-repeat;
    background-size: cover;
    width: auto;
    height: auto;
}

h3 {
    color: rgb(173, 157, 215);
    color: #70869d;
    letter-spacing: .15em;
    text-shadow: 
      -1px -1px 1px #efede3, 
      0px 1px 0 #2e2e2e, 
      0px 2px 0 #2c2c2c, 
      0px 3px 0 #2a2a2a, 
      0px 4px 0 #282828, 
      0px 5px 0 #262626, 
      0px 6px 0 #242424, 
      0px 7px 0 #222, 
      0px 8px 0 #202020, 
      0px 9px 0 #1e1e1e, 
      0px 10px 0 #1c1c1c, 
      0px 11px 0 #1a1a1a, 
      0px 12px 0 #181818, 
      0px 13px 0 #161616, 
      0px 14px 0 #141414, 
      0px 15px 0 #121212,
      2px 20px 5px rgba(0, 0, 0, 0.9),
      5px 23px 5px rgba(0, 0, 0, 0.3),
      8px 27px 8px rgba(0, 0, 0, 0.5),
      8px 28px 35px rgba(0, 0, 0, 0.9);
    font-family: 'Londrina Shadow', cursive;
    font-size: 200px;
    text-align: center;
    animation: ufoAnimation 3s infinite;
}

.gameOver {
    color: #1BFD9C;
    font-family: 'Londrina Shadow', cursive;
    font-size: 120px;
    margin: 200px auto;
    text-align: center;
    letter-spacing: 1.1em;
    position: relative;
    line-height: 1.5em;
    display: none;
    animation: gameOverAnimation 4s infinite;
   }

   .youWin {
    color: #1BFD9C;
    font-family: 'Londrina Shadow', cursive;
    font-size: 120px;
    margin: 200px auto;
    text-align: center;
    letter-spacing: 1.1em;
    position: relative;
    line-height: 1.5em;
    display: none;
    animation: gameOverAnimation 4s infinite;
   }

#buttons {
    margin: auto;
    top: 50%;
}

button {
    --green: #1BFD9C;
    font-size: 20px;
    padding: 0.7em 2.7em;
    letter-spacing: 0.06em;
    position: relative;
    font-family: 'Londrina Shadow', cursive;
    border-radius: 0.6em;
    overflow: hidden;
    transition: all 0.3s;
    line-height: 1.4em;
    border: 2px solid var(--green);
    background: linear-gradient(to right, rgba(27, 253, 156, 0.1) 1%, transparent 40%,transparent 60% , rgba(27, 253, 156, 0.1) 100%);
    color: var(--green);
    box-shadow: inset 0 0 10px rgba(27, 253, 156, 0.4), 0 0 9px 3px rgba(27, 253, 156, 0.1);
    cursor: pointer;
   }
   
   button:hover {
    color: #82ffc9;
    box-shadow: inset 0 0 10px rgba(27, 253, 156, 0.6), 0 0 9px 3px rgba(27, 253, 156, 0.2);
   }
   
   button:before {
    content: "";
    position: absolute;
    left: -4em;
    width: 4em;
    height: 100%;
    top: 0;
    transition: transform .4s ease-in-out;
    background: linear-gradient(to right, transparent 1%, rgba(27, 253, 156, 0.1) 40%,rgba(27, 253, 156, 0.1) 60% , transparent 100%);
   }
   
   button:hover:before {
    transform: translateX(15em);
   }

#game {
    margin: auto;
    background: url(../pics/spaceback.jpg);
    animation: animateBack 3s steps(100) infinite;
    border-radius: 30px;
    border: linear-gradient(145deg, #796487, #665471);
    box-shadow:  23px 23px 43px #2e2634,
                 -23px -23px 43px #b494c8;
    width: 1000px;
    height: 670px;
    overflow: hidden;
    position: relative;
    display: none;
}

.score {
    position: fixed;
    margin: 100px;
    display: none;
    font-size: 36px;
    animation: none;
}
.ufoShot {
    position: fixed;
    margin: 145px;
    display: none;
    font-size: 36px;
    animation: none;
}

#char {
    position: absolute;
    bottom: 110px;
    height: 170px;
    width: calc(790px / 6);
    background: url(../pics/run.png);
    left: 100px;
    animation: animateChar 1s steps(6) infinite;
}

.ufo {
    position: absolute;
    bottom: 240px;
    height: 60px;
    width: 100px;
    animation: ufoAnimation 1s infinite;
 }


#rock {
    width: calc(500px / 4);
    height: 100px;
    position: absolute;
    bottom: 110px;
    left: -10%;
    background: url(../pics/rock.png);
    animation: animateRock 1s steps(8) infinite,
               rockAnimation 10s both infinite;
}

.bullet {
    width: 60px;
    height: 60px;
    position: absolute;
}

.back {
    position:fixed;
    top: 10%;
    right: 10%;
    display: none;
}

#htp {
    margin: 200px auto;
    text-align: center;
    position: relative;
    display: none;
}

.restart {
    display: none;
    margin: 100px auto;
    text-align: center;
}


@keyframes animateChar
{
    from
    {background-position: 0;}
    to {background-position: 830px};
}

@keyframes animateRock
{
    from
    {background-position: 0;}
    to {background-position: 1000px};
}

@keyframes animateUfo
{
    from
    {background-position: 0;}
    to {background-position: 640px};
}

@keyframes animateBack
{
    from
    {background-position: 0;}
    to {background-position: -1000px};
}


@keyframes rockAnimation {
    0% {left: 1000px}
    100% {left: -1000px;}    
}

@keyframes ufoAnimation {
    0% {transform:translateX(10px);}
    25% {transform:translateY(-10px);}
    50% {transform:translateY(10px);}
    100% {transform:translateX(10px);}
}

@keyframes gameOverAnimation {
    0% {transform:translateX(80px);}
    25% {transform:translateY(25px);}
    50% {transform:translateY(50px);}
    100% {transform:translateX(80px);}
}
