html, body {
    width   : 100%;
    height  : 100%;
    margin  : 0;
    padding : 0;
    position: fixed;
    overflow: hidden;
}
#view {
    height:100%;
    width:100%;
    outline: none;
    margin: 0;
}
#fps {
    position: absolute;
    background-color: black;
    border: 2px solid red;
    text-align: center;
    font-size: 2vh;
    color: white;
    top: 15vh;
    right: 10px;
    width: 8vh;
    height: 2.25vh;
}

/*
* Fonts
*/

@font-face {
    font-family: dreamcast;
    src: url(assets/fonts/Dreamcast.ttf)
}

p {
    font-family: dreamcast;
}

/*
* Loader
*/
.rootLight{
    --bg: #FFF9EF;  
    --tx: #020003; 
}

.rootDark{
    --bg: #011129;
    --tx:#FFFAFA;
}

.gameLogo{
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition-duration: 400ms;
    transition-property: opacity;
}

.logoContainer{
    width: 250px;
    height: 250px;
    animation: 4s linear 0s infinite alternate pulse;
}

.logoSvg{
    width: 100%;
    height: 100%;
    fill: var(--tx)  
}

.babylonUnmuteIcon{
    position: absolute;
    right: 0.5%;
    top: 15%;
    height: 4vh;
    width: 6vh;
    background-color: rgba(51,51,51,0.7);
    background-image: url(unmuteButton.svg);
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center;
    background-position-y: 0.4vh;
    border: none;
    outline: none;
    transition: transform 0.125s ease-out;
    cursor: pointer;
    z-index: 9999;
}

.babylonUnmuteIcon:hover 
{ 
    transform: scale(1.05) 
} 

.babylonUnmuteIcon:active 
{ 
    background-color: rgba(51,51,51,1) 
}

@keyframes pulse{
    0% {
        transform: scale(0.8);
    }

    70% {
        transform: scale(1);
    }

    100% {
        transform: scale(0.8);
    }
}

/*
* Demo button
*/
#demoSelect {
    visibility: hidden;
    position: absolute;
    top: 20vh;
    right: 19px;
    z-index: 10;
}

#demoButtonContainer {
    visibility: hidden;
    position: absolute;
    display: flex;
    justify-content: center;
    top: 23vh;
    right: 10px;
    z-index: 10;
}

#demoButton {
   -webkit-user-select: none;
    flex-direction: column;
    object-fit: contain;
    display: flex;
    outline: none;
    height: 5vh;
    border:0px;
}

#demoButtonText {
    position: absolute;
    text-align: center;
    font-size: 1.5vh;
    color: white;
    width: 60px;
    height: 20px;
}

/*
* Common classes
*/

.containerWithCenterAlignment {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0px;
    top: 0px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.unselectable {
    user-select: none;
    pointer-events: none;
    -webkit-touch-callout: none;
}

.undragable {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    user-select: none;
}

.collectedItem {
    position: absolute;
    margin: auto;
    left: 0;
    right: 0;
    bottom: 30%;
    height: 3%;
    object-fit: contain;
}

.chestCount {
    position: absolute;
    color: black;
    font-size: 5vh;
}

.stepChange {
    position: absolute;
    font-size: 4.5vh;
    top: -0.9em;
    left: 25vh;
}

/*
* Preloader ui elements
*/

#preloaderUI {
    visibility: hidden;
}

#infoButton {
    position: absolute;
    margin: 1%;
    top: 0;
    left: 0;
    height: 10%;
    outline: none;
}

#logo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    height: 30%;
    width: 90%;
}

#a {
    margin-top: 5vh;
    height: 50%;
}

#asvla {
    margin-top: 5vh;
    height: 20%;
}

#ascentButtonContainer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 20%;
    height: 10%;
}

#ascentButton {
    height: 100%;
    outline: none;
}

#ascentButtonContainer p {
    position: absolute;
    margin: auto;
    font-size: 4vh;
    color: white;
}

#playButtonContainer {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    bottom: 15%;
    width: 15vh;
    height: 20%;
}

#playButton {
    height: 100%;
    outline: none;
}

#playText {
    position: absolute;
    margin: auto;
    font-size: 4.5vh;
    color: white;
}

#stepCountContainer {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 23%;
    height: 23%;
    top: 5%;
    right: 1vh;
}

#preloaderStepsSubstrate {
    height: 100%;
}

#stepCount {
    position: absolute;
    margin: auto;
    font-size: 1.75vh;
    color: white;
}

#loaderView {
    visibility: hidden;
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    bottom: 18vh;
    width: 20%;
    height: 10%;
}

#loaderImage {
    height: 100%;
    object-fit: contain;
}

#loadProgressText {
    margin: auto;
    font-size: 3.5vh;
    color: black;
    user-select: none;
}

/*
* Game ui elements
*/

#skipScreen {
    visibility: hidden;
    position: absolute;
    -webkit-touch-callout: none;
    pointer-events: none;
    width: 100%;
    height: 100%;
    top: 0px;
    left: 0px;
    background-color: rgba(0, 0, 0, 1);
}

#gameUI {
    position: absolute;
    visibility: hidden;
    width: 100%;
    height: 100%;
    top: 0px;
    left: 0px;
}

#stepView {
    position: absolute;
    top: -1vh;
    left: 0px;
    width: 30%;
    height: 30%;
    text-align: left;
}

#progressMask {
    position: absolute;
    -webkit-mask-image: url(assets/gameUI/stepMask.png);
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    left: 0.8vh;
    top: 23%;
    width: 4.5vh;
    height: 70%;
}

#stepProgress {
    position: absolute;
    height: 100%;
    object-fit: contain;
}

#substrateImage {
    position: absolute;
    -webkit-touch-callout: none;
    height: 100%;
    object-fit: contain;
}

#stepIcon {
    position: absolute;
    left: 0.5vh;
    top: 6%;
    height: 15%;
}

#stepCounter {
    position: absolute;
    -webkit-touch-callout: none;
    user-select: none;
    margin: auto;
    left: 5.5vh;
    top: 0.55em;
    font-size: 3.7vh;
    color: white;
}

#goldAndDistanceView {
    position: absolute;
    top: -1vh;
    right: 0px;
    width: 40%;
    height: 15%;
    text-align: right;
}

#goldAndDistanceSubstrate {
    position: relative;
    top: -14px;
    height: 75%;
    object-fit: contain;

}

#goldIcon {
    position: absolute;
    right: 0.5vh;
    top: 14.5%;
    height: 4vh;
}

#heightCounter {
    position: absolute;
    user-select: none;
    margin: auto;
    right: 1vh;
    top: 0.55em;
    font-size: 4vh;
    color: white;
}

#coinCounter {
    position: absolute;
    user-select: none;
    margin: auto;
    right: 5.5vh;
    top: 16.5%;
    /*top: 2.6em;*/
    font-size: 3.5vh;
    color: #f3e440;
}

#speedController {
    position: absolute;
    bottom: 0%;
    right: 0px;
    width: 15%;
    height: 40vh;
    text-align: right;
}

#finishButton {
    position: absolute;
    -webkit-user-select: none;
    border:0px;
    outline: none;
    height: 30%;
    right: 1.35vh;
    object-fit: contain;
}

#speedSlider{
    position: absolute;
    -webkit-appearance: none;
    outline: none;
    bottom: 13vh;
    right: -6vh;
    width: 26vh;
    height: 6vh;
    transform: rotate(270deg);
    -moz-transform: rotate(270deg);
    background: url(assets/gameUI/speedSliderBackground.png) center no-repeat;
    background-size: contain;
}

#speedSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 10vh;
    width: 10vh;
    border:0px;
    margin-left: 0.5vh;
    background:url(assets/gameUI/speedSliderThumb.png) center no-repeat;
    background-size: contain;
}

#speedSlider::-moz-range-thumb {
    border: none;
    height: 10vh;
    width: 10vh;
    background:url(assets/gameUI/speedSliderThumb.png) center no-repeat;
    background-size: contain;
}

#speedSlider::-ms-thumb {
    height: 100vh;
    width: 100vh;
}

/*
* Container for collected items
*/

#collectedItemsContainer {
    position: absolute;
    text-align: center;
    pointer-events: none;
    width: 100%;
    height: 100%;
    left: 0px;
    top: 0px;
}

/*
* Revard popup
*/
#revardPopup {
    visibility: hidden;
}

#popupSubstrate {
    height: 45%;
}

#acceptRevardButtonContainer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 66%;
    height: 8%;
}

#acceptRevardButton {
    height: 100%;
    outline: none;
}

#acceptRevardButtonContainer p {
    position: absolute;
    margin: auto;
    font-size: 3vh;
    color: white;
}

@media all and (min-height:1000px) {
    #goldAndDistanceSubstrate {
        top: -32px;
    }
}

@media all and (max-height:1700px) {
    #goldAndDistanceSubstrate {
        top: -25px;
    }
}

@media all and (max-height:1250px) {
    #goldAndDistanceSubstrate {
        top: -19px;
    }
}

@media all and (max-height:1100px) {
    #goldIcon {
        top: 11.5%;
    }

    #coinCounter {
        top:13.5%;
    }
}

@media all and (max-height:1000px) {
    #goldAndDistanceSubstrate {
        top: -15px;
    }
}

@media all and (max-height:800px) {
    #goldIcon {
        top: 10.5%;
    }

    #coinCounter {
        top:13.5%;
    }
}


@media all and (max-height:600px) {
    #goldAndDistanceSubstrate {
        top: -11px;
    }
}

@media all and (max-height:500px) {
    #goldIcon {
        top: 8.5%;
    }

    #coinCounter {
        top:12.5%;
    }
}

@media all and (max-height:400px) {
    #goldAndDistanceSubstrate {
        top: -5px;
    }

    #goldIcon {
        top: 15.5%;
    }

    #coinCounter {
        top:20.5%;
    }
}

@media all and (max-height:375px) {
    #coinCounter {
        top:18.5%;
    }
}

@media all and (max-height:300px) {
    #goldAndDistanceSubstrate {
        top: -5px;
    }

    #goldIcon {
        top: 11.5%;
    }

    #coinCounter {
        top:16.5%;
    }
}