/* ----- GLOBAL SETTINGS ----- */
body {
  font-family: "Inter", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #4f7cff, #8ec5ff);
  color: #fff;
  display: flex;
  justify-content: center;
  padding-top: 40px;
}

.dark {
  background: linear-gradient(135deg, #1e1e1e, #3a3a3a) !important;
  color: #ccc !important;
}

.hidden {
  display: none !important;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 95%;
  text-align: center;
  max-width: 480px;
}

.search-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.btn-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.toggle-theme {
  grid-column: 3;
  justify-self: end;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
}

/* ----- INPUT + BUTTON ----- */
#city-input {
  width: 70%;
  padding: 12px 14px;
  border-radius: 8px;
  border: none;
  outline: none;
  font-size: 16px;
}

#search-btn {
  padding: 12px 16px;
  border-radius: 8px;
  border: none;
  background: #ffffff;
  color: #4f7cff;
  font-weight: bold;
  cursor: pointer;
  margin-left: 6px;
  transition: 0.2s ease;
}

#search-btn:hover {
  background: #dce7ff;
}

/* ----- LOADING ----- */
.loading {
  margin-top: 20px;
  font-size: 18px;
}

/* ----- WEATHER SECTION CARD ----- */
.weather-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 25px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 20px;
  animation: fadeIn 0.3s ease-out;
}

#city-name {
  font-size: 26px;
  font-weight: bold;
}

#temperature {
  font-size: 40px;
  font-weight: bold;
  margin-top: 8px;
}

#weather-icon {
  display: inline-block;
  margin-top: 8px;
  font-size: 40px; /* emojis bigger */
}

#wind,
#humidity,
#feels-like {
  display: block;
  margin-top: 5px;
  font-size: 16px;
}

/* ----- HOURLY FORECAST ----- */
.hourly-list {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  gap: 12px;
  padding: 16px 8px;
  margin-top: 12px;
  scroll-snap-type: x mandatory;
}

@media screen and (max-width: 720px) {
  .hourly-list {
    flex-direction: column;
  }
}

.hourly-item {
  min-width: 80px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: saturate(140%) blur(4px);
  text-align: center;
  scroll-snap-align: start;
  transition: transform 0.2s ease;
}

.hourly-item:hover {
  transform: scale(1.08);
}

.hourly-time {
  font-size: 14px;
  margin-bottom: 4px;
  font-weight: bold;
}

.hourly-icon {
  font-size: 28px;
}

.hourly-temp {
  margin-top: 5px;
  font-size: 16px;
  font-weight: bold;
}

/* Alerts (optional) */
.hourly-item.alert {
  background: rgba(255, 0, 0, 0.25);
}

/* ----- NOTIFICATION BUTTON ----- */
#notify-btn,
#theme-toggle {
  margin-top: 18px;
  padding: 10px 14px;
  background: #fff;
  color: #4f7cff;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s ease;
}

#notify-btn:hover,
#theme-toggle:hover {
  background: #dce7ff;
}

/* ----- ERROR MESSAGE ----- */
#error-message {
  margin-top: 15px;
  display: block;
  font-weight: bold;
  color: #ff4444;
}

/* ----- ANIMATIONS ----- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
