/* ---------- GLOBAL BODY STYLES ---------- */
body {
  font-family: 'Segoe UI', sans-serif;
  min-height: 100vh;
  color: #fff;
  transition: background 0.6s ease;
  position: relative;
  z-index: 0;
  overflow-x: hidden;
  background: none !important; /* Remove default background to avoid repeat/scroll issues */
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background-image: url('img/background.jpg');
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  background-size: cover;
  background-color: #222;
  z-index: -2;
  pointer-events: none;
  transform: translateZ(0);
  will-change: transform;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
  pointer-events: none;
}

/* ---------- INPUT + BUTTON STYLES ---------- */
input#cityInput,
.glass-input {
  padding: 10px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: 12px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

input#cityInput::placeholder,
.glass-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

button#getWeatherBtn {
  font-size: 16px;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  transition: background 0.3s ease;
}

button#getWeatherBtn:hover {
  background-color: rgba(255, 255, 255, 0.35);
}

/* ---------- WEATHER RESULT ---------- */
#weatherResult {
  font-size: 18px;
  text-align: center;
}

/* ---------- FORECAST CONTAINER ---------- */
#forecastContainer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
}

/* ---------- FORECAST CARD ---------- */
#forecastContainer .forecast-card {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 1rem;
  width: 100%;
  text-align: left;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#forecastContainer .forecast-card:hover {
  transform: translateY(-5px);
}

/* ---------- WEATHER ICONS ---------- */
.weather-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px auto;
  display: block;
  object-fit: contain;
}

/* ---------- GLASS EFFECT CARD ---------- */
.glass-card {
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  color: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  transition: all 0.3s ease-in-out;
}

/* ---------- UTILITY OVERRIDES ---------- */
.bg-white {
  background-color: white !important;
}

/* ---------- RESPONSIVE STYLES ---------- */
@media (max-width: 768px) {
  body {
    font-size: 1.1rem;
  }

  h1,
  h4 {
    font-size: 1.5rem;
  }

  .container {
    padding: 0 1rem;
  }

  #forecastContainer > div {
    width: 100% !important;
  }

  .p-4 {
    padding: 1rem !important;
  }

  .glass-navbar {
    background-color: rgba(0, 0, 0, 0.85) !important;
  }
}

/* ---------- ACCESSIBILITY ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ---------- FOOTER STYLES ---------- */
footer.glass-card {
  border-radius: 0 !important;
}

/* ---------- NAVBAR STYLES ---------- */
.glass-navbar {
  background-color: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.glass-navbar .navbar-nav .nav-link {
  color: white !important;
}

.glass-navbar .navbar-brand {
  color: white !important;
}

.glass-navbar .navbar-brand:hover,
.glass-navbar .navbar-brand:focus {
  color: #ddd !important;
}

.glass-navbar .navbar-nav .nav-link.active {
  text-decoration: underline;
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.6);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---------- HOURLY FORECAST STYLES ---------- */
#hourlyContainer .forecast-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.75rem;
  text-align: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  flex: 0 0 auto;
}

#hourlyContainer {
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

#hourlyContainer::-webkit-scrollbar {
  height: 6px;
}

#hourlyContainer::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 5px;
}