/* ── Provider games page ── */
.provider-games-page {
  position: relative;
  padding: 0.5rem 0 1.5rem;
}

.provider-games-page__header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.provider-games-page__back {
  position: fixed;
  left: 0;
  top: 75%;
  z-index: 110;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 0 999px 999px 0;
  background: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.provider-games-page__back:hover {
  transform: translateY(-50%) translateX(2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.34);
  background: #fafafa;
}

.provider-games-page__back:active {
  transform: translateY(-50%) translateX(0);
}

.provider-games-page__back-icon {
  display: block;
  width: 30px;
  height: 30px;
  margin-right: 5px;
  object-fit: contain;
}

@media (min-width: 901px) {
  .provider-games-page__back {
    left: var(--sidebar-width, 240px);
  }
}

.provider-games-page__headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.provider-games-page__title {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--accent-gold, #ffc107);
}

.provider-games-page__count {
  margin: 0;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(59, 158, 255, 0.12);
  color: #7ec3ff;
  font-size: 0.75rem;
  font-weight: 700;
}

.provider-games-search {
  position: relative;
  display: block;
}

.provider-games-search__icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.provider-games-search__input {
  width: 100%;
  min-height: 42px;
  padding: 0.6rem 0.9rem 0.6rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary, #fff);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.provider-games-search__input:focus {
  border-color: rgba(255, 193, 7, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

.provider-games-search__input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.provider-games-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.provider-games-card {
  min-width: 0;
}

.provider-games-card__button {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.provider-games-card__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

.provider-games-card--maintenance .provider-games-card__button {
  cursor: not-allowed;
}

.provider-games-card--maintenance .provider-games-card__button:hover,
.provider-games-card--maintenance .provider-games-card__button:active {
  transform: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.provider-games-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(160deg, #2a2a2a, #111);
}

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

.provider-games-card__media--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18%;
  box-sizing: border-box;
}

.provider-games-card__media--fallback img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.9;
}

.provider-games-card__footer {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.45rem;
  background: rgba(18, 18, 18, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.provider-games-card__name {
  font-size: clamp(0.52rem, 1.2vw, 0.68rem);
  font-weight: 700;
  line-height: 1.2;
  color: #f1f1f1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.provider-games-page__loading,
.provider-games-page__empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 220px;
  padding: 2rem 1rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  text-align: center;
}

.provider-games-page__loading p,
.provider-games-page__empty p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.provider-games-page__empty h2 {
  font-size: 1.05rem;
  font-weight: 700;
}

.provider-games-page__empty-icon {
  font-size: 2rem;
}

.provider-games-page__empty--error {
  border-color: rgba(239, 68, 68, 0.25);
}

.provider-games-page__lobby-btn {
  margin-top: 0.75rem;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffc107, #ff9800);
  color: #111;
  font-weight: 700;
  cursor: pointer;
}

.provider-games-page__lobby-btn:hover {
  filter: brightness(1.05);
}

.provider-games-page__spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent-gold, #ffc107);
  border-radius: 50%;
  animation: providerGamesSpin 0.8s linear infinite;
}

@keyframes providerGamesSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 1024px) {
  .provider-games-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .provider-games-page {
    padding-top: 0.75rem;
  }
}

/* ── Full-screen game player (iframe + loading) ── */
.bmp-game-player {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #000;
}

.bmp-game-player__loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  background: #000;
  color: #fff;
}

.bmp-game-player__loading[hidden],
.bmp-game-player__stage[hidden],
.bmp-game-player__panel--hidden {
  display: none !important;
}

.bmp-game-player__loading p {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.9);
}

.bmp-game-player__loading-ring {
  position: relative;
  width: 118px;
  height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bmp-game-player__loading-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent-gold, #ffc107);
  animation: bmpGamePlayerSpin 1s linear infinite;
}

.bmp-game-player__loading-logo {
  position: relative;
  z-index: 1;
  width: 74px;
  height: auto;
  object-fit: contain;
}

.bmp-game-player__stage {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.bmp-game-player__frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

.bmp-game-player__back {
  position: fixed;
  left: 0;
  top: 75%;
  z-index: 510;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 0 999px 999px 0;
  background: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.bmp-game-player__back:hover {
  transform: translateY(-50%) translateX(2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.34);
  background: #fafafa;
}

.bmp-game-player__back:active {
  transform: translateY(-50%) translateX(0);
}

.bmp-game-player__back-icon {
  display: block;
  width: 30px;
  height: 30px;
  margin-right: 5px;
  object-fit: contain;
}

body.bmp-game-active {
  overflow: hidden;
}

body.bmp-game-active .bottom-nav {
  display: none;
}

@keyframes bmpGamePlayerSpin {
  to {
    transform: rotate(360deg);
  }
}
