/* Hang Man — Ritter-Systems.de (dev-test 23.09.2026) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center !important;
    min-height: 100vh;
    padding: 20px;
}

.app-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 480px;
    margin: auto;
    text-align: center;
}

h1 {
    color: #333;
    margin-bottom: 12px;
    font-size: 1.8em;
}

main {
    margin-bottom: 20px;
}

#intro-text {
    color: #666;
    margin-bottom: 8px;
    font-size: 1em;
}

/* ---- Galgen (SVG, 10 Striche in harness-Reihenfolge) ---- */
#gallows {
    width: 190px;
    height: 210px;
    margin: 0 auto;
    display: block;
}

.stroke {
    stroke: #333;
    stroke-width: 5;
    stroke-linecap: round;
    fill: none;
    opacity: 0;
    transition: opacity .35s ease;
}

.stroke.shown {
    opacity: 1;
}

@keyframes hm-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: .12; }
}

#gallows.hanged {
    animation: hm-blink .45s ease-in-out 6;
}

/* ---- Wort: Buchstabe oberhalb des Strichs ---- */
#word-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 14px 0 6px;
    min-height: 40px;
}

.slot {
    width: 26px;
    height: 34px;
    border-bottom: 3px solid #333;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    font-size: 1.4em;
    font-weight: 700;
}

.slot .glyph {
    visibility: hidden;
    line-height: 1.1;
}

.slot.revealed .glyph {
    visibility: visible;
}

/* ---- Fehlversuche ---- */
#wrong-line {
    color: #b00020;
    min-height: 1.6em;
    margin-bottom: 4px;
}

#wrong-letters {
    font-weight: 700;
    letter-spacing: 3px;
}

/* ---- Tastatur ---- */
#choose-label {
    font-size: .95em;
    color: #555;
    margin-bottom: 8px;
}

#keyboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    max-width: 420px;
    margin: 0 auto 12px;
}

#keyboard button {
    width: 34px;
    height: 40px;
    font-size: 1.05em;
    font-weight: 600;
    border: 1px solid #bbb;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
}

#keyboard button:hover:not(:disabled) {
    background: #e8f0fe;
    border-color: #4285f4;
}

#keyboard button:disabled {
    cursor: default;
    opacity: .45;
}

#keyboard button.correct {
    background: #d3f2d9;
    border-color: #2e9e44;
    color: #1b6e2c;
    opacity: 1;
}

#keyboard button.wrong {
    background: #fdecea;
    border-color: #d95043;
    color: #a33535;
}

/* ---- Ende: Wahl Neues Spiel / Hauptmenue ---- */
#end-area {
    margin-top: 10px;
}

#msg-win {
    color: #2e7d32;
    font-weight: 700;
}

#msg-lose {
    color: #b3261e;
    font-weight: 700;
}

#msg-word {
    margin: 6px 0 10px;
}

#end-word {
    font-weight: 700;
    letter-spacing: 2px;
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    margin: 4px 6px;
    font-size: 1em;
    border: none;
    border-radius: 6px;
    background-color: #1a73e8;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #1558b0;
}

.hidden {
    display: none;
}