/* ! Fonts Importation */
@font-face{
    font-family: 'Raleway-Regular';
    src: url('../fonts/Raleway-Regular.ttf');
}

@font-face{
    font-family: 'Raleway-white';
    src: url('../fonts/Raleway-white.ttf');
}

/* ! General */
*{
    font-family: 'Raleway-Regular';
    font-size: 1rem;
    box-sizing: border-box;
}

html{
    font-size: 16px;
    background-color: rgba(0, 0, 50, 50%);
}

html, body{
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

img{
    -webkit-user-drag: none;
    -webkit-user-select: none;
    user-select: none;
}

button{
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

/* + Warning Bars */
#hud_top_warning_bar, #hud_bottom_warning_bar{
    position: fixed;
    left: -10%;
    width: 120%;
    height: 22%;
    transform: rotate(-4deg);
    background-color: rgba(10, 10, 10, 75%);
    transition-duration: 450ms;
}

#hud_top_warning_bar{top: -30%;}

#hud_bottom_warning_bar{bottom: -30%;}

#no_fullscreen_warning{display: none}

/* + Victory Screen */
#hud_victory{
    border: 0.2rem solid whitesmoke;
    border-width: 0.2rem 0 0.2rem 0;
    width: 100%;
    position: fixed;
    user-select: none;
    z-index: 20;
    padding: 2rem;
    top: 38.5%;
    height: 25%;
    opacity: 0%;

    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    background-color: rgb(0, 40, 140);
    transition-duration: 450ms;
    overflow-x: hidden;
    overflow-y: hidden;
}

.hud_victory__title{
    font-size: 5rem;
    font-weight: bold;
    color: whitesmoke;
    transition-duration: 650ms;
}

.hud_victory__results_box{
    width: 80%;
    height: 100%;
    margin-top: 1.5rem;
    border: solid whitesmoke;
    border-width: 0.15rem 0 0 0;
    color: whitesmoke;
    padding: 0.8rem;

    justify-content: space-around;
    align-items: start;
    flex-wrap: wrap;
    display: none;

    transition-duration: 650ms;
}

.hud_victory__subtitle{
    font-weight: bold;
    font-size: 1.1rem;
}

.hud_victory__sub_box{
    width: 10%;
    height: 10%;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 10%);
    color: whitesmoke;

    transition-duration: 650ms;
    flex-direction: row;
    padding: 0.5rem 1rem;

    overflow: hidden;
}

.hud_victory__sub_box--stats, .hud_victory__sub_box--objects{
    width: 49%;
    height: 76%;
    line-height: 2;
}

.hud_victory__sub_box--exp{
    width: 49%;
    height: 19%;
}

.hud_victory__sub_box--continue{
    width: 49%;
    height: 19%;
    background-color: rgb(0, 0, 0, 0);

    display: flex;
    justify-content: center;
    align-items: center;
}

.hud_victory__button{
    width: 30%;
    border: 1px solid whitesmoke;
    padding: 1rem;
    border-radius: 0.5rem;
    
    text-align: center;
    cursor: pointer;
    transition-duration: 300ms;
    display: none;
}

.hud_victory__button:hover{
    color: whitesmoke;
    background-color: rgba(0, 40, 100);
    font-weight: bold;
}

.hud_victory__button:active{
    background-color: whitesmoke;
    color: rgb(0, 40, 140);
}

/* + Full Screen Button */
#fullScreen{
    width: 100%;
    height: 100%;
    background-color: rgb(0, 40, 140);
    
    display: flex;
    justify-content: center;
    align-items: center;
    
    position: fixed;
    z-index: 20;
    gap: 1rem;
}

#fullScreen:active{
    background-color: rgb(0, 0, 100);
}

.fullScreen_title{
    font-size: 4rem;
    font-weight: bold;
    color: white;

    user-select: none;
}

.fullScreen__playIcon{
    width: 0;
    height: 0;
    border: 2.25rem solid transparent;
    border-left: 4rem solid white;
    aspect-ratio: 1/1;
}

/* ! Player */
/* + Status */
.hud_status{
    width: 30%;
    height: 6rem;
    position: fixed;
    top: 0.5rem;
    left: 1.1rem;
    padding: 0.5rem;

    display: flex;
    align-items: start;
    justify-content: space-around;
    flex-direction: column;
    gap: 0.25rem;
    
    border-radius: 8px;
    background-color: rgb(0, 50, 150);
    transform: skew(-12deg);
    z-index: 5;
    user-select: none;
}           

.hud_status__name{
    font-weight: bold;
    color: white;
}

.hud_status__bar{
    flex-direction: row;
    width: 100%;
    height: 4rem;
}

.hud_status__health, .hud_status__energy{
    display: flex;
    justify-content: start;
    align-items: center;
    transition-duration: 300ms;
}

.hud_status__health{
    width: 100%;
    height: 55%;
    border: 2px rgb(0, 200, 0) solid;
    background-color: rgba(0, 255, 0, 30%);
    animation: none;
}

.hud_status__energy{
    width: 80%;
    height: 45%;
    border: 2px rgb(0, 200, 200) solid;
    background-color: rgba(0, 200, 200, 30%);
    animation: none;
}

.hud_status__icon{
    position: absolute;
    height: 0.8rem;
    padding-left: 0.5rem;
}

.hud_status__text{
    position: absolute;
    font-weight: bold;
    font-size: 0.9rem;
    padding-left: 1.6rem;
}

.hud_status__graffic{
    width: 100%;
    height: 100%;
    transition-duration: 500ms;
}

.hud_status__graffic--health{
    background-color: rgb(0, 220, 0);
}

#player_health_graffic{
    animation: none;
}

.hud_status__graffic--energy{
    background-color: rgb(0, 250, 220);
}

#player_energy_graffic{
    animation: none;
}

@keyframes border_health_warning {
    0%{border-color: rgb(220, 0, 0);}
    50%{border-color: rgb(220, 120, 0);}
    100%{border-color: rgb(220, 0, 0);}
}

@keyframes graphic_health_warning {
    0%{background-color: rgb(220, 0, 0);}
    50%{background-color: rgb(220, 120, 0);}
    100%{background-color: rgb(220, 0, 0);}
}

@keyframes border_specialMoveReady {
    0% {border-color: rgb(250, 255, 180);}
    50% {border-color: rgb(0, 250, 220);}
    100% {border-color: rgb(250, 255, 180);}
}

@keyframes graphic_specialMoveReady {
    0% {background-color: rgb(250, 255, 180);}
    50% {background-color: rgb(0, 250, 220);}
    100% {background-color: rgb(250, 255, 180);}
}

/* + Buffs & Debuffs */
#hud_effects_box{
    width: 30%;
    top: 6.7rem;
    left: 0.5rem;
    position: fixed;

    display: flex;
    justify-content: start;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    
    user-select: none;
    z-index: 5;
}

.hud_effect{
    width: 1.8rem;
    height: 1.8rem;
    padding: 0.25rem;

    color: white;
    border-radius: 0.5rem;
    
    display: flex;
    justify-content: center;
    align-items: center;
    
    overflow: hidden;
}

.hud_effect img{
    width: 100%;
    height: 100%;
}

.hud_effect--buff{
    background-color: rgb(0, 50, 150);
}

.hud_effect--buff:hover{
    background-color: rgb(50, 100, 250);
}

.hud_effect--debuff{
    background-color: rgb(150, 50, 0);
}

.hud_effect--debuff:hover{
    background-color: rgb(250, 100, 50);
}

.hud_effect--buff:hover, .hud_effect--debuff:hover{
    cursor: help;
}

#hud_effect--info{
    width: 30%;
    top: 8.8rem;
    left: 0.5rem;
    position: fixed;
    padding: 0.2rem 0.5rem;
    
    border-radius: 8px;
    border: 1px solid white;
    background-color: rgba(0, 0, 20, 50%);
    
    color: white;
    text-align: justify;

    z-index: 10;
    opacity: 0%;
    user-select: none;
}

/* + Moves */
.hud_moves{
    width: 50%;
    height: 20%;
    left: 0.5rem;
    bottom: 0.5rem;
    position: fixed;

    padding: 0.2rem;
    border-radius: 8px;
    background-color: rgb(40, 40, 120);

    display: flex;
    justify-content: space-between;
    align-items: start;
    flex-direction: row;
    flex-wrap: wrap;

    transition-duration: 300ms;
    z-index: 5;
}

.hud_moves__move{
    height: 47%;
    flex-basis: 49.6%;
    margin: 0.25% 0;

    color: white;
    border: 0;
    border-radius: 8px;
    background-color: rgb(0, 25, 110);
    
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    
    transition-duration: 300ms;
    user-select: none;
    cursor: pointer;
}

.hud_moves__move:hover{
    animation: hud_moves_animation 1s infinite;
}

@keyframes hud_moves_animation {
    0%{ background-color: rgb(0, 25, 110); }
    50%{ background-color: rgb(0, 40, 140); }
    100%{ background-color: rgb(0, 25, 110); }
}

@keyframes highlight_button {
    0%{ background-color: rgb(0, 25, 140); }
    50%{ background-color: rgb(80, 80, 200); }
    100%{ background-color: rgb(0, 25, 140); }
}

.hud_moves__move:active{
    animation: none;
    background-color: rgb(0, 50, 150);
    transition-duration: 0ms;
}

.hud_moves__text{
    width: 70%;
    text-align: center;
}

.hud_moves__img{
    height: 130%;
    opacity: 30%;
}

#hud_moves_attack{
    bottom: -31%;
}

#hud_moves_specials{
    bottom: -31%;
}

.hud_moves__move--disable{
    color: rgb(20, 20, 20);
    background-color: rgb(80, 80, 80);
    pointer-events: none;
}

.hud_moves__move--invisible{
    pointer-events: none;
    opacity: 0%;
}

#hud_moves__return{
    height: 3.5rem;
    left: 49.5%;
    bottom: -31%;
    margin-left: 1.5rem;
    aspect-ratio: 1/1;
    position: fixed;

    color: white;
    border-radius: 8px;
    background-color: rgb(40, 40, 120);
    border: 0;
    
    display: flex;
    justify-content: center;
    align-items: center;

    transition-duration: 300ms;
    user-select: none;
    cursor: pointer;
}

/* + Sprite*/
#player_sprite{
    height: 50%;
    left: 0.5%;
    bottom: 22%;
    position: absolute;
    image-rendering: pixelated;

    transition-duration: 300ms;
}

/* + Backpack */
#hud_backpack{
    position: fixed;
    bottom: -75%;
    left: 0.5rem;
    width: 50%;
    height: 75%;
    border-radius: 8px 8px 0 0;
    background-color: rgb(40, 40, 120);
    padding: 1vh;
    z-index: 6;
    display: flex;
    justify-content: start;
    align-items: start;
    flex-direction: column;
    flex-wrap: nowrap;
    transition-duration: 300ms;
}

.hud_backpack__description{
    width: 100%;
    height: 5rem;
    color: white;
    border-radius: 8px;
    background-color: rgb(50, 50, 150);
    margin-bottom: 1vh;
    padding: 1vh 2vh;
    user-select: none;
    flex-shrink: 0;
}

.hud_backpack__items{
    width: 100%;
    height: 100%;
    
    display: flex;
    justify-content: start;
    align-content: flex-start;
    align-items: start;

    flex-wrap: wrap;
    overflow-y: scroll;
    gap: 1vh;
}

.hud_backpack__items::-webkit-scrollbar, #hud_victory::-webkit-scrollbar{
    width: 0.5rem;
    border-radius: 8px;
    background-color: rgb(80, 80, 150);
}

.hud_backpack__items::-webkit-scrollbar-thumb, #hud_victory::-webkit-scrollbar-thumb{
    border-radius: 8px;
    background-color: rgb(50, 50, 150);
}

.hud_backpack__items::-webkit-scrollbar-thumb:active, #hud_victory::-webkit-scrollbar-thumb:active{
    background-color: rgb(0, 40, 140);
}

.hud_backpack__items div{
    width: 19%;
    aspect-ratio: 1/1;
    border-radius: 8px;
    background-color: rgb(0, 25, 110);
    
    padding: 0;
    margin-bottom: 0.3%;
    position: relative;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;

    user-select: none;
}

.hud_backpack__items div p{
    position: absolute;
    bottom: -0.8rem;
    right: 0.2rem;
    width: 2rem;
    font-weight: bold;
    aspect-ratio: 1/1;

    display: flex;
    align-items: center;
    justify-content: center;
    
    color: white;
    background-color: rgba(50, 50, 150);
    border-radius: 8px;
}

.hud_backpack__items div:hover{
    animation: hud_moves_animation 1s infinite;
}

.hud_backpack__items div:active{
    animation: none;
    background-color: rgb(0, 50, 150);
}

.hud_backpack__items div img{
    height: 60%;
    transition-duration: 300ms;
}

.hud_backpack__items div img:hover{
    height: 80%;
}


/* ! Enemy */
/* + Status */
.enemy_status{
    background-color: rgba(255, 150, 0, 70%);
    width: 30%;
    height: auto;

    top: 0.5rem;
    right: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    position: fixed;
    z-index: 5;

    user-select: none;
    font-weight: bold;
}

.enemy_status__bar, .enemy_status__health{
    width: 100%;
}

.enemy_status__bar{
    height: 20px;
    border: 0.15rem solid rgb(180, 20, 0);
    background-color: rgba(100, 0, 0, 25%);

    margin-top: 0.25rem;
}

.enemy_status__health{
    height: 100%;
    background-color: rgb(220, 50, 10);
    transition-duration: 300ms;
}

/* + Sprite */
#enemy_sprite{
    height: 55%;
    right: 0.5%;
    bottom: 22%;
    position: absolute;
}

@media screen and (orientation: portrait){
    #no_fullscreen_warning{
        width: 100%;
        height: 100%;

        background-color: rgb(0, 25, 140);

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1rem;

        position: absolute;
        padding: 3rem 1rem;
        z-index: 19;
    }

    #no_fullscreen_warning p{
        font-size: 3rem;
        font-weight: bold;
        text-align: center;

        margin: 0;
        padding: 0;
        color: white;
    }

    #no_fullscreen_warning img{
        aspect-ratio: 1/1;
        width: 80%;
    }

    #player_sprite{display: none;}
}

@media screen and (max-width: 1024px) and (orientation: landscape){
    html{
        font-size: 14px;
    }
}