/* Wordle — NYT tile colors on the shared arcade theme */

.wordle-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 0;
}

.daily-label {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 1.2em;
}

.tile-grid {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  gap: 6px;
}

.tile-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.wtile {
  width: clamp(52px, 8.5vh, 68px);
  height: clamp(52px, 8.5vh, 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--card);
  border: 2px solid #d3d6da;
  color: var(--ink);
  transition: transform 0.08s ease, background 0.2s ease, border-color 0.2s ease;
}

.wtile.filled {
  border-color: #878a8c;
  animation: pop 0.09s ease;
}

@keyframes pop {
  50% { transform: scale(1.08); }
}

.wtile.correct { background: #6aaa64; border-color: #6aaa64; color: #fff; }
.wtile.present { background: #c9b458; border-color: #c9b458; color: #fff; }
.wtile.absent  { background: #787c7e; border-color: #787c7e; color: #fff; }

.wtile.reveal {
  animation: flip 0.45s ease;
}

@keyframes flip {
  0% { transform: rotateX(0); }
  50% { transform: rotateX(90deg); }
  100% { transform: rotateX(0); }
}

.tile-row.shake {
  animation: shake 0.35s ease;
}

@keyframes shake {
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ---------- Keyboard ---------- */
.kb {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
}

.kb-row {
  display: flex;
  gap: 6px;
}

.key {
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  border: none;
  border-radius: 6px;
  background: #d3d6da;
  color: var(--ink);
  min-width: clamp(34px, 4.4vw, 46px);
  height: clamp(48px, 7vh, 58px);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.05s ease;
}

.key:active {
  transform: scale(0.94);
}

.key.wide {
  min-width: clamp(58px, 7vw, 76px);
  font-size: 0.8rem;
}

.key.correct { background: #6aaa64; color: #fff; }
.key.present { background: #c9b458; color: #fff; }
.key.absent  { background: #787c7e; color: #fff; }

/* ---------- Stats ---------- */
.stat-row {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin: 12px 0 4px;
}

.stat {
  text-align: center;
}

.stat .num {
  font-size: 2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.stat .lbl {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dist-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-top: 14px;
}

.dist {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
  text-align: left;
}

.dist-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dist-bar {
  background: #787c7e;
  color: #fff;
  padding: 2px 8px;
  text-align: right;
  min-width: 24px;
  border-radius: 3px;
}

.dist-bar.hit {
  background: #6aaa64;
}
