* {
    font-family: calibri, Verdana, Verdana, Geneva, sans-serif;
    font-weight: lighter;
    touch-action: manipulation;
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
    /* IE 10 and IE 11 */
    user-select: none;
    /* Standard syntax */
}

html {

    /*overflow: hidden;*/
    touch-action: manipulation;
    height: 100vh;
    width: 100%;
    top: 0px;
    left: 0px;
    

}

body {
    background: #000;
    position: relative;
    padding: 0;
    width: 100vw;
    height: 100%;
    top: 0px;
    margin: 0px;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1px;
    touch-action: manipulation;
    min-height: 667px;
    min-width: 375px;
    transform: translateZ(0);


}

@media (orientation: landscape) and (max-width: 701px) {
    body {
        transform: rotate(90deg);
        min-height: 100vw;
        max-width: 100vh;
        transform-origin: 50vw 50vw;
        min-width: 100vh;
        width: 100vw;
    }

    body footer {
        max-width: 100vh;
    }

    #deco {

        max-width: 100vh;
    }
}

body.r640x480:before,
body.r1024x768:before {
    height: inherit;
    width: inherit;
    content: "";
    position: absolute;
    box-shadow: 0 0 0 2000px #000;
    z-index: 123;
}

body.level-1 {
    background: #7ef08d;
}

body.level-2 {
    background: #ff52a3;
}

body.level-3 {
    background: #1987c7;
}

body.level-4 {
    background: #0da326;
}

body.level-5 {
    background: #a30d0d;
}

@keyframes spin {

    0%,
    100% {
        box-shadow: .2em 0px 0 0px currentcolor;
    }

    12% {
        box-shadow: .2em .2em 0 0 currentcolor;
    }

    25% {
        box-shadow: 0 .2em 0 0px currentcolor;
    }

    37% {
        box-shadow: -.2em .2em 0 0 currentcolor;
    }

    50% {
        box-shadow: -.2em 0 0 0 currentcolor;
    }

    62% {
        box-shadow: -.2em -.2em 0 0 currentcolor;
    }

    75% {
        box-shadow: 0px -.2em 0 0 currentcolor;
    }

    87% {
        box-shadow: .2em -.2em 0 0 currentcolor;
    }
}

#loading {
    position: absolute;
    height: 70px;
    width: 70px;
    background: #000;
    z-index: 1234567;
    top: 50%;
    left: 50%;
    margin: -35px;
    text-align: center;
    box-shadow: 0 0 0 2000px;
    transition-property: all;
    transition-duration: 1s;
    opacity: 1;
}

#loading::before {
    content: "LOADING";
    position: absolute;
    width: 70px;
    height: 70px;
    text-align: center;
    color: #fff;
    left: 0;
    margin-top: -25px;
}

#loading.hidden {
    opacity: 0;
    z-index: 0;
}

.loader {
    transform: rotateZ(45deg);
    perspective: 1000px;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: block;
    color: #fff;
}

.loader:before,
.loader:after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: inherit;
    height: inherit;
    border-radius: 50%;
    transform: rotateX(70deg);
    animation: 1s spin linear infinite;
}

.loader:after {
    color: #00aaff;
    transform: rotateY(70deg);
    animation-delay: .4s;
}


#deco {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    overflow: hidden;
    left: 0;
}

#deco div {
    height: 70px;
    width: 100%;
    transform-origin: 50% 50%;
    transform: rotate(-45deg);
    position: absolute;
    width: 200vw;
    left: 50%;
    margin-left: -100vw;
    background: rgb(1, 0, 36);
    background: linear-gradient(90deg, rgba(1, 0, 36, 1) 0%, rgba(112, 4, 182, 1) 9%, rgba(3, 3, 73, 1) 35%, rgba(12, 49, 84, 1) 76%, rgba(6, 137, 163, 1) 100%);
}

#deco div:nth-child(1) {
    top: 85vh;

}

#deco div:nth-child(2) {
    top: 65vh;

}

#deco div:nth-child(3) {
    top: 45vh;

}

#deco.game div {
    opacity: .6;
    z-index: 3;
}


#spaceship {
    position: fixed;
    height: 70px;
    width: 70px;
    top: 100%;
    left: 50%;
    margin: -25px;
    margin-top: 0px;
    transition-property: all;
    transition-duration: .1s;
    z-index: 123459;
    image-rendering: pixelated;
    background-image: url("../img/airship.svg");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: auto 70px;
    touch-action: manipulation;

}
#spaceship.multifire2{
    background-image: url("../img/game/airshipmf1.svg");
}
#spaceship.multifire3{
    background-image: url("../img/game/airshipmf2.svg");
}

#spaceship.manual {
    transition-property: none;
}





#spaceship #basic-shield,
#spaceship .powershield,
#spaceship #invulnerabilityshield {
    position: absolute;
    border-radius: 50%;

    box-shadow: 0px 0px 5px 2px rgba(145, 242, 247, 0.62);
    height: inherit;
    width: inherit;
    margin: 0;
    transition-property: all;
    transition-duration: .3s;
    top: 0;
}

#spaceship .colorshield {
    position: absolute;
    border-radius: 50%;
    height: inherit;
    width: inherit;
    margin: 0;
    transition-property: all;
    transition-duration: .3s;
    top: 0;
    opacity: .5;
}

#spaceship #invulnerabilityshield {

    box-shadow: 0px 0px 5px 2px rgba(248, 252, 13, 0.62);
}

#spaceship .powershield::before {
    content: "";
    width: 66px;
    height: 59px;
    position: absolute;
    margin: 2px;
    border-radius: 50%;
    border-top: 4px solid #a8f5ff;
    border-bottom: 4px solid #a8f5ff;
    animation-name: powerup;
    animation-duration: 3s;
    animation-iteration-count: infinite;
    opacity: .6;

}

#spaceship #invulnerabilityshield::before {
    content: "";
    width: 70px;
    height: 70px;
    position: absolute;
    margin: -3px;
    border-radius: 50%;
    border-top: 4px solid #fffb00;
    border-bottom: 4px solid #fffb00;
    border-style: dotted;
    animation-name: powerup;
    animation-duration: 3s;
    animation-iteration-count: infinite;
    opacity: .6;
}


#spaceship .powershield {
    background-color: rgba(69, 207, 207, .3);
}


#spaceship #basic-shield.impact {

    box-shadow: 0px 0px 5px 2px rgba(233, 29, 46, 0.62);
}


@keyframes fire {

    from {
        bottom: 0;
    }

    to {
        bottom: 100vh;
    }

}



#singleFire {
    width: 5px;
    height: 50px;
    position: absolute;

    opacity: 0;
    margin-left: 33px;
    border-radius: 4px;
    background: rgb(0, 219, 255);
    background: linear-gradient(0deg, rgba(0, 219, 255, .4) 0%, rgb(240, 244, 6) 22%, rgb(0, 255, 115) 70%);

}

#singleFire .multifire {
    width: 50px;
    height: 10px;
    position: absolute;
    left: 50%;
    margin-left: 33px;
    background-color: rgba(229, 229, 247, 0);
    opacity: 0.8;
    background-size: 38px 38px;
    background-image: repeating-linear-gradient(to right, #444cf7, #444cf7 4px, rgba(229, 229, 247, 0) 4px, rgba(229, 229, 247, 0));
    background-position: center;
    animation-name: firelatency;
    animation-iteration-count: infinite;
    animation-duration: 1s;
}

#feedback,
#time {
    height: 100px;
    position: fixed;
    background-color: rgba(0, 0, 0, .8);
    padding-left: 2.5vw;
    padding-right: 2.5vw;
    width: 95vw;
    top: 0px;
    left: 0px;
    text-align: left;
    line-height: 100px;
    font-size: 20px;
    color: #fff;
    text-transform: uppercase;
    font-style: oblique;
    opacity: 0;
    transition-duration: .5s;
    transition-property: all;
    z-index: 123589;
    margin-top: 0px;

}

#feedback {
    max-width: 0px;
    transition-property: opacity;
    white-space: nowrap;
    overflow: hidden;
}

#time {

    opacity: 1;
    text-align: center;
    text-transform: lowercase;

    z-index: 12345;
}

#level-transition {
    position: fixed;
    height: 100%;
    width: 100%;
    transition-property: all;
    transition-duration: 3s;
    opacity: 0;
    top: 0px;
    left: 0;
    background-color: #000;
    z-index: 1234566;


}

#level-transition span {
    display: block;
    margin: auto;
    position: relative;
    top: 50%;
    margin-top: -75px;
    text-align: center;
    color: #fff;
    height: 150px;
    font-size: 20px;
    text-transform: uppercase;
    line-height: 20px;
}

#level-transition.active {

    opacity: 1;
}

#feedback.active {
    max-width: 350px;
    opacity: 1;
    z-index: 123589;
}



#spaceship #bomb {
    position: fixed;
    transition-property: all;
    transition-duration: 1.5s;
    left: 50%;
    width: 5px;
    background-color: red;
    height: 50px;
    border-radius: 50%;
    top: 90vh;
    opacity: 0;
}

#spaceship #bomb.fire {

    animation-name: bomb;
    animation-duration: 1.5s;
    animation-iteration-count: 1;
}

#singleFire.active {
    animation-name: fire;
    animation-duration: .3s;
    animation-iteration-count: infinite;
    opacity: 1;
}






body section.layer {
    min-height: 600px;
    background: rgb(37, 30, 68);
    width: 100%;
    position: relative;
    opacity: .9;
    z-index: 1000;
    touch-action: manipulation;

}

#level-progress,
#level-treasures {
    position: absolute;
    width: auto;
    left: 0;
    top: 0;
    height: 15px;
    left: 10px;
    z-index: 123484;
    max-width: 50vw;
    margin-top: 5px;

}

#level-progress:before {
    width: 100%;
    position: absolute;
    height: 2px;
    background-color: #ccc;
    margin-top: 7px;
    content: "";
    z-index: 123485;


}

#level-progress i,
#level-treasures i {
    height: 10px;
    border-radius: 50%;
    margin: 3px;
    width: 10px;
    background-color: #000;
    box-shadow: inset 0 0 0 1px #fff;
    display: inline-block;
    position: relative;
    z-index: 123486;

}

#level-treasures {
    right: 10px;
    left: unset;
    margin-left: 0;
    font-size: 10px;

}

#level-treasures i {
    box-shadow: none;
    opacity: .3;
    font-style: normal;

}

#level-treasures i.aquired {
    opacity: 1;
}

#level-progress i.playing {
    background-color: #ffffff;
}

#level-progress i.passed {
    background-color: #ccc;
}

#level-progress i:nth-last-child(1) {
    margin-right: 0;
}

#level-progress i:nth-child(1) {
    margin-left: 0;
}

#menu,
#welcome {
    display: none;
    position: fixed;
    width: 300px;
    min-height: 300px;
    padding: 25px;
    height: auto;
    background-color: #000;
    z-index: 123487;
    top: 50%;
    border-radius: 4px;
    left: 50%;
    margin: -175px;
    box-shadow: 0 0 0 2000px rgba(0, 0, 0, .5);
}

#submenu {
    position: absolute;
    z-index: 1234878;
    height: 100%;
    width: inherit;
    overflow: scroll;
    background: black;
    display: none;
    top: 0;
}

#submenu.active {
    display: block;
}

#submenu div {
    width: 100%;
    height: auto;
    display: none;
    margin-top: 70px;
    color: #fff;
}

#submenu div div {
    display: inherit;
    margin-top: 15px;
}

#submenu div h4 {
    border-bottom: 1px solid #fff;
    padding-bottom: 25px;
    margin-bottom: 0;
    color: #84a6c4;
}

#submenu #scored,
strong.hist-value {
    text-align: center;
    display: block;
    font-size: 20px;
    color: #a3fb8a;
    font-weight: bold;
}

strong.hist-value {
    font-size: 16px;
    color: #00aaff;
}

#submenu #closesubmenu {
    position: sticky;
    cursor: pointer;
    height: 70px;
    width: 100%;
    left: 0;
    top: 0;
    font-size: 20px;
    text-align: left;
    line-height: 70px;
    color: #fff;
    background-color: #000;
    display: block;
}

#submenu.active div.active {
    display: block;
}

#welcome {
    display: block;
    box-shadow: none;
}

#welcome.inactive {
    display: none;
}

#welcome p,
#welcome h3 {
    color: #fff;
}

#welcome a.btn {
    line-height: 50px;
    text-transform: uppercase;
    color: #fff;
}

#welcome ul,
#sub-game-settings ul {
    padding: 0;
}

#welcome ul li,
#sub-game-settings ul li {
    line-height: 50px;
    border-bottom: 1px solid #fff;
    color: #fff;
    list-style: none;
    display: block !important;
}

#welcome ul li:before,
#sub-game-settings ul li:before {
    content: "";
    position: absolute;
    background-color: #fa7070;
    height: 30px;
    width: 60px;
    right: 5vw;
    margin-top: 10px;
    border-radius: 4px;

}

#welcome ul li:after,
#sub-game-settings ul li:after {
    content: "";
    position: absolute;
    background-color: #ffffff;
    box-shadow: inset 0 0 0 2px #ccc;
    height: 26px;
    width: 26px;
    right: 5vw;
    margin-right: 30px;
    margin-top: -38px;
    border-radius: 4px;

}

#welcome ul li.enabled:before,
#sub-game-settings ul li.enabled:before {
    background-color: #affdb5;
}

#welcome ul li.enabled:after,
#sub-game-settings ul li.enabled:after {
    margin-right: 4px;
}

#welcome ul li a,
#sub-game-settings ul li a {
    text-decoration: none;
    color: #fff;
    display: block;
    position: relative;
}

#menu.active {
    display: block;
}

#menu h3 {
    text-align: center;
    color: #fff;
}

#menu ul {
    padding: 0;
    list-style: none;
    width: auto;
}

#menu ul li {
    border-bottom: 1px solid #fff;
    min-height: 50px;
    height: auto;
    line-height: 50px;
    color: #fff;
    display: flex;
}

#menu ul li a {
    text-decoration: none;
    color: inherit
}

#legend {
    position: fixed;
    right: 0px;
    padding: 0 10px 25px 10px;
    top: 0px;
    width: auto;
    min-width: 90px;
    height: auto;
    z-index: 12347;
    background: rgb(1, 0, 36);
    background: linear-gradient(-90deg, rgba(1, 0, 36, .2) 0%, rgba(12, 49, 84, .2) 76%, rgba(6, 137, 163, 0) 100%);
    min-height: 100px;

}

#score {
    font-size: 30px;
    color: #fff;
    text-align: right;
    padding: 5px 0px 5px 25px;
    line-height: 30px;
    font-weight: bold;
    font-style: italic;
    margin-top: 30px;
    position: relative;
    right: 2.5vw;
    width: auto;
    transition-property: all;
    transition-duration: .3s;
}

#health-bar,
#shield-bar {
    width: inherit;
    height: 15px;
    box-shadow: inset 0 0 0 2px;
    border-radius: 4px;
    white-space: nowrap;
    margin-top: 5px;
    background: rgba(9, 246, 68, 0.6);
    max-width: 50vw;
}

#shield-bar {
    position: absolute;
    top: 70px;
    background: #99c5e1;
    min-width: 90px;
    z-index: 123455;
    width: 90px;
    left: 10px;
}

#health-bar span,
#shield-bar span {
    width: 20%;
    height: inherit;
    display: inline-block;
    box-shadow: inset 0 0 0 1px #ccc;
    position: relative;
    background-color: #008000;
}

#shield-bar span {
    float: right;
}

#menu #game-action,
#menu #game-action-reload,
.btn {
    display: block;
    border-radius: 4px;
    border: 1px solid #fff;
    text-align: center;
    margin: auto;
    margin-top: 15px;
    text-decoration: none;

    width: 40%;
    float: right;
    margin: 4%;
}

body section.layer .powerup {

    height: 50px;
    width: 50px;
    background-color: #ccc;
    position: absolute;
    left: 50%;
    border-radius: 4px;
    animation: powerup;
    animation-duration: 5s;
    animation-iteration-count: infinite;
    transform-origin: 50% 50%;
    line-height: 50px;
    text-align: center;
    color: #b4cfda;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 30px 30px;
    color: transparent !important;
}

body section.layer .powerup.treasure {
    background-color: rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 0 2px 2px rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .3) !important;
    opacity: .5;
}


body section.layer .multifire {
    background-color: rgb(117, 6, 6);
    color: #ff0000;
    background-image: url("../img/game/weapon.svg");

}

body section.layer .powershield {
    background-color: rgb(19, 4, 85);
    color: #72bffd;
    background-image: url("../img/game/shield.svg");
}

body section.layer .time {
    background-color: rgb(51, 134, 83);
    color: #72fdac;
    background-image: url("../img/game/time.svg");
}

body section.layer .health {
    background-color: rgb(4, 85, 22);
    color: #008000;
    background-image: url("../img/game/health.svg");
}

body section.layer .booster {
    background-color: rgb(24, 102, 204);
    color: #8fcafa;
    background-image: url("../img/game/speed.svg");

}

body section.layer .scorebooster {
    background-color: rgb(255, 196, 2);
    color: #ffff00;
    background-image: url("../img/game/score.svg");

}

body section.layer .bomb {
    background-color: rgb(14, 12, 12);
    color: #524f4f;
    background-image: url("../img/game/bomb.svg");
}



#controls {
    height: 190px;
    width: 190px;

    /* position: fixed; */
    bottom: 0;
    margin: -60px;
}

#controls .control {
    height: 70px;
    width: 70px;

    position: absolute;
    z-index: 1005;
    border-top: 2px solid rgb(189, 225, 255);
    border-right: 2px solid rgb(189, 225, 255);
    transform-origin: 50% 50%;


}

#controls .control.fire {
    border: none;
    top: 0;
    left: 0;
}

#controls #top {
    top: -60px;
    left: 0;
    transform: scale(0.5) rotate(-45deg);

}

#controls #right {
    top: 0;
    left: 60px;
    transform: scale(0.5) rotate(45deg);
}

#controls #bottom {
    top: 60px;
    left: 0px;
    transform: scale(0.5) rotate(135deg);


}

#controls #left {
    top: 0;
    left: -60px;
    transform: scale(0.5) rotate(-135deg);
}

#startButton {
    height: 100px;
    width: 100px;
    line-height: 100px;
    border-radius: 50%;
    box-shadow: 0 0 0 2000px rgba(0, 0, 0, .8);
    color: #fff;
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 123460;
    border: 1px solid #fff;
    text-align: center;
    margin: -50px;
    cursor: pointer;
}

#startButton i {

    line-height: 20px;
    display: block;
    margin-top: 10px;
    color: #524f4f;

}

#escape {
    height: 30px;
    width: 30px;
    position: fixed;
    left: 2.5vw;
    top: 35px;
    color: #fff;
    text-align: left;
    cursor: pointer;
    z-index: 123488;
    background-repeat: no-repeat;
    background-size: 20px auto;
    background-position: center center;
    line-height: 30px;
    font-size: 20px;
}

#audio {
    height: 30px;
    width: 30px;
    position: fixed;
    left: 100px;
    top: 35px;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #fff;
    z-index: 123588;
    background-repeat: no-repeat;
    background-size: 20px auto;
    background-position: center center;
}

#audio.muted {
    background-image: url("../img/muted.svg");
}

#audio.playing {
    background-image: url("../img/playing.svg");
}


#startButton:hover {
    color: orange;
    border-color: orange;
}



#captain-logs {
    white-space: nowrap;
    line-height: 10px;
    font-size: 10px;
    height: 10px;
    right: 0;
    transition-property: max-width;
    opacity: 0;
    color: #fff;
    position: absolute;
    top: 105px;
    transition-duration: 10s;
    padding-right: 25px;
    transition-timing-function: linear;
    max-width: 0;
    overflow: hidden;
    z-index: 123456;
}

#captain-logs.active {
    opacity: 1;
    max-width: 1000px;
}

#levelbackground div {
    position: absolute;
    width: inherit;
    height: inherit;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    opacity: 1;
    transition-property: all;
    transition-duration: 5s;
}

#levelbackground div.disabled {
    opacity: 0;
}

body footer {
    height: 100%;
    width: 100%;
    background-color: #000;
    position: relative;
    overflow: hidden;
}

footer .smallnav {
    color: #fff;
    position: absolute;
    bottom: 0;
    left: 0;
    padding-left: 25px;
    line-height: 50px;
}

#welcome-message {
    position: absolute;
    right: 0;
    width: auto;
    background-color: rgba(0, 0, 0, .6);
    color: #fff;
    padding: 25px;
    top: 0;
    height: 100%;
    max-width: 350px;
    text-align: inherit;
    transition-property: all;
    transition-duration: .3s;
    overflow: hidden;
    overflow-y: scroll;
    z-index:122;
}

#welcome-message.inactive {
    right: -500px;
}

#welcome-message h1 {
    text-transform: uppercase;
    text-align: center;
    border-bottom: 1px solid #fff;
    padding-bottom: 15px;
}

#welcome-message a {
    text-decoration: none;
    color: orange;
    text-align: center;
    width: 100%;
    display: block;
}

#wm-toggler {
    height: 40px;
    width: 40px;
    position: fixed;
    top: 0;
    right: 0;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    padding: 15px;
    opacity: 1;
    z-index: 123;
}

#wm-toggler:hover span {
    animation-name: togglerHighlight;
    animation-duration: 2s;
    animation-iteration-count: infinite;

}

#wm-toggler span {
    position: relative;
    margin: 2px;
    width: 8px;
    height: 8px;
    display: inline-block;
    background-color: #ffff;
    border-radius: 1px;
    opacity: .8;
}

#wm-toggler span:nth-child(2) {
    animation-delay: .2s;
}

#wm-toggler span:nth-child(3) {
    animation-delay: .3s;
}

#wm-toggler span:nth-child(4) {
    animation-delay: .6s;
}

#wm-toggler span:nth-child(5) {
    animation-delay: .8s;
}

#wm-toggler span:nth-child(6) {
    animation-delay: 1s;
}

#wm-toggler span:nth-child(7) {
    animation-delay: 1.2s;
}

#wm-toggler span:nth-child(8) {
    animation-delay: 1.4s;
}

#wm-toggler span:nth-child(9) {
    animation-delay: 1.6s;
}


@media screen and (max-width: 701px) {

    #welcome-message {
        z-index: 123456;

    }

    #wm-toggler {
        opacity: 1;
        z-index: 123457;

    }
}

#game-preferences {
    width: 100%;
    height: auto;
}

#game-preferences select,
#game-preferences label {
    display: inline-block;
    width: 45%;
    height: 50px;
    color: #fff;
    background-color: #000;
}

#fullscreen-request {
    background: #000;
    color: #fff;
    display: block;
    padding: 15px;
    /* margin: auto; */
    margin-bottom: 15px;
    min-width: 90%;
}