/* Hangman Game Styles */
.hangman-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease-in-out;
}

.hangman-header {
    text-align: center;
    margin-bottom: 20px;
}

.hangman-title {
    font-size: 28px;
    color: #e91e63;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.hangman-subtitle {
    font-size: 16px;
    color: #9e9e9e;
    margin: 0;
}

.hangman-game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.hangman-canvas-container {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

#hangman-canvas {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f5f5f5;
}

.hangman-stats {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 500px;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
}

.hangman-score {
    color: #4caf50;
}

.hangman-wrong-guesses {
    color: #f44336;
}

.hangman-hint-container {
    width: 100%;
    max-width: 500px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    text-align: center;
    font-style: italic;
    color: #1565c0;
}

.hangman-word-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.hangman-word-container .letter {
    width: 35px;
    height: 50px;
    border-bottom: 3px solid #3f51b5;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #3f51b5;
    margin: 0 2px;
    transition: all 0.3s ease;
}

.hangman-keyboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));
    gap: 8px;
    max-width: 500px;
    margin-bottom: 20px;
}

.hangman-keyboard .key {
    padding: 12px 8px;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.hangman-keyboard .key:hover:not(:disabled) {
    background: #e0e0e0;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.hangman-keyboard .key:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hangman-keyboard .key:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.hangman-keyboard .key.correct {
    background: #4caf50;
    color: white;
}

.hangman-keyboard .key.incorrect {
    background: #f44336;
    color: white;
}

.hangman-keyboard .key.pressed {
    transform: scale(0.95);
}

.hangman-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
}

.hangman-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hangman-btn-primary {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
}

.hangman-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4);
}

.hangman-btn-primary:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

.hangman-btn-secondary {
    background: #6c757d;
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.hangman-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

/* Hangman Modal Styles */
.hangman-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.hangman-modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.hangman-modal-title {
    font-size: 28px;
    color: #e91e63;
    margin-bottom: 15px;
    font-weight: 700;
}

.hangman-modal-message {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.5;
}

.hangman-final-score {
    font-size: 24px;
    font-weight: 700;
    color: #4caf50;
    margin-top: 10px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hangman-container {
        padding: 20px;
        margin: 10px;
    }
    
    .hangman-title {
        font-size: 24px;
    }
    
    #hangman-canvas {
        width: 280px;
        height: 300px;
    }
    
    .hangman-stats {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .hangman-keyboard {
        grid-template-columns: repeat(7, 1fr);
        gap: 6px;
    }
    
    .hangman-keyboard .key {
        padding: 10px 6px;
        font-size: 14px;
    }
    
    .hangman-word-container .letter {
        width: 30px;
        height: 45px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    #hangman-canvas {
        width: 240px;
        height: 260px;
    }
    
    .hangman-keyboard {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .hangman-controls {
        flex-direction: column;
        width: 100%;
        max-width: 200px;
    }
    
    .hangman-btn {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
    }
}

/* Hide class */
.hidden {
    display: none;
}