/* ===== 钓小龙虾 样式（黑白像素风 · DOM 浮层 + 移动端适配） =====
 * 与画布共用同一套灰阶：PAPER #e8e8e8 / INK #1a1a1a（见 js/config.js CFG.PALETTE）
 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  height: 100%;
  touch-action: manipulation;      /* 禁止双击缩放 */
  overscroll-behavior: none;       /* 禁止下拉刷新/回弹 */
}
body {
  background: #e8e8e8;
  overflow: hidden;
  font-family: "Courier New", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", monospace;
  color: #1a1a1a;
  user-select: none;
}

/* 舞台：铺满视口，Phaser 画布 FIT 居中，DOM 浮层叠在其上 */
#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
}
#stage canvas {
  display: block;
  touch-action: none;              /* 游戏区域手势交给 Phaser，不滚动/缩放页面 */
  box-shadow: 0 0 0 3px #1a1a1a, 0 18px 48px rgba(26, 26, 26, .35);
  image-rendering: pixelated;
}

/* 全屏按钮（不支持全屏 API 的设备自动隐藏） */
#fsBtn {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  width: 44px;
  height: 32px;
  padding: 0;
  font-size: 12px;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 0;
  background: #1a1a1a;
  border: none;
  color: #e8e8e8;
  box-shadow: none;
  z-index: 6;
  cursor: pointer;
}
#fsBtn:hover { background: #6f6f6f; }
#fsBtn.hidden { display: none; }

/* 线长滑块（移动端：滚轮的替代，拖动调长短；上=长 下=短） */
#lineSlider {
  display: none;
  position: absolute;
  right: max(16px, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 58vh;
  min-height: 200px;
  z-index: 6;
  touch-action: none;
}
@media (pointer: coarse) {
  #lineSlider { display: block; }
}
#lineSliderTrack {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
  width: 8px;
  border-radius: 0;
  background: #f7f7f7;
  border: 2px solid #1a1a1a;
}
#lineSliderFill {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 8px;
  border-radius: 0;
  background: #6f6f6f;
  height: 50%;
}
#lineSliderKnob {
  position: absolute;
  left: 50%;
  width: 24px;
  height: 24px;
  border-radius: 0;
  background: #1a1a1a;
  border: 3px solid #f7f7f7;
  outline: 2px solid #1a1a1a;
  box-shadow: none;
  transform: translate(-50%, -50%);
  top: 50%;
}
#lineSliderMark {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: #a8a8a8;
  border-radius: 0;
}
.lsLabel {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
  opacity: .7;
  letter-spacing: 2px;
  pointer-events: none;
}
.lsTop { top: -22px; }
.lsBottom { bottom: -22px; }

/* 竖屏旋转提示：触屏设备 + 竖屏时全屏覆盖 */
#rotateHint {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #e8e8e8;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: center;
  padding: 24px;
}
#rotateHint .rhIcon {
  width: 36px;
  height: 60px;
  border: 3px solid #1a1a1a;
  border-radius: 4px;
  position: relative;
  animation: rhBob 1.6s ease-in-out infinite;
}
#rotateHint .rhIcon::after {          /* 手机听筒线 */
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 3px;
  background: #1a1a1a;
}
@keyframes rhBob { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } }
#rotateHint .rhText { font-size: 17px; font-weight: 700; letter-spacing: 3px; line-height: 1.9; }
#rotateHint small { opacity: .55; letter-spacing: 1px; }
@media (orientation: portrait) and (pointer: coarse) {
  #rotateHint { display: flex; }
}

/* 饵料剩余信息（点击饵料盒才短暂显示） */
#baitInfo {
  position: absolute;
  background: #1a1a1a;
  border: none;
  border-radius: 0;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #e8e8e8;
  box-shadow: 4px 4px 0 rgba(26, 26, 26, .25);
  z-index: 4;
  pointer-events: none;
  white-space: nowrap;
}
#baitInfo.hidden { display: none; }

/* 开始遮罩 */
#overlay {
  position: absolute;
  inset: 0;
  background: rgba(232, 232, 232, .88);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  z-index: 5;
}
#overlay.hidden { display: none; }
#overlay h2 {
  font-size: 46px;
  letter-spacing: 14px;
  text-indent: 14px;               /* 抵消最后一字的字距，视觉居中 */
  color: #1a1a1a;
  font-weight: 700;
  text-shadow: 4px 4px 0 #a8a8a8;
}
.ovSub {
  font-size: 14px;
  opacity: .75;
  letter-spacing: 3px;
  font-weight: 700;
}

/* 按钮：墨块方角，hover 反色 */
button {
  font-size: 16px;
  padding: 12px 42px;
  border: 3px solid #1a1a1a;
  border-radius: 0;
  background: #1a1a1a;
  color: #e8e8e8;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 4px;
  text-indent: 4px;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(26, 26, 26, .3);
  transition: none;
}
button:hover {
  background: #e8e8e8;
  color: #1a1a1a;
  box-shadow: 2px 2px 0 rgba(26, 26, 26, .3);
}
button:active { transform: translate(2px, 2px); box-shadow: none; }

/* 水桶捕获统计面板（含安全区） */
#bucketPanel {
  position: absolute;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(12px, env(safe-area-inset-bottom));
  background: #f7f7f7;
  border: 3px solid #1a1a1a;
  border-radius: 0;
  padding: 12px 16px;
  font-size: 13px;
  min-width: 220px;
  box-shadow: 6px 6px 0 rgba(26, 26, 26, .3);
  z-index: 6;
  animation: panelIn .15s steps(3);
}
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } }
#bucketPanel.hidden { display: none; }
.bpHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  letter-spacing: 2px;
}
#bpClose {
  background: none;
  border: none;
  color: #1a1a1a;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
  box-shadow: none;
  letter-spacing: 0;
}
#bpClose:hover { background: #1a1a1a; color: #e8e8e8; }
#speciesList .row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
#speciesList .sprite {
  width: 26px;
  height: 16px;
  flex: none;
  image-rendering: pixelated;
}
#speciesList .dot {                   /* 精灵图不可用时的灰点兜底 */
  width: 12px;
  height: 12px;
  margin: 0 7px;
  border-radius: 0;
  flex: none;
  background: #6f6f6f;
  border: 2px solid #1a1a1a;
}
#speciesList .row .name { flex: 1; letter-spacing: 1px; }
#speciesList .row .num {
  color: #1a1a1a;
  font-weight: 700;
  font-size: 12px;
  background: #e8e8e8;
  border: 2px solid #1a1a1a;
  border-radius: 0;
  padding: 1px 7px;
}
#speciesList .row.zero { opacity: .45; }
.bpTotal {
  border-top: 2px solid #1a1a1a;
  margin-top: 9px;
  padding-top: 9px;
  font-weight: 700;
  letter-spacing: 2px;
}
.bpTotal span { color: #1a1a1a; }
