html,
body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #1a1a2e;
}

.pwa-launch-fill,
#pwa-background,
#pwa-launch-cover,
#pwa-update-overlay::before {
  position: fixed;
  left: 0;
  top: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  background-color: #1a1a2e;
  background-image: url('launch-background.jpg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 100% 100%;
  pointer-events: none;
}

#pwa-background {
  z-index: 0;
}

#pwa-launch-cover {
  z-index: 2;
}

#pwa-update-overlay::before {
  content: '';
  z-index: 0;
}

@media (orientation: portrait) {
  .pwa-launch-fill,
  #pwa-background,
  #pwa-launch-cover,
  #pwa-update-overlay::before {
    width: 100vh;
    width: 100dvh;
    height: 100vw;
    height: 100dvw;
    transform: rotate(90deg);
    transform-origin: 50vw 50vw;
    transform-origin: 50dvw 50dvw;
  }
}

html.pwa-fake-landscape .pwa-launch-fill,
html.pwa-fake-landscape #pwa-background,
html.pwa-fake-landscape #pwa-launch-cover,
html.pwa-fake-landscape #pwa-update-overlay::before {
  width: var(--pwa-vh, 100dvh);
  height: var(--pwa-vw, 100dvw);
  transform: rotate(90deg);
  transform-origin: calc(var(--pwa-vw, 100dvw) / 2) calc(var(--pwa-vw, 100dvw) / 2);
}

html.pwa-real-landscape .pwa-launch-fill,
html.pwa-real-landscape #pwa-background,
html.pwa-real-landscape #pwa-launch-cover,
html.pwa-real-landscape #pwa-update-overlay::before {
  width: 100%;
  height: 100%;
  transform: none;
  transform-origin: unset;
}

#GameDiv {
  position: relative;
  z-index: 1;
}

#pwa-fullscreen-hint {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  font-family: Helvetica, Arial, sans-serif;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#pwa-fullscreen-hint.is-visible {
  display: flex;
}

#pwa-fullscreen-hint .pwa-fullscreen-hint__inner {
  max-width: 320px;
  padding: 28px 32px;
  border-radius: 12px;
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

#pwa-fullscreen-hint .pwa-fullscreen-hint__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}

#pwa-update-overlay {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  isolation: isolate;
  background-color: #1a1a2e;
  color: #ffffff;
  font-family: Helvetica, Arial, sans-serif;
  text-align: center;
  pointer-events: auto;
  touch-action: none;
  cursor: default;
}

#pwa-update-overlay.is-visible {
  display: flex;
}

#pwa-update-overlay .pwa-update-overlay__inner {
  position: relative;
  z-index: 1;
  max-width: 320px;
  padding: 28px 32px;
  border-radius: 12px;
  background: rgba(26, 26, 46, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

#pwa-update-overlay .pwa-update-overlay__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}

html.pwa-ios-immersive,
html.pwa-ios-immersive body {
  width: 100%;
  height: 100%;
  height: -webkit-fill-available;
  min-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}
