/* 店内大屏 kiosk 定制样式（覆盖引擎自带 web-mobile/style.css）。
   相对官方模板的改动：
     - body 背景纯黑（原 #333），加载与过场不闪白/不露灰底
     - overflow:hidden + overscroll-behavior:none，禁下拉刷新/橡皮筋滚动
     - -webkit-touch-callout:none，触屏长按不弹系统菜单 */
html {
  -ms-touch-action: none;
  touch-action: none;
  overscroll-behavior: none;
  background-color: #000;
}

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;
  -khtml-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Remove spin of input type number */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    /* display: none; <- Crashes Chrome on hover */
    -webkit-appearance: none;
    margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}

body {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  margin: 0;

  overflow: hidden;
  overscroll-behavior: none;

  cursor: default;
  color: #888;
  background-color: #000;

  text-align: center;
  font-family: Helvetica, Verdana, Arial, sans-serif;

  display: flex;
  flex-direction: column;
}

canvas {
  background-color: rgba(0, 0, 0, 0);
  touch-action: none;
}

#GameDiv, #Cocos3dGameContainer, #GameCanvas {
  width: 100%;
  height: 100%;
}

:root {
  --safe-top: env(safe-area-inset-top);
  --safe-right: env(safe-area-inset-right);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);
}

/* ============================================================
   分层视频（背景视频在 canvas 之下）
   z-index 约定：背景视频 0 / canvas 内容 1 / 预留前景视频 2
   ============================================================ */
#GameDiv {
  position: relative;
  z-index: 1;
}

#ds-video-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;   /* 所有触摸仍到达 canvas */
  background: #000;
  overflow: hidden;
}

#ds-video-layer .ds-video-slot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  background: #000;
}
