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

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-width: 100vw;
    background: #111;
}

.container {
    position: relative;
    width: 90%;
    max-width: 500px;
    padding: 40px;
    background: #151515;
}

.container h2 {
    color: #999;
    margin-bottom: 45px;
}

#form.valid .indicator {
    background: #0f0;
    box-shadow: 0 0 5px #0f0,
                0 0 10px #0f0,
                0 0 20px #0f0,
                0 0 40px #0f0;
}

#form.invalid .indicator {
    background: #f00;
    box-shadow: 0 0 5px #f00,
                0 0 10px #f00,
                0 0 20px #f00,
                0 0 40px #f00;
}

.input-field {
    position: relative;
    height: 40px;
    width: 100%;
}

.input-field input[type="tel"] {
    position: absolute;
    background: transparent;
    font-size: 1rem;
    color: #fff;
    width: 100%;
}

.input-field label {
    position: absolute;
    top: 0;
    left: 0;
    color: #555;
    pointer-events: none;
    display: block;
    transition: 0.5s;
}

.input-field input[type="tel"]:focus + label,
.input-field input[type="tel"]:valid + label {
    transform: translateY(-35px);
    font-size: 1.2rem;
    color: #fff;
    background: #0F878A;
    padding: 2px 6px;
}

.input-field span {
    position: absolute;
    bottom: 0;
    right: 0;
    display: block;
    background: #555;
    width: 100%;
    height: 2px;
}

.input-field .border:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #00b0ff;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s ease-in-out;
}

.input-field input[type="tel"]:focus ~ .border:before,
.input-field input[type="tel"]:valid ~ .border:before {
    transform: scaleX(1);
    transform-origin: right;
    transition: transform 0.5s ease-in-out;
}

.container > span {
    width: 100%;
    padding: 15px 0;
    display: block;
    margin-top: 1rem;
    color: #555;
    font-weight: bold;
    background: transparent;
    border-bottom: 3px solid #333;
}

.container #result {
    font-weight: bold;
    color:#fff
}

.container #result.invalid {
    color: #f00;
}

.btn {
    margin-top: 20px;
    border: none;
    box-shadow: none;
    padding: 10px 25px;
    background: #333;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.btn:hover {
    background: #00b0ff;
}

.input-field .indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    background: #555;
    border-radius: 50%;
}

footer {
    position: absolute;
    bottom: 0;
    margin-bottom: 2rem;
    color: #555;
}

footer a {
    color: #fff;
    text-decoration: none;
}