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

body {
  position: relative;
  overflow: hidden;
  height: 100vh;
  width: 100%;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(https://media.istockphoto.com/id/1007768414/photo/blue-sky-with-bright-sun-and-clouds.jpg?s=612x612&w=0&k=20&c=MGd2-v42lNF7Ie6TtsYoKnohdCfOPFSPQt5XOz4uOy4=);
  background-size: cover;
  background-position: center;
  filter: blur(8px);
  z-index: -1;
}

.card {
  width: 90%;
  max-width: 470px;
  background: linear-gradient(135deg, #006CAD, #006CAD);
  color: #fff;
  margin: 100px auto 0;
  border-radius: 20px;
  padding: 40px 35px;
  text-align: center;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.search {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search input {
  border: 0;
  outline: 0;
  background: #ebfffc;
  color: #555;
  padding: 10px 25px;
  height: 60px;
  border-radius: 30px;
  flex: 1;
  margin-right: 16px;
  font-size: 18px;
}

.search button {
  border: 0;
  outline: 0;
  background: #ebfffc;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  cursor: pointer;
}

.search button img {
  width: 35px;
}

.location-btn {
  background-color: #006CAD;
  font-size: 18px;
  padding: 12px 20px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
}

.location-btn:hover {
  background-color: skyblue;
}

.weather-icon {
  width: 130px;
  margin-top: 30px;
}

.weather h1 {
  font-size: 80px;
  font-weight: 500;
}

.weather h2 {
  font-size: 45px;
  font-weight: 400;
  margin-top: -10px;
}

.details {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  margin-top: 10px;
}

.col {
  display: flex;
  align-items: center;
  text-align: left;
}

.col img {
  width: 40px;
  margin-right: 20px;
}

.humidity,
.wind {
  font-size: 25px;
  margin-top: -6px;
}

.weather {
  display: none;
}

.error {
  text-align: left;
  margin-left: 10px;
  font-size: 20px;
  margin-top: 10px;
  display: none;
  color: red;
}

.loader {
  position: relative;
  top: 50%;
  left: 40%;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  animation: spin 1s linear infinite;
  display: flex;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.created-by {
  text-align: center;
  font-family: 'Arial', sans-serif;
  font-size: 16px;
  font-weight: bold;
  color: #333;
  background-color: #f4f4f9;
  border-radius: 20px;
  padding: 10px;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeIn 2s forwards;
  display: inline-block;
  width: 100%;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.created-by p {
  margin: 0;
  font-size: 18px;
  color: #007BFF;
  font-weight: 600;
}

.created-by:hover p {
  color: #0056b3;
  cursor: pointer;
}


@media (max-width: 480px) {
  .card {
    margin: 50px auto;
    padding: 30px;
  }

  .search input {
    font-size: 16px;
    padding: 8px 18px;
  }

  .search button {
    width: 50px;
    height: 50px;
  }

  .weather h1 {
    font-size: 60px;
  }

  .weather h2 {
    font-size: 30px;
  }

  .details {
    flex-direction: column;
    padding: 10px;
  }

  .col img {
    width: 30px;
    margin-right: 10px;
  }

  .humidity,
  .wind {
    font-size: 20px;
  }

  .loader {
    width: 80px;
    height: 80px;
  }
}


@media (max-width: 768px) {
  .card {
    margin: 80px auto;
    padding: 35px;
  }

  .weather h1 {
    font-size: 70px;
  }

  .weather h2 {
    font-size: 38px;
  }

  .details {
    padding: 15px;
  }

  .humidity,
  .wind {
    font-size: 22px;
  }

  .loader {
    width: 90px;
    height: 90px;
  }
}


@media (min-width: 769px) {
  .card {
    width: 80%;
    max-width: 500px;
    margin-top: 120px;
    padding: 40px;
  }

  .weather h1 {
    font-size: 80px;
  }

  .weather h2 {
    font-size: 45px;
  }

  .details {
    padding: 20px;
  }

  .humidity,
  .wind {
    font-size: 25px;
  }

  .loader {
    width: 100px;
    height: 100px;
  }
}
