* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Arial", sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0px;
  position: relative;
  overflow: visible;
  transition: all 0.8s ease;
}


body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}


.bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}


.weather-app {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 40px;
  width: 100%;
  max-width: 450px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
  text-align: center;
  position: relative;
  z-index: 10;
  animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-container {
  position: relative;
  margin-bottom: 30px;
}

.search-input {
  width: 100%;
  padding: 15px 50px 15px 20px;
  border: none;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 16px;
  outline: none;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.02);
}

.search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #00b894, #00a085);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.search-btn:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 184, 148, 0.4);
}


.loading {
  display: none;
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.weather-info {
  display: none;
  animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.location {
  font-size: 24px;
  color: white;
  margin-bottom: 10px;
  font-weight: 300;
}

.date {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 30px;
  font-size: 14px;
}

.weather-icon {
  font-size: 80px;
  margin: 20px 0;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.temperature {
  font-size: 64px;
  font-weight: 200;
  color: white;
  margin: 20px 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.description {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 30px;
  text-transform: capitalize;
}

.weather-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

.detail-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease;
}

.detail-item:hover {
  transform: translateY(-5px);
}

.detail-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.detail-value {
  color: white;
  font-size: 18px;
  font-weight: 500;
}

.error-message {
  display: none;
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
  padding: 15px;
  border-radius: 10px;
  margin-top: 20px;
  border: 1px solid rgba(255, 107, 107, 0.3);
}


@media (max-width: 480px) {
  .weather-app {
    padding: 30px 20px;
    margin: 10px;
  }

  .temperature {
    font-size: 48px;
  }

  .weather-details {
    grid-template-columns: 1fr;
  }
}


.sunny {
  background: linear-gradient(rgba(255, 193, 7, 0.2), rgba(255, 152, 0, 0.3)),
    url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80")
      center/cover;
}
.cloudy {
  background: linear-gradient(rgba(108, 117, 125, 0.2), rgba(52, 58, 64, 0.3)),
    url("https://images.unsplash.com/photo-1504608524841-42fe6f032b4b?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80")
      center/cover;
}
.rainy {
  background: linear-gradient(rgba(73, 80, 87, 0.3), rgba(52, 58, 64, 0.4)),
    url("https://images.unsplash.com/photo-1515694346937-94d85e41e6f0?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80")
      center/cover;
}
.snowy {
  background: linear-gradient(
      rgba(248, 249, 250, 0.2),
      rgba(173, 181, 189, 0.3)
    ),
    url("https://images.unsplash.com/photo-1477601263568-180e2c6d046e?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80")
      center/cover;
}
.clear {
  background: linear-gradient(rgba(0, 123, 255, 0.2), rgba(108, 117, 125, 0.3)),
    url("https://images.unsplash.com/photo-1419242902214-272b3f66ee7a?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80")
      center/cover;
}
.default-bg {
  background: linear-gradient(rgba(116, 185, 255, 0.3), rgba(9, 132, 227, 0.4)),
    url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80")
      center/cover;
}

@media (max-width: 768px) {
  .weather-app {
    padding: 20px 15px;
    margin: 20px;
  }

  .temperature {
    font-size: 48px;
  }

  .weather-details {
    grid-template-columns: 1fr;
  }

  .weather-icon {
    font-size: 60px;
  }

  .description {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .weather-app {
    padding: 20px 15px;
    margin: 10px;
  }

  .temperature {
    font-size: 40px;
  }

  .weather-icon {
    font-size: 56px;
  }

  .description {
    font-size: 16px;
  }

  .weather-details {
    grid-template-columns: 1fr;
  }

  .detail-item {
    padding: 15px;
  }

  .detail-value {
    font-size: 16px;
  }

  .search-input {
    font-size: 13px;
  }
}