@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: var(--site-text, #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: var(--site-text, #faf9f6);
  opacity: 0.9;
}

.progress-bar-container {
  width: 400px;
  height: 12px;
  background: color-mix(in srgb, var(--site-surface, #7a8fab) 35%, transparent);
  border-radius: var(--site-radius-sm, 10px);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 1px solid color-mix(in srgb, var(--site-surface, #7a8fab) 60%, transparent);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--site-surface, #7a8fab) 0%,
    var(--site-accent, #6f829b) 50%,
    var(--site-muted, #8fa5c7) 100%
  );
  border-radius: var(--site-radius-sm, 10px);
  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: var(--site-text, #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: min(88vw, 1080px);
    padding: 20px 30px;
  }

  .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: calc(100vw - 24px);
    padding: 18px 22px;
    font-size: 1.05rem;
  }

  .searchbar:focus {
    scale: 1.02;
  }
}

.searchbar {
  box-sizing: border-box;
  width: var(--site-search-width, min(88vw, 1080px));
  padding: 20px 30px;
  border-radius: var(--site-search-radius, 20px);
  background-color: var(--site-search-bg, var(--site-input-bg, #101d31));
  text-align: center;
  font-size: var(--site-search-font-size, 1.3rem);
  font-style: italic;
  border: 2px solid
    var(--site-search-border-color, var(--site-control-border-hover, rgba(255, 255, 255, 0.34)));
  outline: none;
  color: var(--site-input-text, #faf9f6);
  margin: 0px 0px 20px 0px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--site-shadow, rgba(0, 0, 0, 0.3));
}

.searchbar::placeholder {
  font-family: "Roboto", serif;
  font-size: inherit;
  color: var(--site-placeholder, #faf9f6);
  text-align: center;
  opacity: 1;
}

.searchbar:hover {
  background-color: var(--site-search-hover-bg, var(--site-input-bg, #101d31));
  border-color: var(--site-search-border-color, var(--site-control-border-hover, rgba(255, 255, 255, 0.34)));
  box-shadow: var(--site-search-glow-shadow, 0 0 0 3px var(--site-control-ring, rgba(255, 255, 255, 0.18)));
  cursor: text;
}

.searchbar:focus {
  outline: none;
  background-color: var(--site-search-hover-bg, var(--site-input-bg, #101d31));
  border-color: var(--site-search-border-color, var(--site-control-border-hover, rgba(255, 255, 255, 0.38)));
  transform: scale(1.04);
  box-shadow: var(--site-search-glow-shadow, 0 0 0 4px var(--site-control-ring, rgba(255, 255, 255, 0.22)));
  cursor: text;
}

.game {
  margin: 0.45rem;
  cursor: pointer;
  position: relative;
  display: inline-block;
}
.game img {
  width: 175px;
  height: 175px;
  border-radius: var(--site-radius-md, 14px);
  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: min(88vw, 1080px);
    padding: 20px 30px;
  }

  .searchbar:focus {
    transform: scale(1.02);
  }
}

@media screen and (max-width: 480px) {
  .searchbar {
    width: calc(100vw - 24px);
    padding: 18px 22px;
    font-size: 1.05rem;
  }

  .searchbar:focus {
    transform: none;
  }
}

.searchbar {
  box-sizing: border-box;
  padding: 1.2vw;
  width: 50%;
  border-radius: 5px;
  background: var(--site-input-bg, #2a3a5b);
  text-align: center;
  font-family: "Roboto", serif;
  font-size: 24px;
  font-style: normal;
  border: none;
  outline: none;
  color: white;
  transition: 0.2s;
  margin: 0 0 20px;
  box-shadow: none;
  transform: none;
}

.searchbar::placeholder {
  color: #aaa;
  text-align: center;
  opacity: 1;
}

.searchbar:hover,
.searchbar:focus {
  background: var(--site-search-hover-bg, #3a4a7b);
  border: none;
  box-shadow: none;
  transform: none;
}
