@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;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  gap: 15px;
}

.loading-text {
  font-family: "Roboto", serif;
  font-size: 18px;
  font-weight: 500;
  color: #faf9f6;
  opacity: 0.9;
}

.progress-bar-container {
  width: 400px;
  height: 12px;
  background: rgba(122, 143, 171, 0.3);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(122, 143, 171, 0.5);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #7a8fab 0%, #6f829b 50%, #8fa5c7 100%);
  border-radius: 6px;
  width: 0%;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.progress-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shine 2s infinite;
}

@keyframes shine {
  0% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

.progress-percentage {
  font-family: "Roboto", serif;
  font-size: 14px;
  font-weight: 500;
  color: #faf9f6;
  opacity: 0.8;
  margin-top: 5px;
}

@media screen and (max-width: 1000px) {
  .progress-bar-container {
    width: 80%;
    max-width: 350px;
  }

  .loading-text {
    font-size: 16px;
  }

  .searchbar {
    width: 90%;
    padding: 15px;
  }

  .searchbar:focus {
    scale: 1.05;
  }
}

@media screen and (max-width: 480px) {
  .progress-bar-container {
    width: 90%;
    max-width: 300px;
    height: 10px;
  }

  .loading-text {
    font-size: 14px;
  }

  .progress-percentage {
    font-size: 12px;
  }

  .searchbar {
    width: 95%;
    padding: 15px;
  }

  .searchbar:focus {
    scale: 1.02;
  }
}

.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;
}

.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;
  }
}
