:root { color-scheme: dark; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #0b0e16;
  color: #eef1f7;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB",
    "Noto Sans CJK SC", system-ui, sans-serif;
  overflow: hidden;
}

/* 舞台：保持 16:9，居中，画布按比例缩放填满可用空间 */
#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05070d;
}

#game {
  /* 由 JS 按窗口尺寸设置 width/height（保持 16:9 letterbox） */
  display: block;
  background: #12141e;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
  touch-action: none;
}

/* 摄像头视频源不显示，只作为绘制/检测的数据源 */
#cam {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  left: -10px;
  top: -10px;
}

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(20, 26, 44, 0.85), rgba(4, 6, 12, 0.96));
  backdrop-filter: blur(4px);
  z-index: 10;
  padding: 20px;
}

.overlay.hidden { display: none; }

.card {
  max-width: 520px;
  width: 100%;
  text-align: center;
  background: rgba(18, 22, 36, 0.9);
  border: 1px solid rgba(120, 140, 200, 0.25);
  border-radius: 18px;
  padding: 36px 32px 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.card h1 {
  margin: 0 0 10px;
  font-size: 34px;
  letter-spacing: 1px;
}

.lead {
  margin: 0 0 18px;
  color: #cdd4e6;
  font-size: 16px;
}

.tips {
  text-align: left;
  margin: 0 auto 22px;
  padding-left: 20px;
  max-width: 400px;
  color: #aeb6cc;
  font-size: 14px;
  line-height: 1.7;
}

.tips strong { color: #8fe38f; }

.btn {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 14px 20px;
  font-size: 17px;
  font-weight: 600;
  color: #06121a;
  background: linear-gradient(180deg, #7ee0ff, #35b6f2);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease;
  font-family: inherit;
}

.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }

.btn.ghost {
  color: #cdd4e6;
  background: transparent;
  border: 1px solid rgba(140, 160, 210, 0.4);
  font-weight: 500;
  font-size: 15px;
}

.btn.install {
  color: #06121a;
  background: linear-gradient(180deg, #7dffb0, #1fd473);
  margin-top: 16px;
}

.install-row { margin-top: 6px; }

.install-note {
  display: block;
  margin: 8px 0 2px;
  font-size: 12px;
  color: #9fe0b8;
}

.ios-hint {
  margin: 16px auto 2px;
  max-width: 420px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #cfe0ff;
  background: rgba(90, 130, 210, 0.14);
  border: 1px solid rgba(120, 150, 220, 0.3);
  border-radius: 10px;
}

.ios-hint b { color: #eaf1ff; }
.ios-share {
  display: inline-block;
  transform: translateY(1px);
  font-weight: 700;
  color: #7fb0ff;
}

.status {
  min-height: 20px;
  margin: 14px 0 6px;
  font-size: 14px;
  color: #ff9a9a;
}

.status.info { color: #9fd0ff; }

.hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #78809a;
}
