html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000;
  font-family: sans-serif;
}

/* ==========================================
   物理双眼分屏 CSS 布局（基础横屏/电脑端样式）
   ========================================== */
.vr-viewport-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  flex-direction: row;
}

.eye-view {
  position: relative;
  overflow: hidden;
  width: 50vw;
  height: 100vh;
  box-sizing: border-box;
}

.left-eye {
  border-right: 2px solid #000;
  border-bottom: none;
}

/* 强行让 A-Frame 画布塞满视口 */
a-scene {
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
}

/* ==========================================
   VR 文字 UI 提示层（基础横屏/电脑端样式）
   ========================================== */
.vr-overlay {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  color: #ffffff;
  font-size: 20px;
  font-weight: 500;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
  z-index: 99999;
  pointer-events: none;
  width: auto;
  min-width: 60%;
  max-width: 85%;
  padding: 10px 22px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  line-height: 1.5;
}

/* 全屏动作按钮 */
#actionBtn {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 100000;
  padding: 14px 36px;
  background: #007AFF;
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  transition: background 0.2s;
}

#actionBtn:active {
  background: #0056b3;
}

/* ==========================================
   竖屏适配：上下分屏 + 仅文字文本框旋转90度（场景不动）
   ========================================== */
@media (orientation: portrait) {
  /* 分屏保持上下排列，场景不旋转 */
  .vr-viewport-container {
    flex-direction: column;
  }

  .eye-view {
    width: 100vw;
    height: 50vh;
  }

  .left-eye {
    border-right: none;
    border-bottom: 2px solid #000;
  }

  /* ✅ 顶部提示框：整体旋转90度，文字竖向显示 */
  .vr-overlay {
    top: 50% !important;
    left: 14% !important;
    transform: translate(-50%, -50%) rotate(90deg) !important;
    transform-origin: center center !important;
    min-width: auto !important;
    max-width: none !important;
    width: 72% !important;
    font-size: 15px !important;
    padding: 8px 16px !important;
    line-height: 1.4 !important;
  }

  /* 提示框内的英文字号同步适配 */
  .vr-overlay span {
    font-size: 13px !important;
  }

  /* ✅ 中央弹窗：整体旋转90度 */
  #center-title-left,
  #center-title-right {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) rotate(90deg) !important;
    transform-origin: center center !important;
    font-size: 14px !important;
    padding: 10px 18px !important;
    line-height: 1.5 !important;
    width: 68% !important;
    max-width: none !important;
  }

  /* 中央弹窗内的红色标题与英文字号适配 */
  #center-title-left > span:first-child,
  #center-title-right > span:first-child {
    font-size: 1.1em !important;
  }

  #center-title-left span:last-child,
  #center-title-right span:last-child {
    font-size: 13px !important;
  }

  /* ✅ 底部按钮：旋转90度，放到右侧居中 */
  #actionBtn {
    left: auto !important;
    right: 20px !important;
    bottom: auto !important;
    top: 50% !important;
    transform: translateY(-50%) rotate(90deg) !important;
    font-size: 14px !important;
    padding: 10px 28px !important;
  }
}