/* 画布按整数 CSS 像素取尺寸，视口有小数时右侧/底部会露出约 1px，这里让它露出深色而不是 WebView 默认的白色 */
html {
  background-color: #020100;
}

body {
  margin: 0px 0px 1px 0px; /* the extra 1px allows the iOS inner/outer check to work */
  background-color: #020100;
  overflow: hidden;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

/* Phaser 按整数 CSS 像素设置画布尺寸（如 411px），视口实际是 411.43px，右侧/底部会漏出不到 1 个物理像素。
   让画布按视口铺满，补上这条缝（宽高比变化 < 0.1%，看不出拉伸）。
   只在 App 里这么做（html.native 由 main.js 加上）：手机浏览器的 100vh 包含地址栏的高度，比可见区域高，
   画布被拉长后点击位置会和格子对不上（网页版帮忙时选不中想要的宠物） */
html.native:not(.letterbox) body > canvas {
  width: 100vw !important;
  height: 100vh !important;
}

/* 网页版：在画布上滑动不要滚动页面 / 下拉刷新 / 双击缩放 */
body > canvas {
  touch-action: none;
}

body.initialized {
  background-color: #699519;
  /* background-image: url(../img/bg_tile.png); */
  background-repeat: repeat;
  background-size: 300px 300px;
}

@font-face {
  font-family: "Lobster";
  src: url("../fonts/Lobster.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

/* Hides video play button (aka "The Orb") in Webkit browsers (e.g. iOS Safari 10.3) */
*::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}

.unselectable {
  -moz-user-select: -moz-none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -o-user-select: none;
  user-select: none;
}

#gameFontPreload {
  position: fixed;
  left: -1000px;
  top: -1000px;
  visibility: hidden;
}

#gbMsg {
  position: absolute;
  text-shadow: 0px 1px 5px #000000;
  width: 100%;
  height: 3%;
  top: 97%;
  padding-top: 0.5%;
  color: white;
  font-family: Verdana;
  font-size: 1.5vh;
  text-align: center;
  background: linear-gradient(rgba(0, 84, 166, 0), rgba(0, 84, 166, 0.5));
  -webkit-transition: opacity 0.5s;
  transition: opacity 0.5s;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none; /* Non-prefixed version, currently
                            supported by Chrome and Opera */
}

#gbMsgLabel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
}

.gbMsgHidden {
  opacity: 0;
}

#xpromoOverlay {
  visibility: hidden;
  position: fixed;
  z-index: 1000;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  top: 0%;
  left: 0%;
  display: block;
}

#xpromoVideoContainer {
  position: absolute;
  width: 640px;
  height: 640px;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
  display: block;
}

#xpromoVideo {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0%;
  top: 0%;
  cursor: pointer;
}
