/*general style*/
body {
    background: teal;
    margin: 0;
}

h2 span{
    color: navy;
}

.container {
    margin: 2%;
    background: lightblue;
    color: gray;
    padding: 2%;
}

.row,
.game-info {
    display: flex;
}

hr {
    border: 1px solid gray;
}

.game-info .game-name,
.game-info .category,
.hangman-draw,.letters {
    flex: 1;
}

.game-info .category {
    text-align: right;
}

.game-info .category span{
    color: navy;
    font-size: 30px;
}

h2{
    text-align: center;
    align-items: center;
    position: relative;
}

/*draw area*/
.hangman-draw {
    background: teal;
    margin: 1%;
    padding-top: 2%;
}

.hangman-draw .the-draw {
    width: 40px;
    height: 250px;
    border-bottom: 5px solid lightblue;
    position: relative;
    margin-left: 10%;
}

.hangman-draw .stand::before,
.hangman-draw .hang::before,
.hangman-draw .hang::after {
    content: '';
    position: absolute;
    background-color: lightblue;
}

.hangman-draw .stand::before {
    width: 5px;
    height: 100%;
    left: 50%;
    margin-left: -2.5px;
}

.hangman-draw .hang::before {
    height: 5px;
    width: 100px;
    left: 20px;
    top: 10px;
}

.hangman-draw .hang::after {
    width: 5px;
    height: 40px;
    left: 120px;
}

/*man draw*/
.hangman-draw .rope ,
.hangman-draw .man .head,
.hangman-draw .man .body,
.hangman-draw .man .hands::before,
.hangman-draw .man .hands::after,
.hangman-draw .man .legs::before,
.hangman-draw .man .legs::after{
    position: absolute;
}

.hangman-draw .rope{
    width: 70px;
    height: 70px;
    border-radius: 50%;
    left: 85px;
    top: 35px;
    border: 5px dashed cadetblue;
}

.hangman-draw .man .head {
    width: 50px;
    height: 50px;
    left: 100px;
    top: 50px;
    background-image: url("effects/depressed.png");
    background-size: cover;
}

.hangman-draw .man .body{
    width: 50px;
    height: 70px;
    border-radius: 15%;
    left: 96px;
    top: 100px;
    border: 5px solid lightblue;
}

.hangman-draw .man .hands::before,
.hangman-draw .man .hands::after,
.hangman-draw .man .legs::before,
.hangman-draw .man .legs::after{
    content: ' ';
    width: 70px;
    height: 5px;
    background-color: lightblue;
}

.hangman-draw .man .hands::before,
.hangman-draw .man .hands::after{
    top: 150px;
}

.hangman-draw .man .legs::before,
.hangman-draw .man .legs::after{
    top: 200px;
}

.hangman-draw .man .hands::before{
    left: 142px;
}

.hangman-draw .man .hands::after{
    left: 40px;
}

.hangman-draw .man .legs::before{
    left: 121px;
}

.hangman-draw .man .legs::after{
    left: 60px;
}

.hangman-draw .man .hands::before,
.hangman-draw .man .legs::before{
    transform: rotate(50deg);
}

.hangman-draw .man .hands::after,
.hangman-draw .man .legs::after{
    transform: rotate(-50deg);
}

/*letters box & area*/
div .letters {
    margin: 1%;
    background-color: teal;
    color: teal;
}

.letters{
    padding: 1%;
    text-align: center;
    font-size: 30px;

}

.letters .letter-box{
    width: 7%;
    height: 10%;
    display: inline-block;
    background-color: lightblue;
    padding: 0.5%;
    line-height: 70%;
    text-transform: uppercase;
    cursor: pointer;
    margin-bottom: 1%;
    margin-left: 1%;
}

.letters .letter-box.clicked{
    background-color: gray;
    color: darkgray;
}

.no\.letters{
    text-align: center;
    justify-content: center;
    width: 97%;
    margin: .5%;
    padding: 1%;
    font-size: 30px;
    background-color: lightblue;
    color: gray;
}

.no\.letters span{
    font-size: 40px;
    color: navy;
}

.letters-guess{
    background-color: lightblue;
    display: flex;
    justify-content: center;
    min-height: 10%;
    margin-bottom: 5%;
    margin-top: 4%;
}

.letters-guess span{
    color:  navy;
    padding-top: 3%;
    width: 100%;
    height: 4%;
    font: 40px bold;
    margin-right: 1%;
    text-align: center;
    line-height: 17px;
    text-transform: uppercase;
    border-bottom: 3px solid gray;
    transition: 0.5s;
}

.letters-guess span.space{
    border-bottom: none;
}

/*wrong guesses*/
.hangman-draw .stand,
.hangman-draw .hang{
    display: none;
}

.hangman-draw .rope ,
.hangman-draw .man .head,
.hangman-draw .man .body,
.hangman-draw .man .hands,
.hangman-draw .man .legs{
    display: none;
}

.hangman-draw.wrong-1 .stand {
    display: block;
}

.hangman-draw.wrong-2 .hang {
    display: block;
}

.hangman-draw.wrong-3 .rope {
    display: block;
}

.hangman-draw.wrong-7 .man .head {
    display: block;
}

.hangman-draw.wrong-4 .man .body {
    display: block;
}

.hangman-draw.wrong-5 .man .hands {
    display: block;
}

.hangman-draw.wrong-6 .man .legs {
    display: block;
}

/*end of the game*/
.game-state{
    margin-left: 2%;
    margin-top: 1%;
}

button{
    border-radius: 10%;
    border: 2px dashed teal;
    background-color: cadetblue;
    color: navy;
    font-size: 25px;
    padding: 1%;
    width: 20%;
    box-shadow: 0 10px 15px teal;
    margin-left: 40%;
    margin-bottom: 1%;
    cursor: pointer;
}

button:hover{
    color: lightblue;
}

button:active{
    background-color: lightblue ;
    color: cadetblue;
}


/*dark mode*/
body.dark-mode {
    background: #1e1e1e;
    color: #e0e0e0;
}

body.dark-mode .container {
    background: #2e2e2e;
    color: #d3d3d3;
}

body.dark-mode .game-info .category span,
body.dark-mode .no\.letters span,
body.dark-mode .letters-guess span {
    color: chocolate;
}

body.dark-mode .hangman-draw {
    background: #1e1e1e;
}

body.dark-mode .hangman-draw .the-draw {
    border-bottom: 5px solid chocolate;
}

body.dark-mode .hangman-draw .stand::before,
body.dark-mode .hangman-draw .hang::before,
body.dark-mode .hangman-draw .hang::after,
body.dark-mode .hangman-draw .man .body,
body.dark-mode .hangman-draw .man .hands::before,
body.dark-mode .hangman-draw .man .hands::after,
body.dark-mode .hangman-draw .man .legs::before,
body.dark-mode .hangman-draw .man .legs::after {
    background-color: chocolate;
    border-color: chocolate;
}

body.dark-mode .hangman-draw .man .body{
        background-color: transparent;
}

body.dark-mode .hangman-draw .rope {
    border: 5px dashed lightcoral;
}

body.dark-mode .letters {
    background-color: #1e1e1e;
    color: #1e1e1e;
}

body.dark-mode .letters .letter-box {
    background-color: chocolate;
    color: white;
}

body.dark-mode .letters .letter-box.clicked {
    background-color: #696969;
    color: #a9a9a9;
}

body.dark-mode .no\.letters {
    background-color: #2e2e2e;
    color: #d3d3d3;
}

body.dark-mode .letters-guess {
    background-color: #2e2e2e;
}

body.dark-mode .letters-guess span {
    border-bottom: 3px solid #a9a9a9;
}

body.dark-mode button {
    background-color: chocolate;
    color: #f0f8ff;
    border: 2px dashed lightcoral;
    box-shadow: 0 10px 15px chocolate;
}

body.dark-mode button:hover {
    color: #2e2e2e;
    background-color: lightcoral;
}

body.dark-mode button:active {
    background-color: #2e2e2e;
    color: lightcoral;
}

body.dark-mode .hangman-draw .man .head {
    width: 50px;
    height: 50px;
    left: 100px;
    top: 55px;
    background-image: url("effects/emoji.png");
    background-size: cover;
    z-index: 10;
}

body.dark-mode h2 span{
    color: chocolate;
}

#dark-mode-toggle{
    background: transparent;
    border-radius: 0;
    border: none;
    padding: 0;
    width: 0;
    box-shadow: none;
    margin-left: 4%;
    margin-right: 4%;
    margin-bottom: 0;
    top: 0;
    cursor: pointer;
}