body {
  background: #f5f5f5;
  color: #333;
  font-family: "Roboto", sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-image: url("/images/sky.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

main {
  flex: 1 1 100%;
  padding: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fff;
  box-shadow: 0px 10px 30px -5px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  width: 80%;
  max-width: 1000px;
  max-height: 90%;
}

.location,
.current {
  display: flex;
  margin-bottom: 20px;
}

.location .city,
.location .date,
.current .temp,
.current .weather,
.current .hi-low,
.current .wind,
.current .humidity,
.current .pressure,
.current .sunrise,
.current .sunset,
.current .feels-like {
  display: flex;
}

.location .city {
  color: #333;
  font-size: 36px;
  font-weight: bold;
}

.location .date {
  color: #888;
  font-size: 20px;
  font-weight: 300;
}

.current .temp span {
  font-weight: 200;
}

.current .weather,
.current .hi-low,
.current .wind,
.current .humidity,
.current .pressure,
.current .sunrise,
.current .sunset,
.current .feels-like {
  color: #333;
  font-size: 18px;
  font-weight: 500;
}

.search-box {
  padding: 10px;
  width: 100%;
  border: none;
  border-radius: 10px;
  margin: 20px auto;
  box-shadow: 0px 10px 20px -10px rgba(0, 0, 0, 0.2);
}

.search-box:focus {
  outline: none;
  box-shadow: 0px 10px 20px -5px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.5s ease;
}

.welcome-message {
  text-align: center;
  animation: fadeIn 2s ease-in-out;
  margin-bottom: 20px;
}

.welcome-image {
  max-width: 100%;
  height: auto;
}

p {
  font-size: 20px;
  font-weight: 500;
  color: #333;
  margin: 10px 0;
}

.forecast {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  margin-top: 20px;
  overflow-x: auto;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  height: 90%;
  padding-top: 20px;
  animation: fadeIn 2s ease-in-out;
  transition: opacity 0.5s ease; /* Added transition property for opacity */
  opacity: 0; /* Set initial opacity to 0 */
}

.forecast.show {
  opacity: 1; /* Opacity set to 1 when the forecast is shown */
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cards-container {
  display: flex;
  padding: 0 10px; /* Added padding to ensure cards are not cut off */
}

.forecast-cards {
  display: flex;
  flex-wrap: nowrap;
}
.details-hidden {
  display: none;
  padding: 5px;
  margin: 10px;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 2px 2px 6px 0px rgba(0, 0, 0, 0.2);
  background: #fff;
  animation: fadeIn 2s ease-in-out;
  font-size: 14px;
  width: 100px;
}
.forecast-item {
  display: flex;
  flex-direction: column;
}
.brief-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px;
  margin: 10px;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 2px 2px 6px 0px rgba(0, 0, 0, 0.2);
  background: #fff;
  animation: fadeIn 2s ease-in-out;
  width: 100px; /* Set a fixed width to ensure consistent card size */
}
.card {
  flex: 0 0 auto;
  margin: 15px;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 2px 2px 6px 0px rgba(0, 0, 0, 0.2);
  background: #fff;
  animation: fadeIn 2s ease-in-out;
  width: 100px; /* Set a fixed width to ensure consistent card size */
  background-color: #9ad3e9;
}

.card h3 {
  text-align: center;
  margin-bottom: 0.5em;
}

.card .temp {
  text-align: center;
  font-size: 1.2em;
  margin-bottom: 0.5em;
}

.card .weather {
  text-align: center;
  font-size: 1.2em;
  margin-bottom: 0.5em;
}

.card .icon {
  display: flex;
  justify-content: center;
}

.card .icon img {
  height: 50px;
  width: 50px;
}

.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
}

.card-content .time {
  font-weight: bold;
}
.card-content .temp {
  font-size: 1.2em;
}

.card-content .weather {
  margin-top: 10px;
}
@media screen and (max-width: 768px) {
  main {
    width: 90%; /* Adjusted the width to 90% for smaller screens */
  }

  .forecast {
    height: 70%; /* Adjusted the height to 70% for smaller screens */
  }

  .card {
    width: 40%; /* Adjusted the width to 80% for smaller screens */
  }
}
