/* Hangman Game Styles */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #1a1a2e;
  color: #e0e0e0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 16px;
}

h1 {
  font-size: 2rem;
  color: #a78bfa;
  margin-bottom: 24px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

#game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 600px;
}

/* Hangman SVG figure */
#hangman-svg {
  width: 200px;
  height: 220px;
  background: #16213e;
  border-radius: 12px;
  padding: 12px;
}

#hangman-svg line,
#hangman-svg circle,
#hangman-svg path {
  stroke: #a78bfa;
  stroke-width: 3;
  stroke-linecap: round;
}

#hangman-svg circle {
  fill: none;
}

/* Word display */
#word-display {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.letter-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.letter-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #a78bfa;
  min-width: 28px;
  text-align: center;
  min-height: 36px;
  line-height: 36px;
}

.letter-underline {
  width: 28px;
  height: 3px;
  background: #4b5563;
  border-radius: 2px;
}

/* Incorrect guesses counter */
#wrong-count {
  font-size: 1rem;
  color: #9ca3af;
}

#wrong-count span {
  color: #f87171;
  font-weight: 700;
}

/* Alphabet buttons */
#alphabet {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 360px;
}

.letter-btn {
  width: 40px;
  height: 40px;
  border: 2px solid #4b5563;
  border-radius: 8px;
  background: #16213e;
  color: #e0e0e0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  text-transform: uppercase;
}

.letter-btn:hover:not(:disabled) {
  background: #7c3aed;
  border-color: #a78bfa;
  transform: scale(1.08);
}

.letter-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.letter-btn.correct {
  background: #065f46;
  border-color: #34d399;
  color: #34d399;
  opacity: 1;
}

.letter-btn.wrong {
  background: #7f1d1d;
  border-color: #f87171;
  color: #f87171;
  opacity: 1;
}

/* Status message */
#message {
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  min-height: 32px;
  color: #fbbf24;
}

#message.win {
  color: #34d399;
}

#message.lose {
  color: #f87171;
}

/* Restart button */
#restart-btn {
  padding: 12px 32px;
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: none;
}

#restart-btn:hover {
  background: #6d28d9;
  transform: scale(1.04);
}

#restart-btn.visible {
  display: block;
}

/* Guessed letters display */
#guessed-letters {
  font-size: 0.9rem;
  color: #6b7280;
  text-align: center;
  min-height: 20px;
}
