* {
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  box-sizing: border-box;
}

html,
body {
  position: relative;
  background: linear-gradient(#752e2e, #582323);
  background-image: url(img/pexels-cmonphotography-1809644.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1em;
  color: #ddd;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

::-webkit-scrollbar {
  display: none;
}

#load-screen {
  display: none;
  position: fixed;
  inset: 0;
  justify-content: center;
  align-items: center;
  background-color: #222222fe;
  z-index: 90;
}

#loader {
  width: 48px;
  height: 48px;
  border: 5px solid #fff;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  position: relative;
  animation: pulse 1s linear infinite;
}

#loader:after {
  content: "";
  position: absolute;
  width: 48px;
  height: 48px;
  border: 5px solid #fff;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  animation: scaleUp 1s linear infinite;
}

@keyframes scaleUp {
  0% {
    transform: translate(-50%, -50%) scale(0);
  }
  60%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes pulse {
  0%,
  60%,
  100% {
    transform: scale(1);
  }
  80% {
    transform: scale(1.2);
  }
}

main {
  position: relative;
  margin: 0 auto;
  padding: 40px;
  width: 800px;
  max-height: 90vh;
  max-height: 90svh;
  background-color: #dddddd0f;
  backdrop-filter: blur(15px);
  box-shadow: 0 3px 10px #222;
  border-radius: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
}

.home {
  margin: 30px 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10%;
}

.home #city-name-date {
  display: none;
  width: 100%;
}

.home #city-name {
  margin-bottom: 10px;
}

.home p#notification {
  width: 50%;
  text-align: left;
}

.home hr {
  margin: auto 0;
  width: 2px;
  height: 20px;
  background-color: #aaa;
}

button#my-weather {
  margin-bottom: 10px;
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  background-color: #1f7ae2;
  color: #ddd;
  text-align: center;
  text-transform: capitalize;
  cursor: pointer;
}

button#my-weather:hover {
  background-color: #2283f1;
}

button#my-weather i {
  color: #fff;
}

.home #actions {
  width: 50%;
}

#weather-form {
  width: 100%;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  border-radius: 5px;
  overflow: hidden;
  transition: 0.2s ease-in;
}

input#city {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  color: #222;
  transition: 0.2s ease-in;
}

i {
  margin: 10px;
  color: #222;
  text-align: center;
}

i.fa-xmark {
  display: none;
  color: rgb(255, 72, 72);
}

#weather {
  width: 100%;
  display: none;
  justify-content: space-between;
  align-items: center;
}

#weather #temp .temperature {
  font-size: 8em;
}

#weather-icon {
  width: 150px;
  height: auto;
}

#weather-info {
  text-align: center;
  font-style: italic;
  text-transform: capitalize;
}

#hourly-forecast-section {
  border-radius: 10px;
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -225px;
  backdrop-filter: blur(10px);
  text-align: center;
  transition: 0.4s ease-in-out;
  z-index: 50;
}

#hourly-forecast-section i {
  margin: 15px auto 0;
  font-size: 1em;
  background-color: #fff;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
}

#hourly-forecast-section h3 {
  padding: 25px 20px;
  text-transform: capitalize;
  font-size: 2em;
  color: #111;
}

#hourly-forecast {
  padding: 20px;
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  background-color: #333;
}

.hourly-item {
  width: 100%;
  height: 100%;
  padding: 15px;
  display: inherit;
  flex-direction: column;
  justify-content: inherit;
  align-items: inherit;
}

.hourly-item p {
  font-size: 0.75em;
}

@media (max-width: 769px) {
  main {
    width: 725px;
    padding: 40px 20px;
  }
}

@media (max-width: 426px) {
  main {
    max-width: 93vw;
    max-height: 93vh;
    max-height: 93svh;
    justify-content: space-evenly;
  }
  .home {
    width: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  #top-hr {
    margin: 30px;
    height: 2px;
    width: 20px;
  }
  .home p#notification {
    width: 100%;
  }

  #city-name-date {
    text-align: center;
    margin-bottom: 20px;
  }

  #actions {
    width: fit-content !important;
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #ffffff28;
    padding: 6px;
    border-radius: 6px;
    box-shadow: 0 4px 8px #666;
  }

  #actions button {
    width: 40px;
    height: 40px;
    margin: 0;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  #actions button span {
    display: none;
  }
  #weather #temp .temperature {
  font-size: 5em;
  }
  #weather {
    flex-direction: column;
  }
  #hourly-forecast {
    flex-wrap: wrap;
  }
  .hourly-item {
    max-width: 75px;
    flex: 1 0 calc(100% - 3px);
  }
  #hourly-forecast-section {
    bottom: -340px;
  }
}

@media (max-width: 376px) {
  #hourly-forecast-section {
    bottom: -450px;
  }
}