#hangman-game {
    font-family: Arial, sans-serif;
    max-width: 600px;
    margin: 20px auto;
    text-align: center;
    padding: 20px;
    border: 2px solid #333;
    border-radius: 10px;
    background-color: #f9f9f9;
    position: relative;
}

#mode-select {
    margin-bottom: 15px;
    padding: 5px;
    font-size: 16px;
}

#word-display {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 5px;
    margin-bottom: 15px;
    white-space: pre-wrap;
    word-break: break-word;
    max-width: 100%;
}

#letter-input {
    padding: 5px;
    font-size: 18px;
    text-align: center;
    width: 50px;
}

#guess-button, #next-word-button {
    padding: 8px 15px;
    font-size: 16px;
    margin: 5px;
    cursor: pointer;
    background-color: #0073e6;
    color: white;
    border: none;
    border-radius: 5px;
}

#next-word-button {
    display: none;
    background-color: #28a745;
}

#guess-button:hover {
    background-color: #005bb5;
}

#next-word-button:hover {
    background-color: #218838;
}

#message {
    margin-top: 15px;
    font-size: 18px;
    font-weight: bold;
}

#attempts {
    font-weight: bold;
    color: red;
}

#wrong-letters {
    color: #d9534f;
    font-weight: bold;
}

#correct-words, #incorrect-words {
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
    color: #28a745;
    display: flex;
    justify-content: center;
    gap: 20px;
}

#incorrect-words {
    color: #dc3545;
}

#notification {
    display: none;
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px;
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    border-radius: 5px;
    font-weight: bold;
    z-index: 1000;
}

#keyboard {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    gap: 5px;
    margin-top: 15px;
    justify-content: center;
}

.key-button {
    padding: 10px;
    font-size: 18px;
    cursor: pointer;
    background-color: #0073e6;
    color: white;
    border: none;
    border-radius: 5px;
    text-transform: uppercase;
}

.key-button:hover {
    background-color: #005bb5;
}

.key-button:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

#hangman-container {
    width: 250px;
    height: 300px;
    margin: 20px auto;
    position: relative;
    border: 2px solid black;
    background: linear-gradient(to bottom, #ddd, #bbb);
}

.hangman-part {
    position: absolute;
    display: none;
    background-color: black;
}

#hangman-gallows {
    width: 100px;
    height: 10px;
    top: 10px;
    left: 75px;
    background-color: black;
    display: block;
}

#hangman-rope {
    width: 2px;
    height: 30px;
    top: 20px;
    left: 125px;
    background-color: black;
    display: block;
}

#hangman-head {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    top: 50px;
    left: 110px;
}

#hangman-body {
    width: 10px;
    height: 50px;
    top: 80px;
    left: 120px;
}

#hangman-left-arm, #hangman-right-arm {
    width: 30px;
    height: 5px;
    top: 90px;
}

#hangman-left-arm {
    left: 90px;
}

#hangman-right-arm {
    left: 130px;
}

#hangman-left-leg, #hangman-right-leg {
    width: 30px;
    height: 5px;
    top: 140px;
}

#hangman-left-leg {
    left: 90px;
}

#hangman-right-leg {
    left: 130px;
}

#hangman-left-foot, #hangman-right-foot {
    width: 20px;
    height: 5px;
    top: 160px;
}

#hangman-left-foot {
    left: 85px;
}

#hangman-right-foot {
    left: 135px;
}

#hangman-left-hand, #hangman-right-hand {
    width: 10px;
    height: 10px;
    top: 85px;
    border-radius: 50%;
}

#hangman-left-hand {
    left: 80px;
}

#hangman-right-hand {
    left: 140px;
}