/* Hangman-specific styles - Vertical Layout */

.game-container {
    display: flex;
    flex-direction: column;
    max-width: 1400px;
    gap: 15px;
}

.hangman-card {
    max-width: 900px;
    margin: 0 auto;
}

.game-container .stats-card {
    max-width: 900px;
    margin: 0 auto;
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-top: 12px;
    padding: 10px;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 10px;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.info-label {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

.info-value {
    font-size: 1.3em;
    color: #0ea5e9;
    font-weight: 700;
}

/* Hangman Drawing */
.hangman-drawing {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 0;
    margin: 10px 0;
}

.hangman-drawing svg {
    width: 160px;
    height: 200px;
}

.hangman-part {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Word Display */
.word-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 15px 10px;
    margin: 10px 0;
}

.word-letter {
    width: 35px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8em;
    font-weight: 700;
    color: #333;
    border-bottom: 3px solid #0ea5e9;
    transition: all 0.3s ease;
}

.word-letter.revealed {
    color: #0ea5e9;
    animation: letterReveal 0.3s ease;
}

.word-letter.missed {
    color: #e74c3c;
}

@keyframes letterReveal {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Guessed Letters Display */
.guessed-letters-container {
    margin: 10px auto;
    padding: 10px;
    max-width: 650px;
    text-align: center;
}

.guessed-letters-title {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 10px;
    font-weight: 600;
}

.guessed-letters-display {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    min-height: 30px;
}

.guessed-letter {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.2s ease;
}

.guessed-letter.correct {
    background: rgba(39, 174, 96, 0.2);
    color: #27ae60;
    border: 2px solid #27ae60;
}

.guessed-letter.wrong {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 2px solid #e74c3c;
}

/* Hangman Keyboard */
.hangman-keyboard {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 10px;
    max-width: 650px;
    margin: 0 auto;
}

.letter-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #0ea5e9;
    background: white;
    color: #0ea5e9;
    font-size: 1em;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.letter-btn:hover:not(:disabled) {
    background: #0ea5e9;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.letter-btn:active:not(:disabled) {
    transform: translateY(0);
}

.letter-btn.correct {
    background: #27ae60;
    border-color: #27ae60;
    color: white;
    cursor: not-allowed;
}

.letter-btn.wrong {
    background: #e74c3c;
    border-color: #e74c3c;
    color: white;
    cursor: not-allowed;
}

.letter-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hangman-drawing svg {
        width: 150px;
        height: 180px;
    }
    
    .hangman-drawing {
        padding: 15px 0;
        margin: 10px 0;
    }
    
    .word-letter {
        width: 30px;
        height: 40px;
        font-size: 1.5em;
        gap: 8px;
    }
    
    .word-display {
        gap: 6px;
        padding: 15px 10px;
        margin: 10px 0;
    }
    
    .letter-btn {
        width: 38px;
        height: 38px;
        font-size: 0.95em;
    }
    
    .hangman-keyboard {
        gap: 6px;
        padding: 12px 8px;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
        margin-top: 10px;
    }
    
    .info-item {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }

    .info-label {
        font-size: 0.85em;
    }

    .info-value {
        font-size: 1.1em;
    }

    .game-header h2 {
        font-size: 1.4em;
    }

    .game-instructions {
        font-size: 0.9em;
        line-height: 1.4;
    }

    .guessed-letters-container {
        margin: 10px auto;
        padding: 10px;
    }

    .guessed-letters-title {
        font-size: 1em;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .hangman-drawing svg {
        width: 130px;
        height: 160px;
    }

    .hangman-drawing {
        padding: 10px 0;
        margin: 8px 0;
    }

    .word-letter {
        width: 23px;
        height: 32px;
        font-size: 1.1em;
    }
    
    .word-display {
        gap: 4px;
        padding: 12px 5px;
        margin: 8px 0;
    }
    
    .letter-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8em;
    }
    
    .hangman-keyboard {
        gap: 4px;
        padding: 10px 5px;
    }

    .game-info {
        gap: 8px;
        padding: 8px;
        margin-top: 10px;
    }

    .info-label {
        font-size: 0.8em;
    }

    .info-value {
        font-size: 1em;
    }

    .game-header h2 {
        font-size: 1.3em;
    }

    .game-instructions {
        font-size: 0.85em;
        line-height: 1.3;
    }

    .guessed-letters-container {
        margin: 8px auto;
        padding: 8px;
    }

    .guessed-letters-title {
        font-size: 0.95em;
        margin-bottom: 6px;
    }
}

/* Dark Mode Adjustments */
.dark-mode .guessed-letters-title {
    color: #b0b0b0;
}

.dark-mode .guessed-letter.correct {
    background: rgba(39, 174, 96, 0.3);
    color: #2ecc71;
}

.dark-mode .guessed-letter.wrong {
    background: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.dark-mode .word-letter {
    color: #e0e0e0;
    border-bottom-color: #9b9bff;
}

.dark-mode .word-letter.revealed {
    color: #9b9bff;
}

.dark-mode .letter-btn {
    background: #2d2d2d;
    border-color: #9b9bff;
    color: #9b9bff;
}

.dark-mode .letter-btn:hover:not(:disabled) {
    background: #9b9bff;
    color: #1a1a1a;
}

.dark-mode .info-label {
    color: #b0b0b0;
}

.dark-mode .info-value {
    color: #9b9bff;
}

/* High Contrast Mode */
.high-contrast .guessed-letters-title {
    color: #000;
    font-weight: 900;
}

.high-contrast .guessed-letter.correct {
    background: rgba(0, 160, 0, 0.3);
    border-width: 3px;
    font-weight: 900;
}

.high-contrast .guessed-letter.wrong {
    background: rgba(192, 0, 0, 0.3);
    border-width: 3px;
    font-weight: 900;
}

.high-contrast .word-letter {
    border-bottom-width: 4px;
    border-bottom-color: #000;
}

.high-contrast .word-letter.revealed {
    color: #000;
    font-weight: 900;
}

.high-contrast .letter-btn {
    border-width: 3px;
    font-weight: 900;
}

.high-contrast .letter-btn.correct {
    background: #00a000;
}

.high-contrast .letter-btn.wrong {
    background: #c00000;
}

/* Animation Disable */
.no-animations .word-letter.revealed {
    animation: none;
}

.no-animations .letter-btn,
.no-animations .hangman-part {
    transition: none;
}
