* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background: #fff;
}

/* Center the weather container */
.weather-container {
  max-width: min(100%, 375px);
  min-height: 45em;
  height: 660px;
  margin: auto;
  background: #fff;
  display: grid;
  --header-h: clamp(220px, 48vw, 340px);
  /* responsive header height */
  position: relative;
  overflow: hidden;
  border: 1px solid #d3d3d370;
  border-radius: 16px;
}

.content {
  /* container for current weather and forecast*/
  height: 390px;
  grid-area: 1 / 1 / 2 / 2;
  background: linear-gradient(135deg, #8589FF, #E8E9FF);
  clip-path: ellipse(90% 70% at 50% 30%);
}

.content-dark {
  height: 390px;
  position: relative;
  grid-area: 1 / 1 / 2 / 2;
  background: linear-gradient(135deg, #222350, #6264A2);
  clip-path: ellipse(90% 70% at 50% 30%);
  overflow: hidden;
  z-index: 0;
}

.current-weather {
  grid-area: 1 / 1 / 2 / 2;
  z-index: 1;
  color: #FFFFFF;
  padding: 16px;
}

.temp {
  color: #FFFFFF;
  font-size: 120px;
  font-weight: 400;
  margin: auto 0;
}

.temp::after {
  content: "°C";
  font-size: 40px;
  vertical-align: super;
  margin-left: 8px;
  position: relative;
  top: -18px;
}

.city {
  font-size: 34px;
  font-weight: 300;
  position: relative;
  margin: auto 0;
}

.time {
  font-size: 18px;
  font-weight: 300;
  margin: auto;
}

.weather-desc {
  font-size: 22px;
  font-weight: 300;
  margin: auto 0;
}

#weather-icon {
  position: absolute;
  top: 5em;
  right: 1em;
  width: 8em;
}

.forecast {
  margin-top: 10px;
}

.days {
  ul {
    display: flex;
    flex-direction: row;
    padding-left: 1em;
    margin: 0 auto;

    p:first-child {
      width: 9em;
    }

    p:nth-child(3) {
      width: 6em;
      text-align: center;
    }

    img {
      height: 50px;
      width: 50px;
    }
  }
}

.next-city-btn {
  position: absolute;
  top: calc(var(--header-h) - 5px);
  z-index: 2;
  right: -10px;
  transform: translateX(-50%);
  background: #757AFF;
  border: none;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.next-city-btn .arrow {
  color: white;
}

@media only screen and (max-width: 600px) {
  .days {
    ul {
      padding-left: 1em;
      margin: 0 auto;
    }

    p:first-child {
      width: 9em !important;
    }
  }

  #weather-icon {
    right: 0;
    top: 3em;
  }

  .next-city-btn {
    top: calc(var(--header-h) + 110px);
  }

  .weather-container {
    min-height: 40em;
    border-radius: 0;
    border: 0;
  }
}

/* =========================================================
   Pulse animation for the big weather icon only
   ========================================================= */
@keyframes sunPulse {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0.2rem rgba(77, 74, 63, 0.6));
  }

  50% {
    transform: scale(1.06);
    filter: drop-shadow(0 0 0.9rem rgba(189, 189, 181, 0.9));
  }
}

#weather-icon.sun-pulse {
  animation: sunPulse 3s ease-in-out infinite;
}