@import url('https://fonts.googleapis.com/css2?family=Muli:wght@400;700&display=swap');

* {
    box-sizing: border-box; /*if we add border or padding, it doesn't affect the width of it. */
}
body {
    background-color: slateblue;
    color: #f2f2f2;
    font-family: 'Muli', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden; /*don't want scroll bar to appear.*/
    margin: 0;
}

/* container */
.container {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 20px 40px;
    border-radius: 5px;
    box-shadow: 5px 5px 7px rgba(0, 0, 0, 0.596);
}

/* container text */

h1 {
    text-align: center;
    margin-bottom: 30px;
}

label {
    position: absolute;
    /* because form control is relative */
    top: 15px;
    left: 0px;
    pointer-events: none;
    /* so that label become non-clickable */
}

a {
    text-decoration: none;
    color: lightblue;
    margin-left: 60px;
}

.text {
    margin-top: 30px;
}

/* button */
.btn {
    cursor: pointer;
    display: inline-block;
    width: 100%;
    padding: 15px;
    background-color: lightblue;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
}

.btn:focus {
    outline: none;
}

.btn:active {
    transform: scale(0.98);
}

/* form control */
.form-control {
    position: relative;
    margin: 20px 0px 40px;
    width: 300px;
}

input {
    background-color: transparent;
    color: #f2f2f2;
    border: none;
    border-bottom: 1.5px #f2f2f2 solid;
    display: block;
    font-size: 18px;
    width: 100%;
    padding: 15px 0px;
}


input:focus, input:valid {
    outline: 0;
    /* to change the border colour at focus */
    border-bottom-color: lightblue;
}

label span {
    display:inline-block;
    font-size: 18px;
    min-width: 5px;
    transition: 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
}

/* to change the font colour of text; both at focus and at JS span */
input:focus + label span, input:valid + label span {
    color: lightblue;
    transform: translateY(-30px);
}
