/* 嘉兴红十 Web 页：牌桌铺满窗口，底色和 Cocos 相机的暗红木一致，加载和换场景时不闪白。 */
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  cursor: default;
  padding: 0;
  border: 0;
  margin: 0;
  background-color: #1A0C06;
  color: #F1DDB0;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", serif;
}

body, canvas, div {
  outline: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -khtml-user-select: 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 {
  -webkit-appearance: none;
  margin: 0;
}

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

#GameDiv {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  border: 0;
}

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

#jx-loading, #jx-rotate {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: radial-gradient(ellipse at center, #3A1A0C 0%, #1A0C06 70%);
  text-align: center;
  z-index: 10;
}

#jx-rotate {
  display: none;
  z-index: 20;
}

.jx-mark {
  font-size: 34px;
  letter-spacing: 6px;
  color: #F1C978;
}

.jx-note {
  font-size: 18px;
  color: #CDB48A;
}

.jx-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(241, 201, 120, .25);
  border-top-color: #F1C978;
  border-radius: 50%;
  animation: jx-spin 1s linear infinite;
}

/* 竖着的手机轮廓，转 90° 示意横过来。 */
.jx-phone {
  width: 44px;
  height: 76px;
  border: 3px solid #F1C978;
  border-radius: 8px;
  animation: jx-turn 2.4s ease-in-out infinite;
}

@keyframes jx-spin {
  to { transform: rotate(360deg); }
}

@keyframes jx-turn {
  0%, 25% { transform: rotate(0deg); }
  55%, 85% { transform: rotate(-90deg); }
  100% { transform: rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .jx-spinner, .jx-phone { animation: none; }
}

: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);
}
