/* games/fifteen-puzzle/style.css */

/* ── 難度切換列 ── */
.fp-diff-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 0 auto 14px;
}

.fp-diff-btn {
  padding: 6px 18px;
  border-radius: 20px;
  border: 2px solid var(--primary, #D4380D);
  background: transparent;
  color: var(--primary, #D4380D);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}
.fp-diff-btn.active,
.fp-diff-btn:hover {
  background: var(--primary, #D4380D);
  color: #fff;
}

/* ── 棋盤容器 ── */
.fp-board-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.fp-board {
  display: grid;
  gap: 6px;
  background: var(--card-bg, #fff);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  touch-action: none;
  user-select: none;
}

/* grid-template-columns controlled by JS */

/* ── 方塊 ── */
.fp-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  background: var(--primary, #D4380D);
  color: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
  font-size: 1.6rem;
}

.fp-tile:hover {
  transform: scale(0.96);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.fp-tile.fp-empty {
  background: transparent;
  box-shadow: none;
  cursor: default;
  border: 3px dashed var(--border, #e0e0e0);
}
.fp-tile.fp-empty:hover {
  transform: none;
}

.fp-tile.fp-correct {
  background: #52c41a;
}

.fp-tile.fp-anim {
  transition: transform 0.15s ease;
}

/* ── 勝利覆層 ── */
.fp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.fp-overlay.hidden { display: none; }

.fp-overlay-box {
  background: var(--card-bg, #fff);
  border-radius: 20px;
  padding: 32px 40px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  max-width: 340px;
  width: 90%;
}

.fp-overlay-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.fp-overlay-body {
  font-size: 1.1rem;
  color: var(--text-secondary, #666);
  margin-bottom: 20px;
  line-height: 1.7;
}
