/* Basic full-screen mobile layout for Cocos Creator web builds.
 *
 * Layout follows the v.hitclub.pl pattern so iPhone Safari is able to
 * collapse its URL bar / tab bar:
 *   - body is position: absolute (not fixed) so it participates in the
 *     scroll context and can grow taller than the viewport.
 *   - body has touch-action: pan-x pan-y so the browser handles native
 *     pan gestures (this is what triggers Safari's chrome-hide animation).
 *   - canvas and #Cocos2dGameContainer are position: absolute too, so
 *     they live in the same scroll context as body. The Cocos engine
 *     repositions them on resize.
 *   - JS swaps body height between 100% (fullscreen) and 110vh
 *     (chrome-visible) at runtime.
 */

html {
  -ms-touch-action: none;
}

body, canvas, div {
  display: block;
  outline: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

body {
  margin: 0;
  padding: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100lvw;
  width: 100vw;
  height: 100lvh;
  height: 100vh;
  background-color: #000;
  text-align: center;
  font-family: Helvetica, Verdana, Arial, sans-serif;
  touch-action: pan-x pan-y;
}

#game-shell {
  position: absolute;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
}

/* Canvas is always sized to the viewport (NOT 100% of body) so the body
 * can grow taller than the viewport for the iPhone Safari scroll trick
 * without the canvas stretching and leaving a black gap below it. */
#GameCanvas,
#Cocos2dGameContainer {
  position: absolute;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
}

/* Splash screen covers the whole viewport as well */
#splash {
  position: fixed;
  left: var(--app-offset-left, 0);
  top: var(--app-offset-top, 0);
  width: var(--app-width, 100vw);
  height: var(--app-height, 100dvh);
  margin: 0;
  padding: 0;
}

#mobile-fs-mask {
  align-items: flex-end;
  background: transparent;
  box-sizing: border-box;
  color: #fff;
  display: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  height: 100%;
  justify-content: center;
  left: 0;
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 18px);
  pointer-events: none;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100000;
}

#mobile-fs-mask .mobile-fs-mask-inner {
  align-items: center;
  animation: mobile-fs-pulse 1.8s ease-in-out infinite;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 0 0 rgba(255, 215, 0, 0.55);
  display: inline-flex;
  gap: 10px;
  max-width: 92vw;
  padding: 10px 20px;
  pointer-events: auto;
  text-align: center;
}

@keyframes mobile-fs-pulse {
  0%, 100% {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 0 0 rgba(255, 215, 0, 0.55);
  }
  50% {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 0 10px rgba(255, 215, 0, 0);
  }
}

#mobile-fs-mask .mobile-fs-mask-inner p {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
}

#mobile-fs-mask .mobile-fs-mask-close {
  background: rgba(255, 255, 255, 0.16);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  height: 24px;
  line-height: 1;
  margin: 0;
  padding: 0;
  width: 24px;
}









