* {
  box-sizing: border-box;
}

body {
  margin: 0 auto;
  font-family: "Montserrat", Helvetica, sans-serif;
  font-size: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  background-color: #FFFFFF;
  color: #000000;
}

header {
  padding: 40px 10px 20px 10px;
}

/* The whole section with all weather info */
#city-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 12px;
  max-width: 450px;
}

.container {
  padding: 6px;
}

/* Todays weather description on top of page */
#todaysForecast {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

i {
  font-size: 44px;
  padding: 5px;
}

h1,
h2,
p,
ul,
input,
button {
  margin: 0;
}

h1 {
  font-size: 40px;
  font-weight: 700;
  text-align: center;
}

h2 {
  font-size: 30px;
  font-weight: 700;
  margin-top: 35px;
  padding: 20px 10px 10px;
}

ul {
  list-style: none;
  padding-left: 0;
}

/* List of the 4 day forecast */
li {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px dashed;
}

/* input and search button in a form */
form {
  padding: 32px 0;
  display: flex;
  flex-direction: row;
  gap: 12px;
}

button,
input {
  all: unset;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 16px;
}

button {
  background-color: #000000;
  color: #FFFFFF;
}

input {
  border: 1px solid #000000;
  background-color: #FFFFFF;
}

input::placeholder {
  color: #000000;
}

/* Right arrow styling and placement */

#nextCity {
  text-align: right;
  margin-top: -30px;

}

#nextCity,
#inputBtn {
  cursor: pointer;
}

#nextCity:hover,
#inputBtn:hover,
a:hover {
  opacity: 0.7;
}

a {
  all: unset;
  cursor: pointer;
}

footer {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 15px;
  padding: 24px;
}

footer i {
  font-size: 30px;
}

/* styling on rain */

body.rain {
  background-color: #BDE8FA;
  color: #164A68;
}

/* Styling form content on rain */
.rain input {
  border: 1px solid #164A68;
  background-color: #FFFFFF;
}

.rain input::placeholder {
  color: #164A68;
}

.rain button {
  background-color: #164A68;
}

/* styling on cloud */

body.cloud {
  background-color: #F9FDFE;
  color: #F47775;
}

/* Styling form content on cloud */
.cloud input {
  border: 1px solid #F47775;
  background-color: #FFFFFF;
}

.cloud input::placeholder {
  color: #F47775;
}

.cloud button {
  background-color: #F47775;
}

/* styling on clear */

body.clear {
  background-color: #F7E9B9;
  color: #2A5510;
}

/* Styling form content on clear */
.clear input {
  border: 1px solid #2A5510;
  background-color: #FFFFFF;
}

.clear input::placeholder {
  color: #2A5510;
}

.clear button {
  background-color: #2A5510;
}

/* styling on snow */

body.snow {
  background-color: #F9FDFE;
  color: #164A68;
}

/* Styling form content on rain */
.snow input {
  border: 1px solid #164A68;
  background-color: #F9FDFE;
}

.snow input::placeholder {
  color: #164A68;
}

.snow button {
  background-color: #164A68;
}

/* Animations */

.weatherIcon {
  position: absolute;
  padding-top: 4px;
  padding-left: 15px;
}

.weatherIconClear {
  animation: bounce 1.5s infinite;
}

.weatherIconRain {
  animation: wiggle 0.5s ease-in-out infinite;
}

.weatherIconCloud {
  animation: bounce 1.5s infinite, movement 20s linear infinite;
  left: -100px;
}

.weatherIconSnow {
  top: -50px;
  left: 80vw;
  transform: translateX(-50%);
  animation: falling 20s linear infinite, drifting 5s ease-in-out infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0) scale(1.2);
  }

  50% {
    transform: translateY(-10px) scale(1.3);
  }
}

@keyframes falling {
  0% {
    top: -50px;
  }

  100% {
    top: 150vh;
  }
}

@keyframes drifting {

  0%,
  100% {
    transform: translateX(-50%) translateX(-20px);
  }

  50% {
    transform: translateX(-50%) translateX(20px);
  }
}

@keyframes movement {
  0% {
    left: -50px;
  }

  100% {
    left: 100vw;
  }
}

@keyframes wiggle {

  0%,
  100% {
    transform: rotate(0deg);
  }

  25%,
  75% {
    transform: rotate(-5deg);
  }

  50% {
    transform: rotate(5deg);
  }
}