/* Wordle DE - Spielfeld, Tastatur, Stats-Banner */

.wordle-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 1rem 0.5rem;
}

.wordle-title {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.wordle-title small {
  display: block;
  font-size: 0.7rem;
  opacity: 0.6;
  margin-top: 0.2rem;
}

/* Tipp-Knopf unter dem Spielfeld, dezent — bewusste Aktion, kein
 * dauerprominenter Spielzeug-Knopf. */
.wordle-hint-btn-wrap {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0 0.3rem 0;
}

.wordle-hint-btn {
  background-color: transparent;
  border: 1px dashed rgba(181, 159, 59, 0.35);
  color: rgba(212, 185, 74, 0.7);
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, background-color 0.15s, color 0.15s;
}

.wordle-hint-btn:hover {
  background-color: rgba(181, 159, 59, 0.1);
  color: #d4b94a;
  border-color: rgba(181, 159, 59, 0.6);
}

.wordle-hint-btn:active { transform: scale(0.97); }
.wordle-hint-btn:disabled { opacity: 0.5; cursor: default; }

.wordle-unranked-banner {
  margin: 0 0 1rem 0;
  padding: 0.5rem 0.75rem;
  background-color: rgba(220, 53, 69, 0.12);
  border: 1px solid rgba(220, 53, 69, 0.4);
  border-radius: 4px;
  color: #f1959b;
  font-size: 0.82rem;
  text-align: center;
}

.wordle-hint-box {
  margin: 0.8rem 0;
  padding: 0.75rem;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(181, 159, 59, 0.4);
  border-radius: 8px;
}

.wordle-hint-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.wordle-hint-title { font-weight: 700; font-size: 0.95rem; }
.wordle-hint-count { font-size: 0.78rem; opacity: 0.7; }

.wordle-hint-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.wordle-hint-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.6rem;
  background-color: rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  font-size: 0.92rem;
}

.wordle-hint-word {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.wordle-hint-cand {
  color: #d4b94a;
  font-size: 0.95rem;
  line-height: 1;
}

.wordle-hint-bits {
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  opacity: 0.75;
  white-space: nowrap;
}

.wordle-hint-note {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.75;
  font-style: italic;
}

.wordle-hint-loading {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.75;
  padding: 0.5rem;
}

.wordle-hint-error {
  text-align: center;
  font-size: 0.85rem;
  color: #f1959b;
  padding: 0.5rem;
}

.wordle-admin-banner {
  margin: 0.5rem 0 1rem 0;
  padding: 0.5rem 0.75rem;
  background-color: rgba(181, 159, 59, 0.15);
  border: 1px solid rgba(181, 159, 59, 0.4);
  border-radius: 4px;
  color: #d4b94a;
  font-size: 0.85rem;
  text-align: center;
}

.wordle-board {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  gap: 0.3rem;
  margin: 1rem 0;
}

.wordle-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.3rem;
}

.wordle-tile {
  aspect-ratio: 1;
  border: 2px solid #3a3a3c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.2rem, 5vw, 1.7rem);
  font-weight: 700;
  user-select: none;
  transition: background-color 0.3s, border-color 0.2s, transform 0.15s;
}

.wordle-tile.filled {
  border-color: #565758;
  transform: scale(1.04);
}

.wordle-tile.correct {
  background-color: #538d4e;
  border-color: #538d4e;
  color: white;
}

.wordle-tile.present {
  background-color: #b59f3b;
  border-color: #b59f3b;
  color: white;
}

.wordle-tile.absent {
  background-color: #3a3a3c;
  border-color: #3a3a3c;
  color: white;
}

.wordle-message {
  min-height: 1.5em;
  text-align: center;
  margin: 0.7rem 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.wordle-keyboard {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 1rem;
}

.wordle-kb-row {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
}

.wordle-kb-key {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.85rem 0.1rem;
  border: none;
  border-radius: 4px;
  background-color: #818384;
  color: white;
  font-weight: 700;
  cursor: pointer;
  font-size: clamp(0.85rem, 3vw, 1rem);
  transition: background-color 0.2s, transform 0.1s;
}

.wordle-kb-key.wide {
  flex: 1.5 1 0;
  font-size: clamp(0.7rem, 2.5vw, 0.85rem);
}

.wordle-kb-key.correct {
  background-color: #538d4e;
}

.wordle-kb-key.present {
  background-color: #b59f3b;
}

.wordle-kb-key.absent {
  background-color: #3a3a3c;
  color: #888;
}

.wordle-kb-key:hover {
  filter: brightness(1.1);
}

.wordle-kb-key:active {
  transform: scale(0.95);
}

/* Error / shake feedback */
.wordle-shake {
  animation: wordle-shake 0.4s ease-in-out;
}

@keyframes wordle-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

/* Stats banner */
.wordle-stats-banner {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: none;
}

.wordle-stats-banner.visible {
  display: block;
}

.wordle-stats-banner h3 {
  font-size: 1.05rem;
  margin: 0 0 0.6rem 0;
}

.wordle-stats-banner h4 {
  font-size: 0.9rem;
  margin: 0.8rem 0 0.4rem 0;
  opacity: 0.85;
}

.wordle-stats-row {
  display: flex;
  justify-content: space-around;
  text-align: center;
  gap: 0.5rem;
}

.wordle-stat {
  flex: 1;
}

.wordle-stat-num {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.1;
}

.wordle-stat-label {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.1rem;
}

.wordle-dist-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0;
  font-size: 0.85rem;
}

.wordle-dist-row > span:first-child {
  width: 1.2em;
  text-align: right;
  opacity: 0.7;
}

.wordle-dist-bar {
  background-color: #538d4e;
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  min-width: 1.5rem;
  text-align: right;
  font-weight: 600;
}
