@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
*{
    padding: 0;
    margin: 0;
}

:root {
    --color1:rgba(2,2,2);
    --color2:rgba(214,214,214);
    --color3:rgba(13,13,13);
    --color4:rgba(16,16,16);
    --color5:rgba(40,40,40);
    --borders:rgba(214,214,214,0.2);
    --bShadow:rgba(214,214,214,0.1);
    --placeholder:rgba(214,214,214,0.4);
}
body {
    width: 100%;
    height: 100vh;
    background-color: var(--color1);
    color: var(--color2);
    font-family: "Roboto", sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1em;
}
form {
    width: clamp(20em,35vw,35em);
    height: clamp(17.5em, 25vw, 25em);
    background-color: var(--color3);
    border-radius: 12px;
    border: 1.5px solid var(--borders);
    box-shadow: 0px 0px 1000px 15px var(--bShadow);
    padding: 1em;
    display: flex;
    flex-direction: column;
   
}

.titleContainer {
    width: 100%;
    padding: 1em;
    font-size: 0.8em;
    box-sizing: border-box;
    height: 25%;
    white-space: nowrap;
}

.title {
    font-size: clamp(1.5em,2.75vw,2.75em);
}
.buttonContainer {
    height: 25%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    }
.buttonContainer > button {
    width: 40%;
    border-radius: 10px;
    position: relative;
    height: 60%;
    background-color:var(--color1);
    box-shadow: 0px 0px 10px 0px var(--bShadow);
    border: none;
    color: var(--color2);
    font-size: 1.5em;
    transition: all 0.3s ease-in-out;
    isolation: isolate;
    border:2px solid var(--borders);
    &:focus {
        outline: var(--color2);
    }
}

.buttonContainer > button::before {
    content:"";
    top:0;
    left: 0;
    opacity: 1;
    width: 100%;
    height: 100%;
    border-radius: 9px;
    position: absolute;
    z-index: -1;
    background-image: linear-gradient(to right,#1e96eb,#81f939);
    transition: all 0.3s ease-in-out;
}
.buttonContainer > button::after {
    content: "";
    top: 0;
    left: 0;
    opacity: 1;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    position: absolute;
    z-index: -1;
    background-color: var(--color1);
}
.buttonContainer > button:hover {
    border-color: var(--color2);
}
.buttonContainer > button:active {
    transform: scale(1.05);
}
.buttonContainer > button:hover::after {
    color: var(--color1);
}
.buttonContainer > button:hover::before {
    filter: blur(0.5em);
}

.loginWrapper {
    width: 100%;
    height: 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-around   ;
}
.usernameContainer, .passwordContainer {
    width: 100%;
    position: relative;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease-in-out;
}
.usernameContainer > input,.passwordContainer > input {
    border: none;
    padding: .75em;
    font-size: 1.25em;
    width: 80%;
    color: var(--color2);
    border: 1.5px solid var(--borders);
    border-radius: 10px;
    box-shadow: 0px 0px 10px 0px var(--bShadow);
    background-color: var(--color1);
    transition: all 0.3s ease-in-out;
    filter: none;
    &:focus {
        outline: none;
    }
}
input:-webkit-autofill {
    filter:none;
}

h1::selection {
    background-color: var(--borders);
}
button::selection {
    background-color: var(--borders);
}
input::selection {
    background-color: var(--borders);
}
.usernameContainer::before, .passwordContainer::before {
    position: absolute;
    align-items: center;
    font-size: clamp(1.5em,1.8vw,1.8em);
    color: var(--placeholder);
    display: inline-block;
    background-color: var(--color1);
    top: 25%;
    left: 10%;
    
    
    pointer-events: none;
    transition: all 0.3s ease-in-out;
}
.usernameContainer::before {
    content: "Username";
}
.passwordContainer::before {
    content: "Password";
}
.usernameContainer:has(input:focus)::before,
.usernameContainer:has(:not(input:placeholder-shown))::before,
.passwordContainer:has(input:focus)::before,
.passwordContainer:has(:not(input:placeholder-shown))::before {
    font-size: clamp(1.3em,1.5vw,1.5em);
    color: var(--color2);
    top: -22.5%;
}
input:focus, input:not(:placeholder-shown) {
    box-shadow: none;
    border-color: var(--color2);
}

.popUp {
    position: absolute;
    width: clamp(20em,25em,30%);
    height: 12%;
    box-sizing: border-box;
    background-color: var(--color4);
    bottom: 5%;
    border-radius: 0 0 1em 1em;
    transition: all 0.5s ease-out;
    opacity: 0;
    transform: translateY(25px);
}
.popUp.visible {
    opacity: 1;
    transform: translateY(0);
}
.popUp > h3 {
    margin: 0.5em;
}
.popUp > p {
    font-weight: 200;
    font-size: clamp(0.9em,1.4vw,1.4em);
    margin: 0.5em;
}
.popUpBar {
    width: 100%;
    height: 5%;
    background-image:linear-gradient(to right,#1e96eb,#81f939) ;
    top: 0;
    position: absolute;
    transform: scaleX(0%);
    transition: all 2s ease-in-out;
}
.popUp.visible > .popUpBar {
    transform: scaleX(100%);
}

footer {
    width: 100%;
    height: 5%;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: right;
    padding: 0.5em;
    box-sizing: border-box;
    bottom: 0;
}