@font-face {
    font-family: silombol;
    src: url(fonts/silombol.ttf) format("truetype");
    font-weight: normal;
}

@font-face {
    font-family: ari;
    src: url(fonts/ari-w9500-display.ttf) format("truetype");
    font-weight: bold;
}


@font-face {
    font-family: ari;
    src: url(fonts/ari-w9500.ttf) format("truetype");
    font-weight: normal;
}

body{
    font-family: silombol;
    background-color: #121212;
    color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-size: 24px;
}

h1,h2,p{
    margin: 0;
}

h1{
    font-family: ari;
    font-size: 1.5em;
    padding: 0.5em;
    margin: 0 0.5em;
    margin-bottom: -0.15em;
    margin-right: auto;
    line-height: 0;
    background-color: #121212;
    position: relative;
    z-index: 5;
}

.form{
    max-width: 500px;
    padding: 1em;
    display: grid;
    margin-top: 3.6em;
    animation: rotate 5s infinite ease-in-out, scale 5s infinite ease-in-out;
    animation-delay: -4s, -2s;
}

input{
    font: inherit;
    padding: 0.5em;
    font-family: ari;
    font-weight: bold;
    background-color: transparent;
    border: none;

    color: inherit;
    letter-spacing: 5px;
    box-sizing: border-box;
    width: 100%;
}

input:focus{
    outline: none;
}

.box{
    position: relative;
    z-index: 1;
    border: 2px solid #f0f0f0;
    padding: 1.25em;
    padding-top: 1.25em;
    display: grid;
    gap: 1em;
    box-shadow: 0.2em 0.2em 0 #000000, 0.3em 0.3em 0 #f0f0f058;
    border-radius: 0.75em;

    div.password{
        position: relative;
        display: flex;
        background-color: transparent;
        border: 2px solid #f0f0f0;
        border-radius: 0.5em;
        align-items: center;

        .icon{
            width: 1.5em;
            height: 1.5em;
            margin-right: 0.5em;
            cursor: pointer;
            opacity: 0.9;
            user-select: none;
        }
    }

    div.action{
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.5em;

        a{
            font-size: 0.8em;
            opacity: 0.5;
            user-select: none;
            cursor: pointer;
            margin: 0.5em;

            &:hover{
                text-decoration: underline;
            }
        }
        
        button{
            border: 2px solid #f0f0f0;
            background-color: #f0f0f0;
            color: black;
            font: inherit;
            padding: 0.5em 1em;
            justify-self: end;
            cursor: pointer;
            border-radius: 0.5em;

            &:hover{
                background-color: transparent;
                color: #f0f0f0;
            }
            
            &:active{
                opacity: 0.5;
            }
        }
    }

    &.flash{
        animation: border-flash 0.3s;
    }
}

.shake{
    animation: shake 0.2s;
}

@keyframes border-flash {
    0% { border-color: red; box-shadow: 0.2em 0.2em 0 #000000, 0.3em 0.3em 0 rgba(255, 0, 0, 0.5); scale: 1.05; }
    100% { border-color: #f0f0f0; box-shadow: 0.2em 0.2em 0 #000000, 0.3em 0.3em 0 #f0f0f058; scale: 1;}
}

@keyframes shake {
    0% { transform: translate(-10px, 0); border-color: red;}
    25% { transform: translate(8px, 0); }
    50% { transform: translate(-5px, 0); }
    75% { transform: translate(2px, 0); }
    100% { transform: translate(0, 0);  border-color: #f0f0f0;}
}


footer{
    user-select: none;
    pointer-events: none;
    font-family: ari;
    opacity: 0.4;
    font-size: 0.58em;
    display: flex;
    gap: 2.5em;
    margin: auto;
    margin-top: 2.5em;

    div{
        display: flex;
        align-items: center;
        line-height: 1.3;
        gap: 0.6em;
    }

    .icon{
        width: 2.8em;
        height: 2.8em;
    }
}

.notif-container{
    pointer-events: none;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0 ;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5em;
    z-index: 10;
    padding: 1em;
    font-weight: bold;
    overflow-y: scroll;
    overflow-x: hidden;
    font-family: ari;
    font-size: 16px;

    /*  Helper for Y axis shake */
    .notifWiggle{
        animation: wiggleY 0.8s infinite ease-in-out;
        animation-delay: -0.75s;
    }
    
    .notif{
        backdrop-filter: blur(5px);
        padding: 1em;
        border-radius: 0.5em;
        display: flex;
        gap: 1em;
        max-width: 380px;
        align-items: center;
        animation: fade-in 0.18s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275), wiggleX 1s infinite ease-in-out;

        &.out{
            animation: fade-out 0.5s forwards;
        }

        &.correct{
            background-color: rgba(0, 255, 0, 0.661);
        }

        &.incorrect{
            background-color: rgba(255, 0, 0, 0.661);
        }
       
        .icon{
            width: 1.5em;
            vertical-align: middle;
            animation: icon 0.8s infinite ease-in-out;
        }
    }

}

@keyframes fade-in {
    0% { opacity: 0; scale: 0; }
    100% { opacity: 1; scale: 1;}
}

@keyframes fade-out {
    0% { opacity: 1; }
    100% { opacity: 0; transform: translateX(100%);}
}

@keyframes rotate {
    0%,100% { rotate: -3deg; }
    50% { rotate: 3deg; }
}

@keyframes scale {
    0%,100% { scale: 0.95; }
    50% { scale: 0.9; }
}

@keyframes wiggleX {
    0%,100% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
}

@keyframes wiggleY {
    0%,100% { transform: translateY(-10px); }
    50% { transform: translateY(10px); }
}

@keyframes icon {
    0%,100% { transform: scale(3) rotate(0deg); }
    25% { transform: scale(1) rotate(15deg); }
    50% { transform: scale(2) rotate(0deg); }
    75% { transform: scale(1) rotate(-15deg); }
}

.captchas{
    padding: 1em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5em;


    &.fade-in{
        animation: img-fade-in 3s forwards cubic-bezier(0.165, 0.84, 0.44, 1);
    }

    .title{
        align-self: flex-start;
        font-weight: normal;
        opacity: 0.5;
        font-size: 0.9em;
        margin: 0em 0.5em;
        margin-bottom: -1em;
    }


    .captcha-box{
        position: relative;
        border-radius: 0.5em;
        box-shadow: 0.2em 0.2em 0 #000000, 0.3em 0.3em 0 #f0f0f058;
        background-color: white;
        max-width: 500px;
        aspect-ratio: 690/258;
        width: 100%;
        overflow: hidden;
        flex: 1;

        img{
            max-width: 100%;
            height: auto;
            display: block;

            &.fade-in{
                animation: img-fade-in 1s forwards cubic-bezier(0.165, 0.84, 0.44, 1);
            }
        }

        .loading{
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);

            > img{
                animation: load 2s infinite linear;
                width: 2.5em;
            }
        }
    }

    .navigator{
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5em;
        flex: 1;
        animation: rotate 4s infinite ease-in-out, scale 4s infinite ease-in-out;
        animation-delay: -3s, -1.5s;

        .arrow>img{
            user-select: none;
            width: 1.25em;
            height: 1.25em;
            cursor: pointer;
            user-select: none;
            transition: scale 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);

            &:active{
                transition: scale 0s;
                scale: 0.8;
            }
        }

        .name{
            min-width: 180px;
            text-align: center;
        }

        &.disabled{
            pointer-events: none;
            opacity: 0.4;
        }
    }
}

@keyframes img-fade-in {
    0% { opacity: 0; scale: 1.05; }
    100% { opacity: 1; scale: 1;}
}

.stickynote{
    position: fixed;
    bottom: 1em;
    right: 1em;
    font-size: 0.5em;
    color: #3b3b3b;
    user-select: none;
    transition: color 0.3s;
    text-decoration: none;

    &:hover{
        transition: color 0s;
        color: #5a5a5a;
    }
}

@keyframes load {
    0% { rotate: 0deg; }
    100% { rotate: 360deg; }
}