@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;800;900&display=swap');

*{
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root{
    --base-color: #ff0000;
    --gray-color: #8f8f8f;
    --second-color: rgb(122, 122, 122);
}


body{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--second-color);
}

.box{
    position: relative;
    width: 380px;
    height: 420px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.box form{
    position: absolute;
    inset: 4px;
    background-color: #28292d;
    padding: 50px 40px;
    z-index: 2;
    display: flex;
    flex-direction: column;

}

.box form #logo{
    align-items: center;
    text-align: center;
}

.box form #logo img{
   width: 70px;
}


.box form .inputBox{
    position: relative;
    width: 300px;
    margin-top: 35px;
}

.box form .inputBox input
{
    position: relative;
    width: 100%;
    padding: 20px 10px 10px;
    background: transparent;
    outline: none;
    border: none;
    box-shadow: none;
    color: black;
    font-size: 1rem;
    letter-spacing: 0.05rem;
    transition: 0.5s;
    z-index: 10;
}

.box form .inputBox span{
     position: absolute;
     left: 0;
     padding: 20px 10px 10px;
     pointer-events: none;
     color: grey;
     font-size: 1rem;
     letter-spacing: 0.05rem;
     transition: 0.5s;
}

.box form .inputBox input:valid ~ span,
.box form .inputBox input:focus ~ span{
    color: white;
    font-size: 0.75rem;
    transform: translateY(-34px);
}

.box form .inputBox i
{
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    transition: 0.5s;
    pointer-events: none;

}

.box form .inputBox input:valid ~ i,
.box form .inputBox input:focus ~ i{
    height: 44px;
}

.box form links
{
    display: flex;
    justify-content: space-between;

}

.box form .links a{
    margin: 10px 0;
    font-size: 0.75rem;
    color:#8f8f8f;
    text-decoration: none;
}

.box form .links a:hover{
    color: white;
}

.box form input[type="submit"]{
    outline: none;
    padding: 15px 25px;
    background: var(--base-color);
    cursor: pointer;
    font-size: 1rem;
    border-radius: 4px;
    font-weight: 600;
    width: 100%;
    margin-top: 10px;
    color: black;
}

.box form input[type="submit"]:active{
    opacity: 0.8;
}


.box::before{
    content:'';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 380px;
    height: 420px;
    background: linear-gradient(0deg, transparent, var(--base-color), var(--base-color));
    animation: animate 6s linear infinite;
    transform-origin: bottom right;
}

.box::after{
    content:'';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 380px;
    height: 420px;
    background: linear-gradient(0deg, transparent, var(--base-color), var(--base-color));
    animation: animate 6s linear infinite;
    transform-origin: bottom right;
    animation-delay: -3s;
}

@keyframes animate {
    0%{
        transform: rotate(0deg);
    }
    100%{
        transform: rotate(360deg);
    }
}


.borderline{
    position:absolute;
    top: 0;
    inset: 0;
}

.borderline::before{
    content:'';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 380px;
    height: 420px;
    background: linear-gradient(0deg, transparent, rgb(255, 145, 0), rgb(255, 140, 0), rgb(255, 153, 0));
    animation: animate 6s linear infinite;
    transform-origin: bottom right;
    animation-delay: -1.5px;
}

.borderline::after{
    content:'';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 380px;
    height: 420px;
    background: linear-gradient(0deg, transparent, rgb(255, 255, 255), rgb(255, 255, 255), rgb(0, 0, 0));
    animation: animate 6s linear infinite;
    transform-origin: bottom right;
    animation-delay: -4.5px;
}

#error{
    background-color: rgb(255, 0, 0);
    color: rgb(255, 255, 255);
    border: 1px solid red;
    position: relative;
}