.game-modal {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: grid;
  place-items: center;
  padding: 24px;
}
.game-modal[hidden] {
  display: none;
}

.game-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 8, 18, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.game-modal__panel {
  position: relative;
  width: 100%;
  max-width: 1180px;
  background: var(--lfr-card);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  max-height: 92vh;
}

.game-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--lfr-border);
}
.game-modal__title {
  font-family: var(--lfr-font-display);
  font-weight: 600;
  font-size: 18px;
  color: #fff;
}
.game-modal__close {
  background: rgba(255, 255, 255, 0.06);
  border: 0;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background 0.2s ease;
}
.game-modal__close:hover {
  background: var(--lfr-pink);
}

.game-modal__frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.game-modal__frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 768px) {
  .game-modal {
    padding: 0;
  }
  .game-modal__panel {
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }
  .game-modal__frame-wrap {
    flex: 1 1 auto;
    aspect-ratio: auto;
  }
}
