* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #08192b;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Segoe UI", sans-serif;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
}

.game {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}

/* 成品实机画面：整屏铺满，顶部的烘焙比分和底部的桌面裁掉，只保留球台主体 */
.scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("images/gen/gptimg_1795519703_look.png");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: auto 132%;
}

.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 22, 42, 0.62) 0%, rgba(5, 22, 42, 0.3) 15%, rgba(5, 22, 42, 0) 38%),
    radial-gradient(125% 85% at 50% 52%, rgba(0, 0, 0, 0) 52%, rgba(2, 12, 24, 0.38) 100%);
}

.board {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.hud {
  position: absolute;
  z-index: 3;
  top: max(10px, env(safe-area-inset-top, 0px));
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.scoreboard {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(7, 27, 49, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 10px 26px rgba(2, 12, 24, 0.35);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 38px;
  border-radius: 999px;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.chip.p1 {
  background: linear-gradient(160deg, #ffa45c, #ff7a2f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.chip.p2 {
  background: linear-gradient(160deg, #5aa9ff, #2d7fe8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.vs {
  padding: 0 3px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.pause-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(7, 27, 49, 0.55);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.pause-btn .mp-icon {
  width: 22px;
  height: 22px;
}

.pause-btn:active {
  background: rgba(7, 27, 49, 0.78);
}

.hint {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  display: flex;
  align-items: center;
  gap: 6px;
  transform: translateX(-50%);
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(5, 23, 42, 0.55);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: opacity 0.4s ease;
}

.hint.hide {
  opacity: 0;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot.red {
  background: #ff7a2f;
}

.dot.blue {
  background: #3c8ef0;
}

.sep {
  opacity: 0.4;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 16, 30, 0.6);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.overlay[hidden] {
  display: none;
}

.panel {
  width: min(84vw, 320px);
  padding: 24px 22px 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(17, 44, 72, 0.97), rgba(8, 26, 46, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  text-align: center;
}

.eyebrow {
  margin: 0 0 6px;
  color: #ffb680;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.panel h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
}

.ovDesc {
  margin: 8px 0 20px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  line-height: 1.5;
}

.primary-btn {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(160deg, #ffa45c, #ff7a2f);
  box-shadow: 0 8px 20px rgba(255, 122, 47, 0.3);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.primary-btn:active {
  transform: translateY(1px);
}
