@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

* {
  padding: 0;
  margin: 0;
}

body,
h1,
h3,
h4,
h5,
text,
h6 {
  font-family: "Roboto", serif;
  text-align: center;
  font-weight: 400;
  color: #faf9f6;
}

.searchbar {
  padding: 1vw;
  width: 40%;
  border-radius: 5px;
  background: #7a8fab;
  text-align: left;
  font-size: 24px;
  border: none;
  outline: none;
  color: #faf9f6;
  transition: 0.2s;
  margin: 0px 0px 20px 0px;
  transition: 0.3s;
}

.searchbar::placeholder {
  font-family: "Roboto", serif;
  font-size: 16px;
  color: #faf9f6;
  text-align: center;
  opacity: 0.4;
}

#progress-bar {
  position: relative;
  width: 80%;
  background-color: #7a8fab;
  border-radius: 10px;
}
#loading-bar {
  width: 0%;
  height: 25px;
  background-color: #e7928f;
  border-radius: 10px;
  transition: width 0.3s;
}
#loading-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  line-height: 30px;
}

.searchbar:focus {
  outline: none;
  background: #6f829b;
  scale: 1.1;
  transition: 0.3s;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.game {
  margin: 0.45rem;
  cursor: pointer;
  position: relative;
  display: inline-block;
}
.game img {
  width: 175px;
  height: 175px;
  border-radius: 10px;
  transition: all 0.35s ease;
}
.game:hover img {
  transform: scale(1.05) translateY(-0.2vw);
  filter: brightness(0.7);
  box-shadow: 0 0 0.5vw rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.text {
  font-family: "Roboto", serif;
  font-weight: 500;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  animation: slide-out 0.35s ease forwards;
}
.game:hover .text {
  opacity: 1;
  animation: slide-in 0.35s ease forwards;
}

@keyframes slide-in {
  from {
    transform: translate(-50%, 0%);
  }
  to {
    transform: translate(-50%, calc(-50% - 0.2vw));
  }
}

@keyframes slide-out {
  from {
    transform: translate(-50%, calc(-50% - 0.2vw));
  }
  to {
    transform: translate(-50%, 0%);
  }
}
@media screen and (max-width: 1000px) {
  .searchbar {
    width: 90%;
    padding: 15px;
  }

  .searchbar:focus {
    scale: 1.05;
  }
}

@media screen and (max-width: 480px) {
  .searchbar {
    width: 95%;
    padding: 15px;
  }

  .searchbar:focus {
    scale: 1.02;
  }
}
