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

body {
  background: #75afdf;
  min-height: 100vh;
  font-family: 'Poppins', Arial, sans-serif;
  overflow-x: hidden;
}

.main-container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 0 16px;
}

#background {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100%;
  object-fit: cover;
  z-index: -1;
  filter: opacity(0.9);
}

.search-bar {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  text-align: center;
  margin-bottom: 20px;
  height: 60px;
  width: clamp(260px, 40vw, 700px);
}

.search-bar input {
  padding: 0.9rem 2rem 0.9rem 1.2rem;
  border-radius: 24px;
  border: none;
  outline: none;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.6);
  color: #444;
  width: 100%;
  height: 40px;
  box-shadow: 0 2px 14px 1px rgba(0,0,0,0.2);
}

.search-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  color: #9bbbd4;
  font-size: 1.2rem;
  transition: color 0.2s ease;
}

.search-btn:hover {
  color: #28527a;
}

.weather-box {
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.location-time {
  text-align: center;
  margin-bottom: 8px;
}

.city {
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.datetime {
  font-weight: 700;
  font-size: 32px;
  letter-spacing: 0.5px;
}

.weather-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}

#weather_icon {
  font-size: 200px;
  margin-bottom: 6px;
}

.status {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.temp {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.feels-like {
  font-size: 2rem;
  color: #e1ecfb;
  margin-top: 4px;
}

.grid-cards {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
  width: 80vw;
  min-height: 16vh;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  box-shadow: 0 2px 14px 1px rgba(0,0,0,0.045);
  padding: 22px 42px;
  gap: 18px;
  backdrop-filter: blur(4px);
}

.weather_cards {
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.info-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 8px;
}

.info-icon {
  font-size: 2.5rem;
  margin-bottom: 2px;
  margin-top: -5px;
}

.info-label {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 1px;
}

.info-value {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
}

/* ---------- RESPONSIVE DESIGN ---------- */

@media (max-width: 600px) {
  .main-container {
    gap: 24px;
  }

  .search-bar {
    width: 85vw;
    height: 54px;
  }

  .search-bar input {
    font-size: 1rem;
    padding: 0.8rem 2rem 0.8rem 1rem;
  }

  #weather_icon {
    font-size: 120px;
  }

  .feels-like {
    font-size: 1.2rem;
  }

  .city {
    font-size: 1.8rem;
  }

  .datetime {
    font-size: 1rem;
  }

  .grid-cards {
    width: 85vw;
    padding: 20px;
    gap: 14px;
  }

  .info-label, .info-value {
    font-size: 0.9rem;
  }
}

/* Medium Screens (Tablets, 600px–1024px) */
@media (min-width: 600px) and (max-width: 1024px) {
  .search-bar {
    width: 60vw;
  }

  .grid-cards {
    width: 60vw;
  }

  #weather_icon {
    font-size: 160px;
  }

}

/* Large Screens (2K+) */
@media (min-width: 1920px) {
  .search-bar {
    width: 28vw;
    max-width: 800px;
  }

  .grid-cards {
    width: 30vw;
    max-width: 820px;
  }

  #weather_icon {
    font-size: 240px;
  }

  .feels-like {
    font-size: 2.2rem;
  }
}
