* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #000;
}

.custom-lobby {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: block;
  background: #dde5ee;
}

.custom-lobby.is-hidden {
  display: none;
}

.startup-remote-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: block;
  width: 100%;
  height: 100%;
  background: #f5f7fb;
  opacity: 1;
  transition: opacity 320ms ease;
}

.startup-remote-loader.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.startup-remote-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #f5f7fb;
}

.game-lobby-back {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  top: max(14px, env(safe-area-inset-top));
  z-index: 35;
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 50%;
  background: rgba(12, 18, 28, .62);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.game-lobby-back.is-visible {
  display: flex;
}

.game-lobby-back span {
  width: 30px;
  height: 30px;
  display: block;
  overflow: hidden;
  border-radius: 50%;
}

.game-lobby-back img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.game-lobby-back:active {
  transform: scale(.96);
}

.game-launch-overlay {
  position: fixed;
  inset: 0;
  z-index: 32;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  color: #f8fbff;
  background:
    radial-gradient(circle at 50% 34%, rgba(43, 87, 142, .26), transparent 38%),
    linear-gradient(180deg, #07111d 0%, #0a1420 48%, #050b12 100%);
}

.game-launch-overlay.is-visible {
  display: flex;
}

.game-launch-overlay__panel {
  width: min(300px, 100%);
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.game-launch-overlay__mark {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, .16);
  border-top-color: #46a8ff;
  border-radius: 50%;
  animation: game-launch-spin .9s linear infinite;
}

.game-launch-overlay__panel strong {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.game-launch-overlay__panel p {
  min-height: 18px;
  margin: 0;
  color: rgba(248, 251, 255, .72);
  font-size: 13px;
  line-height: 1.4;
}

.game-launch-overlay__bar {
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
}

.game-launch-overlay__bar i {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(70, 168, 255, .1), #46a8ff, rgba(70, 168, 255, .1));
  animation: game-launch-bar 1.15s ease-in-out infinite;
}

@keyframes game-launch-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes game-launch-bar {
  0% {
    transform: translateX(-105%);
  }

  100% {
    transform: translateX(245%);
  }
}

.game-lobby-confirm {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .52);
}

.game-lobby-confirm.is-visible {
  display: flex;
}

.game-lobby-confirm__panel {
  width: min(320px, 100%);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  color: #fff;
  background: rgba(15, 23, 36, .96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .38);
  text-align: center;
}

.game-lobby-confirm__panel h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.game-lobby-confirm__panel p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
}

.game-lobby-confirm__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.game-lobby-confirm__actions button {
  height: 40px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  font-size: 14px;
  cursor: pointer;
}

.game-lobby-confirm__actions [data-lobby-confirm-ok] {
  background: #1f8cff;
}

.custom-lobby-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #dde5ee;
}

.lobby-toast {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, .82);
  font-size: 14px;
  text-align: center;
}
