/* 连连看：棋盘 / 牌 / 连线 / 结算 */
.ll-stage {
  display: flex;
  justify-content: center;
  margin: 4px 0 6px;
}
.ll-board {
  position: relative;
  margin: 0 auto;
  /* 棋盘底色：中性深底，和牌面不冲突 */
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(34, 211, 238, .06), transparent 60%),
    rgba(13, 16, 24, .55);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--rim), inset 0 1px 0 rgba(255, 255, 255, .05);
  touch-action: manipulation;
}
.ll-tile {
  position: absolute;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .1s var(--ease), box-shadow .14s var(--ease), opacity .26s var(--ease);
  z-index: 2;
}
.ll-tile:active { transform: scale(.92); }
.ll-tile.sel {
  z-index: 4;
  box-shadow: 0 0 0 3px var(--accent), 0 8px 18px -8px rgba(0, 0, 0, .8);
  transform: scale(1.04);
}
.ll-tile.hint {
  animation: llHint .5s ease-in-out 2;
  z-index: 4;
}
@keyframes llHint {
  0%, 100% { box-shadow: 0 0 0 2px rgba(251, 191, 36, .4); }
  50% { box-shadow: 0 0 0 4px rgba(251, 191, 36, .95), 0 0 18px 2px rgba(251, 191, 36, .5); }
}
.ll-tile.gone { opacity: 0; pointer-events: none; }
/* 被上面的牌压住：盖一层冷色纱压暗（保留图案，和豆了个豆同一套观感） */
.ll-tile.cov { filter: saturate(.82); }
.ll-tile.cov::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: rgba(9, 13, 20, .44); pointer-events: none;
}
/* 点了被压住的牌：抖一下（用 margin 位移，避免和 :active 的 transform 打架） */
.ll-tile.shake { animation: llShake .3s var(--ease); }
@keyframes llShake {
  0%, 100% { margin-left: 0; margin-top: 0; }
  20% { margin-left: -4px; }
  55% { margin-left: 4px; margin-top: 1px; }
  80% { margin-left: -2px; }
}
/* 牌面直接复用豆了个豆的 .dd-face（inset:0 填满 .ll-tile） */
.ll-tile .dd-face { border-radius: 12px; }
/* 连连看牌面较小：文字牌只写一种文字（另一种在下方朗读框里显示），
 * 大字居中占满贴纸中间，底部留出主色色带的高度 */
.ll-tile .dd-face.dd-wordface { padding: 2px 1px 8%; }
.ll-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  overflow: visible;
}
/* 电击连线：三层描边叠出电弧 —— 外层糊光、中层主色、内层亮芯。
 * 普通消除走蓝色，成语暴击走紫色；形状由 JS 每帧重抖（锯齿闪电），这里只管质感和配色。
 * 连线跟着卡牌一起消：卡牌 .gone 淡出 260ms，连线同步淡出，到点一起移除。 */
.ll-bolt {
  --bc-core: #f2fbff;          /* 亮芯 */
  --bc-mid: #63c4ff;           /* 主色 */
  --bc-glow: #2f8bff;          /* 外辉光 */
  transition: opacity .26s var(--ease);
  opacity: 1;
}
/* 暴击：紫电 */
.ll-bolt.crit {
  --bc-core: #fbf1ff;
  --bc-mid: #c9a2ff;
  --bc-glow: #8b5cf6;
}
.ll-bolt.out { opacity: 0; }
.ll-bolt polyline {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ll-bolt-glow {
  stroke: var(--bc-glow);
  stroke-width: 12;
  opacity: .34;
  filter: blur(3px);
}
.ll-bolt-mid {
  stroke: var(--bc-mid);
  stroke-width: 4.6;
  opacity: .85;
  filter: drop-shadow(0 0 7px var(--bc-glow));
}
.ll-bolt-core {
  stroke: var(--bc-core);
  stroke-width: 1.7;
  opacity: 1;
}
.ll-line-fallback {
  position: absolute;
  inset: 0;
  background: rgba(47, 139, 255, .28);
  border-radius: 12px;
  transition: opacity .26s var(--ease);
}
.ll-line-fallback.crit { background: rgba(139, 92, 246, .32); }
.ll-line-fallback.out { opacity: 0; }
.ll-speak-box {
  min-height: 34px;
  margin: 8px 0 2px;
  padding: 6px 12px;
  border-radius: 12px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-2);
  white-space: pre-line;   /* 成语标签是「整句 + 换行 + 拼音」两行 */
  background: rgba(13, 16, 24, .55);
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), border-color .22s var(--ease);
  pointer-events: none;
}
.ll-speak-box.show {
  opacity: 1;
  transform: translateY(0);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(34, 211, 238, .15), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.ll-tip { margin-top: 8px; }
.ll-result { text-align: center; padding: 10px 4px 4px; }
.ll-result h3 {
  font-size: 26px;
  margin: 6px 0 12px;
  color: var(--accent-2);
}
.ll-result.lose h3 { color: #f87171; }

/* 倒计时最后 10 秒的加时弹窗：浮在棋盘中央 */
.ll-addtime {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 960;
  width: min(86%, 320px);
  padding: 14px 16px 12px;
  border-radius: 16px;
  text-align: center;
  background: #0d1018;
  border: 1px solid rgba(251, 191, 36, .4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5), 0 0 18px rgba(251, 191, 36, .12);
  pointer-events: auto;
}
.ll-addtime h3 { font-size: 19px; margin: 2px 0 6px; color: #fbbf24; }
.ll-addtime .hint { font-size: 12px; margin: 0 0 10px; }
.ll-addtime-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 6px; }
.ll-addtime-input {
  width: 72px; padding: 6px 8px; border-radius: 10px;
  background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  font-size: 16px; font-weight: 700; text-align: center;
}
.ll-addtime-cost { font-size: 12.5px; color: var(--gold); margin: 0 0 10px; min-height: 18px; }
.ll-addtime .modal-actions { margin-top: 2px; }
.ll-addtime .btn.go.poor { color: #f87171; border-color: rgba(248, 113, 113, .4); }
