body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.8s ease;
}

/* Default background (before search) */
#body {
  background: linear-gradient(to right, #a1c4fd, #c2e9fb);
}

/* Dynamic background themes */
.sunny {
  background: linear-gradient(to right, #f6d365, #fda085);
}

.cloudy {
  background: linear-gradient(to right, #bdc3c7, #2c3e50);
}

.rainy {
  background: linear-gradient(to right, #667db6, #0082c8, #0082c8, #667db6);
}

.stormy {
  background: linear-gradient(to right, #232526, #414345);
}

.foggy {
  background: linear-gradient(to right, #e0eafc, #cfdef3);
}

/* Navigation Bar */
nav {
  background: #0078ff;
  color: white;
  padding: 10px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
nav .logo {
  font-weight: bold;
  font-size: 20px;
}
nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}
nav ul li {
  margin-left: 20px;
}
nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: 0.2s;
}
nav ul li a:hover,
.active {
  text-decoration: underline;
}

/* Container */
.container {
  flex: 1;
  text-align: center;
  padding: 40px 20px;
}

.search-box {
  margin-top: 20px;
}

input {
  padding: 10px;
  width: 260px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 16px;
}

button {
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  background: #0078ff;
  color: white;
  cursor: pointer;
  font-size: 16px;
}

button:hover {
  background: #005ecb;
}

/* Weather Result */
.weather-container {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.weather-card {
  background: white;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  margin: 10px;
  width: 220px;
  transition: transform 0.2s;
  animation: fadeIn 0.6s ease;
}
.weather-card:hover {
  transform: scale(1.05);
}

.weather-card h3 {
  color: #0078ff;
}

.weather-icon {
  font-size: 40px;
  margin: 10px 0;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* About Page */
.about ul {
  text-align: left;
  display: inline-block;
  margin-top: 10px;
}

.btn {
  display: inline-block;
  padding: 10px 15px;
  border-radius: 6px;
  background: #0078ff;
  color: white;
  text-decoration: none;
  margin-top: 20px;
}

/* Footer */
footer {
  text-align: center;
  padding: 12px;
  background: #0078ff;
  color: white;
  font-size: 14px;
}

/* Authentication Pages (Login / Signup) */
.auth-container {
  flex: 1;
  text-align: center;
  padding: 50px 20px;
}

.auth-container h1 {
  margin-bottom: 10px;
}

.auth-form {
  background: white;
  display: inline-block;
  padding: 30px 40px;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  margin-top: 20px;
  max-width: 400px;
  text-align: center;
}

.auth-form input {
  display: block;
  width: 90%;
  margin: 10px auto;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
}

.auth-form button {
  width: 95%;
  padding: 12px;
  border: none;
  border-radius: 6px;
  background: #0078ff;
  color: white;
  cursor: pointer;
  font-size: 16px;
  margin-top: 10px;
}

.auth-form button:hover {
  background: #005ecb;
}

.auth-alt {
  margin-top: 15px;
  font-size: 14px;
}

.auth-alt a {
  color: #0078ff;
  text-decoration: none;
  font-weight: 500;
}

.logout-btn {
  background: #ff4b5c;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 15px;
}

.logout-btn:hover {
  background: #ff1e38;
}

/* ---------- HOURLY FORECAST ---------- */
.hourly-scroll {
  display: flex;
  overflow-x: auto;
  gap: 15px;
  padding: 15px 0;
  margin-top: 10px;
  scrollbar-width: thin;
}

.hour-card {
  min-width: 120px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 10px;
  text-align: center;
  font-size: 14px;
  transition: transform 0.3s ease;
}

.hour-card:hover {
  transform: scale(1.05);
  background: rgba(240, 248, 255, 0.9);
}

.hourly-scroll::-webkit-scrollbar {
  height: 8px;
}

.hourly-scroll::-webkit-scrollbar-thumb {
  background: #0078d7;
  border-radius: 10px;
}
/* ---------- HOURLY FORECAST ---------- */
.hourly-scroll {
  display: flex;
  overflow-x: auto;
  gap: 15px;
  padding: 15px 0;
  margin-top: 10px;
  scrollbar-width: thin;
}

.hour-card {
  min-width: 120px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 10px;
  text-align: center;
  font-size: 14px;
  transition: transform 0.3s ease;
}

.hour-card:hover {
  transform: scale(1.05);
  background: rgba(240, 248, 255, 0.9);
}

.hourly-scroll::-webkit-scrollbar {
  height: 8px;
}

.hourly-scroll::-webkit-scrollbar-thumb {
  background: #0078d7;
  border-radius: 10px;
}

.location-btn {
  background-color: #0a84ff;
  color: white;
  border: none;
  padding: 8px 14px;
  margin-left: 5px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: 0.3s;
}

.location-btn:hover {
  background-color: #006edc;
}

/* ---------- BASIC LAYOUT ---------- */
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: linear-gradient(to bottom right, #e0f7fa, #b3e5fc);
  color: #222;
  transition: background 0.5s ease, color 0.5s ease;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 25px;
  background: #0078d7;
  color: #fff;
}

nav .logo {
  font-size: 1.4rem;
  font-weight: 600;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  align-items: center;
}

nav ul li {
  display: inline;
}

nav a,
nav button {
  color: white;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

nav a:hover,
nav button:hover {
  opacity: 0.8;
}

/* ---------- MAIN CONTAINER ---------- */
.container {
  max-width: 900px;
  margin: 40px auto;
  text-align: center;
  padding: 10px;
}

/* ---------- SEARCH BOX ---------- */
.search-box {
  margin-top: 20px;
}

.search-box input {
  padding: 10px;
  width: 240px;
  border-radius: 8px;
  border: 1px solid #aaa;
  font-size: 15px;
}

.search-box button {
  background-color: #0078d7;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 15px;
  font-size: 15px;
  margin-left: 5px;
  cursor: pointer;
  transition: 0.3s;
}

.search-box button:hover {
  background-color: #005fa3;
}

/* ---------- LOCATION BUTTON ---------- */
.location-btn {
  background-color: #0a84ff;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  margin-left: 5px;
  transition: 0.3s;
}

.location-btn:hover {
  background-color: #006edc;
}

/* ---------- WEATHER CARD ---------- */
.weather-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 20px;
  max-width: 320px;
  text-align: center;
  margin: 20px auto;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.weather-card:hover {
  transform: translateY(-5px);
}

/* ---------- FAVORITE BUTTON ---------- */
.fav-btn {
  display: inline-block;
  background-color: #0078d7;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  margin-top: 10px;
  transition: all 0.3s ease;
}

.fav-btn:hover {
  background-color: #005fa3;
  transform: scale(1.05);
}

/* ---------- FORECAST TITLE ---------- */
.forecast-title {
  text-align: center;
  margin-top: 25px;
  margin-bottom: 15px;
}

.forecast-title h2 {
  display: inline-block;
  font-size: 22px;
  font-weight: bold;
  color: #111;
  border-bottom: 2px solid #0078d7;
  padding-bottom: 5px;
  letter-spacing: 0.5px;
}

/* ---------- HOURLY FORECAST ---------- */
.hourly-scroll {
  display: flex;
  overflow-x: auto;
  gap: 15px;
  padding: 15px 0;
  scrollbar-width: thin;
  justify-content: center;
}

.hour-card {
  min-width: 120px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 10px;
  text-align: center;
  font-size: 14px;
  transition: transform 0.3s ease;
}

.hour-card:hover {
  transform: scale(1.05);
  background: rgba(240, 248, 255, 0.9);
}

/* ---------- 5-DAY FORECAST ---------- */
.daily-scroll {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 15px;
}

.day-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 10px 15px;
  min-width: 120px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.day-card:hover {
  transform: translateY(-5px);
  background: rgba(240, 248, 255, 0.9);
}

/* ---------- THEME TOGGLE ---------- */
.theme-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s;
}

.theme-btn:hover {
  transform: scale(1.1);
}

/* ---------- DARK MODE ---------- */
.dark-mode {
  background: linear-gradient(to bottom right, #1a1a1a, #333);
  color: #fff;
}

.dark-mode nav {
  background: #111;
}

.dark-mode .weather-card,
.dark-mode .hour-card,
.dark-mode .day-card {
  background: rgba(40, 40, 40, 0.9);
  color: #fff;
}

.dark-mode footer {
  background: #111;
  color: #ccc;
}

/* ---------- FOOTER ---------- */
footer {
  text-align: center;
  padding: 15px;
  background: #0078d7;
  color: white;
  font-size: 14px;
  margin-top: 30px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  .hourly-scroll {
    flex-wrap: wrap;
  }
  .hour-card {
    min-width: 45%;
    margin-bottom: 10px;
  }
  .forecast-title h2 {
    font-size: 20px;
  }
}
