* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    padding: 0 10px;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.header {
    margin-top: 20px;
    text-align: center;
    font-weight: bold;
    font-size: 3rem;
    color: #be5a12;
}

.box {
    display: flex;
    width: 1000px;
    padding: 60px;
    background: #ebebeb;
    border-radius: 10px;
    align-items: flex-end;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.hang-box {
    flex: 1;
    padding: 60px;
    height: 350px;
}

.base {
    width: 220px;
    height: 5px;
    background-color: #000000;
    position: relative;
    margin-top: 260px;
    border-radius: 2px;
}

.stand {
    position: absolute;
    height: 270px;
    width: 5px;
    background-color: #000000;
    margin: -10px 10px;
}

.edge {
    position: absolute;
    width: 165px;
    height: 5px;
    background-color: #000000;
    margin-left: 10px;
    margin-top: -10px;
    display: none;
}

.corner {
    position: absolute;
    width: 5px;
    height: 60px;
    background-color: black;
    transform: rotate(45deg);
    margin-left: 30px;
    margin-top: -16px;
    border-radius: 2px;
    display: none;
}

.rope {
    position: absolute;
    width: 5px;
    height: 50px;
    background-color: black;
    margin-left: 170px;
    margin-top: -10px;
    display: none;
}

.head {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 5px solid black;
    border-radius: 50%;
    background-color: transparent;
    margin-left: 144px;
    margin-top: -225px;
    display: none;
}

.body {
    position: absolute;
    width: 5px;
    height: 80px;
    background-color: black;
    margin-left: 170px;
    margin-top: -168px;
    border-radius: 2px;
    display: none;
}

.right-arm {
    position: absolute;
    width: 5px;
    height: 60px;
    background-color: black;
    transform: rotate(55deg);
    margin-left: 194px;
    margin-top: -194px;
    border-radius: 2px;
    display: none;
}

.left-arm {
    position: absolute;
    width: 5px;
    height: 60px;
    background-color: black;
    transform: rotate(-55deg);
    margin-left: 148px;
    margin-top: -194px;
    border-radius: 2px;
    display: none;
}

.right-leg {
    position: absolute;
    width: 5px;
    height: 60px;
    background-color: black;
    transform: rotate(155deg);
    margin-left: 182px;
    margin-top: -95px;
    border-radius: 2px;
    display: none;
}

.left-leg {
    position: absolute;
    width: 5px;
    height: 60px;
    background-color: black;
    transform: rotate(25deg);
    margin-left: 158px;
    margin-top: -95px;
    border-radius: 2px;
    display: none;
}

.hang-1 .edge {
    display: block;
}

.hang-2 .corner {
    display: block;
}

.hang-3 .rope {
    display: block;
}

.hang-4 .head {
    display: block;
}

.hang-5 .body {
    display: block;
}

.hang-6 .right-arm {
    display: block;
}

.hang-7 .left-arm {
    display: block;
}

.hang-8 .right-leg {
    display: block;
}

.hang-9 .left-leg {
    display: block;
}


.typing {
    display: flex;
    flex-direction: column;
    gap: 80px;
    margin-left: -30px;
}

.word-display {
    gap: 10px;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.word-display .letter {
    width: 30px;
    border-bottom: 4px solid black;
    text-align: center;
    font-size: 30px;
    font-weight: bold;
    color: rgb(149, 71, 15);
    border-radius: 2px;
    height: 40px;
}

.keyboard {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.keyboard .row {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.keyboard .keyboard-letter {
    width: 36px;
    height: 45px;
    justify-content: center;
    align-items: center;
    display: flex;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 25px;
    font-weight: bold;
    border-radius: 4px;
    background: #be5a12;
}

.keyboard .correct {
    background-color: #53331b;
    pointer-events: none;
}

.keyboard .wrong {
    opacity: 0.6;
    pointer-events: none;
}



/* responsive style*/
@media (max-width: 768px) {
    body {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
        width: 95%;
    }

    .header {
        margin-top: 15px;
        font-size: 2rem;
    }

    .box {
        padding: 100px 0;
        display: flex;
        flex-direction: column;
        gap: 60px;
        width: 95%;
        align-items: center;
        margin-bottom: 20px;
    }

    .word-display {
        gap: 4px;
    }

    .word-display .letter {
        font-size: 24px;
        width: 8%;
        height: 35px;
    }

    .keyboard{
        margin-left: 28px;
    }

    .keyboard .keyboard-letter {
        width: 7.5%;
    }

    .hang-box{
        padding: 2px;
    }
}

@media (max-width: 480px) {
    .header {
        font-size: 1.8rem;
    }

    .keyboard .keyboard-letter {
        font-size: 18px;
        padding: 10px;
    }

    .keyboard .row {
        gap: 4px;
    }

    .word-display {
        gap: 2px;
    }

    .word-display .letter {
        font-size: 20px;
        height: 30px;
    }
}