* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

body {
  width: 100%;
  min-height: 100dvh;
  display: grid;
  place-content: center;
  background-color: rgb(12, 0, 34);
}

.input_container {
  position: relative;
}

.input_container > label {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: rgb(155, 155, 155);
  transition: all 0.3s ease;
}

#name {
  padding: 10px 15px;
  border: none;
  outline: none;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  color: white;
}

#name:focus + label,
#name:not(:placeholder-shown) + label {
  color: rgb(209, 209, 209);
  top: -8px;
  left: 5px;
  transform: scale(0.85);
}

.input_container::after {
  content: '';
  width: 0;
  height: 1px;
  border-radius: 5px;
  pointer-events: none;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s ease;
}

.input_container:focus-within::after,
.input_container:has(#name:not(:placeholder-shown))::after {
  width: 90%;
  background: radial-gradient(white, rgb(29, 18, 50) 80%);
}
