* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  color: #333;
  transition: background 0.5s ease;
  min-height: 100vh;
}

.body-theme-cold {
  background: linear-gradient(135deg, #f5edfd 0%, #e8f4ff 100%);
}

.body-theme-mild {
  /* A very clean, barely-there cool gray/white */
  background: linear-gradient(135deg, #ffffff 0%, #f6f8fd 100%);
}

.body-theme-warm {
  background: linear-gradient(120deg, #fffcf5 0%, #fcf7f2 100%);
}

.body-theme-hot {
  background: linear-gradient(120deg, #fff6d9 0%, #ffefe8 100%);
}

.weather-app {
  background: white;
  max-width: 900px;
  margin: 40px auto;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 30px 50px rgba(65, 50, 100, 0.08);
  transition: background 0.5s ease; /* NEW: Makes the color change smooth! */
}

.theme-cold {
  background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
}

.theme-mild {
  background: linear-gradient(135deg, #f6f8fd 0%, #f1f3f9 100%);
}

.theme-warm {
  background: linear-gradient(120deg, #fdfbfb 0%, #ebedee 100%);
}

.theme-hot {
  background: linear-gradient(120deg, #f6d365 0%, #ffae98 100%);
}

/* Header & Forms */
header form {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
}

.search-input {
  flex-grow: 1;
  background-color: rgba(249, 247, 254, 0.534);
  border: none;
  padding: 15px;
  border-radius: 8px;
  font-size: 16px;
}

.search-input:focus {
  outline: rgba(198, 191, 216, 0.884);
  border: 1px solid rgba(181, 181, 184, 0.733);
}

.search-button,
.location-button {
  background-color: #885df1;
  color: white;
  border: none;
  padding: 15px 20px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.location-button {
  background-color: #4bb543;
}

.search-button:hover {
  background-color: #6c46c7;
}
.location-button:hover {
  background-color: #3b8e34;
}

/* Current Weather */
.current-weather {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 30px;
}

.current-city {
  font-size: 42px;
  font-weight: 700;
}

.current-details {
  color: #666;
  line-height: 1.6;
}

.condition-text {
  text-transform: capitalize;
  font-weight: 500;
  color: #885df1;
}

.current-temperature {
  display: flex;
  align-items: center;
}

.current-temperature-value {
  font-size: 72px;
  font-weight: 700;
}

.current-temperature-unit {
  font-size: 24px;
  position: relative;
  top: -24px;
}

.weather-icon {
  width: 130px;
  height: 130px;
  display: block;
  margin-right: 10px;
}

/* Lifestyle Card */
.lifestyle-card {
  background-color: #fdfaef;
  padding: 20px;
  border-radius: 12px;
  margin: 20px 0;
  box-shadow: 0 4px 10px rgba(0, 123, 140, 0.18);
}

.lifestyle-card:hover {
  transform: translateY(2px);
}

.lifestyle-card h3 {
  font-size: 16px;
  margin-bottom: 5px;
}

/* Forecast Grid */
.weather-forecast {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  text-align: center;
  margin-top: 20px;
  box-shadow: 0 3px 40x rgba(0, 123, 140, 0.18);
}

.forecast-day {
  background: #f9f7fe;
  padding: 15px 10px;
  border-radius: 10px;
}

.forecast-date {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.forecast-icon {
  width: 50px;
  height: 50px;
}

.forecast-temperatures {
  font-size: 14px;
  margin-top: 10px;
}

.forecast-temp-max {
  font-weight: 700;
}
.forecast-temp-min {
  color: #666;
  margin-left: 5px;
}

footer {
  text-align: center;
  margin-top: 30px;
  font-size: 13px;
  color: #999;
}

footer a {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: rgba(68, 52, 138, 0.808);
}

footer a:hover {
  color: rgba(44, 35, 88, 0.808);
}

.chart-container {
  margin-top: 40px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  border: 1px solid #eee;
  position: relative;
  height: 250px;
  width: 100%;
}

/* =========================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================= */

/* 💻 TABLET SCREENS (Under 768px) */
@media (max-width: 768px) {
  .weather-app {
    margin: 20px;
    padding: 25px;
  }

  .current-city {
    font-size: 36px;
  }

  .current-temperature-value {
    font-size: 60px;
  }

  .weather-icon {
    width: 100px;
    height: 100px;
  }

  .weather-forecast {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 📱 MOBILE PHONES (Under 576px) */
@media (max-width: 576px) {
  .weather-app {
    margin: 0;
    padding: 30px 20px;
    border-radius: 0;
    min-height: 100vh;
  }

  header form {
    flex-direction: column;
    gap: 15px;
  }

  .search-button,
  .location-button {
    width: 100%;
  }

  .current-weather {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    padding-bottom: 20px;
  }

  .current-temperature {
    justify-content: center;
  }

  .current-city {
    font-size: 32px;
  }

  .current-temperature-value {
    font-size: 56px;
  }

  .weather-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto;
  }

  .weather-forecast {
    grid-template-columns: repeat(2, 1fr);
  }

  .chart-container {
    padding: 10px;
    height: 200px;
  }
}
