/* Final CSS Animation Project HTTP 5104 */

/* Generic Styling */
html {
    background-color: #87ceeb;
    font-family: arial;
    font-size: 16px;
}

.main {
    text-align: center;
    margin: auto;
    position: relative;
}

h2 {
    font-size: 1.2em;
}
#instructions {
    width: 60%;
    border: solid;
    background-color: #fff;
    margin: auto;
    margin-top: 2em;
    padding: 1em;
    border-color: #c32126;
}
#background-wrap {
    bottom: 0;
    left: 0;
    padding-top: 5em;
    position: fixed;
    right: 0;
    top: 0;
    z-index: -1;
}
.hidden {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
}
#ok {
    cursor: pointer;
    padding: 0.7em;
    background-color: #c32126;
    border: none;
    color: #fff;
    width: 6em;
}
/* Control Buttons Styling */
.buttons {
    margin: 1em 1em;
    position: fixed;
    bottom: 4em;
    left: 0;
}
.buttons > * {
    margin-right: 0.5em;
    margin-top: 0.5em;
}
.extrabuttons {
    margin: 1em 1em;
    position: fixed;
    bottom: 4em;
    right: 0;
}
.extrabuttons > * {
    margin-right: 0.5em;
    margin-top: 0.5em;
}
#flyaway {
    cursor: pointer;
    padding: 0.7em;
    background-color: #c32126;
    width: 6em;
    color: #fff;
    text-align: center;
    height: 1em;
    display: none;
}
#flyup {
    cursor: pointer;
    padding: 0.7em;
    background-color: #c32126;
    width: 6em;
    color: #fff;
    text-align: center;
    height: 1em;
    display: none;
}
#land {
    cursor: pointer;
    padding: 0.7em;
    background-color: #c32126;
    width: 6em;
    color: #fff;
    text-align: center;
    height: 1em;
    display: none;
}
#suck {
    cursor: pointer;
    padding: 0.7em;
    background-color: #c32126;
    width: 6em;
    color: #fff;
    text-align: center;
    height: 1em;
    display: none;
}
#drop {
    cursor: pointer;
    padding: 0.7em;
    background-color: #c32126;
    width: 6em;
    color: #fff;
    text-align: center;
    height: 1em;
    display: none;
}
#spaceship {
    position: fixed;
    bottom: 3em;
    margin-bottom: 50em;
    margin-left: -25em;
    -webkit-transition: 5s;
    transition: 5s;
    z-index: -1;
}

.simpson {
    width: auto;
    height: 8em;
    margin-left: 39em;
    margin-bottom: 4em;
    bottom: 0;
    z-index: -5;
    position: fixed;
    -webkit-transition: 5s;
    transition: 5s;
}

#rays {
    z-index: -10;
    margin-top: 20em;
    margin-left: 30em;
    position: fixed;
    bottom: 3em;
    display: none;
    -webkit-transition: 5s;
    transition: 5s;
}

/* Cloud Animations */

@-webkit-keyframes animateCloud {
    0% {
        margin-left: -60em;
    }
    100% {
        margin-left: 100%;
    }
}

@-moz-keyframes animateCloud {
    0% {
        margin-left: -60em;
    }
    100% {
        margin-left: 100%;
    }
}

@keyframes animateCloud {
    0% {
        margin-left: -60em;
    }
    100% {
        margin-left: 100%;
    }
}

.x1 {
    -webkit-animation: animateCloud 35s linear infinite;
    -moz-animation: animateCloud 35s linear infinite;
    animation: animateCloud 35s linear infinite;
    -webkit-transform: scale(0.65);
    -moz-transform: scale(0.65);
    transform: scale(0.65);
}

.x2 {
    -webkit-animation: animateCloud 25s linear infinite;
    -moz-animation: animateCloud 25s linear infinite;
    animation: animateCloud 25s linear infinite;
    -webkit-transform: scale(0.5);
    -moz-transform: scale(0.5);
    transform: scale(0.5);
}

.x3 {
    -webkit-animation: animateCloud 30s linear infinite;
    -moz-animation: animateCloud 30s linear infinite;
    animation: animateCloud 30s linear infinite;
    -webkit-transform: scale(0.4);
    -moz-transform: scale(0.4);
    transform: scale(0.4);
}

.cloud {
    background: #fff;
    background: -moz-linear-gradient(top, #fff 5%, #f1f1f1 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(5%, #fff), color-stop(100%, #f1f1f1));
    background: -webkit-linear-gradient(top, #fff 5%, #f1f1f1 100%);
    background: -o-linear-gradient(top, #fff 5%, #f1f1f1 100%);
    background: -ms-linear-gradient(top, #fff 5%, #f1f1f1 100%);
    background: linear-gradient(top, #fff 5%, #f1f1f1 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fff', endColorstr='#f1f1f1',GradientType=0 );
    -webkit-border-radius: 6.25em;
    -moz-border-radius: 6.25em;
    border-radius: 6.25em;
    -webkit-box-shadow: 0 8px 5px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 8px 5px rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 5px rgba(0, 0, 0, 0.1);
    height: 7.5em;
    position: relative;
    width: 22em;
}

.cloud:after,
.cloud:before {
    background: #fff;
    content: "";
    position: absolute;
    z-index: -1;
}

.cloud:after {
    -webkit-border-radius: 6.25em;
    -moz-border-radius: 6.25em;
    border-radius: 6.25em;
    height: 6.25em;
    left: 3em;
    top: -3em;
    width: 6.25em;
}

.cloud:before {
    -webkit-border-radius: 12.5em;
    -moz-border-radius: 12.5em;
    border-radius: 12.5em;
    width: 11.25em;
    height: 11.25em;
    right: 3em;
    top: -5.5em;
}

/* Sun */
#sun {
    animation: sunFire 4s infinite alternate;
    position: absolute;
    top: 20%;
    left: 80%;
    z-index: -2;
    height: 10em;
    width: 10em;
    margin-top: -3em;
    border-radius: 100%;
    background: orange;
    background: -webkit-radial-gradient(#fdb813, yellow);
    background: -moz-radial-gradient (#fdb813, yellow);
    background: -o-radial-gradient(#fdb813, yellow);
    background: radial-gradient(#fdb813, yellow);
    box-shadow: 0 0 3em #f5c91a;
}

/* Footer */
.footer {
    clear: both;
    font-size: 0.9em;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    background-color: green;
    color: #fff;
    padding: 0.5em 1em;
    line-height: 0.5em;
    z-index: -6;
}



@media screen and (max-width: 935px) {

.simpson {
    margin-left: 39em;   
}
}

@media screen and (max-width: 850px) {
#instructions{
    margin-top: 7em;
}
.simpson {
    margin-left: 31em;
}
#rays {
    z-index: -10;
    margin-top: 20em;
    margin-left: 22em;
    position: fixed;
    bottom: 3em;
    display: none;
    -webkit-transition: 5s;
    transition: 5s;
}
}

@media screen and (max-width: 790px) {

#instructions{
    margin-top: 7em;
}
.simpson {
    margin-left: 25em;
}
#rays {
    z-index: -10;
    margin-top: 20em;
    margin-left: 16em;
    position: fixed;
    bottom: 3em;
    display: none;
    -webkit-transition: 5s;
    transition: 5s;
}
}

@media screen and (max-width: 550px) {
.main {
margin-right: -3em;
}
#instructions{
    margin-top: 7em;
}
.simpson {
    margin-left: 21em;
}
#rays {
    z-index: -10;
    margin-top: 20em;
    margin-left: 12em;
    position: fixed;
    bottom: 3em;
    display: none;
    -webkit-transition: 5s;
    transition: 5s;
}
}

@media screen and (max-width: 480px) {
.main {
margin-right: -4em;
}
#instructions{
    margin-top: 7em;
}
.simpson {
    margin-left: 18em;
}
#rays {
    z-index: -10;
    margin-top: 20em;
    margin-left: 9em;
    position: fixed;
    bottom: 3em;
    display: none;
    -webkit-transition: 5s;
    transition: 5s;
}
.footer {
    font-size: 0.85em;
    padding: 0.7em 1em;
    }
}

@media screen and (max-width: 420px) {
.main {
margin-right: -5em;
}
#instructions{
    margin-top: 7em;
}
.simpson {
    margin-left: 15em;
}
#rays {
    z-index: -10;
    margin-top: 20em;
    margin-left: 6.5em;
    position: fixed;
    bottom: 3em;
    display: none;
    -webkit-transition: 5s;
    transition: 5s;
}
.footer {
    font-size: 0.8em;
    padding: 0.85em 0.2em;
    }
}

@media screen and (max-width: 320px) {
.main {
margin-right: -6em;
}
#instructions{
    margin-top: 5em;
}
.simpson {
    margin-left: 12em;
}
#rays {
    z-index: -10;
    margin-top: 20em;
    margin-left: 3em;
    position: fixed;
    bottom: 3em;
    display: none;
    -webkit-transition: 5s;
    transition: 5s;
}
.footer {
    font-size: 0.7em;
    padding: 1.4em 0.1em;
    }
}