/* 球球大逃杀 - 糖果派对风格 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Baloo 2", "ZCOOL KuaiLe", "PingFang SC", system-ui, -apple-system,
    "Helvetica Neue", sans-serif;
  font-weight: 700;
  background: #8fd86f;
  color: #2a3d1f;
  user-select: none;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  background: #8fd86f;
  image-rendering: -webkit-optimize-contrast;
  cursor: crosshair;
}

.hidden {
  display: none !important;
}

/* ============ 遮罩面板 ============ */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    ellipse at center,
    rgba(143, 216, 111, 0.6),
    rgba(60, 100, 40, 0.85)
  );
  z-index: 100;
  backdrop-filter: blur(6px);
}

.panel {
  background: #fff8e7;
  border: 4px solid #b8956a;
  border-radius: 24px;
  padding: 36px 48px;
  min-width: 380px;
  max-width: 520px;
  text-align: center;
  box-shadow: 0 12px 0 rgba(0, 0, 0, 0.15), 0 24px 60px rgba(0, 0, 0, 0.3);
}

.title {
  font-size: 44px;
  color: #e64d6b;
  text-shadow: 0 3px 0 #b83955, 0 6px 0 rgba(0, 0, 0, 0.1);
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.subtitle {
  font-size: 15px;
  color: #7a6a4a;
  margin-bottom: 24px;
  font-weight: 600;
}

.controls {
  background: #f5e6c8;
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 24px;
  border: 2px solid #d9c39a;
}

.controls > div {
  font-size: 14px;
  color: #6b5a3a;
  margin: 6px 0;
  font-weight: 600;
}

.controls .hint-sub {
  font-size: 12px;
  color: #9a8560;
  font-weight: 600;
  margin-top: 2px;
}

.key {
  display: inline-block;
  background: #fff;
  border: 2px solid #b8956a;
  border-bottom-width: 3px;
  border-radius: 6px;
  padding: 2px 8px;
  min-width: 22px;
  font-size: 12px;
  color: #4a3a20;
  margin: 0 2px;
  font-weight: 800;
}

.candy-btn {
  font-family: inherit;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  background: #5ab0ff;
  border: none;
  border-bottom: 4px solid #3d8ed6;
  border-radius: 14px;
  padding: 12px 40px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  letter-spacing: 1px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}

.candy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.15);
}

.candy-btn:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

.candy-btn-alt {
  background: #ffc94d;
  border-bottom-color: #d9a530;
}

.candy-btn-ghost {
  background: #f5e6c8;
  color: #6b5a3a;
  border-bottom-color: #b8956a;
}

/* 设置面板 */
#settings-screen,
#passphrase-screen {
  z-index: 9999 !important;
}
.settings-panel {
  min-width: min(860px, 92vw) !important;
  max-width: min(1020px, 95vw) !important;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left !important;
  padding: 24px 32px;
  overflow: visible;
}

.settings-tabs {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
  justify-content: center;
  flex-shrink: 0;
}

.settings-tab {
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 2px solid #e6d9bd;
  background: #fff8e7;
  color: #6b5a3a;
  cursor: pointer;
  transition: all 0.15s;
}

.settings-tab:hover {
  background: #fff3c2;
}

.settings-tab.is-active {
  background: #5ab0ff;
  color: #fff;
  border-color: #3d8ed6;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}

.settings-body {
  padding: 12px 14px;
  background: rgba(255, 248, 231, 0.6);
  border: 2px dashed #e6d9bd;
  border-radius: 14px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  align-content: start;
  pointer-events: auto;
  overscroll-behavior: contain;
}

.settings-body::-webkit-scrollbar {
  width: 8px;
}
.settings-body::-webkit-scrollbar-thumb {
  background: #d4b98a;
  border-radius: 4px;
}
.settings-body::-webkit-scrollbar-track {
  background: rgba(255, 248, 231, 0.3);
  border-radius: 4px;
}

/* 分组标题（掉落 tab 等） */
.settings-group-title {
  grid-column: 1 / -1;
  font-size: 13px;
  font-weight: 800;
  color: #4a3a1a;
  background: linear-gradient(90deg, #fde68a, transparent);
  padding: 6px 12px;
  border-radius: 8px;
  margin-top: 6px;
  letter-spacing: 0.5px;
}

.settings-group-title:first-child {
  margin-top: 0;
}

/* 分组内的条目容器 */
.settings-group-body {
  display: contents;
}

/* narrow screens: 2 columns, then single */
@media (max-width: 800px) {
  .settings-body {
    grid-template-columns: repeat(2, 1fr);
  }
  .settings-panel {
    min-width: 92vw !important;
    max-width: 96vw !important;
  }
}
@media (max-width: 520px) {
  .settings-body {
    grid-template-columns: 1fr;
  }
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  border-bottom: 1px dashed #eadfc5;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 10px;
  height: fit-content;
}

.setting-label {
  font-size: 12px;
  font-weight: 700;
  color: #5a4a2a;
  flex: 0 1 auto;
  white-space: nowrap;
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.setting-control {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.setting-control input[type="range"] {
  width: 60px;
  accent-color: #5ab0ff;
}

.setting-control input[type="number"] {
  width: 52px;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  padding: 3px 4px;
  border: 2px solid #e6d9bd;
  border-radius: 8px;
  background: #fff;
  color: #5a4a2a;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.setting-control input[type="number"]:focus {
  outline: none;
  border-color: #5ab0ff;
  box-shadow: 0 0 0 3px rgba(90,176,255,0.25);
}

.settings-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  flex-shrink: 0;
}

.settings-actions .candy-btn {
  font-size: 16px;
  padding: 10px 22px;
}

/* Passphrase gate panel */
.passphrase-panel {
  max-width: 380px;
  text-align: center;
  padding: 28px 28px 22px;
}

.passphrase-icon {
  font-size: 42px;
  margin-bottom: 8px;
  animation: floatY 2.2s ease-in-out infinite;
}

.passphrase-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  margin-top: 10px;
  border-radius: 14px;
  border: 2px solid #e5d6ff;
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  text-align: center;
  letter-spacing: 4px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}

.passphrase-input:focus {
  border-color: #b794f6;
  box-shadow: 0 0 0 4px rgba(183, 148, 246, 0.18);
}

.passphrase-input.shake {
  animation: shakeInput .42s cubic-bezier(.36, .07, .19, .97);
  border-color: #ff5a5a;
}

.passphrase-error {
  margin-top: 10px;
  font-size: 13px;
  color: #ff5a5a;
  font-weight: 700;
  min-height: 18px;
}

.passphrase-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.passphrase-hint {
  margin-top: 14px;
  font-size: 12px;
  color: #9a8cb8;
  font-weight: 600;
}

@keyframes shakeInput {
  0%, 100% { transform: translateX(0); }
  15%      { transform: translateX(-8px); }
  30%      { transform: translateX(7px); }
  45%      { transform: translateX(-6px); }
  60%      { transform: translateX(5px); }
  75%      { transform: translateX(-3px); }
  90%      { transform: translateX(2px); }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}


.tip {
  margin-top: 18px;
  font-size: 13px;
  color: #999;
  font-weight: 600;
}

.stats {
  background: #f5e6c8;
  border-radius: 16px;
  padding: 18px 24px;
  margin: 20px 0;
  border: 2px solid #d9c39a;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 18px;
  color: #6b5a3a;
}

.stat-row b {
  color: #e64d6b;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-row .candy-btn {
  font-size: 16px;
  padding: 10px 24px;
}

/* ============ HUD ============ */
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

.hud-corner {
  position: absolute;
  padding: 14px;
}
.hud-tl {
  top: 0;
  left: 0;
}
.hud-tr {
  top: 0;
  right: 0;
}

.hud-card {
  background: rgba(255, 248, 231, 0.9);
  border: 2px solid #b8956a;
  border-radius: 14px;
  padding: 10px 14px;
  min-width: 120px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
}

.hud-label {
  font-size: 11px;
  color: #a08a5a;
  font-weight: 700;
  letter-spacing: 1px;
}

.hud-value {
  font-size: 22px;
  color: #e64d6b;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.hud-timer {
  font-size: 15px;
  color: #6b5a3a;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.hud-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #6b5a3a;
  font-weight: 700;
  margin: 3px 0;
}
.hud-row b {
  color: #e64d6b;
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
  font-weight: 800;
}
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.2);
}
.dot-red {
  background: #e64d6b;
}
.dot-gold {
  background: #ffd93d;
}

/* 顶部中央 - HP+XP */
.hud-top-center {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.hp-bar-wrap {
  flex: 1;
  position: relative;
  height: 22px;
  background: rgba(0, 0, 0, 0.25);
  border: 2px solid #4a3a20;
  border-radius: 12px;
  overflow: hidden;
}

.hp-bar {
  position: absolute;
  inset: 0;
  width: 100%;
  background: linear-gradient(90deg, #5ee270, #3fc45a);
  border-radius: 10px 0 0 10px;
  transition: width 0.25s ease-out, background 0.25s;
}

.hp-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  font-variant-numeric: tabular-nums;
}

.hud-lives {
  font-size: 18px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
  min-width: 76px;
  text-align: right;
}

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

.lv-badge {
  background: #ffd93d;
  color: #6b4a1a;
  border: 2px solid #b8871a;
  border-radius: 10px;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 800;
  min-width: 52px;
  text-align: center;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

.xp-bar-wrap {
  flex: 1;
  position: relative;
  height: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 2px solid #4a3a20;
  border-radius: 8px;
  overflow: hidden;
}

.xp-bar {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, #ffd93d, #ff884d);
  transition: width 0.3s ease-out;
}

.xp-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.7);
  font-variant-numeric: tabular-nums;
}

/* 底部武器栏 */
.hud-weapon-bar {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}

.wslot {
  position: relative;
  width: 84px;
  height: 84px;
  background: rgba(255, 248, 231, 0.9);
  border: 3px solid #b8956a;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
  transition: transform 0.15s, border-color 0.15s;
}

.wslot.active {
  border-color: #ffd93d;
  background: rgba(255, 249, 200, 0.95);
  transform: translateY(-4px) scale(1.05);
}

.wslot.flash {
  animation: flashGold 0.3s ease-out;
}
@keyframes flashGold {
  0%,
  100% {
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
  }
  50% {
    box-shadow: 0 0 0 4px #ffd93d, 0 4px 0 rgba(0, 0, 0, 0.15);
  }
}

.wslot-key {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 11px;
  color: #a08a5a;
  font-weight: 800;
}

.wslot-icon {
  font-size: 32px;
  line-height: 1;
}

.wslot-name {
  font-size: 12px;
  color: #6b5a3a;
  font-weight: 700;
  margin-top: 4px;
}

/* 拾取提示 */
.pickup-tip {
  position: absolute;
  bottom: 130px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 248, 231, 0.95);
  border: 2px solid #b8956a;
  border-radius: 12px;
  padding: 6px 16px;
  font-size: 14px;
  color: #6b5a3a;
  font-weight: 700;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15);
  animation: floatUp 1s ease-in-out infinite alternate;
}
@keyframes floatUp {
  from {
    transform: translate(-50%, 0);
  }
  to {
    transform: translate(-50%, -4px);
  }
}

/* 中央提示 */
.center-toast {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40px;
  color: #ffd93d;
  text-shadow: 0 3px 0 #b8871a, 0 6px 10px rgba(0, 0, 0, 0.4);
  font-weight: 800;
  letter-spacing: 2px;
  pointer-events: none;
  animation: toastPop 1.2s ease-out forwards;
}

@keyframes toastPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -60%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -70%) scale(1);
  }
}

/* 拳头兜底槽 - 半透明表示是内置 */
.wslot.fist:not(.active) {
  opacity: 0.7;
}
.wslot.fist .wslot-name {
  color: #a08a5a;
  font-style: italic;
}

/* 控制按钮 */
.hud-btns {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.icon-btn {
  pointer-events: auto;
  background: rgba(255, 248, 231, 0.9);
  border: 2px solid #b8956a;
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 18px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
  transition: transform 0.1s;
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn:active { transform: translateY(1px); }
.icon-btn.muted { opacity: 0.5; }

/* 小地图 */
.minimap-wrap {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: rgba(255, 248, 231, 0.9);
  border: 3px solid #b8956a;
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15);
}
#minimap {
  display: block;
  width: 130px;
  height: 130px;
  border-radius: 8px;
  background: #8fd86f;
}
.minimap-label {
  text-align: center;
  font-size: 11px;
  color: #a08a5a;
  font-weight: 800;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* 受伤边缘晕 */
.damage-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 45%,
    rgba(230, 77, 107, 0) 55%,
    rgba(230, 77, 107, 0.6) 100%
  );
  opacity: 0;
  transition: opacity 0.15s ease-out;
}
.damage-vignette.hurt {
  opacity: 1;
}
.damage-vignette.lowhp {
  opacity: 0.85;
  animation: pulseVignette 1.2s ease-in-out infinite;
}
@keyframes pulseVignette {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.9; }
}

/* 倒计时 */
.countdown {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 160px;
  color: #ffd93d;
  text-shadow: 0 6px 0 #b8871a, 0 12px 30px rgba(0, 0, 0, 0.5);
  font-weight: 800;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.countdown.go {
  font-size: 100px;
  color: #5ee270;
  text-shadow: 0 6px 0 #2f9e42, 0 12px 30px rgba(0, 0, 0, 0.5);
  letter-spacing: 4px;
}

/* Boss 警告 */
.boss-warning {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 24px 60px;
  background: rgba(31, 41, 55, 0.85);
  border: 4px solid #EF4444;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.6);
  pointer-events: none;
  animation: bossWarn 2s ease-out forwards;
}
.boss-warning-text {
  font-size: 42px;
  color: #EF4444;
  font-weight: 800;
  letter-spacing: 4px;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.6);
}
.boss-warning-sub {
  font-size: 15px;
  color: #ffd0d0;
  font-weight: 600;
  margin-top: 8px;
  letter-spacing: 1px;
}
@keyframes bossWarn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  85% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

/* 暂停小面板 */
.panel.small {
  min-width: 300px;
  padding: 28px 36px;
}
.title.small {
  font-size: 32px;
}

/* ============ Boss 血条 ============ */
.boss-hp-wrap {
  position: absolute;
  top: 92px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, 60vw);
  padding: 8px 14px 10px;
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.9), rgba(31, 41, 55, 0.75));
  border: 2px solid #ef4444;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4), inset 0 0 12px rgba(239, 68, 68, 0.3);
  pointer-events: none;
  animation: bossHpPulse 1.6s ease-in-out infinite alternate;
}
@keyframes bossHpPulse {
  from { box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4), inset 0 0 8px rgba(239, 68, 68, 0.2); }
  to { box-shadow: 0 4px 20px rgba(239, 68, 68, 0.7), inset 0 0 14px rgba(239, 68, 68, 0.45); }
}
.boss-hp-title {
  font-size: 15px;
  color: #ffd0d0;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-align: center;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
  margin-bottom: 6px;
}
.boss-hp-bar-outer {
  position: relative;
  width: 100%;
  height: 18px;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid #1f2937;
  border-radius: 10px;
  overflow: hidden;
}
.boss-hp-bar {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #f87171, #ef4444);
  background-size: 200% 100%;
  animation: bossBarShine 2s linear infinite;
  transition: width 0.15s ease-out;
}
@keyframes bossBarShine {
  from { background-position: 0 0; }
  to { background-position: 200% 0; }
}
.boss-hp-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

/* ============ 连杀提示 ============ */
.kill-streak {
  position: absolute;
  top: 33%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 56px;
  font-weight: 800;
  color: #ffd93d;
  letter-spacing: 6px;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 217, 61, 0.5);
  pointer-events: none;
  animation: killStreakPop 1.4s ease-out forwards;
  white-space: nowrap;
}
@keyframes killStreakPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4) rotate(-8deg); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.25) rotate(4deg); }
  50% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  85% { opacity: 1; transform: translate(-50%, -60%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -80%) scale(0.9); }
}

/* ============ 移动端虚拟摇杆 ============ */
#mobile-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 25;
}
#mobile-controls .stick {
  position: absolute;
  bottom: 40px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(31, 41, 55, 0.15);
  border: 3px dashed rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  touch-action: none;
  backdrop-filter: blur(4px);
}
#mobile-controls #stick-left { left: 30px; }
#mobile-controls #stick-right {
  right: 30px;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(255, 200, 200, 0.5);
}
.stick-knob {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #cfe8ff 60%, #5ab0ff 100%);
  border: 3px solid #1f2937;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
  transition: transform 0.06s linear;
  will-change: transform;
}
.stick-knob-fire {
  background: radial-gradient(circle at 35% 30%, #ffffff, #ffc8c8 60%, #ef4444 100%);
  z-index: 2;
}
.stick-hint {
  font-size: 12px;
  color: #ffe0e0;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 1;
}
.mobile-pickup-btn {
  position: absolute;
  bottom: 190px;
  right: 48px;
  pointer-events: auto;
  touch-action: manipulation;
  border: 3px solid #1f2937;
  border-radius: 18px;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  color: #1f2937;
  background: linear-gradient(180deg, #ffe66d, #ffd93d);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
  z-index: 26;
}
.mobile-pickup-btn.hidden { display: none; }
.mobile-pickup-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
