@import url('https://fonts.googleapis.com/css2?family=Antic+Didone&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Macondo&display=swap');

body {
    background-color: #4E3D42;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

h1 {
    color: #E3DBDB;
    font-family: "Macondo", serif;
    font-size: 42px;
    margin: 5px;
    letter-spacing: 1rem;
}

.container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4em;
    width: 80%;
    height: auto;
    min-height: 600px;
    background-color: #FFFFFF;
    margin: 20px auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: #231b1d 0px 19px 38px, #251d1f 0px 15px 12px;
}

.gallows-container {
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 400px;
    max-height: 500px;
}

.game-container {
    font-family: "Antic Didone", serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-weight: 400;
}

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

.word .letter{
    font-family: "Macondo", serif;
    color: #251d1f;
    width: 34px;
    font-size: 2.4rem;
    text-align: center;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
}

p {
    font-size: 1.2rem;
    margin: 10px;
    text-align: center;
}

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

button {
    background-color: #C9D5B5;
    color: #4E3D42;
    font-family: "Macondo", serif;
    font-weight: 600;
    width: 60px;
    height: 60px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 1s, box-shadow 1s;
    box-shadow: #9F9F92 0px 0px 0px 2px, #9F9F92 0px 4px 6px -1px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset;
}

button:hover {
    background-color: #9F9F92;
    box-shadow: none;
}

button:disabled {
    background-color: #9F9F92;
    box-shadow: none;
    cursor: default;
}

.modal-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #4e3d42ec;
    z-index: 1000;
}

.modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed;
    background-color: white;
    font-family: "Macondo", serif;
    top: 50%;
    left: 50%;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    transform: translate(-50%, -50%);
  }

  .results {
    font-size: 2rem;
    color: #4e3d42;
    font-weight: 600;
  }

  img {
    width: 25%;
    margin-bottom: 50px;
  }

  .reset-btn {
    font-size: 1.2rem;
    width: 30%;
    margin-top: 40px;
    transition: color 1s;
  }

  .reset-btn:hover {
    color: #f6fde9;
    box-shadow: #9F9F92 0px 0px 0px 2px, #9F9F92 0px 4px 6px -1px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset;
  }


@media screen and (max-width: 768px) {
    h1 {
        font-size: 30px;
    }

    .container {
        width: 90%;
        gap: 1em;
        margin: 15px auto;
    }

    .game-container {
        width: 90%;
    }

    .word {
        gap: 4px;
    }
    
    .word .letter {
        width: 18px;
        font-size: 1.8rem;
        margin-bottom: 5px;
    }

    button {
        width: 50px;
        height: 50px;
    }

    .game-container p {
        font-size: 1rem;
    }

    .reset-btn {
        width: 40%;
    }
}

@media screen and (max-width: 480px) {
    h1 {
        font-size: 24px;
    }

    .container {
        flex-direction: column;
        align-items: center;
        height: auto;
        padding: 5px;
        width: 94%;
        gap: 0.2em;
        margin: 8px auto;
    }

    .gallows-container {
        max-width: 100%;
        height: 450px;
    }

    p {
        font-size: 1rem;
    }

    button {
        width: 45px;
        height: 45px;
    }

    .keyboard {
        margin: 8px 0;
    }
}