/* agu-display-regular - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Agu Display';
    font-style: normal;
    font-weight: 400;
    src: url('./fonts/agu-display-v1-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
  }

/* londrina-solid-300 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Londrina Solid';
    font-style: normal;
    font-weight: 300;
    src: url('./fonts/londrina-solid-v17-latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
  }
  /* londrina-solid-regular - latin */
  @font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Londrina Solid';
    font-style: normal;
    font-weight: 400;
    src: url('./fonts/londrina-solid-v17-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
  }

/* kelly-slab-regular - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Kelly Slab';
    font-style: normal;
    font-weight: 400;
    src: url('./fonts/kelly-slab-v17-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
  }

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, white, orange, white, orange);
    border: 1px solid rgba(245, 245, 245, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    cursor: pointer;
    background: linear-gradient(180deg, orange, white, orange, white);
}

::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

* {
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    width: 100vw;
    height: 100vh;
    height: var(--real-vh, 100vh);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Kelly Slab', Arial, Helvetica, sans-serif;
    position: relative;
    overflow: hidden;
}

h1 {
    font-size: 48px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    position: absolute;
    top: calc(50% - 310px);
}

#agu {
    font-family: 'Agu Display';
}

#londrina {
    font-family: 'Londrina Solid';
}

#kelly {
    font-family: 'Kelly Slab';
}

#fullscreen {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    background-image: url('img/5_background/backgroundGameGray.png') ;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

canvas {
    background-color: black;
    border: 3px solid black;
    border-radius: 20px;
    box-shadow: 0 0 50px black;
    display: block;
    position: absolute;
}

.button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.75);
    box-shadow: 0 0 5px black;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 10px;
    & img {
        width: 30px;
        height: 30px;
        filter: drop-shadow(0 0 2px black);
    }
    &:hover {
        box-shadow: 0 0 5px black inset;
        background-color: rgba(255, 255, 255, 0.85);
        cursor: pointer;
    }
    &:active {
        scale: 0.95;
    }
}

.descr-visible {
    height: 100%;
    opacity: 1;
    display: block;
}

.overlay-ctn {
    display: block;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    position: absolute;
    border: 1px solid black;
    width: 720px;
    height: 480px;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: auto 720 / 480;
    & #overlay-game {
        position: absolute;
        bottom: 0px;
        left: 20px;
        right: 20px;
        display: flex;
        justify-content: space-between;
        & .buttons-row-top,
        .buttons-row-bottom {
            display: flex;
            gap: 10px;
            flex-direction: column;
        }
        & #button-left-img {
            rotate: 180deg;
        }
        & #button-jump-img {
            rotate: 270deg;
        }
    }
    & #overlay-settings {
        position: absolute;
        bottom: 0px;
        left: 80px;
        right: 80px;
        top: 90px;
        bottom: 0;
        display: flex;
        justify-content: end;        
        margin: 0 auto;
        padding: 10px 70px;
        flex-direction: column;
        z-index: 95;
        & .info-block, .info-impressum {
            height: fit-content;
            width: -webkit-fill-available;
            padding-top: 10px;
            overflow-y: scroll;
            overflow-x: hidden;
            display: none;
            color: white;
            & .info-ctn {
                background-color: rgba(0, 0, 0, 0.75);
                border-radius: 5px;
                padding: 5px;
                margin: 10px;
                & .info-headline {
                    display: flex;
                    padding: 5px 10px;
                    align-items: center;
                    gap: 20px;
                    &:hover {
                        cursor: pointer;
                    }
                    & img {
                        rotate: 0deg;
                        width: 16px;
                        height: 16px;
                    }
                }
                & .info-line {
                    height: 100%;
                    display: none;
                    flex-direction: column;
                    padding: 5px 10px;
                    font-size: 18px;
                    & a {
                        color: whitesmoke;
                    }
                }
            }
        }
        & .settings-buttons {
            display: flex;
            flex-direction: row;
            justify-content: center;
            & .button {
                margin: 5px 10px;
                aspect-ratio: 1/1;
            }
            & .button-screen {
                & #img-smallscreen {
                    display: none;
                }
            }
            & #button-sound-img {
                width: 26px;
                height: 26px;
            }
        }
    }
    & #overlay-messages {
        display: none;
        position: absolute;
        top: 0px;
        left: 0;
        right: 0;
        bottom: 0;
        & #img-msg-win {
            display: none;
            width: 400px;
            transform: translateX(100%);
            transform: translateY(0%);
            height: auto;
            animation: winningMessage 5s linear;
        }
        & #img-msg-loose {
            width: 100%;
            height: 100%;
            height: 480px;
            display: none;
            aspect-ratio: auto 720/480;  
            border-radius: 20px;
            animation: loosingMessage 5s linear;
        }
    }
    & #overlay-rotate {
        background-color: rgba(0, 0, 0, 0.9);
        color: whitesmoke;
        position: absolute;
        top: 0px;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 100;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 10px;
        font-size: 284x;

        & .img-ctn {
            width: 180px;
            height: 180px;
            position: relative;
            & img {
                position: absolute;
                width: 70px;
                height: 70px;
                right: 10px;
                top: 10px;
                rotate: 90deg;
            }
            & .mobile-portrait {
                position: absolute;
                left: 0;
                bottom: 0;
                height: 180px;
                width: 90px;
                border-radius: 10px;
                border: 3px solid rgba(245, 245, 245, 0.8);
            }
            & .mobile-landscape{
                position: absolute;
                left: 0;
                bottom: 0;
                height: 90px;
                width: 180px;
                border-radius: 10px;
                border: 3px solid rgba(245, 245, 245, 0.8);
            }
        }
    }

    .level-closed {
        filter: grayscale(1);
        pointer-events: none;
    }

    & #overlay-start {
        display: none;
        position: absolute;
        top: 0px;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 20px;
        & .level-buttons {
            margin-top: 30px;
            position: absolute;
            width: 100%;
            display: flex;
            flex-wrap: nowrap;
            justify-content: center;
            gap: 20px;
            z-index: 100;
            & .level-button {
                background-color: rgba(255, 255, 255, 0.75);
                border: 0.5px solid rgba(0, 0, 0, 0.5);
                border-radius: 10px;
                width: 100px;
                max-width: 22%;
                height: 60px;
                display: flex;
                justify-content: center;
                align-items: center;
                position: relative; 
                &:hover {
                    cursor: pointer;
                    background-color: rgba(255, 255, 255, 0.85);
                    box-shadow: 0 0 5px black inset;
                }      
                &:active {
                    scale: 0.95;
                }
                & img {
                    width: 50px;
                    height: 50px;
                    margin: 0 -10px;
                    filter: drop-shadow(0 0 5px black);
                }
            }
        }
        & img {
            width: 100%;
            height: 100%;
            border-radius: 20px;
        }
    }
}

@keyframes loosingMessage {
    0% {
        transform: translateY(0%);
        height: 0%;
        opacity: 0;
    }
    35% {
        transform: translateY(0%);
        height: 100%;
        opacity: 1;
    }
    75% {
        transform: translateY(0%);
        height: 100%;
        opacity: 1;
    }
    100% {
        transform: translateY(0%);
        height: 0%;
        opacity: 0; 
    }
}

@keyframes winningMessage {
    0% {
        transform: translateX(100%) rotate(360deg);
        scale: 0.0;
        opacity: 0;
    }
    25% {
        transform: translateX(20%) rotate(0deg);
        opacity: 0.75;
    }
    30% {
        opacity: 1;
        scale: 1.1;
    }
    32% {
        scale: 1.0;
    }
    70% {
        transform: translateX(20%) rotate(0deg);
        opacity: 1;
        scale: 1.0;
    }
    100% {
        scale: 0.0;
        transform: translateX(-100%) rotate(-360deg);
        opacity: 0;
    }
}

@media (min-width: 1024px) and (hover: hover) {  
    #overlay-game {  
        display: none !important;  
    }  
}

@media only screen and (max-width: 720px) {
    canvas  {
        width: 100%;
    }
    .overlay-ctn {
        width: 100%;
    }
}

@media only screen and (max-height: 700px) {
    h1 {
        display: none;
    } 
}

@media only screen and (max-height: 480px) {
    canvas {
        height: 100vh;
    }
    .overlay-ctn {
        height: 100vh;
        width: unset;
    }
}