.games {
  padding: 64px 24px;
  background: var(--color-dark);
}

.games-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  gap: 32px;
}

.games-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}

.games-header-left {
  display: grid;
  gap: 16px;
}

.games-header h2 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}

.btn-view-all {
  display: grid;
  place-items: center;
  padding: 4px 32px;
  height: 40px;
  font-weight: 700;
  font-size: 16px;
  color: var(--color-white);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-pill);
  background: #0f1e15;
  transition: background 0.3s;
}

.btn-view-all:hover {
  background: rgba(19, 238, 133, 0.1);
}

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

.games-grid:not(.show-all) .game-card:nth-child(n+7) {
  display: none;
}

.game-card {
  position: relative;
  border-radius: var(--radius-pill);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s;
}

.game-card:hover {
  transform: translateY(-4px);
}

.game-card img {
  width: 100%;
  aspect-ratio: 204 / 293;
  object-fit: cover;
  display: block;
}

.game-overlay {
  display: none;
}

.game-card:hover .game-overlay {
  display: grid;
  place-items: center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.game-play-btn {
  background: var(--color-primary);
  color: var(--color-dark);
  font-weight: 700;
  font-size: 16px;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
}

.game-players {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--color-dark-card);
  border-bottom-left-radius: var(--radius-pill);
  border-bottom-right-radius: var(--radius-pill);
}

.game-players svg {
  flex-shrink: 0;
}

.game-players-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-white);
  opacity: 0.9;
  flex: 1;
}

.games-cta {
  display: grid;
  justify-items: center;
}

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

  .games-header h2 {
    font-size: 28px;
  }
}

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

  .games-header {
    grid-template-columns: 1fr;
  }

  .games-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .games-header h2 {
    font-size: 24px;
  }
}

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