:root {
  --neon-cyan: #00f3ff;
  --neon-magenta: #ff007f;
  --neon-gold: #ffd700;
  --neon-green: #00ff9d;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #060b19;
  color: #e8faff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  touch-action: none;
}

#camera-video {
  position: fixed;
  inset: 0;
  width: 100dvw;
  height: 100dvh;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

.game-stage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100dvw;
  height: 100dvh;
  overflow: hidden;
  z-index: 5;
}

.game-stage.forced-landscape-cw {
  top: 50%;
  left: 50%;
  width: 100dvh;
  height: 100dvw;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center center;
}

.game-stage.forced-landscape-ccw {
  top: 50%;
  left: 50%;
  width: 100dvh;
  height: 100dvw;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center center;
}

#game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* 极简顶部 HUD */
.cyber-hud-top {
  position: absolute;
  top: 10px;
  left: 14px;
  right: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hud-left, .hud-right {
  pointer-events: auto;
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(8, 14, 30, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  padding: 5px 12px;
  backdrop-filter: blur(4px);
}

.bars-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 96px;
}

.hp-bar-outer {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  overflow: hidden;
}

.hp-bar-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #ff2a5f, #ff6b8b);
  transition: width 0.15s ease;
}

.xp-bar-outer {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  overflow: hidden;
}

.xp-bar-inner {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00f3ff, #00ff9d);
  transition: width 0.15s ease;
}

.stat-star {
  font-size: 13px;
  font-weight: 800;
  color: var(--neon-gold);
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(8, 14, 30, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

/* 底部触控层（无任何多余文字） */
.controls-layer {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  pointer-events: none;
}

.joystick-zone {
  pointer-events: auto;
  width: 116px;
  height: 116px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.joystick-base {
  position: relative;
  width: 98px;
  height: 98px;
  border-radius: 50%;
  background: rgba(6, 14, 32, 0.32);
  border: 1.5px solid rgba(0, 243, 255, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
}

.joystick-stick {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, var(--neon-cyan) 75%, #006680 100%);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.6);
  pointer-events: none;
}

.action-zone {
  pointer-events: auto;
  display: flex;
  align-items: flex-end;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  backdrop-filter: blur(4px);
}

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

.btn-jump {
  width: 76px;
  height: 76px;
  font-size: 24px;
  font-weight: 900;
  background: radial-gradient(circle, rgba(255, 0, 127, 0.52) 0%, rgba(36, 6, 30, 0.65) 100%);
  border: 2px solid rgba(255, 0, 127, 0.75);
  box-shadow: 0 0 14px rgba(255, 0, 127, 0.4);
}
