/* games-hangman.css — themed hangman with SVG gallows + chunky letter
 * keyboard. The gallows parts fade in one-by-one as lives are spent.
 */
.hm-stage { max-width: 720px; margin: 0 auto; padding: 22px; }

.hm-meta {
  display: flex; gap: 14px; align-items: center;
  font-family: 'Bangers', cursive;
  font-size: 1.2em;
  letter-spacing: 0.04em;
}
.hm-lives  { color: var(--gm-accent-1); }
.hm-streak { color: var(--gm-accent-2); }
.hm-meta strong { padding: 0 4px; }

.hm-gallows-wrap {
  display: grid;
  place-items: center;
  margin: 8px auto 18px;
}
.hm-gallows {
  width: clamp(180px, 36vw, 280px);
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45));
}
.hm-stroke {
  stroke: var(--gm-text);
  stroke-width: 5;
  stroke-linecap: round;
  fill: none;
}
.hm-part {
  opacity: 0;
  stroke: var(--gm-error);
  filter: drop-shadow(0 0 6px rgba(255, 85, 119, 0.7));
  transition: opacity 0.32s ease;
}
.hm-part.is-shown { opacity: 1; }

.hm-word {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 auto 24px;
  font-family: 'Bangers', cursive;
  font-size: clamp(28px, 6vw, 44px);
  letter-spacing: 0.06em;
}
.hm-letter {
  min-width: 1.3em;
  padding: 6px 8px;
  border-bottom: 3px solid var(--gm-accent-1);
  text-align: center;
  color: var(--gm-text);
}
.hm-letter.is-blank { color: transparent; }
.hm-letter.is-space { border: 0; min-width: 0.5em; }
.hm-letter.is-punct { border: 0; color: var(--gm-muted); }

.hm-keyboard {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
  max-width: 600px;
  margin: 0 auto;
}
.hm-key {
  background: var(--gm-bg-alt);
  border: 2px solid var(--gm-border);
  border-radius: 8px;
  color: var(--gm-text);
  font-family: 'Bangers', cursive;
  font-size: clamp(16px, 3vw, 22px);
  letter-spacing: 0.04em;
  aspect-ratio: 1;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.hm-key:hover:not([disabled]) {
  transform: translateY(-2px);
  border-color: var(--gm-accent-1);
}
.hm-key.is-hit  {
  background: rgba(107, 255, 142, 0.25);
  border-color: var(--gm-success);
  color: var(--gm-success);
}
.hm-key.is-miss {
  background: rgba(255, 85, 119, 0.15);
  border-color: var(--gm-error);
  color: var(--gm-error);
  opacity: 0.6;
}
.hm-key:disabled { cursor: not-allowed; }

.hm-banner {
  margin-top: 18px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(107, 247, 255, 0.18), rgba(255, 121, 242, 0.18));
  border: 1px solid var(--gm-border);
  border-radius: 14px;
  text-align: center;
  font-family: 'Bangers', cursive;
  font-size: 1.6em;
  letter-spacing: 0.05em;
}
.hm-banner[data-result="win"]  { color: var(--gm-success); }
.hm-banner[data-result="lose"] { color: var(--gm-error); }
.hm-banner small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.55em;
  font-weight: 600;
  color: var(--gm-muted);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

@media (max-width: 540px) {
  .hm-keyboard { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
