Floating label problem(CSS)

The label is not translating ,is there any problem with the code

It is translated, it has been moved 20px to the left and 20px up from where it would normally be. The styles are working exactly as specified in the code, what were you expecting to see?

I updated the code ,take a look once.

Try it like this: 
 <div class="form_elems">
       <input type="text" name="text" id="text">
       <label>Fill in your Name</label>
**Add this style:**
#text:focus ~ label{   

**Update the following styles like this:**
#text {
    background: none;  color: #F4D03F;  padding: 5px;  margin-bottom: 20px;  border: none;
    border-bottom: 2px solid #3498DB;  background-color: transparent; outline: none; z-index: 1;
  display:flex;  justify-content:center;  align-items:center;  height:auto;  margin-top:15vmax;
  flex-direction:column;  position:relative;