/* Upload index.html, style.css and the image folder together. */
* { box-sizing: border-box; }
html { min-height: 100%; background: #1E40AF; }
body { margin: 0; }
.catalog {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  border: 0;
  padding: 12px 2% 13px;
  background: #1E40AF;
}
.games {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: clamp(4px, 1vw, 15px);
  padding: 0;
  margin: 0;
  list-style: none;
}
.game {
  grid-column: var(--x) / span var(--size);
  grid-row: var(--y) / span var(--size);
  aspect-ratio: 1;
  min-width: 0;
  overflow: hidden;
  --card-radius: clamp(4px, 1vw, 14px);
  border-radius: var(--card-radius);
}
.game img, .game video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.game-toggle {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
  border-radius: inherit;
  clip-path: inset(0 round var(--card-radius));
  isolation: isolate;
  line-height: 0;
}
.game-toggle:focus-visible { outline: 3px solid white; outline-offset: -4px; }
.game-toggle .animation {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  clip-path: inset(0 round 7%);
  border: 0;
  border-radius: inherit;
  pointer-events: none;
  background: transparent;
}
.game-toggle .animation[hidden] { display: none; }
@media (max-width: 600px) {
  .catalog {
    width: 100%;
    padding: 6px 2% 10px;
  }
  .games {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(4px, 2.4vw, 10px);
  }
  .game {
    grid-column: var(--mx) / span var(--ms);
    grid-row: var(--my) / span var(--ms);
    --card-radius: clamp(3px, 2vw, 10px);
    border-radius: var(--card-radius);
  }
}
