.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 16px;
}

.game-card {
  display: flex;
  flex-direction: column;
  min-height: 232px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
}

.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-5px);
  border-color: var(--brand);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.game-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 128px;
  /* CLS fix: reserve exact space before image loads */
  aspect-ratio: 16 / 9;
  background: var(--art);
  overflow: hidden;
}

.game-art svg {
  position: relative;
  z-index: 1;
  width: min(78%, 190px);
  height: 112px;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.22));
}

.game-art .icon-stroke {
  fill: none;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 12;
}

.game-art .icon-fill {
  fill: rgba(255, 255, 255, 0.92);
}

.game-art .icon-accent {
  fill: var(--accent);
}

.play-count {
  position: absolute;
  z-index: 2;
  right: 10px;
  top: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 850;
  backdrop-filter: blur(8px);
}

.custom-icon-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* CLS fix */
  display: block;
}

.game-art:has(.custom-icon-img) {
  background: #111827;
}

.publisher {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

