/* Полоса навигации по играм */
.games-bar {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.games-bar-inner {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.game-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.game-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  text-decoration: none;
}

.game-btn.is-current {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
}

/* Витрина игр */
.games-intro {
  max-width: 760px;
  margin-bottom: 22px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin: 20px 0 30px;
}

.game-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.game-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.game-card-subtitle {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

.game-card-how {
  flex: 1;
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.5;
}

.game-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 42px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
  text-decoration: none;
}

.game-play-btn:hover {
  filter: brightness(1.06);
  text-decoration: none;
}

/* Страница отдельной игры */
.game-subtitle {
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.game-how {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-left: 4px solid var(--brand);
  border-radius: 0 10px 10px 0;
  background: var(--surface-2);
  line-height: 1.5;
}

.game-frame-wrap {
  width: 100%;
  height: 640px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.game-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.game-fullscreen {
  margin: 7px 0 24px;
  text-align: right;
  font-size: 13px;
}

.game-description {
  max-width: 820px;
}

.other-games {
  margin: 30px 0;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.other-games h2 {
  margin-top: 0;
}

.other-games-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 700px) {
  .games-bar-inner {
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  .game-frame-wrap {
    height: 70vh;
    min-height: 70vh;
    border-radius: 10px;
  }

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

  .game-card {
    padding: 16px;
  }
}
