/* This CSS file styles the game cards and the overall layout of the page. */

body {
  --clr-dark: #6e6295;
  --clr-light: #f9f1f0;
  --clr-accent: #6ab6b4;
  font-family: sans-serif;
  margin: 0;
  background-color: var(--clr-light);
  color: var(--clr-light);

  /* Add a background image */
  background-image: url('../img/polka-dot-background.png'); /* Replace with the relative path to your image */
  background-size: cover; /* Ensures the image covers the entire background */
  background-position: center; /* Centers the image */
  background-repeat: no-repeat; /* Prevents the image from repeating */
}

header {
  text-align: center;
  padding: 2rem;
  background-color: var(--clr-accent);
  color: var(--clr-light);
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 250px));
  gap: 1em;
  justify-content: center;
  padding: 2rem;
}

.game-card {
  background: var(--clr-accent);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  transition: transform 750ms cubic-bezier(.5, 0, .5, 1), opacity 250ms linear;
  border-radius: 10px;
}

.game-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 1rem;
  transition: transform 750ms cubic-bezier(.5, 0, .5, 1), opacity 250ms linear;
  border-radius: 8px;
}

.game-card:hover img,
.game-card:focus img {
  transform: scale(1.1);
  opacity: 0.5;
}

/* Make entire game cards clickable */
a.game-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.button-row {
  display: flex;
  gap: 0.5em;
  margin-top: 0.75em;
}

.btn {
  flex: 1;
  padding: 0.5em 0.75em;
  border-radius: 0.5em;
  font-weight: bold;
  font-size: 1rem;
  text-decoration: none;
  background-color: var(--clr-dark);
  color: var(--clr-light);
  cursor: pointer;
  user-select: none;
  
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background-color: #554d7c;
  transform: scale(1.05);
}

