/* Hangman CSS */

.hangman-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
}

.hangman-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    width: 100%;
}

/* SVG Drawing Area */
.drawing-area {
    width: 150px;
    height: 180px;
}

.hangman-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.draw-part {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw 0.5s forwards ease-in-out;
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

/* Game Info */
.game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 300px;
}

.hangman-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.category-badge {
    background: var(--accent-purple);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    font-weight: bold;
}

.hint-text {
    color: var(--accent-yellow);
    font-size: 0.9rem;
}

/* Word Display */
.word-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 2rem 0;
}

.letter {
    width: 40px;
    height: 50px;
    border-bottom: 3px solid var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
    text-transform: uppercase;
}

.letter.space {
    border-bottom: none;
    width: 20px;
}

.letter.hidden {
    color: transparent;
}

.letter.missed {
    color: var(--accent-magenta);
    opacity: 0.7;
}

/* Setup Form */
.hangman-setup {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.input-group input {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.8rem;
    border-radius: 6px;
    font-size: 1rem;
}

/* Keyboard */
.keyboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(36px, 1fr));
    gap: 0.5rem;
    width: 100%;
    max-width: 600px;
    margin-top: auto;
}

.key {
    aspect-ratio: 1;
    border: none;
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 0 var(--border-color);
}

.key:hover:not([disabled]) {
    transform: translateY(-2px);
    background: var(--accent-purple);
}

.key:active:not([disabled]) {
    transform: translateY(0);
}

.key.correct {
    background: #10b981;
    /* Green */
    color: white;
    border-color: #059669;
}

.key.wrong {
    background: var(--bg-secondary);
    color: var(--text-muted);
    opacity: 0.5;
    text-decoration: line-through;
}

/* Modal */
.game-over-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--accent-purple);
    width: 80%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 100;
}

.final-word {
    font-size: 1.5rem;
    color: var(--accent-yellow);
    letter-spacing: 2px;
    margin: 1rem 0;
}