@import url(https://fonts.googleapis.com/css?family=Inter:100,200,300,regular,500,600,700,800,900);
html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.4;
  background: linear-gradient(135deg, #1b2838 0%, #2a475e 50%, #171a21 100%);
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  background-color: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.container {
  max-width: 1220px;
  padding: 0 10px;
  margin: 0 auto;
}

.st {
  position: relative;
}

.st:hover::after {
  position: absolute;
  content: "Акаунт має бути відкритим";
  bottom: 113%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #007bff;
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  font-size: 14px;
}

.clearbtn {
  padding: 10px 20px;
  color: #fff;
  text-transform: uppercase;
  &:hover {
    text-decoration: underline 2px solid #fff;
    text-underline-offset: 8px;
  }
}

.buttons__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.st__title {
  font-size: 28px;
  text-transform: uppercase;
  font-weight: 600;

  color: #fff;
  width: fit-content;
  margin: 0 auto;
  padding: 15px 25px;
  border-radius: 20px;
  margin-bottom: 50px;
  margin-top: 20px;
}

#submitBtn {
  margin-left: 10px;

  padding: 10px 20px;
  color: #fff;
  text-transform: uppercase;
  border-radius: 15px;
  &:hover {
    text-decoration: underline 2px solid #fff;
    text-underline-offset: 8px;
  }
}
.letters {
  margin-left: 10px;

  padding: 10px 20px;
  color: #fff;
  text-transform: uppercase;
  border-radius: 15px;
  &:hover {
    text-decoration: underline 2px solid #fff;
    text-underline-offset: 8px;
  }
}
.time {
  margin-left: 10px;

  padding: 10px 20px;
  color: #fff;
  text-transform: uppercase;
  border-radius: 15px;
  &:hover {
    text-decoration: underline 2px solid #fff;
    text-underline-offset: 8px;
  }
}

.free {
  padding: 10px 20px;
  color: #fff;
  text-transform: uppercase;
  border-radius: 15px;
  &:hover {
    text-decoration: underline 2px solid #fff;
    text-underline-offset: 8px;
  }
}

.discount {
  padding: 10px 20px;
  color: #fff;
  text-transform: uppercase;
  border-radius: 15px;
  &:hover {
    text-decoration: underline 2px solid #fff;
    text-underline-offset: 8px;
  }
}

.unavailable {
  padding: 10px 20px;
  color: #fff;
  text-transform: uppercase;
  border-radius: 15px;
  &:hover {
    text-decoration: underline 2px solid #fff;
    text-underline-offset: 8px;
  }
}

.clearfil {
  padding: 10px 20px;
  color: #fff;
  text-transform: uppercase;
  border-radius: 15px;
  &:hover {
    text-decoration: underline 2px solid #fff;
    text-underline-offset: 8px;
  }
}

input {
  padding: 15px;
  margin: 0 auto 20px;
  display: block;
  width: 535px;
}

input:focus {
  outline: 2px solid rgb(42, 167, 49);
}
#result {
  margin: 0 auto;
  text-align: center;
}

input::placeholder {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.4;
}

.search-input {
  padding: 15px;
  margin: 0 auto 20px;
  display: block;
  width: 535px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  place-items: center;
}

.more-games-btn {
  padding: 10px 20px;
  margin-top: 10px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin: 0 auto;
  margin-top: 20px;
}

.more-games-btn:hover {
  background-color: #0056b3;
}

.centered {
  text-align: center;
}
.userinfo {
  background: linear-gradient(135deg, #98b1d1 0%, #2a475e 50%, #969fb6 100%);
  color: #fff;
  width: 180px;
  padding: 30px;
  margin: 0 auto;
  transition: box-shadow 0.3s ease;
  &:hover {
    box-shadow: 0 0 60px rgba(55, 172, 140, 0.7);
  }
}
.img__user {
  width: 50px;
}

.friendsInfo {
  color: #fff;
}

.friend-item,
.game-item {
  text-align: center;
  width: 180px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  background: linear-gradient(135deg, #98b1d1 0%, #2a475e 50%, #969fb6 100%);
  backdrop-filter: blur(5px);

  transition: box-shadow 0.3s ease-in;
  &:hover {
    box-shadow: 0 0 60px rgba(55, 172, 140, 0.7);
  }
}

.gamesInfo {
  color: #fff;
}

.top-game {
  margin-bottom: 20px;
  text-align: center;
  color: #fff;
}

@keyframes fadeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeSlideIn 0.6s ease forwards;
}

#submitBtn,
.more-games-btn {
  transition:
    transform 0.1s ease,
    background-color 0.3s;
}

#submitBtn:active,
.more-games-btn:active {
  transform: scale(0.97);
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.img__user,
.friend-item img,
.game-item img,
.top-game img {
  animation: popIn 0.4s ease-in;
}

.friend-item img,
.game-item img,
.top-game img,
.img__user {
  transition: transform 0.3s ease;
}

.friend-item img:hover,
.game-item img:hover,
.top-game img:hover,
.img__user:hover {
  transform: scale(1.1);
}

input {
  transition: all 0.3s ease;
}

input:focus {
  outline: 2px solid rgb(42, 167, 49);
}
#notFoundMsg {
  grid-column: 1 / -1;

  color: red;
  font-weight: bold;
  margin-top: 20px;
}

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #333333;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  z-index: 5;
}

.loader--hidden {
  opacity: 0;
  visibility: hidden;
}

.loader::after {
  content: "";
  width: 75px;
  height: 75px;
  border: 15px solid #fff;
  border-top-color: #21429c;
  border-radius: 50%;
  animation: loading 0.75s linear infinite;
}

@keyframes loading {
  from {
    transform: rotate(0turn);
  }
  to {
    transform: rotate(1turn);
  }
}

@media (max-width: 780px) {
  .st {
    flex-direction: column;
    row-gap: 20px;
  }

  input {
    width: 100%;
  }

  .search-input {
    width: 100%;
  }
}
@media (max-width: 470px) {
  .st__title {
    font-size: 20px;
  }
}
.total-playtime {
  margin-top: 20px;
  font-size: 20px;
  font-weight: 500;
  color: #fff;
}

.price__none {
  color: gray;
}

.total-spent {
  text-align: center;
  margin: 10px 0;
}
.total-spent__title {
  font-size: 1.2rem;
  color: #fff;
}
.total-spent__sub {
  color: gray;
  font-size: 0.85rem;
}

.not-found-message {
  grid-column: 1/-1;
  color: red;
}
