* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/***** use own font (e.g. as tff) ******/
@font-face {
    font-family: luckiestGuy;
    src: url("../img/5.Font/Luckiest_Guy/LuckiestGuy-Regular.ttf");
}
.pos-rel {
    position: relative;
}

.fbox-center {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.fbox-start {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
}
.fbox-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.fbox-row-center {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.fbox-sbetween {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fbox-row-sbetween {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.fbox-row-start {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
}

.d-none {
    display: none !important;
}

.gap-05em {
    gap: 0.5em;
}

.gap-1em {
    gap: 1em;
}

.gap-2em {
    gap: 2em;
}

.mt-03em {
    margin-top: 0.3em;
}

.mr-8px {
    margin-right: 8px;
}

#fullscreen-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas {
    background-color: black;
    box-shadow: 1px 2px 13px -2px rgba(0, 0, 0, 0.75);
    position: relative;
    z-index: 1;
    display: block;
    opacity: 1;
    transform: translateY(-800px);
}

canvas:fullscreen {
    background-image: url("/img/3. Background/Layers/5. Water/D2.png");
}

h1 {
    font-size: 58px;
    font-kerning: normal;
    filter: drop-shadow(10px -2px 29px #eaf8f8);
    color: #632aaf;
    text-align: center;
}

h3 {
    font-size: 32px;
    text-align: center;
    margin: 10px;
}

body {
    position: relative;
    font-family: luckiestGuy;
    color: white;
    flex-direction: column;
    height: 100vh;
    background-image: url("../img/3. Background/Layers/5. Water/D2.png");
}

audio::-webkit-media-controls-panel {
    background-color: rgba(69, 80, 57, 0.76);
}

/** mobile instructions panel**/
.m-game-instructions {
    display: none;
}

/** in instruction panel**/
#finslap-img {
    height: 80px;
    margin: 15px;
}

#bubble-img {
    height: 76px;
    margin: 15px;
    margin-top: 22px;
}

.keysBtn-Wrapper {
    position: relative;
}

.keysBtn-Wrapper::before {
    height: 100px;
    width: 100px;
    top: 0;
    left: 0;
    position: absolute;
}

/*** SCREENS ***/

.screen {
    width: 100%;
    height: 100%;
    position: absolute;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 6em;
    z-index: 4;
}

#bgScreen {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
    width: 100vw;
    height: calc(100% - 100px); /* minus footer instructions*/
}

.endScreen {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.button {
    margin-top: 10px;
    height: 40px;
}

#keysBtn {
    height: 82px;
}

/*******  Instructions DESKTOP *********/

.game-instructions {
    transform: translateY(300px);
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    background-color: #3165b3;
    margin-top: 20px;
    gap: 2em;
    height: 100px;
    position: fixed;
    bottom: 0;
}

.game-instructions .button {
    height: 28px;
    margin-top: 0px;
}

.game-instructions #keysBtn {
    height: 50px;
}

.game-instructions .sharkySmall {
    height: 40px;
}

/*******  Instructions for MOBILE use *********/

.m-switches,
.m-buttons {
    display: none;
}

/*******  TOGGLE FOR MUSIC *********/
/* Div containing both toggles */
.instructionDiv {
    padding: 10px;
    margin-top: 25px;
    background-color: rgba(255, 255, 255, 0.185);
    gap: 10px;
    z-index: 10;
    border-radius: 15px;
    width: 720px;
}

.instructionsLeft {
    width: 75%;
}
.instructionsRight {
    width: 25%;
    justify-content: space-between;
}

.instruction-switches {
    gap: 0.3em;
    width: max-content;
    padding-left: 5px;
    padding-right: 5px;
    align-items: flex-end;
}

.instruction-switches img {
    height: 1.5em;
    margin-right: 0.5em;
    margin-left: 0.25em;
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 18px;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(144, 135, 153);
    -webkit-transition: 0.4s;
    transition: 0.4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 1px;
    background-color: rgba(255, 255, 255, 0.842);
    -webkit-transition: 0.4s;
    transition: 0.4s;
}

input:checked + .slider {
    background-color: yellow;
}

input:focus + .slider {
    box-shadow: 0 0 1px yellow;
}

input:checked + .slider:before {
    -webkit-transform: translateX(24px);
    -ms-transform: translateX(24px);
    transform: translateX(24px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/*** AUDIO SETTINGS ON MAIN SCREEN ***/

audio {
    position: absolute;
    width: 76%;
    filter: invert(1);
    bottom: 2;
    right: 4px;
    height: 18px;
}

audio:hover {
    width: 145%;
    right: unset;
    left: 0px;
}

@media only screen and (max-height: 720px) and (orientation: portrait) and (pointer: coarse) {
    #bgScreen {
        width: 100%;
        height: 100%;
    }
}

@media only screen and (max-height: 700px) and (orientation: landscape) {
    .game-instructions {
        display: none !important;
    }

    #bgScreen {
        width: 100%;
        height: 100%;
    }
}


@media only screen and (max-width: 720px) and (orientation: portrait)  {
/* force Landscape Mode when in Portrait-mode*/

html {
    transform: rotate(-90deg);
    transform-origin: left top;
    width: 100vh;
    height: 100vw;
    overflow-x: hidden;
    position: absolute;
    top: 100%;
    left: 0;
}

body {
    height: 100vw;
    width: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas {
    width: unset;
    max-width: 100%;
    height: 100vw;
    position: relative;
}

#bgScreen {
    width: 100%;
    height: 100%;
}

.game-instructions{
    display: none;
}
}


/******** ON TOUCHDEVICES OVER 720px ************/
/* 
@media only screen and (min-width: 720px) and (orientation: portrait) and (pointer: coarse) {
    
    html {
        transform: rotate(-90deg);
        transform-origin: left top;
        width: 100vh;
        height: 100vw;
        overflow-x: hidden;
        position: absolute;
        top: 100%;
        left: 0;
    }

    body {
        height: 100vw;
        width: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    canvas {
        width: unset;
        max-width: 100%;
        height: 100vw;
        position: relative;
    }

    #bgScreen {
        width: 100%;
        height: 100%;
    } */

    /* touchbuttons for mobile
    .m-switches,
    .m-buttons {
        display: flex !important;
    }

    .m-button {
        height: 9vw !important;
        width: 9vw;
        cursor: pointer;
    }

    .game-instructions {
        display: none !important;
    }

    .m-switches {
        position: absolute;
        top: 1em;
        right: 1em;
        z-index: 200;
    }

    .m-switches img {
        height: 1em;
    }

    .switch {
        width: 32px !important;
        height: 16px !important;
    }

    .slider:before {
        position: absolute;
        content: "";
        height: 12px !important;
        width: 12px !important;
        left: 2px;
        bottom: 2px;
    }

    input:checked + .slider:before {
        -webkit-transform: translateX(16px) !important;
        -ms-transform: translateX(16px) !important;
        transform: translateX(16px);
    }

    .m-buttons {
        position: absolute;
        display: flex;
        justify-content: space-between;
        margin: 1em;
        bottom: 0;
        right: 0;
        left: 0;
        z-index: 200;
        height: 15vw;
    }

    .m-btn-attack #m-btn-bubble {
        position: absolute;
        bottom: 5vw;
        left: 10vw;
    }

    .m-btn-attack #m-btn-finslap {
        position: absolute;
        bottom: 5vw;
        left: 0;
    }

    .m-btn-moves {
        position: relative;
        height: 100%;
    }

    .m-btn-moves #m-left {
        position: absolute;
        right: 16vw;
        bottom: 5vw;
    }

    .m-btn-moves #m-right {
        position: absolute;
        right: 0;
        bottom: 5vw;
    }

    .m-btn-moves #m-up {
        position: absolute;
        top: -5vw;
        right: 8vw;
    }

    .m-btn-moves #m-down {
        position: absolute;
        bottom: -1vw;
        right: 8vw;
    } */
/* } */


/******** MOBILE UNDER 720px ************/

@media only screen and (max-width: 720px) and (max-height: 700px) and (orientation: portrait){
    /* force Landscape Mode when in Portrait-mode*/
    html {
        transform: rotate(-90deg);
        transform-origin: left top;
        width: 100vh;
        height: 100vw;
        overflow-x: hidden;
        position: absolute;
        top: 100%;
        left: 0;
    }

    body {
        height: 100vw;
        width: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    canvas {
        width: unset;
        max-width: 100%;
        height: 100vw;
        position: relative;
    }

    #bgScreen {
        width: 100%;
        height: 100%;
    }

    /* touchbuttons for mobile */
    .m-switches,
    .m-buttons {
        display: flex !important;
    }

    .m-button {
        height: 9vw !important;
        width: 9vw;
        cursor: pointer;
    }

    .game-instructions {
        display: none !important;
    }

    .m-switches {
        position: absolute;
        top: 1em;
        right: 1em;
        z-index: 200;
    }

    .m-switches img {
        height: 1em;
    }

    .switch {
        width: 32px !important;
        height: 16px !important;
    }

    .slider:before {
        position: absolute;
        content: "";
        height: 12px !important;
        width: 12px !important;
        left: 2px;
        bottom: 2px;
    }

    input:checked + .slider:before {
        -webkit-transform: translateX(16px) !important;
        -ms-transform: translateX(16px) !important;
        transform: translateX(16px);
    }

    .m-buttons {
        position: absolute;
        display: flex;
        justify-content: space-between;
        margin: 1em;
        bottom: 0;
        right: 0;
        left: 0;
        z-index: 200;
        height: 15vw;
    }

    .m-btn-attack #m-btn-bubble {
        position: absolute;
        bottom: 5vw;
        left: 10vw;
    }

    .m-btn-attack #m-btn-finslap {
        position: absolute;
        bottom: 5vw;
        left: 0;
    }

    .m-btn-moves {
        position: relative;
        height: 100%;
    }

    .m-btn-moves #m-left {
        position: absolute;
        right: 17.5vw;
        bottom: 5vw;
    }

    .m-btn-moves #m-right {
        position: absolute;
        right: -1.5vw;
        bottom: 5vw;
    }

    .m-btn-moves #m-up {
        position: absolute;
        top: -5vw;
        right: 8vw;
    }

    .m-btn-moves #m-down {
        position: absolute;
        bottom: -1vw;
        right: 8vw;
    }

    #looseImage {
        width: 80vw;
    }

    /* WelcomeScreen - change Instructions-Panel to special mobile HTML */

    .screen {
        padding: 1em;
    }

    h1 {
        margin-top: 1em;
        font-size: 2.5em;
    }

    h3 {
        margin: 0.2em;
        font-size: 1.2em;
    }

    .button {
        height: 1.8em;
        margin: 0.2em;
    }

    .imgSmall {
        height: 3em;
    }

    #m-keysBtn {
        height: 3.5em;
    }
}

@media only screen and (max-height: 480px) {
    canvas {
        height: 100vh;
    }
    .game-instructions {
        display: none;
    }
}

/* MOBILE SPECIAL Format eg NEST HUB Device --> looks like landscape format, not much height*/
@media only screen and (max-height: 600px) {
    #sharkyGIF {
        display: none;
    }

    .wrapper-instructions {
        margin-top: 2em;
    }


    /* SHOW TOUCH NAVIGATION for mobile */
    .m-switches,
    .m-buttons {
        display: flex !important;
    }

    .m-button {
        height: 46px !important;
        width: 46px;
        cursor: pointer;
    }

    .game-instructions {
        display: none !important;
    }

    .m-switches {
        position: absolute;
        top: 1em;
        right: 1em;
        z-index: 200;
    }

    .m-switches img {
        height: 1em;
    }

    .switch {
        width: 32px !important;
        height: 16px !important;
    }

    .slider:before {
        position: absolute;
        content: "";
        height: 12px !important;
        width: 12px !important;
        left: 2px;
        bottom: 2px;
    }

    input:checked + .slider:before {
        -webkit-transform: translateX(16px) !important;
        -ms-transform: translateX(16px) !important;
        transform: translateX(16px);
    }

    .m-buttons {
        position: absolute;
        display: flex;
        justify-content: space-between;
        margin: 1em;
        bottom: 0;
        right: 0;
        left: 0;
        z-index: 200;
        height: 15vw;
    }

    .m-btn-attack #m-btn-bubble {
        position: absolute;
        bottom: 4vw;
        left: 80px;
    }

    .m-btn-attack #m-btn-finslap {
        position: absolute;
        bottom: 4vw;
        left: 20px;
    }

    .m-btn-moves {
        position: relative;
        height: 100%;
    }

    .m-btn-moves #m-left {
        position: absolute;
        right: 120px;
        bottom: 4vw;
    }

    .m-btn-moves #m-right {
        position: absolute;
        right: 16px;
        bottom: 4vw;
    }

    .m-btn-moves #m-up {
        position: absolute;
        top: 0px;
        right: 68px;
    }

    .m-btn-moves #m-down {
        position: absolute;
        bottom: -1vw;
        right: 68px;
    }

    #looseImage {
        width: 80vw;
    }
}

