/* wordfall: tile grid restyled to match the site — black, white, bold Inter,
   sharp corners, green only for a match. */

.game {
  padding-top: 24px;
}

.stats {
  color: var(--dim);
}

.board-wrap {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

#board {
  position: relative;
}

.tile {
  position: absolute;
  width: 44px;
  height: 44px;
  transition: transform 0.19s ease;
  will-change: transform;
}

.tile-face {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: var(--fg);
  border: 1px solid var(--faint);
  font-family: inherit;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, opacity 0.18s ease;
}

.tile-face:hover {
  border-color: #777;
}

.tile-face.selected {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.tile-face.matched {
  background: var(--good);
  border-color: var(--good);
  color: #000;
}

.tile-face.clearing {
  transform: scale(0.2);
  opacity: 0;
}

.tile-face.shake {
  animation: shake 0.3s ease;
}

.tile-face.shuffled {
  animation: flash 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes flash {
  0%, 100% { background: #000; }
  50% { background: var(--good); border-color: var(--good); color: #000; }
}

/* Status line reuses the site's .status rules from shared/game.css-style
   convention: a single live region above the found list. */

.status {
  min-height: 1.4em;
  margin: 0 0 8px;
}

/* Found-word list: same shape as the daily games' .guesses list. */

.found {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  min-height: 1px;
}

.found li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--faint);
}

.found .word {
  letter-spacing: -0.01em;
}

.found .pts {
  color: var(--good);
  white-space: nowrap;
}

.controls {
  display: flex;
  gap: 8px;
}

.btn {
  font: inherit;
  font-size: 15px;
  padding: 12px 18px;
  border-radius: 0;
  cursor: pointer;
}

.btn-primary {
  flex: 1;
  background: #fff;
  color: #000;
  border: 1px solid #fff;
  font-weight: 800;
}

.btn-primary:hover {
  background: #ccc;
  border-color: #ccc;
}

.btn-ghost {
  background: #000;
  color: var(--fg);
  border: 1px solid var(--faint);
}

.btn-ghost:hover {
  border-color: #fff;
}

.btn:disabled {
  color: #444;
  border-color: var(--faint);
  cursor: default;
  background: #000;
}
