body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  /* background: #222; */
  background: #111;
  font-size: 120%;
  transition: background-image 0.5s ease-in-out, background-color 0.5s ease-in-out;
}

body:hover {
  background-color: #000;
}

body {
  background-image: url('https://source.unsplash.com/1600x900/?landscape');
}

.card {
  height: 45vh;
  background: #3a1e1ed0;
  color: rgb(255, 255, 255);
  padding: 2em;
  border-radius: 30px;
  width: 100%;
  max-width: 420px;
  margin: 1em;
  transition: background 0.3s ease-in-out, transform 0.3s ease-in-out;
  transform: translateY(0);
}

.card:hover {
  background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5)); 
  transform: translateY(-5px); /* Move the card up by 5px on hover */
}

.search {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease-in-out;
}

button {
  margin: 0.5em;
  border-radius: 50%;
  border: none;
  height: 44px;
  width: 44px;
  outline: none;
  background: #7c7c7c2b;
  color: white;
  cursor: pointer;
  transition: background 0.2s ease-in-out, transform 0.2s ease-in-out;
}

button:hover {
  background: #7c7c7c6b;
  transform: scale(1.1);
}

input.search-bar {
  border: none;
  outline: none;
  padding: 0.4em 1em;
  border-radius: 24px;
  background: #7c7c7c2b;
  color: white;
  font-family: inherit;
  font-size: 105%;
  width: calc(100% - 100px);
  transition: background 0.3s ease-in-out;
}

input.search-bar:focus {
  background: #7c7c7c4d;
}

h1.temp {
  margin: 0;
  margin-bottom: 0.4em;
}

.flex {
  display: flex;
  align-items: center;
}

.description {
  text-transform: capitalize;
  margin-left: 8px;
}

.weather.loading {
  visibility: hidden;
  max-height: 20px;
  position: relative;
  transition: visibility 0.3s ease-in-out, max-height 0.3s ease-in-out;
}

.weather.loading:after {
  visibility: visible;
  content: "Loading...";
  color: white;
  position: absolute;
  top: 0;
  left: 20px;
  transition: visibility 0.3s ease-in-out;
}

.weather:not(.loading) {
  opacity: 1;
  max-height: 100px;
  transition: opacity 0.3s ease-in-out, max-height 0.3s ease-in-out;
}
