body.space-scouts {
    background-image: url('../img/bg-space-scouts.jpg') !important;
}

#game-and-controls {
    position: relative;
    width: 100%;
}
.phone-or-mobile #game-and-controls {
    position: fixed;
    top: 40px;
    bottom: 0;
    left: 0;
    right: 0;
}
#game-and-controls.fullscreen {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100% !important;
    z-index: 10001;
    background-image: url('../img/bg-space.jpg');
    background-repeat: none;
    background-size: cover;
}
body.space-scouts #game-and-controls.fullscreen {
    background-image: url('../img/bg-space-scouts.jpg');
}

.controls {
    position: absolute;
    right: -100%; /* while loading */
}
.controls-btn {
    vertical-align: text-bottom;
    display: inline-block;
    width:40px;
    height:40px;
    border:none;
    background:none;
    background-size:100%;
}
.controls-btn-sound {
    background-image:url(../img/bg-btn-volume.png);
}
.controls-btn-close {
    background-image:url(../img/bg-btn-close.png);
}
.controls-btn-cc {
    background-image:url(../img/button-games-cc.png);
}
.controls-btn-fullscreen {
    background-image:url(../img/button-games-fullscreen.png);
}

.muted {
    opacity: 0.5;
}

.unmuted {
    opacity:1;
}
.u-show-desktop {
    display:none !important;
}

.h_iframe {
    position: absolute;
    overflow: hidden;
    left: -20px; /* to keep invisible offscreen until loaded */
    border-radius: 12px;
    border: 7px solid #eb6636;
    box-shadow: 0 -3px 0 #eb6636, 0 2px 2px rgba(0,0,0,0.3);
}

.h_iframe iframe {
    position: absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background-color: black;
}

nav#main{
    display: none;
}
footer{
    display: none;
}
header{
    display: none;
}
#mainSection{
    height: auto;
    min-height: 0!important;
}

.space-scouts-logo {
    background-image: url(../img/space_scouts_title.png);
    background-repeat: no-repeat;
    background-size: 100%;
    display: block;
    height: 3.9em;
    left: 50%;
    margin-left: -200%; /* while loading */
    position: absolute;
    width: 25em;
    z-index: 1;
}
.phone-or-mobile .space-scouts-logo {
    height: 2em;
    margin-left: -6.25em;
    width: 12.5em;
}
.space-scouts .h_iframe {
    border-radius: 12px;
    border: 7px solid #949DBF;
    box-shadow: -2px -2px 0 #C9CEDF, 2px 2px 0 #5C6484, 0 4px 2px rgba(0,0,0,0.3);
}

@media screen and (max-height: 751px) {
    mainSection {
        height: 900px;
    }
}
@media screen and (min-height: 750px) {
    nav#main{
        display: block;
        position: static;
    }
    footer{
        display: block;
        position: static;
    }
    header{
        display: block;
    }
}
@media screen and (max-height: 860px) {
    #for-parents{
        display: block;
        margin-top: 20px;
    }
    footer{
        display: none;
    }
}
@media screen and (min-width: 320px) {
    body.space{
        background-image: url('../img/bg-space-mobile.jpg');
    }
    .site-nav{
        padding-left: 10px;
    }
    #for-parents{
        display: none;
    }
}
@media screen and (min-width: 1024px) and (orientation:landscape){
    body.space{
        background-image: url('../img/bg-space.jpg');
    }
    header{
        display: block;
    }
    #for-parents{
        display: none;
    }
    .ipad  #for-parents{
        display: block;
    }
    .ipad nav#main{
        display: none;
    }
}
@media screen and (min-height: 1024px){
    nav#main{
        display: block;
        position: absolute;
    }
    footer{
        display: block;
        position: absolute;
    }
    #mainSection{
        height: 100vh;
    }
}
@media screen and (orientation:portrait)
{
    .controls-btn-fullscreen {
        display: none;
    }
}
@media screen and (max-height: 792px)
{
    nav#main {
        display: none;
    }
    #mainSection {
        height: 720px;
    }
    div#footer {
        bottom: auto;
        position: absolute;
    }
}

@media only screen and (min-device-width : 320px) and (max-device-width : 568px){
    #soundButton {
        display: none !important;
    }
}

@media only screen and (min-device-height : 320px) and (max-device-height : 568px){
    #soundButton {
        display: none !important;
    }
}

@media only screen and (min-device-width : 768px) and (max-device-width : 1024px)
and (orientation : portrait)
{
    nav#main {
        position: static;
    }
}

@media screen and (max-device-width: 601px) and (orientation : portrait)
and (-webkit-min-device-pixel-ratio: 2) {
    #mainSection {
        height: 950px;
    }

    nav#main {
        margin-top: 685px;
        bottom: auto;
    }
}

@media screen and (max-device-width: 601px) and (orientation : portrait)
and (-webkit-min-device-pixel-ratio: 1.331) and (-webkit-max-device-pixel-ratio: 1.332) {
    #mainSection {
        height: 950px;
    }

    nav#main {
        margin-top: 685px;
        bottom: auto;
    }
}
