.rotateTip-mask,
.fullTip-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
}

.rotateTip-text,
.fullTip-text {
  position: absolute;
  top: 72%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 86%;
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.rotateTip--compact .rotateTip-text {
  transform: translate(-50%, -50%) scale(0.85);
}

/* ---- 旋转屏幕引导动画 ---- */
.rotateAnim {
  position: absolute;
  top: 42%;
  left: 50%;
  width: 88px;
  height: 148px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.rotateAnim-phone {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.06);
  transform-origin: center center;
  animation: rotatePhoneToLandscape 2.4s ease-in-out infinite;
}

.rotateAnim-screen {
  position: absolute;
  inset: 14px 10px 12px;
  border-radius: 4px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
}

.rotateAnim-speaker {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 28px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.55);
  transform: translateX(-50%);
}

.rotateAnim--toPortrait .rotateAnim-phone {
  animation-name: rotatePhoneToPortrait;
}

.rotateTip--compact .rotateAnim {
  transform: translate(-50%, -50%) scale(0.78);
}

@keyframes rotatePhoneToLandscape {
  0%,
  18% {
    transform: rotate(0deg);
  }
  42%,
  72% {
    transform: rotate(90deg);
  }
  92%,
  100% {
    transform: rotate(0deg);
  }
}

@keyframes rotatePhoneToPortrait {
  0%,
  18% {
    transform: rotate(90deg);
  }
  42%,
  72% {
    transform: rotate(0deg);
  }
  92%,
  100% {
    transform: rotate(90deg);
  }
}

/* ---- 上滑/点击全屏引导动画 ---- */
.fullAnim {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 96px;
  height: 168px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.fullAnim-phone {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.fullAnim-screen {
  position: absolute;
  inset: 14px 10px 12px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
}

.fullAnim-chevron {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 18px;
  height: 18px;
  border-left: 2px solid rgba(255, 255, 255, 0.75);
  border-top: 2px solid rgba(255, 255, 255, 0.75);
  transform: translate(-50%, 0) rotate(45deg);
  opacity: 0;
  animation: fullSwipeChevron 1.8s ease-in-out infinite;
}

.fullAnim-finger {
  position: absolute;
  left: 50%;
  top: 68%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.18);
  animation: fullSwipeFinger 1.8s ease-in-out infinite;
}

.fullAnim--tap .fullAnim-chevron {
  display: none;
}

.fullAnim--tap .fullAnim-finger {
  top: 52%;
  animation: fullTapFinger 1.5s ease-in-out infinite;
}

@media (orientation: landscape) {
  .fullAnim {
    top: 34%;
    transform: translate(-50%, -50%) scale(0.72);
  }

  .fullTip-text {
    top: 84%;
    font-size: 18px;
  }
}

@keyframes fullSwipeFinger {
  0%,
  12% {
    transform: translateY(0);
    opacity: 0.2;
  }
  28% {
    opacity: 1;
  }
  62% {
    transform: translateY(-48px);
    opacity: 1;
  }
  78%,
  100% {
    transform: translateY(-56px);
    opacity: 0;
  }
}

@keyframes fullSwipeChevron {
  0%,
  20% {
    opacity: 0;
    transform: translate(-50%, 12px) rotate(45deg);
  }
  40%,
  60% {
    opacity: 0.9;
    transform: translate(-50%, -8px) rotate(45deg);
  }
  80%,
  100% {
    opacity: 0;
    transform: translate(-50%, -22px) rotate(45deg);
  }
}

@keyframes fullTapFinger {
  0%,
  35% {
    transform: scale(1);
    opacity: 0.55;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12);
  }
  50% {
    transform: scale(0.82);
    opacity: 1;
    box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.08);
  }
  70%,
  100% {
    transform: scale(1);
    opacity: 0.55;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12);
  }
}

.logoTip {
  position: fixed;
  inset: 0;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.logoTip--hide {
  opacity: 0;
  pointer-events: none;
}

.logoTip-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
}

.logoTip-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 60%;
  max-height: 40%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.logoTip--show .logoTip-logo {
  opacity: 1;
}

.logoTip-text {
  display: none;
  position: absolute;
  top: 72%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  font-weight: bold;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.logoTip--ios .logoTip-text {
  display: block;
}

.logoTip--show.logoTip--ios .logoTip-text {
  opacity: 1;
}

.gameError {
  position: fixed;
  inset: 0;
}

.gameError-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
}

.gameError-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(80vw, 420px);
  padding: 28px 24px 24px;
  box-sizing: border-box;
  background: #1c1c1c;
  border-radius: 12px;
}

.gameError-msg {
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}

.gameError-btn {
  display: block;
  width: 40%;
  margin: 24px auto 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  background: #e53935;
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
}

.gameError-code {
  display: none;
  margin-top: 12px;
  font-size: 12px;
  font-weight: normal;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.2;
  word-break: break-all;
}

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

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

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

  display: flex;
  flex-direction: column;
  overscroll-behavior-y: none;
}

html {
  overscroll-behavior-y: none;
}

#GameDiv {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh; /* 跟当前可视高度走 */
  z-index: 1;
}
