.game-modal {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.game-modal.is-open {
  visibility: visible;
  opacity: 1;
}

.game-modal__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(11, 13, 15, 0.85);
  backdrop-filter: blur(6px);
}

.game-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1280px, 100%);
  height: min(820px, calc(100vh - 48px));
  background-color: var(--color-surface-2);
  border: 1px solid var(--color-yellow);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.game-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: var(--color-surface);
  border-bottom: 1px solid rgba(242, 183, 5, 0.4);
}

.game-modal__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.game-modal__close {
  background: transparent;
  border: 0;
  color: var(--color-yellow);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.game-modal__close:hover {
  background-color: rgba(242, 183, 5, 0.15);
}

.game-modal__body {
  flex: 1;
  min-height: 0;
}

.game-modal__iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 600px) {
  .game-modal {
    padding: 16px;
  }
  .game-modal__dialog {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    max-height: calc(100vh - 32px);
    border-radius: 12px;
  }
}
