/* ============================================================
 * 武器连连看样式（横屏 / 竖屏自适应）
 * 横屏：格子行高随可用空间自适应（1fr 均分），状态栏/提示悬浮
 * 竖屏：页面级滚动，格子用固定比例
 * ============================================================ */
.llk-board-wrap {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 2px 44px 30px;
  position: relative;
}

.llk-status {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  color: rgba(245, 241, 231, 0.75);
  font-size: 13px;
}
.llk-status b {
  color: #f0cf88;
  font-size: 15px;
}
.llk-status-item {
  display: flex;
  align-items: center;
}
.llk-hint-btn,
.llk-shuffle-btn {
  padding: 4px 14px;
  border: 1px solid rgba(225, 188, 104, 0.55);
  border-radius: 14px;
  background: rgba(225, 188, 104, 0.1);
  color: #f0cf88;
  font-size: 12px;
  cursor: pointer;
}
.llk-hint-btn:active,
.llk-shuffle-btn:active {
  filter: brightness(0.85);
}

/* ---------- 棋盘 ---------- */
.llk-board {
  position: relative;
  display: grid;
  width: 100%;
  max-width: 820px;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.llk-cell {
  display: flex;
  min-width: 0;
  min-height: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.llk-cell:hover {
  border-color: rgba(255, 255, 255, 0.45);
}
.llk-cell.empty {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.llk-cell.selected {
  border-color: #e2bd66;
  background: rgba(226, 189, 102, 0.16);
  box-shadow: 0 0 0 2px rgba(226, 189, 102, 0.55), 0 0 18px rgba(226, 189, 102, 0.35);
  transform: translateY(-2px);
}
.llk-cell.hinted {
  border-color: #38a681;
  background: rgba(56, 166, 129, 0.16);
  animation: llk-hint-blink 0.7s ease-in-out 3;
}
@keyframes llk-hint-blink {
  0%, 100% { box-shadow: 0 0 0 0 rgba(56, 166, 129, 0); }
  50% { box-shadow: 0 0 0 3px rgba(56, 166, 129, 0.55); }
}

/* 图标：扁格内自动等比缩放居中（svg meet 模式） */
.llk-icon {
  display: flex;
  width: 56%;
  height: 84%;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.llk-icon svg {
  width: 100%;
  height: 100%;
}

/* ---------- 消除连线（SVG 覆盖层，含棋盘外圈坐标） ---------- */
.llk-lines {
  position: absolute;
  top: -12.5%;
  left: -12.5%;
  width: 125%;
  height: 133.34%;
  pointer-events: none;
  z-index: 6;
  overflow: visible;
}

/* ---------- 提示 / 通关横幅 ---------- */
.llk-toast {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  min-height: 18px;
  color: rgba(245, 241, 231, 0.7);
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}
.llk-complete-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 8;
  padding: 16px 34px;
  border: 1px solid rgba(225, 188, 104, 0.7);
  border-radius: 10px;
  background: rgba(12, 16, 13, 0.94);
  color: #f0cf88;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 3px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 40px rgba(226, 189, 102, 0.3);
}

/* ---------- 竖屏：页面级滚动，格子用固定比例放大触点 ---------- */
body.portrait .llk-board-wrap {
  padding: 2px 10px 40px;
}
body.portrait .llk-board {
  gap: 3px;
  grid-template-rows: none;
  grid-auto-rows: minmax(0, 1fr);
}
body.portrait .llk-cell {
  aspect-ratio: 1 / 1.05;
  border-radius: 6px;
}
body.portrait .llk-icon {
  width: 66%;
  height: 76%;
}
body.portrait .llk-status {
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}
body.portrait .llk-toast {
  bottom: 12px;
  white-space: normal;
  max-width: 90%;
}
