* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #030406;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #e2e8f0;
  touch-action: none;
  -webkit-overflow-scrolling: auto;
}

#game-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #030406;
}

#webglCanvas {
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

#crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

#gameCanvas {
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  position: absolute;
  top: 0;
  left: 0;
  image-rendering: pixelated;
}

/* 电影级暗角与噪点效果 */
.vignette-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.75) 85%, rgba(0, 0, 0, 0.95) 100%);
  z-index: 5;
}

.scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 4px;
  z-index: 6;
  opacity: 0.6;
}

/* HUD 风格组件 */
.hud-box {
  position: absolute;
  z-index: 20;
  background: rgba(10, 14, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

/* 电梯下行过场与过场CG动画 */
#elevator-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #020617;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

#elevator-transition-overlay.hidden,
#cg-teaching-zone.hidden {
  display: none !important;
}

.elevator-shaft {
  width: 280px;
  height: 380px;
  background: #0f172a;
  border: 4px solid #334155;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.9), inset 0 0 20px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.elevator-floor-indicator {
  background: #000;
  border: 2px solid #ef4444;
  padding: 8px 24px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: monospace;
  font-size: 28px;
  font-weight: 900;
  color: #ef4444;
  text-shadow: 0 0 12px #ef4444;
  margin-bottom: 20px;
}

.floor-arrow {
  animation: arrowBlink 0.6s infinite alternate;
}

@keyframes arrowBlink {
  from { opacity: 0.3; transform: translateY(-2px); }
  to { opacity: 1; transform: translateY(2px); }
}

.elevator-status-text {
  font-size: 14px;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 2px;
  animation: pulse 1s infinite alternate;
}

.elevator-metal-doors {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  pointer-events: none;
}

.door-panel {
  flex: 1;
  height: 100%;
  background: linear-gradient(90deg, #1e293b, #334155);
  border: 1px solid #475569;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.elevator-metal-doors.open .door-left {
  transform: translateX(-100%);
}

.elevator-metal-doors.open .door-right {
  transform: translateX(100%);
}

#cg-teaching-zone {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1001;
  background: radial-gradient(circle, #2b0a0a 0%, #050505 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.blood-text {
  color: #ef4444 !important;
  text-shadow: 0 0 20px #dc2626, 0 0 40px #7f1d1d !important;
}

/* 左上角HUD容器 (楼层标牌 + 小地图) */
#left-top-hud {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 核心要求：S3 3楼 常驻显示 */
#floor-badge {
  position: relative;
  top: auto;
  left: auto;
  border-left: 3px solid #ef4444;
}

/* 战术小地图视窗 */
#minimap-container {
  position: relative;
  top: auto;
  left: auto;
  padding: 6px;
  flex-direction: column;
  align-items: center;
  background: rgba(8, 12, 18, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.75), inset 0 0 10px rgba(56, 189, 248, 0.1);
}

#minimapCanvas {
  width: 160px;
  height: 96px;
  border-radius: 4px;
  background: #04070d;
  display: block;
}

.minimap-legend {
  display: flex;
  justify-content: space-around;
  width: 100%;
  margin-top: 4px;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
}

.leg-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.dot.green {
  background: #22c55e;
  box-shadow: 0 0 5px #22c55e;
}

.dot.red {
  background: #ef4444;
  box-shadow: 0 0 5px #ef4444;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 8px #ef4444;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.85); }
}

.floor-text {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #f87171;
  text-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.room-subtext {
  font-size: 12px;
  color: #94a3b8;
}

/* 联机状态 */
#online-hud {
  top: 16px;
  right: 16px;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.hud-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.restart-trigger-btn {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.restart-trigger-btn:hover {
  background: rgba(239, 68, 68, 0.4);
  border-color: #ef4444;
  color: #fff;
}

.restart-trigger-btn:active {
  transform: scale(0.92);
}

/* 角色选择大厅界面样式 */
.char-select-card {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95);
  border-radius: 16px;
  max-width: 820px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.char-select-header {
  text-align: center;
}

.char-title {
  font-size: 22px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 2px;
}

.char-subtitle {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.char-card {
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.char-card:hover {
  border-color: rgba(56, 189, 248, 0.6);
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.9);
}

.char-card.selected {
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.5);
  background: rgba(14, 116, 144, 0.25);
}

.char-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.char-avatar {
  font-size: 32px;
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.char-info {
  display: flex;
  flex-direction: column;
}

.char-name {
  font-size: 16px;
  font-weight: 800;
  color: #f1f5f9;
}

.char-tag {
  font-size: 11px;
  color: #38bdf8;
  font-weight: 600;
}

.char-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
}

.char-skill-box {
  margin-top: 4px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  padding: 6px 8px;
  border-left: 3px solid #38bdf8;
}

.char-skill-title {
  font-size: 12px;
  font-weight: 700;
  color: #fef08a;
  display: flex;
  align-items: center;
  gap: 4px;
}

.char-skill-desc {
  font-size: 10px;
  color: #cbd5e1;
  margin-top: 2px;
  line-height: 1.3;
}

.char-select-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.char-name-input-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #cbd5e1;
}

.char-name-input-box input {
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  outline: none;
  font-size: 13px;
}

.char-name-input-box input:focus {
  border-color: #38bdf8;
}

.btn-enter-game {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: none;
  color: #fff;
  font-weight: 800;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.5);
  transition: all 0.2s;
}

.btn-enter-game:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.7);
}

.btn-enter-game:active {
  transform: scale(0.96);
}

#btn-skill {
  width: 76px;
  height: 76px;
  border-color: rgba(56, 189, 248, 0.5);
}

#btn-skill.cooling {
  border-color: rgba(100, 116, 139, 0.3);
  filter: grayscale(0.8);
}

#btn-skill.active {
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.8);
}
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  transition: opacity 0.2s;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  display: none !important;
}

.modal-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.9);
  border-radius: 12px;
  max-width: 380px;
  width: 90%;
  padding: 20px;
  text-align: center;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  font-size: 17px;
  font-weight: 800;
  color: #f87171;
  margin-bottom: 12px;
}

.modal-body {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-sub-tip {
  margin-top: 8px;
  font-size: 11px;
  color: #fbbf24;
}

.vote-rule-tip {
  margin-top: 6px;
  font-size: 11px;
  color: #94a3b8;
}

.vote-progress-bar {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 8px;
  color: #38bdf8;
  font-weight: bold;
  font-size: 13px;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.modal-btn {
  border: none;
  outline: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
}

.modal-btn:active {
  transform: scale(0.94);
}

.btn-cancel {
  background: #334155;
  color: #94a3b8;
}

.btn-danger {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.5);
}

.btn-success {
  background: #16a34a;
  color: #fff;
  box-shadow: 0 0 12px rgba(22, 163, 74, 0.5);
}

#player-count {
  font-size: 13px;
  font-weight: 600;
  color: #38bdf8;
}

#network-ping {
  font-size: 10px;
  color: #4ade80;
}

/* 交互提示浮层 */
#interaction-prompt {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 25;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid #f59e0b;
  border-radius: 20px;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#interaction-prompt.hidden {
  opacity: 0;
  pointer-events: none;
}

.prompt-key {
  background: #f59e0b;
  color: #000;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 4px;
  font-weight: bold;
  font-size: 12px;
}

/* 虚拟摇杆固定位于左下方，触感极佳且稳定 */
#joystick-zone {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 150px;
  height: 150px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

#joystick-base {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, rgba(15, 23, 42, 0.7) 100%);
  border: 2px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.8), inset 0 0 10px rgba(56, 189, 248, 0.2);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#joystick-thumb {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle, #38bdf8 20%, #0284c7 90%);
  border: 2px solid #e0f2fe;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.8);
  position: absolute;
  pointer-events: none;
  transform: translate(0px, 0px);
}

/* 动作操作区（右下角） */
#actions-zone {
  position: absolute;
  bottom: 28px;
  right: 28px;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  gap: 18px;
}

.action-btn {
  position: relative;
  border: none;
  outline: none;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  transition: transform 0.1s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.action-btn:active {
  transform: scale(0.92);
}

#btn-interact {
  width: 64px;
  height: 64px;
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(245, 158, 11, 0.4);
}

#btn-interact.highlight {
  border-color: #f59e0b;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
}

#btn-flashlight {
  width: 80px;
  height: 80px;
  border-color: rgba(234, 179, 8, 0.5);
}

#btn-flashlight.active {
  border-color: #eab308;
  box-shadow: 0 0 24px rgba(234, 179, 8, 0.7);
  background: rgba(45, 35, 10, 0.9);
}

#btn-flashlight.cooling {
  border-color: rgba(100, 116, 139, 0.3);
  filter: grayscale(0.8);
}

.cd-circle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}

.cd-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 6;
}

.cd-bar {
  fill: none;
  stroke: #eab308;
  stroke-width: 6;
  stroke-dasharray: 276.46;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear, stroke 0.3s;
}

.btn-icon {
  font-size: 24px;
  pointer-events: none;
}

.btn-label {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
  pointer-events: none;
}

.btn-timer {
  position: absolute;
  bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #fef08a;
  text-shadow: 0 1px 3px #000;
  pointer-events: none;
}

/* 物品栏 */
#inventory-bar {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.7);
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
}

.inv-slot {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.inv-slot.active {
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.inv-icon {
  font-size: 18px;
}

.inv-badge, .inv-status, .inv-count {
  font-size: 8px;
  color: #94a3b8;
  position: absolute;
  bottom: 2px;
}

/* 提示通知消息 */
#toast-container {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast-msg {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
  animation: fadeInOut 3s forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(-10px); }
  15% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

/* 开局 CG 动画层 (必须最高层级，直接接收触摸点击) */
#cg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

#cg-overlay.faded {
  opacity: 0 !important;
  pointer-events: none !important;
  display: none !important;
}

.cg-content {
  text-align: center;
  padding: 24px;
  animation: cgFloat 4s ease-in-out infinite alternate;
}

@keyframes cgFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

.cg-title {
  font-size: clamp(2rem, 8vw, 3.8rem);
  font-weight: 900;
  color: #dc2626;
  letter-spacing: 6px;
  position: relative;
  text-shadow: 0 0 20px rgba(220, 38, 38, 0.8), 0 0 40px rgba(185, 28, 28, 0.5);
  animation: glitch 2s infinite;
}

.cg-subtitle {
  margin-top: 14px;
  font-size: 15px;
  color: #94a3b8;
  letter-spacing: 3px;
}

.cg-tip {
  margin-top: 40px;
  font-size: 13px;
  color: #64748b;
  letter-spacing: 2px;
  animation: blink 2s infinite;
}

.cg-blood-warning {
  margin-top: 18px;
  font-size: 12px;
  color: #7f1d1d;
  letter-spacing: 1px;
}

@keyframes blink {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.9; }
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); filter: hue-rotate(90deg); }
  40% { transform: translate(-1px, -1px); }
  60% { transform: translate(2px, 1px); }
  80% { transform: translate(1px, -2px); filter: hue-rotate(-90deg); }
  100% { transform: translate(0); }
}

/* 竖屏时强制旋转提示 */
#orientation-prompt {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #030406;
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.rotate-phone-icon {
  font-size: 54px;
  animation: rotateGuide 2s ease-in-out infinite;
}

@keyframes rotateGuide {
  0% { transform: rotate(0deg); }
  40% { transform: rotate(-90deg); }
  60% { transform: rotate(-90deg); }
  100% { transform: rotate(0deg); }
}

.rotate-text {
  font-size: 20px;
  font-weight: bold;
  color: #ef4444;
  margin-top: 18px;
  letter-spacing: 2px;
}

.rotate-subtext {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 10px;
  line-height: 1.6;
  max-width: 280px;
}

/* 竖屏移动设备强制弹出横屏提示 */
@media screen and (orientation: portrait) and (max-width: 900px) {
  #orientation-prompt {
    display: flex;
  }
}

/* 横屏下的 UI 布局细节调整 */
@media screen and (orientation: landscape) {
  #orientation-prompt {
    display: none !important;
  }

  /* 保证横屏全屏时刘海屏避让安全区 */
  #floor-badge {
    top: env(safe-area-inset-top, 16px);
    left: max(env(safe-area-inset-left, 16px), 24px);
  }

  #online-hud {
    top: env(safe-area-inset-top, 16px);
    right: max(env(safe-area-inset-right, 16px), 24px);
  }

  #actions-zone {
    bottom: max(env(safe-area-inset-bottom, 20px), 20px);
    right: max(env(safe-area-inset-right, 24px), 32px);
    gap: 16px;
  }

  #btn-flashlight {
    width: 76px;
    height: 76px;
  }

  #btn-interact {
    width: 60px;
    height: 60px;
  }

  #toast-container {
    top: 20px;
  }

  .cg-title {
    font-size: clamp(2.4rem, 6.5vw, 4rem);
    letter-spacing: 8px;
  }

  .cg-subtitle {
    margin-top: 8px;
    font-size: 14px;
    letter-spacing: 4px;
  }
}
