.games {
  padding: 80px 154px;
  background-color: #131420;
}

.games__inner {
  max-width: 1612px;
  margin: 0 auto;
}

.games__title {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 42px;
  color: #ffffff;
  line-height: normal;
  margin-bottom: 12px;
}

.games__subtitle {
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 40px;
}

.games__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.games__card {
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.games__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(153, 224, 7, 0.2);
}

.games__card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
}

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

.game-modal__content {
  position: relative;
  width: 90vw;
  height: 85vh;
  max-width: 1200px;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
}

.game-modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

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

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

@media (max-width: 1400px) {
  .games {
    padding: 60px 60px;
  }
}

@media (max-width: 1024px) {
  .games {
    padding: 40px 20px;
  }

  .games__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .games__title {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .games {
    padding: 32px 16px;
  }

  .games__title {
    font-size: 24px;
  }

  .games__subtitle {
    font-size: 14px;
  }

  .games__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .game-modal__content {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
}
