body{
    margin:0;
    padding:0;
    background:linear-gradient(#6c3483, #58d68d);
    height: 100vh;
}

.formulario{
    position: relative;
    margin: 50px auto;
    padding-top: 10px;
    padding-bottom: 10px;
    width: 400px;
    background: white;
    border-radius: 10px;
}

.formulario h1{
    text-align: center;
    padding: 0 0 20px 0;
    border-bottom: 1px solid silver;
}

.formulario form{
    padding: 0 40px;
    box-sizing: border-box;
}

form .username{
    position: relative;
    border-bottom: 2px solid #adadad;
    margin: 10px 0;    
}

.username input{
    width: 100%;
    padding: 0 5px;
    height: 40px;
    font-size: 20px;
    border: none;
    background: none;
    outline: none;
}

.username label{
    position: absolute;
    top: 50%;
    left: 5px;
    color: #adadad;
    transform: translateY(-50%);
    font-size: 10px;
    pointer-events: none;
}

.username span::before{
    content: '';
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #6c3483;
}

.username input:focus ~ label,
.username input:focus ~ label{
    top: -5px;
    color:  #6c3483;
}

.username input:focus ~ span::before,
.username input:focus ~ span::before{
    width: 100%;
}


input[type="submit"]{
    width: 100%;
    height: 50px;
    border: 1px solid;
    background: #6c3483;
    border-radius: 25px;
    font-size: 20px;
    color: white;
    cursor: pointer;
    outline: none;
}

input[type="submit"]:hover{
    border-color: purple;
    transition: .5s;
}

@media(max-width:800px){

    #formulario {
        width: 90%;
    }
}
