:root {
  --game-shell-portrait-max: 430px;
  --game-shell-landscape-max-w: min(96vw, 860px);
}

html {
  width: 100%;
  height: 100%;
  background: #0b1020;
}

body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #0b1020;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

body.is-landscape-mode {
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-shell-frame {
  display: block;
  border: 0;
  background: #333;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 24px 80px rgba(0, 0, 0, 0.45);
  transition: width 0.25s ease, height 0.25s ease, box-shadow 0.25s ease;
}

/* 跳一跳固定横屏 1280×720 */
.game-shell-frame.is-landscape {
  width: var(--game-shell-landscape-max-w);
  max-width: 96vw;
  height: min(
    calc(100dvh - 20px),
    calc(var(--game-shell-landscape-max-w) * 720 / 1280)
  );
  margin: 0 auto;
}

.jump-back-btn,
.demo-back-btn {
  position: fixed;
  z-index: 9999;
  top: max(10px, env(safe-area-inset-top));
  left: max(10px, calc((100vw - var(--game-shell-landscape-max-w)) / 2 + 10px));
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(8, 12, 24, 0.72);
  color: #fff;
  font: 600 13px/1.2 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.jump-back-btn:active,
.demo-back-btn:active {
  transform: scale(0.98);
}

@media (max-width: 640px) {
  .jump-back-btn,
  .demo-back-btn {
    left: max(10px, env(safe-area-inset-left));
  }

  .game-shell-frame.is-landscape {
    width: 100vw;
    max-width: 100vw;
    height: min(calc(100dvh - 12px), calc(100vw * 720 / 1280));
    box-shadow: none;
  }
}
