/* #region GENERAL */
*{
    padding: 0;
    margin: 0;
    text-decoration: none;
    scroll-behavior: smooth;
    list-style: none;
    box-sizing: border-box;
    position: relative;
}
html{
    font-size: 10px;
    @media (max-width: 600px) {
        font-size: 8px;
    }
}
.d-flex{
    display: flex;
}
.d-none{
    display: none;
}
/* #endregion */

/* #region FONTS */
@font-face {
    font-family: 'Rye';
    src: url('./assets/fonts/Rye-Regular.ttf');
}
@font-face {
    font-family: 'Smokum';
    src: url('./assets/fonts/Smokum-Regular.ttf');
}
@font-face{
    font-family: 'Bricolage Grotesque';
    src: url('./assets/fonts/BricolageGrotesque-VariableFont_opsz,wdth,wght.ttf');
}
@font-face{
    font-family: 'MaidenOrange';
    src: url('assets/fonts/MaidenOrange-Regular.ttf');
}
h1{
    font-family: 'Rye','sans-serif';
    font-size: min(60px, 64px);
    letter-spacing: 6px;
    color: rgb(255, 166, 0);
    text-shadow: 5px 2px 8px rgba(0,0,0,0.9);
    text-align: center;
}
h2{
    font-family: 'Rye','sans-serif';
    font-size: 3rem;
    letter-spacing: 6px;
    color: #f4d4a0;
    text-shadow: 5px 2px 8px rgba(0,0,0,0.9);
    text-align: left;
    @media(max-width: 480px){
        font-size: 3rem;
    }
}
/* #endregion */

/* #region BODY */
body{
    font-family: 'Smokum','sans-serif';
    background: url('./assets/icons/Comic2.png');
    background-repeat: no-repeat;
    backdrop-filter: saturate(30%); 
    background-size: cover;
    
    main{
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: auto;
        min-height: calc(100dvh - 5dvh);
        #wrapper{
            width: 100%;
            max-width: 720px;
            height: 100%;
            max-height: 480px;
            canvas{
                background-color: black;
                display: block;
            }
            #imprint-btn{
                position: absolute;
                top: 1rem;
                left: 1rem;
                z-index: 3;
                background: #ffa700;
                width: 18rem;
                height: 5rem;
                font-size: 2.4rem;
                font-family: 'Rye','sans-serif';
                border: 0;
                border-radius: 8px;
                cursor: pointer;
            }
            #imprint-btn:hover{
                border: 3px solid white;
            }
            #fullscreen-btn{
                background: transparent;
                position: absolute;
                top: 0.5rem;
                right: 7rem;
                border: none;
                cursor: pointer;
                visibility: hidden;
                img{
                    width: 5rem;
                }
            }
            #audio-btn{
                position: absolute;
                top: 0.5rem;
                right: 0.5rem;
                z-index: 2;
                background: transparent;
                border: 0;
                cursor: pointer;
                img{
                    width: 5rem;
                }
            }
            #startscreen{
                background-image: url('./assets/img/9_intro_outro_screens/start/startscreen_2.png');
                background-position: center;
                background-size: cover;
                width: 100%;
                max-width: 720px;
                height: 100%;
                max-height: 480px;
                position: absolute;
                top: 0;
                left: 0;
                z-index: 2;
                justify-content: center;
                align-items: center;
                flex-direction: column;
                button{
                    background: transparent;
                    border: 0;
                    cursor: pointer;
                    img{
                        width: 12rem;
                    }
                    img:hover{
                        width: 13rem;
                    }
                    @media (max-width: 480px){
                        img{
                            width: 9rem;
                        }
                        img:hover{
                            width: 10rem;
                        }
                    }
                }
                button:hover{
                    box-shadow: none;
                }
                #btn-explanation{
                    position: absolute;
                    background-color: #a0220ab3;
                    bottom: 0;
                    height: 5rem;
                    width: 100%;
                    font-size: 2.6rem;
                    display: flex;
                    justify-content: space-around;
                    align-items: center;
                    .all-view, .desktop-view{
                        display: flex;
                        align-items: center;
                        img{
                            height: 4.5rem;
                        }
                    }
                    .mobile-view{
                        display: none;
                        align-items: center;
                        img{
                            height: 4.5rem;
                        }
                    }
                    @media (max-width: 720px){
                        .desktop-view{
                            display: none;
                        }
                        .mobile-view{
                            display: flex;
                        }
                    }
                    @media (max-width: 480px){
                        font-size: 2.2rem;
                        padding-right: 0.5rem;
                        justify-content: space-between;
                        .all-view, .mobile-view{
                            img{
                                height: 3rem;
                            }
                        }
                    }
                    @media (max-width: 380px){
                        font-size: 2rem;
                        .all-view, .mobile-view{
                            img{
                                height: 2.5rem;
                            }
                        }
                    }
                }
            }
            #imprint{
                background-image: url('./assets/img/5_background/first_half_background.png');
                background-size: cover;
                position: absolute;
                top: 0;
                left: 0;
                z-index: 3;
                width: 100%;
                max-width: 720px;
                height: 100%;
                max-height: 480px;
                justify-content: center;
                align-items: center;
                flex-direction: column;
                gap: 2rem;
                .close-btn{
                    width: 3rem;
                    height: 3rem;
                    position: absolute;
                    top: 3rem;
                    right: 3.5rem;
                    background: #a0220a;
                    text-align: center;
                    border-radius: 8px;
                    color: white;
                    font-size: 2.4rem;
                    border: 2px solid black;
                    cursor: pointer;
                    @media (max-width: 405px){
                        top: 2rem;
                        right: 2.2rem;
                    }
                }
                .close-btn:hover{
                    box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
                }
                .imprint-text{
                    background: white;
                    width: 90%;
                    height: 65%;
                    padding: 2rem;
                    overflow-y: auto;
                    p{
                        font-size: 1.8rem;
                        font-family: 'Bricolage Grotesque','sans-serif';
                    }
                }
            }
            #loading-scr{
                position: absolute;
                top: 0;
                left: 0;
                flex-direction: column;
                padding: 10rem;
                gap: 3rem;
                justify-content: center;
                z-index: 3;
                background: url('./assets/img/5_background/first_half_background.png');
                background-size: cover;
                width: 100%;
                max-width: 720px;
                height: 100%;
                max-height: 480px;
                p{
                    font-family: 'MaidenOrange';
                    font-size: 24px;
                    padding: 2rem;
                    background: rgba(255,255, 255, 0.8);
                }
                @media(max-width: 660px){
                    padding: 5rem;
                }
                @media (max-width: 470px){
                    p{
                        font-size: 20px;
                    }
                }
                @media (max-width: 405px){
                    gap: 1.5rem;
                    padding: 2rem;
                    h2{
                        font-size: 24px;
                    }
                    p{
                        font-size: 18px;
                    }
                }
            }
            #mobile-btn{
                position: absolute;
                bottom: 1rem;
                display: none;
                justify-content: space-between;
                width: 100%;
                height: 5rem;
                padding-left: 5rem;
                padding-right: 5rem;
                @media (max-width: 1180px){
                    display: flex;
                }
            }
            #endscreen{
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                max-width: 720px;
                height: 100%;
                max-height: 480px;
                background: radial-gradient(circle,rgba(252, 247, 247, 0.5) 0%, rgba(0, 0, 0, 0.5) 100%);
                flex-direction: column;
                justify-content: space-around;
                align-items: center;
                padding: 8% 12%;
                img{
                    width:100% ;
                }
                div{
                    display: flex;
                    justify-content: center;
                    gap: 5rem;
                    button{
                        font-family: 'Smokum','sans-serif';
                        font-size: 2.6rem;
                        color: yellow;
                        background-color: #ffa700;
                        border-radius: 10px;
                        padding: 2px 8px;
                        cursor: pointer;
                    }
                    button:hover{
                        box-shadow: rgba(0, 0, 0, 0.3) 0px 3px 6px;
                    }
                }
                
            }
        }
    }
    
    footer{
        display: flex;
        justify-content: center;
        align-items: center;
        background: white;
        font-size: 18px;
        height: 5dvh;
        img{
            height: 100%;
        }
        @media only screen and (max-height: 480px){
            display: none;
        }
    }
}

#run-key-panel, #jump-throw-key-panel{
    display: flex;
    gap: 1rem;
}
#left-btn, #right-btn, #jump-btn, #throw-btn{
    height: 5rem;
    width: 5rem;
    background: black;
    border: 1rem black;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    img{
        width: 4rem;
        height: 4rem;
    }
}



@media only screen and (max-width: 720px){
    h1{
        display: none;
    }
    #wrapper{
        canvas{
            width: 100%;
        }
    }
}
@media only screen and (max-height: 480px){
    #wrapper{
        canvas{
            height: 100dvh;
        }
    }
}

#rotate-device-wrapper{
    width: 100%;
    height: 100dvh;
    z-index: 20;
    position: absolute;
    top: 0;
    left: 0;
    display:none;
    background-color: black;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    .phone{
        height: 50px;
        width: 100px;
        border: 3px solid white;
        border-radius: 10px;
        animation: rotate-rect 1.5s ease-in-out infinite alternate;
    }
    .message{
        color: white;
        font-size: 1.6rem;
        margin-top: 40px;
    }
    
}
@keyframes rotate-rect{
    0% {transform: rotate(0deg)}
    50% {transform: rotate(-90deg)}
    100% {transform: rotate(-90deg)}
}
@media (max-width: 720px) and (orientation: portrait) {
    #rotate-device-wrapper{
        display: flex;
    }
}

@media (max-width: 720px) and (orientation: landscape) {
    #rotate-device-wrapper{
        display: none !important;
    }
}