/* Galgenmännchen — accent: #f2b035 */

/* Pick-Phase */
.hg-pick {
  max-width: 460px;
  margin: 24px auto;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
}
.hg-pick h3 { margin: 0 0 8px; color: var(--text); font-size: 20px; }
.hg-pick p { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.hg-pick input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  font-size: 22px;
  font-family: ui-monospace, 'JetBrains Mono', monospace;
  letter-spacing: 4px;
  text-align: center;
  text-transform: uppercase;
  padding: 14px 12px;
  background: var(--panel2);
  border: 2px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  outline: none;
  transition: border-color 120ms;
}
.hg-pick input[type="text"]:focus { border-color: #f2b035; }
.hg-pick-hint {
  min-height: 18px;
  margin: 8px 0 14px;
  font-size: 13px;
  color: var(--muted);
}
.hg-pick .mp-btn-primary {
  background: #f2b035;
  color: #1a1a1a;
  border: none;
  font-weight: 600;
}
.hg-pick .mp-btn-primary:disabled {
  background: var(--panel2);
  color: var(--muted);
  cursor: not-allowed;
}

/* Wait-Panel */
.hg-wait {
  max-width: 460px;
  margin: 32px auto;
  padding: 32px 24px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.hg-wait h3 { margin: 16px 0 6px; color: var(--text); font-size: 18px; font-weight: 500; }
.hg-wait p { margin: 0; color: var(--muted); font-size: 13px; }
.hg-spinner {
  width: 36px; height: 36px;
  margin: 0 auto;
  border: 3px solid var(--panel2);
  border-top-color: #f2b035;
  border-radius: 50%;
  animation: hg-spin 800ms linear infinite;
}
@keyframes hg-spin { to { transform: rotate(360deg); } }

/* Galgen */
.hg-gallows-wrap {
  margin: 16px auto 8px;
  text-align: center;
}
.hg-gallows {
  width: 200px;
  height: 220px;
  max-width: 60vw;
  max-height: 50vh;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hg-gallows .frame { stroke: var(--muted); stroke-width: 4; }
.hg-gallows .body  { stroke: #f2b035; stroke-width: 4; }
.hg-gallows .face  { stroke: #ff5d5d; stroke-width: 3; }
.hg-fails {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-family: ui-monospace, monospace;
}

/* Wort-Display */
.hg-word {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 16px 0;
}
.hg-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 4px 6px;
  border-bottom: 3px solid var(--line);
  font-family: ui-monospace, 'JetBrains Mono', monospace;
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
}
.hg-letter.filled {
  border-bottom-color: #f2b035;
  color: #f2b035;
}
.hg-word-self {
  margin-top: 6px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-family: ui-monospace, monospace;
  letter-spacing: 2px;
}

/* Falsche Buchstaben */
.hg-wrong {
  text-align: center;
  font-size: 14px;
  color: var(--text);
  margin: 8px 0 16px;
}
.hg-wrong-label { color: var(--muted); margin-right: 8px; }
.hg-wrong-letter {
  display: inline-block;
  margin: 0 3px;
  padding: 2px 6px;
  background: rgba(255, 93, 93, 0.18);
  color: #ff8a8a;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-weight: 600;
  text-decoration: line-through;
}

/* Tastatur */
.hg-keyboard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px auto 0;
  max-width: 520px;
}
.hg-kb-row {
  display: flex;
  gap: 4px;
  justify-content: center;
}
.hg-key {
  flex: 1 1 0;
  max-width: 48px;
  min-width: 28px;
  aspect-ratio: 1 / 1.15;
  background: var(--panel2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: ui-monospace, monospace;
  font-size: clamp(14px, 3.5vw, 18px);
  font-weight: 600;
  cursor: pointer;
  transition: background 100ms, transform 60ms;
}
.hg-key:hover:not(:disabled) { background: #2a313c; }
.hg-key:active:not(:disabled) { transform: scale(0.95); }
.hg-key:disabled { cursor: default; opacity: 0.55; }
.hg-key.hit  { background: rgba(90, 222, 122, 0.22); color: #5ade7a; border-color: #5ade7a; opacity: 1; }
.hg-key.miss { background: rgba(255, 93, 93, 0.18); color: #ff8a8a; border-color: rgba(255,93,93,0.4); opacity: 1; }

/* Watch-only Hinweis (P1 in guess-Phase) */
.hg-watch {
  margin: 16px auto;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 12px;
  background: var(--panel2);
  border-radius: 8px;
  max-width: 400px;
}

/* Tabellen-Anpassung kleinere Screens */
@media (max-width: 480px) {
  .hg-letter { min-width: 24px; font-size: 22px; }
  .hg-key { max-width: 38px; }
  .hg-gallows { width: 160px; height: 176px; }
}
