/* ==================================================
   GAME SCREEN
   ================================================== */

/* --- Peliruudukko --- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 200px); /* Kaksi kiinteää saraketta */
  gap: 3rem;
  justify-content: center;
  padding: 2rem;
  max-width: 100%;
  margin: 0 auto;
}

/* Iso peli bannereissa */
.game-card.banner {
  grid-column: 1 / -1; /* Vie molemmat sarakkeet */
  max-width: 100%;
   width: calc(2 * 200px + 3rem);
  height: 200px;
  aspect-ratio: unset; 
  justify-self: center;
}

/* Pienet pelit */
.game-card {
  width: 200px;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #253a65;
  border: 1px solid #fff;
  border-radius: 20px;
  color: white;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  transition:0.2s;
  cursor:pointer;
}


.game-card:hover {
  transform: scale(1.05);
  opacity: 1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition:0.2s;
}

/* --- Ikoni pelissä --- */
.game-card img {
  width: 60%;
  height: auto;
  object-fit: contain;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
  max-width: 100px;
}

.game-card:hover img {
  transform: scale(1.1);
}

.game-card span {
  font-size: 1.5em;
  font-weight: bold;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* --- Otsikko --- */
.content-title {
  font-size: 2rem;
  color: white;
  text-align: center;
  margin: 1rem 0;
}

/* --- Iframe-kääre --- */
.game-container {
  position: relative;
  max-width: 1200px;
  width: 100%;
  margin: 2rem auto;
  border-radius: 20px;
  overflow: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.game-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: none;
  width: 100%;
  height: 100%;
}


@media screen and (max-width: 768px) {
  .game-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    padding: 4rem;
  }

  .game-card {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    max-width: none;
    justify-self: center;
  }

  .game-card.banner {
    grid-column: 1 / -1;
    width: 100%;
    aspect-ratio: 2.5 / 1;
    max-width: 100%;
    justify-self: center;
  }
}
