@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;500&display=swap");

body,
html {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #cee5fa;
  font-family: "Poppins", sans-serif;
  overflow: hidden;
}
h2 {
  font-size: 70px;
  color: #75ccf2;
  padding: 60px;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 850px;
  height: 400px;
}

.weather-container {
  width: 400px;
  height: 400px;
  background: linear-gradient(#87ceeb, #e0ffff);
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
  animation: floatSky 10s ease-in-out infinite;
}

.weather-app {
  padding-left: 1000px;
  width: 320px;
  background: linear-gradient(135deg, #87ceeb, #e0ffff);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  color: #0a122a;
  box-shadow: 0px 4px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: scale(0.9);
  animation: fadeInUp 1s forwards;
  z-index: 2;
}

@keyframes floatSky {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.search-bar {
  display: flex;
  justify-content: space-between;
  background-color: rgba(255, 255, 255, 0.4);
  border-radius: 30px;
  padding: 8px 15px;
  margin-bottom: 20px;
}

.search-bar input {
  border: none;
  outline: none;
  font-size: 14px;
  flex: 1;
  padding: 5px;
  font-family: inherit;
  background: transparent;
  color: #0a122a;
}

.search-bar input::placeholder {
  color: rgba(10, 18, 42, 0.7);
}

.search-bar button {
  background: none;
  border: none;
  cursor: pointer;
}

.weather-icon {
  font-size: 60px;
  margin: 20px 0;
  opacity: 0;
  animation: slideIn 1s forwards 0.5s;
}

.temperature,
.city-name,
.condition {
  opacity: 0;
  animation: fadeIn 1s forwards 0.7s;
}

.temperature {
  font-size: 48px;
  font-weight: 500;
  color: #ffd700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.city-name {
  font-size: 22px;
  font-weight: 300;
  margin-bottom: 10px;
}

.condition {
  font-size: 18px;
  margin-bottom: 20px;
}

.weather-details {
  gap: 20px;
  display: flex;
  justify-content: space-around;
  opacity: 0;
  animation: fadeIn 1s forwards 1s;
}

.weather-details div {
  background-color: rgba(255, 215, 0, 0.2);
  padding: 6px;
  border-radius: 10px;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sun {
  position: absolute;
  top: 110px;
  left: 130px;
  width: 150px;
  height: 150px;
  background-color: #ffd700;
  border-radius: 50%;
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.7);
  animation: pulse 4s ease-in-out infinite;
  z-index: 2;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.7),
      0 0 100px rgba(255, 215, 0, 0.5);
  }

  50% {
    box-shadow: 0 0 80px rgba(255, 215, 0, 0.9),
      0 0 150px rgba(255, 215, 0, 0.6);
  }
}

.cloud {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  opacity: 0.85;
  box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.1);
}

.cloud::before,
.cloud::after {
  content: "";
  background: #fff;
  position: absolute;
  border-radius: 50%;
}

.cloud-1 {
  width: 90px;
  height: 50px;
  top: 50px;
  left: -150px;
  animation: moveClouds1 20s linear infinite;
}

.cloud-1::before {
  width: 50px;
  height: 50px;
  top: -20px;
  left: 10px;
}

.cloud-1::after {
  width: 40px;
  height: 40px;
  top: 10px;
  left: 60px;
}

.cloud-2 {
  width: 120px;
  height: 60px;
  top: 180px;
  left: -250px;
  animation: moveClouds2 25s linear infinite;
}

.cloud-2::before {
  width: 60px;
  height: 60px;
  top: -25px;
  left: 15px;
}

.cloud-2::after {
  width: 40px;
  height: 40px;
  top: 10px;
  left: 75px;
}

.cloud-3 {
  width: 100px;
  height: 60px;
  top: 300px;
  left: -200px;
  animation: moveClouds3 22s linear infinite;
}

.cloud-3::before {
  width: 60px;
  height: 40px;
  top: -10px;
  left: 10px;
}

.cloud-3::after {
  width: 30px;
  height: 30px;
  top: 10px;
  left: 60px;
}

@keyframes moveClouds1 {
  0% {
    left: -150px;
  }

  100% {
    left: 500px;
  }
}

@keyframes moveClouds2 {
  0% {
    left: -250px;
  }

  100% {
    left: 500px;
  }
}

@keyframes moveClouds3 {
  0% {
    left: -200px;
  }

  100% {
    left: 500px;
  }
}

@media (max-width: 820px) {
  .container {
    flex-direction: column;
    width: 100%;
    height: auto;
  }

  .weather-container,
  .weather-app {
    margin: 20px 0;
  }
}
