/* ============================================================
   style.css —— 全局样式：黑背景、全屏画布、按钮与 HUD
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}

/* ============ 渲染画布：全屏 ============ */
#game-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ============ HUD 层（时间 / 得分 / 连击） ============ */
#hud {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 40px;
  pointer-events: none; /* 不挡鼠标操作 */
}

.hud-item {
  text-align: center;
  min-width: 90px;
}

.hud-label {
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(0, 255, 255, 0.55);
}

.hud-value {
  font-size: 28px;
  font-weight: bold;
  color: #0ff;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
  font-variant-numeric: tabular-nums; /* 数字等宽，倒计时不抖动 */
}

/* ============ 三选一升级面板（D5） ============ */
#upgrade-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  background: rgba(0, 5, 15, 0.65);
}

.upgrade-title {
  font-size: 26px;
  font-weight: bold;
  letter-spacing: 6px;
  color: #0ff;
  text-shadow: 0 0 16px rgba(0, 255, 255, 0.9);
}

.up-cards {
  display: flex;
  gap: 26px;
}

.up-card {
  width: 190px;
  height: 268px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: rgba(5, 8, 20, 0.92);
  border: 2px solid var(--card-color, #0ff);
  border-radius: 10px;
  box-shadow: 0 0 18px color-mix(in srgb, var(--card-color, #0ff) 45%, transparent);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.up-card:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow: 0 0 30px var(--card-color, #0ff);
}

.up-name {
  font-size: 30px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 10px var(--card-color, #0ff);
}

.up-desc {
  font-size: 17px;
  color: var(--card-color, #0ff);
}

.up-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 2px;
}

/* ============ HUD 中央提示（开始/结算） ============ */
#hud-message {
  position: fixed;
  top: 32%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 11;
  padding: 14px 32px;
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #0ff;
  text-shadow: 0 0 14px rgba(0, 255, 255, 0.9);
  background: rgba(0, 20, 30, 0.55);
  border: 1px solid rgba(0, 255, 255, 0.4);
  border-radius: 6px;
  pointer-events: none;
  white-space: nowrap;
  display: none;
}

/* ============ 桌面模式操作提示 ============ */
#desktop-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  letter-spacing: 1px;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

/* VR 会话中隐藏桌面提示 */
body.in-vr #desktop-hint {
  display: none;
}

/* ============ ENTER VR 按钮 ============ */
#enter-vr {
  position: fixed;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  padding: 12px 36px;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #0ff;
  background: rgba(0, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 255, 0.6);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

#enter-vr:hover {
  background: rgba(0, 255, 255, 0.2);
  box-shadow: 0 0 16px rgba(0, 255, 255, 0.5);
}

/* VR 不可用时的禁用态 */
#enter-vr:disabled {
  color: #666;
  border-color: #444;
  background: rgba(255, 255, 255, 0.03);
  cursor: not-allowed;
  box-shadow: none;
}
