.game-card {
  position: relative;
  flex-shrink: 0;
  width: 160px;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--secondary-background);
}

.game-card:hover,
.game-card:focus-within .game-card:focus {
  transform: scale(1.1);
  z-index: 10;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.game-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 10%,
    rgba(0, 0, 0, 0) 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  z-index: 6;
}

.game-card:hover .game-card-overlay,
.game-card:focus-within .game-card-overlay .game-card:focus .game-card-overlay {
  opacity: 1;
}

.game-card-info {
  padding: 1rem;
  color: var(--text-primary);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.game-card:hover .game-card-info,
.game-card:focus-within .game-card-info,
.game-card:focus .game-card-info {
  transform: translateY(0);
}

.game-card-title {
  font-size: 1rem;
  font-weight: bold;
  margin: 0 0 0.5rem 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.game-card-info p {
  font-size: 0.8rem;
  margin: 0.2rem 0;
  color: var(--text-secondary);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.game-card:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

.game-card.focused {
  transform: scale(1.1);
  z-index: 10;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

.game-card.focused .game-card-overlay {
  opacity: 1;
}

.game-card.focused .game-card-info {
  transform: translateY(0);
}

.game-card-runner-icon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  z-index: 5;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
  pointer-events: none;
}
