* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    outline: none;
    border: none;
}

html {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
        "Open Sans", "Helvetica Neue", sans-serif;
}

.container {
    padding: 30px;
    margin: 100px auto;
    max-width: 300px;
    width: 100%;
}

form {
    position: relative;
}

form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

form label {
    position: absolute;
    left: 12px;
    top: 12px;
    font-size: 14px;
    color: #777;
    transition-property: top, font-size, color, background-color;
    transition-duration: 0.3s;
}

form input:focus + label,
form input:not(:placeholder-shown) + label {
    top: -10px;
    font-size: 12px;
    color: violet;
    background-color: #fff;
    padding: 0 4px;
    left: 10px;
}

form input:focus,
form input :focus + label {
    border: 1px solid violet;
    outline: none;
}

form input:not(:focus) + label {
    color: #777;
}
