.webgl-content * {
  border: 0;
  margin: 0;
  padding: 0;
}

.webgl-content {
  position: absolute;
  left: 50%;
  -webkit-transform: translate(-50%, 0%);
  transform: translate(-50%, 0%);
}

.webgl-content .header {
  position: relative;
  width: 100%;
  height: 115px;
  font-family: Helvetica, Verdana, Arial, sans-serif;
  font-size: 14px;
}

.webgl-content .header .fb-like-frame,
.bookmark,
.shortcut-download,
.circle-glow-effect,
.game-logo,
.store-links {
  position: absolute;
  bottom: 5%;
}

.webgl-content .header .bookmark {
  left: 0%;
  bottom: 0%;
  width: 80px;
  height: 35px;
}

.webgl-content .header .shortcut-download {
  left: 80px;
  bottom: 0%;
  width: 100px;
  height: 35px;
}

.webgl-content .header #bookmark-link,
#shortcut-download-link {
  white-space: nowrap;
  vertical-align: middle;
  display: table-cell;
  border-radius: 4px;
  font-size: 13px;
  height: 26px;
  padding: 0 4px 0 6px;
  font-family: Helvetica, Arial, sans-serif;
  background: #4385EF;
  border: 1px solid #4385EF;
  color: #fff;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
  font-weight: bold;
  text-decoration: None;
}

.webgl-content .header .fb-like-frame {
  left: 178px;
  bottom: 0%;
  height: 35px;
}

.webgl-content .header .circle-glow-effect {
  bottom: 30%;
  left: 50%;
  width: 0px;
  height: 0px;
  border-radius: 50%;
  box-shadow: 0 0 100px 110px #0b1785;
  -webkit-transform: translate(-50%, 0);
  transform: translate(-50%, 0);
}

.webgl-content .header .game-logo {
  left: 50%;
  bottom: -10%;
  height: 130.4px;
  width: 205.6px;
  background: transparent url('Canvas-Logo.png') center bottom no-repeat;
  background-size: contain;
  -webkit-transform: translate(-50%, 0);
  transform: translate(-50%, 0);
}

.webgl-content .header .store-links {
  right: 0%;
}

.webgl-content .header .store-links .store-links-title {
  margin-right: 5px;
  margin-bottom: 2px;
  font-size: 14px;
  color: #c1c1c1;
  text-align: right;
}

.webgl-content .header .store-links .store-links-box {
  width: 285px;
  height: 40px;
}

.webgl-content .header .store-links .store-links-box div {
  margin-top: 3px;
  display: inline-block;
  background-repeat: no-repeat;
  height: 100%;
  width: 44px;
}

.webgl-content .header .store-links .store-links-box .apple-store-link {
  background-image: url('Icon-App-Store.png');
}

.webgl-content .header .store-links .store-links-box .google-store-link {
  background-image: url('Icon-Play-Store.png');
}

.webgl-content .header .store-links .store-links-box .microsoft-store-link {
  background-image: url('Icon-Microsoft-Store.png');
  width: 179px;
}


.webgl-content .footer {
  position: relative;
  margin-top: 5px;
  height: 60px;
  font-family: Helvetica, Verdana, Arial, sans-serif;
  font-size: 14px;
}

.webgl-content .footer .fullscreen,
.license {
  position: absolute;
}

.webgl-content .footer .fullscreen {
  right: 0%;
  width: 115px;
  height: 44px;
  background: transparent url('Button-Fullscreen.png') right top no-repeat;
  background-size: contain;
  z-index: 1;
}

.webgl-content .footer .license {
  white-space: nowrap;
  left: 50%;
  width: 100%;
  margin-top: 15px;
  font-size: 14px;
  font-family: Helvetica, Verdana, Arial, sans-serif;
  color: #546ec4;
  -webkit-transform: translate(-50%, 0);
  transform: translate(-50%, 0);
}

.related-links {
  display: none !important;
}

#gameContainer {
  position: relative;
  outline: 2px solid #0b1785;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  background: #090e3b;
  background: -webkit-linear-gradient(#090e3b, #090715);
  background: -o-linear-gradient(#090e3b, #090715);
  background: -moz-linear-gradient(#090e3b, #090715);
  background: linear-gradient(#090e3b, #090715);
  font-family: 'Titillium Web', sans-serif;
  text-align: center;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0px;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#loading-screen {
  width: 100%;
  height: calc(100% - 115px - 60px - 5px);
  top: 0px;
  left: 0px;
  position: absolute;
  margin-top: 115px;
  /* header 115px */
  transform-origin: top left;
}

.webgl-content .overlay {
  background-size: contain;
  background-repeat: no-repeat;
  background-attachment: scroll;
  width: 100%;
  height: 100%;
  position: absolute;
}

#qa-wrapper {
  display: none !important;
  position: absolute;
  width: 100%;
  height: 100%;
  font-family: Arial Rounded MT Bold, Helvetica Rounded, Arial, sans-serif;
  font-variant: small-caps;
  color: #ffffff;
  text-align: left;
  vertical-align: middle;
}

#qa-wrapper .question {
  position: absolute;
  font-size: 30pt;
  width: 72%;
  top: 24%;
  left: 23%;
}

#qa-wrapper .answers {
  position: absolute;
  width: 92%;
  height: 36%;
  top: 41.2%;
  left: 3%;
}

#qa-wrapper .answers .answer-wrapper {
  position: relative;
  display: inline-block;
  width: calc(49.6% - 60px);
  height: 49.6%;
  margin-left: 60px;
  vertical-align: top;
  font-size: 15pt;
}

#qa-wrapper .answers .answer-wrapper .answer {
  position: relative;
  top: 50%;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
}

#qa-wrapper .answer-instruction {
  position: absolute;
  bottom: 5px;
  right: 5px;
  text-align: right;
  font-size: 18pt;
}

.counter {
  text-align: center;
  position: absolute;
  top: 77.8%;
  width: 100%;
  height: 102px;
  z-index: 8;
}

.counter p {
  font-size: 24px;
  color: #ffffff;
  line-height: 30px;
}

.counter .ProgressLineB {
  background: #090e3b;
  /* For browsers that do not support gradients */
  background: -webkit-linear-gradient(#000000, #000b49);
  /* For Safari 5.1 to 6.0 */
  background: -o-linear-gradient(#000000, #000b49);
  /* For Opera 11.1 to 12.0 */
  background: -moz-linear-gradient(#000000, #000b49);
  /* For Firefox 3.6 to 15 */
  background: linear-gradient(#000000, #000b49);
  /* Standard syntax */
  border: 1px solid #162271;
  height: 26px;
  width: 522px;
}

.counter #ProgressLine {
  border: none;
  height: 21px;
  width: 0px;
  margin-left: 26.1%;
  margin-top: 17px;

  background: #35b318;
  /* For browsers that do not support gradients */
  background: -webkit-linear-gradient(#0fa108, #a1ef59 20%, #35b318 40%, #0d670c);
  /* For Safari 5.1 to 6.0 */
  background: -o-linear-gradient(#0fa108, #a1ef59 20%, #35b318 40%, #0d670c);
  /* For Opera 11.1 to 12.0 */
  background: -moz-linear-gradient(#0fa108, #a1ef59 20%, #35b318 40%, #0d670c);
  /* For Firefox 3.6 to 15 */
  background: linear-gradient(#0fa108, #a1ef59 20%, #35b318 40%, #0d670c);
  /* Standard syntax */

  -webkit-transition: width 0.3s;
  -moz-transition: width 0.3s;
  -o-transition: width 0.3s;
  transition: width 0.3s;
}

.counter .ProgressLine {
  -webkit-animation: slide 12s 1 linear;
  -moz-animation: slide 12s 1 linear;
  -o-animation: slide 12s 1 linear;
  animation: slide 12s 1 linear;
  -webkit-animation-fill-mode: forwards;
  -o-animation-fill-mode: forwards;
  animation-fill-mode: forwards;
}

@-webkit-keyframes slide {
  from {
    width: 98px;
  }

  to {
    width: 246px;
  }
}

@-moz-keyframes slide {
  from {
    width: 98px;
  }

  to {
    width: 246px;
  }
}

@-o-keyframes slide {
  from {
    width: 98px;
  }

  to {
    width: 246px;
  }
}

@keyframes slide {
  from {
    width: 98px;
  }

  to {
    width: 246px;
  }
}

.error-banners,
.error-banners div,
#webgl-support-error,
#mobile-support-error,
#browser-support-error {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.error-banners div {
  position: absolute;
  width: 80%;
  height: 50%;
  left: 10%;
  top: 25%;
  z-index: 100;
  background: #000;
  border: 2px solid #162271;
  font-size: 20pt;
  color: #ffffff;
  text-align: center;
  visibility: hidden;
  overflow: auto;
}

@font-face {
  font-family: "Arial Rounded MT Bold";
  src: url("Arial Rounded Bold.ttf");
}

/* ===================================================================== */
/* abg11 H5 手机自适应(横屏老虎机) —— 等比缩放铺满 + 强制横屏 + 移动端放行 */
/*   gameContainer 内部分辨率固定 1024x640(16:10);由 fitGameContainer()(index.html)*/
/*   计算 scale=min(vw/1024, vh/640) 用 transform 缩放居中(letterbox,不变形)。 */
/*   桌面照常显示 header/footer;手机(.mobile-fit)全屏让位给画布。               */
/* ===================================================================== */

/* gameContainer 缩放基准:左上为原点,绝对定位由 JS 设 left/top 居中 */
#gameContainer {
  transform-origin: top left;
}

/* 手机模式:整页变成纯游戏画布容器,header/footer/loading 让出空间 */
body.mobile-fit {
  overflow: hidden;
}

body.mobile-fit .webgl-content {
  left: 0;
  top: 0;
  -webkit-transform: none;
  transform: none;
  width: 100%;
  height: 100%;
}

/* 手机模式收起书签栏 header 与 license/fullscreen footer,把竖向空间全给画布 */
body.mobile-fit .header,
body.mobile-fit .footer {
  display: none !important;
}

/* 手机模式下 gameContainer 由 JS 绝对定位+scale 居中铺满视口 */
body.mobile-fit #gameContainer {
  position: fixed;
  left: 0;
  top: 0;
  outline: none;
  z-index: 1;
}

/* 手机模式加载页:全屏居中干净闪屏(覆盖桌面 1024x640 硬编码定位)。
   真机修复:#gameContainer(z-index:1)黑画布会盖住 logo → loading-screen 提到 z-index:50;
   并 flex 列居中,元件竖向顺序 logo → Loading 文字 → 进度条,整体居中成一组,不散在四角。 */
body.mobile-fit #loading-screen {
  margin-top: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  background: #090e3b;
  background: linear-gradient(#090e3b, #090715);
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
}

/* 手机模式:logo(.overlay)从"绝对铺满背景"改为流式 logo 块,居中、尺寸适中(不偏左/不过大)。
   原桌面 .overlay 是 position:absolute 铺满 → 这里覆盖成 flex 子项。 */
body.mobile-fit .overlay {
  position: relative;
  width: 46vmin;
  height: 46vmin;
  max-width: 380px;
  max-height: 380px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  margin-bottom: 4vmin;
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
}

/* 手机模式:进度计数块从绝对定位(top:77.8%)改为流式居中,跟在 logo 下方。
   counter 内部也 flex 列居中:Loading 文字 → 进度条。 */
body.mobile-fit .counter {
  position: static;
  top: auto;
  left: auto;
  width: auto;
  height: auto;
  margin: 0;
  z-index: auto;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-align-items: center;
  align-items: center;
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
}

body.mobile-fit .counter p {
  margin: 0 0 12px 0;
}

/* 进度条居中:原 margin-left:26.1% 是桌面硬编码偏移;改 auto 居中,
   宽度由 UnityProgress.js 动态设(从 0 增长),margin auto 使其始终居中扩展。 */
body.mobile-fit .counter #ProgressLine {
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
}

/* qa-wrapper 在手机加载页不参与布局(本就 display:none) */
body.mobile-fit #qa-wrapper {
  display: none !important;
}

/* ===================================================================== */
/* abg11 自动强制横屏(用户零操作):手机竖屏拿着时,游戏画面+加载页自动旋转 */
/*   成横屏铺满物理屏。用户无需去系统设置/手动转手机。                       */
/*   - loading-screen:纯 HTML,直接 CSS rotate(无坐标问题)。                 */
/*   - #gameContainer(含 Unity canvas):rotate 由 JS fitGameContainer() 统一 */
/*     施加(rotate+scale),并配合 index.html 的指针坐标逆变换 hook 修正点击。 */
/* ===================================================================== */

/* 竖屏:加载页整体旋转 90°,宽高互换铺满物理竖屏 → 视觉横屏。
   旋转后进度条/logo 一起转,加载期间正常显示。 */
@media (orientation: portrait) and (max-width: 920px) {
  body.mobile-fit #loading-screen {
    /* 旋转后:元素宽=物理屏高(100vh),元素高=物理屏宽(100vw) */
    width: 100vh;
    height: 100vw;
    /* 以中心为原点旋转,再平移回左上对齐物理屏 */
    transform-origin: top left;
    -webkit-transform: rotate(90deg) translateY(-100%);
    transform: rotate(90deg) translateY(-100%);
  }

  /* 竖屏旋转后 logo 仍居中 */
  body.mobile-fit #loading-screen .overlay {
    background-position: center center;
  }

  /* 旧的"请旋转设备"被动提示:自动横屏后不再需要,强制不显示(DOM 保留备用) */
  body.mobile-fit #rotate-overlay {
    display: none !important;
  }
}

/* ── 强制横屏提示遮罩 ── 默认隐藏;仅手机竖屏时由媒体查询显示 */
#rotate-overlay {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  background: #090e3b;
  background: linear-gradient(#090e3b, #090715);
  color: #ffffff;
  text-align: center;
  font-family: 'Titillium Web', Helvetica, Arial, sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

#rotate-overlay .rotate-inner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

#rotate-overlay .rotate-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 18px;
  -webkit-animation: rotate-hint 1.6s ease-in-out infinite;
  animation: rotate-hint 1.6s ease-in-out infinite;
}

#rotate-overlay .rotate-text-en {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 8px;
}

#rotate-overlay .rotate-text-th {
  font-size: 20px;
  color: #c7d2ff;
}

@-webkit-keyframes rotate-hint {
  0%, 100% { -webkit-transform: rotate(0deg); }
  50% { -webkit-transform: rotate(-90deg); }
}

@keyframes rotate-hint {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-90deg); }
}

/* 手机竖屏:旧的"请旋转设备"被动提示已停用(改为自动强制横屏,见上方旋转规则)。
   保留 #rotate-overlay DOM 以便回退,但默认及竖屏均不显示。 */