.gamehero {
  margin: 25px 0 15px;
  padding: 22px clamp(20px, 3vw, 42px);
  background:
    linear-gradient(270deg, #21172ff5 10%, #241431d4 53%, #24193511),
    url("/media/orbit.jpg") 35% 43% / cover;
  border: 1px solid #47344f;
  border-radius: 16px;
}
.gamehero h1 {
  font-size: clamp(28px, 3.8vw, 44px);
  margin: 8px 0 0;
  font-weight: 900;
  letter-spacing: -1px;
}
.gamehero p {
  margin: 0 0 12px;
  color: #d2c9db;
}
.gamehero .search {
  max-width: 350px;
  background: #18141fd9;
}
.gamehero .search input {
  width: 100%;
}
.gamehealth,
.loadstate {
  font-size: 12px;
  color: #b6aabd;
  margin-bottom: 16px;
}
.gamerail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 90px) / 6);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #594664 transparent;
  padding-bottom: 8px;
}
.gamecard {
  display: block;
  min-width: 0;
  scroll-snap-align: start;
}
.gameart {
  aspect-ratio: 3/4;
  position: relative;
  background: linear-gradient(145deg, #523663, #20222f);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #49404d;
  display: grid;
  place-items: center;
}
.gameart strong {
  text-align: center;
  padding: 10px;
  color: #dfc4ef;
}
.gameart img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}
.gamecard:hover img {
  transform: scale(1.035);
}
.gamecard > b {
  margin-top: 5px;
  display: block;
  text-align: start;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
}
.gamecard small {
  color: #aba1b7;
  font-size: 11px;
}
.gamebadge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: #292030ed;
  color: #ead9f3;
  padding: 2px 8px;
  font-size: 10px;
  border-radius: 6px;
}
.gamebadge.islive {
  background: #801a41e8;
  color: white;
}
.postergrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px 18px;
  margin-top: 16px;
}
.postergrid .empty {
  grid-column: 1/-1;
}
.railnav {
  display: flex;
  gap: 6px;
}
.railnav button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  font: 24px system-ui;
  width: 34px;
}
.gamerail > .empty {
  min-width: 220px;
}
.gamehero.compact h1 {
  text-align: right;
}
.gamecard img[hidden],
#loadgames[hidden] {
  display: none;
}
#loadgames {
  margin: 12px auto;
}
.loadstate {
  text-align: center;
}
@media (max-width: 900px) {
  .gamerail {
    grid-auto-columns: calc((100% - 39px) / 4);
    gap: 13px;
  }
  .postergrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
  }
}
@media (max-width: 580px) {
  .gamerail {
    grid-auto-columns: 38%;
    gap: 10px;
  }
  .postergrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .gamecard > b {
    font-size: 12px;
  }
  .gamehero {
    padding: 18px;
  }
  .railnav button {
    width: 28px;
  }
  .gamebadge {
    font-size: 9px;
    bottom: 4px;
    right: 4px;
  }
}
.gamepages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px auto;
}
.gamepages span {
  font-size: 12px;
  color: var(--muted);
}
.gamepages button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.gamehealth {
  line-height: 1.9;
}
