/* GAME-SPECIFIC STYLES: hangman.css */
.game-wrapper {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    width: 100%;
    max-width: 800px;
    margin: 20px auto; /* Centers the card horizontally */
}
.game-wrapper h1 { margin: 0; color: var(--primary-color); }

.hangman-game-container { display: flex; align-items: center; gap: 40px; width: 100%; justify-content: center; flex-wrap: wrap; }
.figure-container { stroke: var(--text-color); stroke-width: 4px; stroke-linecap: round; fill: none; }
.figure-part { display: none; }
.hangman-wrong-guesses-container { font-size: 1.2rem; font-weight: bold; text-align: center; }

.word-display { display: flex; gap: 10px; font-size: 2.5rem; font-weight: bold; text-transform: uppercase; margin-top: 20px; flex-wrap: wrap; justify-content: center; }
.letter { width: 40px; height: 60px; border-bottom: 4px solid var(--info-color); display: inline-flex; justify-content: center; align-items: center; }
.game-hint { color: #666; margin-top: -10px; font-style: italic; text-align: center; }

.keyboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(45px, 1fr)); gap: 8px; width: 100%; max-width: 600px; margin-top: 20px; }
.key { font-family: var(--body-font); font-size: 1.5rem; font-weight: bold; padding: 10px; border-radius: 8px; border: none; background-color: #e9ecef; color: var(--text-color); cursor: pointer; transition: background-color 0.2s, transform 0.1s; }
.key:hover:not(:disabled) { background-color: #ced4da; }
.key:active:not(:disabled) { transform: scale(0.95); }
.key:disabled { background-color: #6c757d; color: white; cursor: not-allowed; opacity: 0.7; }

.popup-container { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.7); display: flex; justify-content: center; align-items: center; z-index: 1001; }
.popup { background: white; padding: 30px; border-radius: 15px; text-align: center; box-shadow: 0 5px 25px rgba(0,0,0,0.3); width: 90%; max-width: 400px; }
.popup h2 { font-size: 2rem; margin-bottom: 10px; }
#correct-word-display { font-size: 1.2rem; color: var(--info-color); margin-bottom: 20px; font-weight: bold; }
#play-again-btn { font-family: var(--body-font); font-size: 1rem; padding: 12px 25px; border-radius: 8px; border: none; background-color: var(--success-color); color: white; cursor: pointer; font-weight: bold; transition: background-color 0.2s; }
#play-again-btn:hover { background-color: #217a6f; }
.hide { display: none; }

@media (max-width: 768px) {
    .hangman-game-container { flex-direction: column; align-items: center; gap: 20px; }
    .word-display { font-size: 1.8rem; gap: 8px; }
    .letter { width: 30px; height: 45px; }
    .keyboard { grid-template-columns: repeat(auto-fit, minmax(35px, 1fr)); gap: 5px; }
    .key { font-size: 1.1rem; padding: 8px; }
}