/* ============================================================
   对局页 外壳样式 + 棋盘缩放控件
   ============================================================ */

.game {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.game-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 18px;
  background: rgba(11, 16, 32, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}

.game-top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.room-meta {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  font-size: 14px;
}

.room-game {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.room-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(77, 141, 255, 0.14);
  border: 1px solid rgba(77, 141, 255, 0.3);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--accent);
  white-space: nowrap;
}

.room-chip b {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 1.5px;
  font-weight: 700;
}

/* 连接状态点 */
.conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-3);
  flex: 0 0 auto;
  transition: all 0.25s ease;
}

.conn-dot.ok {
  background: var(--win);
  box-shadow: 0 0 10px rgba(52, 217, 155, 0.7);
}

.conn-dot.bad {
  background: var(--lose);
  box-shadow: 0 0 10px rgba(255, 92, 122, 0.7);
}

.stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 20px 50px;
}

.stage-inner {
  width: 100%;
  max-width: 980px;
}

/* 游戏内操作条：紧贴棋盘下方，就近操作 */
.gom-actionbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* ---------------- 棋盘缩放控件 ----------------
   浮动在棋盘右下角的缩放条，支持 50%~150% 缩放，
   并设最小尺寸下限，避免缩到看不清 */
.zoom-bar {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  background: rgba(11, 16, 32, 0.86);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.zoom-btn {
  appearance: none;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--ink-2);
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition: all 0.16s var(--ease);
  padding: 0;
  line-height: 1;
}

.zoom-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
}

.zoom-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.zoom-pct {
  min-width: 42px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.zoom-reset {
  width: 30px;
  height: 30px;
  font-size: 13px;
}

/* 棋盘容器：缩放通过 CSS transform-scale 实现，布局尺寸同步放大 */
.board-scaler {
  transform-origin: top center;
  transition: transform 0.22s var(--ease);
  will-change: transform;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 720px) {
  .stage {
    padding: 14px 12px 50px;
  }

  .room-game {
    display: none;
  }

  .game-top {
    padding: 10px 12px;
    gap: 10px;
  }
}
