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

html {
  font-size: 62.5%;
}

html,
body {
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

#main-container {
  background-image: url("https://images.unsplash.com/photo-1467810160588-c86c0deb5d16?q=80&w=2670&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  position: relative;
  width: 100%;
  height: 100%;
}


header {
  height: 5.5rem;
  position: relative;
}

form {
  height: 100%;
}

.form-group {
  float: right;
  height: 80%;
  position: relative;
  margin: 2.5rem 3.5rem 0 0;
}

.submit-btn {
  position: absolute;
  top: 27%;
  left: 6%;
  background-color: rgba(0, 0, 0, 0);
  border: none;
  outline: none;
  cursor: pointer;
}

.fa-search {
  color: #f3f3f3;
  font-size: 1.8rem;
}

input[type="text"] {
  width: 24rem;
  height: 100%;
  border: none;
  outline: none;
  background: rgba(255, 255, 255, 0.2);
  padding: 0 0 0.3rem 4.5rem;
  color: #ffffff;
  font-size: 1.6rem;
  border-radius: 0.5rem;
}

input[type="text"]::placeholder {
  color: #f3f3f3;
}

.error-msg {
  display: hidden;
  position: absolute;
  left: 2rem;
  color: #ff3333;
  font-size: 15px;
}

.main-weather-display {
  position: absolute;
  top: 30%;
  width: 90%;
  margin-left: 10%;
  color: #f3f3f3;
}

.condition {
  font-size: 2.2rem;
  letter-spacing: 0.1rem;
  padding-left: 0.3rem;
}

.location {
  font-size: 4rem;
  line-height: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: 0.1rem;
}

.degrees {
  font-size: 8rem;
  font-weight: 900;
  font-family: "Nunito", sans-serif;
  position: absolute;
  /* Changed to absolute for precise positioning */
  top: 80%;
  /* Adjust based on your design */
  left: 5%;
  /* Move the degrees further left */
  text-align: left;
  /* Align the text to the left */
  transform: translateX(-10%);
}

.weather-details {
  display: flex;
  flex-direction: column;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.1rem;
  position: absolute;
  border-left: 0.2rem solid rgba(255, 255, 255, 0.5);
  top: 104%;
  left: 22.5rem;
  height: 10rem;
  padding-left: 3.7rem;
  justify-content: space-between;
}

.feels-like {
  position: relative;
}

.feels-like::after {
  content: "\00B0 F";
  position: absolute;
  bottom: 0.7rem;
  left: 11.8rem;
  font-size: 1.1rem;
}

.humidity::after {
  content: "%";
}

.fade-in {
  animation: fadeIn 0.2s;
}

.fade-in2 {
  animation: fadeIn2 1.1s;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    top: 6rem;
  }

  100% {
    opacity: 0.5;
    top: 4.4rem;
  }
}

@keyframes fadeIn2 {
  0% {
    opacity: 0.1;
    transform: scale(0.9, 0.9);
  }

  100% {
    opacity: 1;
  }
}

/* active state */
input:focus~label,
input:valid~label {
  top: -20px;
  font-size: 14px;
  color: #5264AE;
}

/* BOTTOM BARS ================================= */
.bar {
  position: relative;
  display: block;
  width: 24rem;
}

.bar:before,
.bar:after {
  content: '';
  height: 2px;
  width: 0;
  bottom: 1px;
  position: absolute;
  background: #5264AE;
  transition: 0.2s ease all;
  -moz-transition: 0.2s ease all;
  -webkit-transition: 0.2s ease all;
}

.bar:before {
  left: 50%;
}

.bar:after {
  right: 50%;
}

/* active state */
input:focus~.bar:before,
input:focus~.bar:after {
  width: 50%;
}

/* HIGHLIGHTER ================================== */
.highlight {
  position: absolute;
  height: 60%;
  width: 80px;
  top: 25%;
  left: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* active state */
input:focus~.highlight {
  -webkit-animation: inputHighlighter 0.3s ease;
  -moz-animation: inputHighlighter 0.3s ease;
  animation: inputHighlighter 0.3s ease;
}

/* ANIMATIONS ================ */
@-webkit-keyframes inputHighlighter {
  from {
    background: #5264AE;
  }

  to {
    width: 0;
    background: transparent;
  }
}

@-moz-keyframes inputHighlighter {
  from {
    background: #5264AE;
  }

  to {
    width: 0;
    background: transparent;
  }
}

@keyframes inputHighlighter {
  from {
    background: #5264AE;
  }

  to {
    width: 0;
    background: transparent;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  html {
    font-size: 50%;
  }

  .form-group {
    flex-direction: column;
    align-items: flex-start;
    margin: 1.3rem auto;
  }

  .submit-btn {
    position: absolute;
    top: 27%;
    left: 6%;
    background-color: rgba(0, 0, 0, 0);
    border: none;
    outline: none;
    cursor: pointer;
  }

  .fa-search {
    color: #f3f3f3;
    font-size: 1.9rem;
  }

  input[type="text"] {
    height: 100%;
    border: none;
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem 0 0.3rem 4.5rem;
    color: #ffffff;
    font-size: 1.5rem;
    border-radius: 0.5rem;
  }

  input[type="text"]::placeholder {
    color: #f3f3f3;
  }

  .main-weather-display {
    top: 25%;
    width: 90%;
  }

  .degrees {
    font-size: 6rem;
  }

  .location {
    font-size: 2.4rem;
  }

  .condition {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .main-weather-display {
    top: 20%;
  }

  .degrees {
    font-size: 4.5rem;
  }

  .location {
    font-size: 2rem;
  }

  .condition {
    font-size: 1.6rem;
  }

  input[type="text"] {
    height: 3.5rem;
  }
}