.games__header {
  margin-bottom: 40px;
}

.games__header-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
  justify-content: space-between;
}

.games__subtitle {
  color: var(--color-accent);
  font-family: Montserrat;
  font-weight: 500;
}

.games__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

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

.game-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  cursor: pointer;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.2);
  border-color: var(--color-primary);
}

.game-card__cover {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-bg);
}

.game-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

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

.game-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-size: 1.125rem;
}

.game-card__info {
  padding: 16px;
}

.game-card__name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.game-card__rating-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  justify-content: space-between;
}

.game-card__stars {
  display: flex;
  gap: 2px;
}

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

.game-card__likes {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.game-card__play {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 0.9375rem;
}

.game-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-modal[hidden] {
  display: none;
}

.game-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  cursor: pointer;
}

.game-modal__content {
  position: relative;
  width: 90vw;
  max-width: 1100px;
  height: 80vh;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.game-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.game-modal__title {
  font-size: 1.125rem;
  font-weight: 600;
}

.game-modal__close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  color: var(--color-text);
}

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

.game-modal__body {
  flex: 1;
  overflow: hidden;
}

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

@media (max-width: 768px) {
  .games__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .game-modal__content {
    width: 95vw;
    height: 70vh;
  }
}

@media (max-width: 480px) {
  .games__grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
  }
}
