/* taiyue-xxl-game v1.9.1 —— 滑动 / 三消补间动画与音频面板样式
 * 约束：只用 transform / opacity（不触发 layout）；所有新类统一 tx- 前缀；
 * prefers-reduced-motion 命中时全部降级为瞬时（音效与浮分文字保留）。 */

#taiyue-xxl-game-board .tile {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* 棋盘上启用指针手势：只在棋盘内禁用默认滚动手势，页面滚动不受影响 */
#taiyue-xxl-game-board {
  touch-action: none;
}

/* 位移中的格子提到上层，避免被相邻格遮挡 */
#taiyue-xxl-game-board .tile.tx-moving {
  z-index: 3;
}

/* 消除：弹大 → 淡出 */
#taiyue-xxl-game-board .tile.tx-clearing {
  animation: txClear 180ms cubic-bezier(.3, .8, .4, 1) forwards;
  z-index: 2;
}
@keyframes txClear {
  0%   { transform: scale(1);    opacity: 1; }
  45%  { transform: scale(1.22); opacity: 1; filter: brightness(1.45); }
  100% { transform: scale(.34);  opacity: 0; }
}

/* 非法交换：回弹抖动 */
#taiyue-xxl-game-board .tile.tx-deny {
  animation: txDeny 260ms ease-in-out;
}
@keyframes txDeny {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-4px) rotate(-2deg); }
  50%      { transform: translateX(4px)  rotate(2deg); }
  80%      { transform: translateX(-2px); }
}

/* 选中态：轻微放大 + 呼吸光晕（复用既有 .selected，不覆盖其配色） */
#taiyue-xxl-game-board .tile.selected {
  animation: txSelect 900ms ease-in-out infinite;
}
@keyframes txSelect {
  0%, 100% { transform: scale(1.04); }
  50%      { transform: scale(1.09); }
}

/* 音频/动效设置面板 */
.tx-audio-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 10px;
  background: rgba(15, 23, 42, .35);
}
.tx-audio-panel label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #cbd5f5;
}
.tx-audio-panel input[type="range"] {
  width: 92px;
  accent-color: #f5d491;
}
.tx-audio-panel input[type="range"]:disabled {
  opacity: .4;
}

@media (prefers-reduced-motion: reduce) {
  #taiyue-xxl-game-board .tile,
  #taiyue-xxl-game-board .tile.tx-moving,
  #taiyue-xxl-game-board .tile.tx-clearing,
  #taiyue-xxl-game-board .tile.tx-deny,
  #taiyue-xxl-game-board .tile.selected {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

/* ===== v1.10.0 六韵韵令 ===== */
.objective-pill.tx-edict {
  border: 1px solid rgba(245, 212, 145, .85);
  background: linear-gradient(135deg, rgba(245, 212, 145, .22), rgba(245, 212, 145, .06));
  color: #f5d491;
  font-weight: 600;
  letter-spacing: .02em;
}
.objective-pill.tx-edict-urgent {
  animation: txEdictPulse 700ms ease-in-out infinite;
  border-color: rgba(248, 113, 113, .9);
  color: #fca5a5;
}
@keyframes txEdictPulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%      { transform: scale(1.05); opacity: .78; }
}
@media (prefers-reduced-motion: reduce) {
  .objective-pill.tx-edict-urgent { animation: none !important; transform: none !important; }
}

/* ===== v1.11.0 点位排行榜 ===== */
.rank-list .tx-sub { display: block; font-size: 11px; color: #94a3b8; margin-top: 2px; }
.rank-list li.tx-me {
  margin-top: 6px; padding-top: 8px; border-top: 1px dashed rgba(148,163,184,.5);
  color: #f5d491; font-weight: 600; justify-content: center;
}
