/* === Hangman Styles === */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-5);
    min-height: calc(100vh - var(--nav-height));
    padding-top: calc(var(--nav-height) + var(--space-8));
}

.game-header {
    text-align: center;
}

.difficulty-selector {
    display: flex;
    justify-content: center;
}

.difficulty-buttons {
    display: flex;
    gap: var(--space-2);
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    padding: 4px;
}

.difficulty-btn {
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    font-family: var(--font-body);
}

.difficulty-btn:hover {
    color: var(--text-primary);
}

.difficulty-btn--active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.hangman-layout {
    display: flex;
    gap: var(--space-8);
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

#hangman-canvas {
    background: linear-gradient(145deg, rgba(15, 12, 35, 0.95), rgba(8, 6, 20, 0.95));
    border: 2px solid rgba(168, 85, 247, 0.2);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.08);
}

.word-display {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    justify-content: center;
}

.word-letter {
    width: 40px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    font-weight: var(--weight-black);
    font-family: var(--font-mono);
    text-transform: uppercase;
    border-bottom: 3px solid rgba(99, 102, 241, 0.4);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.word-letter--revealed {
    color: var(--success);
    text-shadow: 0 0 10px rgba(52, 211, 153, 0.4);
    border-color: var(--success);
    animation: letterReveal 0.3s ease-out;
}

.word-letter--wrong {
    color: var(--error);
    border-color: var(--error);
}

@keyframes letterReveal {
    0% {
        transform: scale(1.3)
    }

    100% {
        transform: scale(1)
    }
}

.hint-area {
    font-size: var(--text-sm);
    color: var(--accent-cyan);
    min-height: 1.5rem;
}

.message {
    min-height: 2rem;
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    text-align: center;
}

.keyboard {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    max-width: 420px;
}

.key-btn {
    width: 38px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    font-family: var(--font-body);
    text-transform: uppercase;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(145deg, rgba(30, 28, 55, 0.9), rgba(18, 16, 38, 0.9));
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.key-btn:hover:not(:disabled) {
    background: linear-gradient(145deg, rgba(45, 42, 80, 0.9), rgba(28, 25, 55, 0.9));
    border-color: rgba(99, 102, 241, 0.3);
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.1);
}

.key-btn:disabled {
    opacity: 0.2;
    cursor: default;
}

.key-btn--correct {
    background: linear-gradient(145deg, #538d4e, #3d6b39);
    color: white;
    border-color: rgba(83, 141, 78, 0.5);
    box-shadow: 0 0 8px rgba(83, 141, 78, 0.2);
}

.key-btn--wrong {
    background: rgba(248, 113, 113, 0.15);
    color: var(--error);
    border-color: rgba(248, 113, 113, 0.2);
}

.game-actions {
    display: flex;
    gap: var(--space-3);
}

.stats-bar {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

@media (max-width:600px) {
    .hangman-layout {
        flex-direction: column;
    }

    #hangman-canvas {
        width: 160px;
        height: 200px;
    }

    .word-letter {
        width: 30px;
        height: 40px;
        font-size: var(--text-lg);
    }

    .key-btn {
        width: 32px;
        height: 36px;
        font-size: var(--text-xs);
    }
}