.games-section {
  background: var(--dark-bg);
  padding: 70px 0 80px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.game-card {
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  position: relative;
  aspect-ratio: 9/10;
  background: #a26e6e;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

.game-card.hidden-game {
  display: none;
}

.game-card.hidden-game.visible {
  display: block;
}

.games-cta {
  text-align: center;
  margin-top: 50px;
}

/* Game Modal */
.game-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.game-modal.active {
  display: flex;
}

.game-modal-inner {
  width: 90%;
  max-width: 1200px;
  height: 85vh;
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  background: #000;
}

.game-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid var(--white);
  border-radius: 50%;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s;
}

.game-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.game-modal iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 1024px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .games-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .game-modal-inner {
    width: 95%;
    height: 70vh;
  }
}
