* {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  box-sizing: border-box;
}

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.card {
  width: 100%;
  max-width: 470px;
  background: linear-gradient(135deg, #00feba 0%, #5b548a 100%);
  color: #fff;
  border-radius: 30px;
  padding: 40px 35px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: slideDown 0.6s ease-out;
}
.search {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  animation: fadeIn 0.8s ease-out 0.2s backwards;
}

.search input {
  border: none;
  outline: none;
  background: rgba(235, 255, 252, 0.95);
  color: #333;
  padding: 12px 25px;
  height: 60px;
  border-radius: 33px;
  flex: 1;
  font-size: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.search input:hover {
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.search input:focus {
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.search input::placeholder {
  color: #999;
}

.search button {
  border: none;
  outline: none;
  background: rgba(235, 255, 252, 0.95);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.search button:hover {
  background: #fff;
  transform: scale(1.1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.search button:active {
  transform: scale(0.95);
}

.search button img {
  width: 20px;
  height: 20px;
}
.weather-icon {
  width: 170px;
  margin-top: 30px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
  animation: float 3s ease-in-out infinite;
}

.weather {
  display: none;
  animation: fadeIn 0.6s ease-out;
}

.weather h1 {
  font-size: 80px;
  font-weight: 600;
  margin: 20px 0 0 0;
  text-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  letter-spacing: -2px;
}

.weather h2 {
  font-size: 40px;
  font-weight: 400;
  margin: -5px 0 0 0;
  opacity: 0.95;
}

.details {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 20px;
  margin-top: 40px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.col {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 12px;
  transition: transform 0.3s ease;
}

.col:hover {
  transform: translateY(-3px);
}

.col img {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  padding: 8px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.col:hover img {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.humidity,
.wind {
  font-size: 24px;
  font-weight: 600;
  margin: 4px 0 -4px 0;
}

.col p:last-child {
  font-size: 13px;
  opacity: 0.85;
  font-weight: 300;
}
.error {
  text-align: center;
  display: none;
  font-size: 16px;
  color: #fff;
  background: rgba(255, 67, 67, 0.2);
  padding: 15px 20px;
  border-radius: 15px;
  margin-top: 15px;
  border-left: 4px solid #ff4343;
  animation: shake 0.5s ease-in-out, fadeIn 0.4s ease-out;
}

.error p {
  margin: 0;
  font-weight: 500;
}

/* Animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

/* Responsive Design */
@media (max-width: 600px) {
  .card {
    padding: 30px 20px;
  }

  .weather h1 {
    font-size: 60px;
  }

  .weather h2 {
    font-size: 30px;
  }

  .details {
    flex-direction: column;
    gap: 20px;
  }

  .col {
    width: 100%;
    justify-content: flex-start;
  }

  .search input {
    font-size: 16px;
    padding: 10px 20px;
  }

  .humidity,
  .wind {
    font-size: 20px;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 254, 186, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 254, 186, 0.8);
}
