/* 火车站 —— 界面样式（照 floating_island 原样，仅改标题注释） */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { width: 100%; height: 100%; overflow: hidden; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; }
canvas { display: block; }

/* 单画布：aholo 引擎容器铺满全屏（场景/角色/碰撞都在引擎内） */
#aholo { position: fixed; inset: 0; z-index: 1; }

/* 远程玩家名牌层（DOM 投影叠加，不响应鼠标） */
#tags { position: fixed; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.nametag {
  position: absolute; left: 0; top: 0;
  padding: 2px 10px; font-size: 13px; color: #fff; white-space: nowrap;
  background: rgba(20, 50, 70, 0.6); border-radius: 10px;
}

.hidden { display: none !important; }

/* 昵称输入遮罩 */
#overlay {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #7ec8e3 0%, #bfe7f5 60%, #eaf7fc 100%);
}
.panel {
  width: 320px; padding: 32px 28px; text-align: center;
  background: rgba(255, 255, 255, 0.92); border-radius: 14px;
  box-shadow: 0 8px 30px rgba(30, 80, 110, 0.25);
}
.panel h1 { font-size: 32px; color: #2a6d8f; letter-spacing: 6px; }
.panel .sub { margin: 8px 0 20px; font-size: 13px; color: #6b93a5; }
#nickInput {
  width: 100%; padding: 10px 12px; font-size: 15px;
  border: 2px solid #9ecfe2; border-radius: 8px; outline: none;
}
#nickInput:focus { border-color: #4aa3c8; }
#joinBtn {
  width: 100%; margin-top: 14px; padding: 11px 0; font-size: 16px;
  color: #fff; background: #3d9bc4; border: none; border-radius: 8px;
  cursor: pointer; letter-spacing: 3px;
}
#joinBtn:hover { background: #2f89b0; }
#joinBtn:disabled { background: #9ec3d3; cursor: default; }
.msg { min-height: 18px; margin-top: 10px; font-size: 13px; color: #d0544a; }
.panel .hint { margin-top: 14px; font-size: 12px; color: #8aa7b5; line-height: 1.7; }

/* HUD */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#status {
  position: absolute; top: 12px; left: 12px;
  padding: 8px 14px; font-size: 13px; color: #fff;
  background: rgba(20, 50, 70, 0.55); border-radius: 8px; line-height: 1.7;
}
#vrBtn {
  position: absolute; top: 12px; right: 12px; pointer-events: auto;
  padding: 9px 20px; font-size: 14px; color: #fff; letter-spacing: 2px;
  background: rgba(61, 155, 196, 0.85); border: none; border-radius: 8px; cursor: pointer;
}
#vrBtn:disabled { opacity: 0.5; }
#controls {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  padding: 6px 14px; font-size: 12px; color: #fff;
  background: rgba(20, 50, 70, 0.45); border-radius: 14px; white-space: nowrap;
}

/* 断线等提示横幅 */
#banner {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 30;
  padding: 9px 20px; font-size: 14px; color: #fff;
  background: rgba(200, 80, 60, 0.9); border-radius: 8px;
}

/* 手机触控层 */
html, body { touch-action: none; overscroll-behavior: none; }
#nickInput { font-size: 16px; } /* 防 iOS 聚焦自动放大 */

#stick { position: fixed; z-index: 15; pointer-events: none; }
.stick-base {
  position: absolute; width: 110px; height: 110px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.14);
  border: 2px solid rgba(255, 255, 255, 0.35);
}
.stick-knob {
  position: absolute; width: 48px; height: 48px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

#pads {
  position: fixed; right: 18px; bottom: 24px; z-index: 15;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.pad {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #fff;
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.45);
  user-select: none; -webkit-user-select: none;
}
.pad.small { width: 56px; height: 56px; font-size: 16px; }
.pad.active { background: rgba(255, 255, 255, 0.45); }
