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

body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  color: white;
}

h1 {
  font-size: 2rem;
  margin-bottom: 30px;
  letter-spacing: 1px;
}

.search-container {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
}

#city-input {
  padding: 12px 20px;
  border-radius: 25px;
  border: none;
  outline: none;
  font-size: 1rem;
  width: 280px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

#city-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

#search-btn {
  padding: 12px 24px;
  border-radius: 25px;
  border: none;
  background: #e94560;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

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

#weather-display {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px 40px;
  min-width: 320px;
  text-align: center;
}

#weather-display h2 {
  font-size: 2rem;
  margin-bottom: 15px;
}

#weather-display p {
  font-size: 1.1rem;
  margin: 8px 0;
  opacity: 0.9;
}

#forecast-container {
  display: flex;
  gap: 15px;
  margin-top: 25px;
  flex-wrap: wrap;
  justify-content: center;
}

.forecast-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 15px 20px;
  text-align: center;
  min-width: 100px;
}

.forecast-card p {
  font-size: 0.9rem;
  margin: 5px 0;
  opacity: 0.9;
}

.forecast-card img {
  width: 50px;
  height: 50px;
}

#weather-display img {  /* this is for the weather icon size increment on todays forecast*/
  width: 80px;
  height: 80px;
}

#search-history {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}

.history-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 20px;
  color: white;
  padding: 8px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.3s;
}

.history-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

#chart-container {
  width: 90%;
  max-width: 800px;
  margin: 25px auto;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 20px;
}

.alert-banner {
  width: 100%;
  background: #e94560;
  color: white;
  text-align: center;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 8px;
  margin-bottom: 20px;
}

.hidden {
  display: none;
}

body.day-mode {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
}

body.night-mode {
  background: linear-gradient(135deg, #0a0a0f, #0d0d1a, #050510);
}

@media (max-width: 768px) { /* Adjustments for smaller screens */
  body {
    padding: 20px 15px;
  }

  h1 {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }

  .search-container {
    flex-direction: column;
    width: 100%;
  }

  #city-input {
    width: 100%;
  }

  #search-btn {
    width: 100%;
    border-radius: 15px;
  }

  #weather-display {
    width: 100%;
    padding: 20px;
  }

  #forecast-container {
    gap: 10px;
  }

  .forecast-card {
    min-width: 80px;
    padding: 10px;
  }

  #chart-container {
    width: 100%;
    padding: 15px;
  }

  #search-history {
    gap: 8px;
  }

  .history-btn {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}

.big-temp {
  font-size: 4rem;
  font-weight: bold;
  margin: 10px 0;
  line-height: 1;
}

.condition-text {
  font-size: 1.2rem;
  opacity: 0.8;
  margin-bottom: 20px;
  text-transform: capitalize;
}

.weather-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 15px;
  text-align: left;
}

.weather-grid-item {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 15px;
  font-size: 0.95rem;
}

.date-text {
  font-size: 0.95rem;
  opacity: 0.6;
  margin-bottom: 5px;
}

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

#weather-display {
  animation: fadeIn 0.5s ease;
}

#forecast-container {
  animation: fadeIn 0.6s ease;
}

#chart-container {
  animation: fadeIn 0.7s ease;
}