.hangman-wrapper {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.hangman-wrapper.hangman-dark-mode {
    background: #1a1a1a !important;
    color: #fff !important;
}

.hangman-wrapper.hangman-dark-mode .hangman-gallows line,
.hangman-wrapper.hangman-dark-mode .hangman-gallows circle {
    stroke: #fff !important;
}

.hangman-difficulty-selector {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: inline-block;
    position: relative;
}

.hangman-wrapper.hangman-dark-mode .hangman-difficulty-selector {
    background: rgba(0, 0, 0, 0.7) !important;
    border-color: #666 !important;
}

.hangman-wrapper.hangman-dark-mode .hangman-difficulty-select {
    background: #2a2a2a !important;
    color: #fff !important;
    border-color: #666 !important;
}

.hangman-info-icon {
    transition: transform 0.2s ease;
}

.hangman-info-icon:hover {
    transform: scale(1.2);
}

.hangman-tooltip {
    pointer-events: none;
}

.hangman-wrapper.hangman-dark-mode .hangman-tooltip {
    background: #1a1a1a !important;
    border: 1px solid #666 !important;
}

.hangman-gallows {
    display: block;
    margin: 0 auto 20px;
}

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

.hangman-word {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 20px 0;
    font-size: 32px;
    font-weight: bold;
    flex-wrap: wrap;
}

.hangman-letter {
    min-width: 30px;
    text-align: center;
    color: #333 !important;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
    display: inline-block;
    break-inside: avoid;
}

.hangman-space {
    display: inline-block;
    width: 20px;
}

.hangman-dark-mode .hangman-letter {
    color: #fff;
}

.hangman-blank {
    color: #999;
}

.hangman-dark-mode .hangman-blank {
    color: #666;
}

.hangman-keyboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin: 20px 0;
}

.hangman-key {
    width: 40px;
    height: 40px;
    font-size: 18px;
    font-weight: bold;
    border: 2px solid #333;
    background: #fff;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.hangman-dark-mode .hangman-key {
    border-color: #fff;
    background: #2a2a2a;
    color: #fff;
}

.hangman-key:hover:not(:disabled) {
    background: #e0e0e0;
    transform: scale(1.1);
}

.hangman-dark-mode .hangman-key:hover:not(:disabled) {
    background: #3a3a3a;
}

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

.hangman-key-correct {
    background: #10b981 !important;
    color: #fff !important;
    border-color: #10b981 !important;
}

.hangman-key-wrong {
    background: #ef4444 !important;
    color: #fff !important;
    border-color: #ef4444 !important;
}

.hangman-status {
    text-align: center;
    margin-top: 20px;
}

.hangman-wrong-count {
    font-size: 18px;
    color: #666;
}

.hangman-dark-mode .hangman-wrong-count {
    color: #ccc;
}

.hangman-message {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 10px;
}

.hangman-win {
    background: #d1fae5;
    color: #065f46;
}

.hangman-dark-mode .hangman-win {
    background: #064e3b;
    color: #d1fae5;
}

.hangman-lose {
    background: #fee2e2;
    color: #991b1b;
}

.hangman-dark-mode .hangman-lose {
    background: #7f1d1d;
    color: #fee2e2;
}

.hangman-new-game {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.hangman-new-game:hover {
    background: #2563eb;
}

/* Mobile Optimization */
@media (max-width: 480px) {
    .hangman-wrapper {
        padding: 10px;
        margin: 5px;
        max-width: 100%;
        overflow-x: hidden;
    }

    .hangman-gallows {
        width: 150px;
        height: 187px;
    }

    .hangman-word {
        /* Dynamische Schriftgröße durch JavaScript, nicht überschreiben */
        gap: 3px;
        margin: 10px 0;
        overflow-x: hidden;
    }

    .hangman-letter {
        min-width: 18px;
    }

    .hangman-key {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .hangman-message {
        font-size: 16px;
    }
}

    .hangman-key {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .hangman-message {
        font-size: 18px;
    }
}
