/* --- Base Layout --- */
body {
  font-family: 'Poppins', sans-serif;
  background: #007bff;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100vh;
  padding-top: 50px;
  gap: 20px;
}

/* --- Title and Logo Row --- */
.title-with-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;

  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.2s;
}

.title {
  font-size: 35px;
  color: #fff;
  margin: 0;
}

/* Inline logo next to title */
.inline-logo {
  width: 40px;
  height: auto;
  animation: fadeInScale 0.6s ease forwards;
  animation-delay: 0.4s;
  transition: transform 0.3s ease;
}

.inline-logo:hover {
  transform: scale(1.1);
}

/* --- Weather Card --- */
.weather-card {
  background: #F8F8FF	;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  width: 360px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.8s ease-out;
}

/* --- Location Input --- */
.location-input {
  margin-bottom: 20px;
}

.location-input input {
  padding: 10px;
  width: 65%;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.location-input button {
  padding: 10px 12px;
  margin-left: 10px;
  border: none;
  background: #007bff;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.location-input button:hover {
  animation: pop 0.3s ease;
}

/* --- Weather Info --- */
.top-section {
  margin-bottom: 25px;
}

#location {
  font-size: 18px;
  font-weight: 500;
  color: #333;
}

#condition {
  color: #777;
  font-size: 14px;
  margin-bottom: 15px;
}

.main-weather {
  display: flex;
  justify-content: center;
  align-items: center;
}

#icon {
  width: 64px;
  height: 64px;
  animation: fadeInScale 0.6s ease forwards;
}

#temperature {
  font-size: 48px;
  margin-left: 10px;
  font-weight: 300;
  color: #333;
  opacity: 0;
  animation: fadeInScale 0.8s ease forwards;
  animation-delay: 0.2s;
}

.extra-info {
  margin-top: 10px;
  color: #555;
  font-size: 14px;
}

/* --- Forecast Section --- */
.forecast {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.forecast-day {
  font-size: 13px;
  color: #444;
  text-align: center;

  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.forecast-day:nth-child(1) { animation-delay: 0.3s; }
.forecast-day:nth-child(2) { animation-delay: 0.4s; }
.forecast-day:nth-child(3) { animation-delay: 0.5s; }
.forecast-day:nth-child(4) { animation-delay: 0.6s; }
.forecast-day:nth-child(5) { animation-delay: 0.7s; }

.forecast-day img {
  width: 30px;
  height: 30px;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* --- Responsive Design --- */
@media (max-width: 500px) {
  .weather-card {
    width: 90%;
  }

  .inline-logo {
    width: 30px;
  }

  .title {
    font-size: 22px;
  }
}
