.form {
    width: 600px;
    margin: auto;
    height: 50px;
    position: relative;
    overflow: hidden;
}

    .form input {
        width: 100%;
        font-size: 1.5rem;
        text-align: left;
        margin: auto;
        font-weight: 500;
        border: none;
        padding-top: 15px;
        outline: none;
        background-color: transparent;
    }

    .form label {
        position: absolute;
        bottom: 0px;
        left: 0px;
        width: 100%;
        height: 100%;
        pointer-events: none;
        color: #fff;
        border-bottom: 1px solid white;
    }

        .form label::after {
            content: "";
            position: absolute;
            bottom: -1px;
            left: 2px;
            width: 100%;
            height: 100%;
            pointer-events: none;
            color: #fff;
            transform: translateX(-100%);
            transition: transform 0.3s ease;
        }

    .form input:focus + .label-name .content-name, .form input:valid + .label-name .content-name {
        transform: translateY(-150%);
        font-size: 14px;
        color: #fff;
        background-color: transparent;
    }

    .form input:focus + .label-name::after, .form input:valid + .label-name::after {
        transform: translateX(0%);
        background-color: transparent;
    }
.content-name {
    position: absolute;
    bottom: 5px;
    left: 0px;
    transition: all 0.3s ease;
}

input[type = "submit"] {
    border: 0px;
    background: none;
    display: block;
    margin: 20px auto;
    text-align: center;
    border: 2px solid #2ecc71;
    padding: 14px 40px;
    outline: white;
    color: black;
    border-radius: 24px;
    transition: 0.25s;
    cursor: pointer;
}

    input[type = "submit"]:hover {
        background: #2ecc71;
    }