body {
    background-color: #1E1E1E;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    margin: 0 auto;
    color: #D4C9B9;
    /* make the text in the body unselectable */
    user-select: none;
}

#root {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #1E1E1E;
    align-items: center;
    margin: 0 auto;
}

#gameBoard {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #1E1E1E;
    align-items: center;
    margin: 0 auto;
    width: 380px;
}

.inputRows {
    display: flex;
    flex-direction: row;
    justify-content: center;
    background-color: #1E1E1E;
}

.inputFields {
    width: 54px;
    height: 54px;
    border: solid rgb(104, 104, 104) 2px;
    margin: 3px;
    text-align: center;
    line-height: 54px;
    font-size: 38px;
    font-weight: 550;
    color: #fff;
}

#keyboardContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 15px 0 0 0;
}

.keyboardRows {
    display: flex;
    flex-direction: row;
}

#titleBarIcons {
    width: 100px;
    height: auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.keyCaps {
    background-color: #1E1E1E;
    margin: 3px;
    width: 60px;
    text-align: center;
    line-height: 58px;
    font-size: 25px;
    font-weight: 600;
    border-radius: 41% 7% 52% 8% / 7% 48% 9% 56%;
    color: #D4C9B9;
    border: 4px outset #424242;
}

.keyCaps:hover {
    cursor: pointer;
}

#Enter {
    width: 100px;
}

#titleBar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 310px;
    height: 40px;
    margin: 40px 0 0 0;

}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes winLoseAnimation {
    0% {
        transform: scale(0.8) translateY(50px);
        opacity: 0;
    }

    50% {
        transform: scale(1.05) translateY(0);
        opacity: 1;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes shakeAndFade {
    0% {
        transform: translateX(0);
        opacity: 0.25;
    }

    25% {
        transform: translateX(-5px);
        opacity: 0.5;
    }

    50% {
        transform: translateX(5px);
        opacity: 0.75;
    }

    75% {
        transform: translateX(-5px);
        opacity: 1;
    }

    100% {
        transform: translateX(0);
    }
}

.popup.animate {
    animation: pulse 0.2s ease forwards;
}

.inputFields.animate {
    animation: pulse 0.2s ease;
}

#errorMessage.animate {
    animation: shakeAndFade 0.2s ease-out;
}

#winMessage.animate {
    animation: winLoseAnimation 0.8s ease-out;
}

#loseMessage.animate {
    animation: winLoseAnimation 0.8s ease-out;
}

a {
    color: inherit;
    text-decoration: none;
}

.popup-content a {
    color: rgb(255, 230, 139);
}

.popup {
    display: none;
    position: fixed;
    z-index: 1;
    padding: 0 10px 0 10px;
    overflow: auto;
    background-color: rgba(28, 28, 28, 1);
    border-radius: 10px;
}

.popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    margin: 0;
    font-size: 14px;
}

.popup-content h2 {
    font-size: 28px;
    margin: 10px 0 10px 0;
}

.popup-content p {
    font-size: 18px;
    margin: 0px 0 10px 0;
    padding: 0 8px 0 8px;
}

#helpPopup img {
    margin: 0;
}

.example {
    width: 310px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.example p {
    width: 300px;
    padding: 0;
}

#helpPopup {
    /* for some reason this works when you want to center a fixed div */
    width: 450px;
    height: 540px;
    top: 48%;
    left: 50%;
    margin-top: -270px;
    /* negative half of height. */
    margin-left: -250px;
    /* negative half of width. (not really)*/
}

#aboutPopup {
    width: 550px;
    height: 240px;
    top: 38%;
    left: 50%;
    margin-top: -120px;
    /* negative half of height. */
    margin-left: -290px;
    /* negative half of width. (not really)*/
}

.btn {
    cursor: pointer;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover {
    text-decoration: none;
    cursor: pointer;
}

.button {
    background-color: #fff;
    width: 100px;
    height: 40px;
    color: #000000;
    font-size: 22px;
    border: none;
    border-radius: 8px;
    border-radius: 41% 7% 52% 8% / 7% 48% 9% 56%;
}

.button:hover {
    background-color: #dadada;
    cursor: pointer;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.107);
    display: none;
    /* keeping overlay hidden by default */
    z-index: 0;
}

#errorMessage {
    display: none;
    position: fixed;
    top: 2%;
    left: 50%;
    width: 280px;
    height: 20px;
    margin-left: -160px;

    background-color: #F6CECE;
    color: #d83f3d;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#winMessage {
    display: none;
    position: fixed;
    top: 25%;
    left: 50%;
    width: 380px;
    height: 190px;
    margin-left: -183px;
    z-index: 1;
    padding: 0 6px 0 6px;
    overflow: auto;
    background-color: #1E1E1E;
    border-radius: 10px;
    color: white;

    border-radius: 10% 70% 10% 9% / 34% 10% 52% 22%;
    border: 4px solid #ffffff;
}

#winMessage h1 {
    font-size: 30px;
}

#winMessage p {
    font-size: 22px;
    font-weight: bold;
    margin-top: 15px;
}

#playAgainBtn {
    width: 150px;
}

#winMessageBottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 310px;
    height: 40px;
    margin: 15px 0 0 0;
}

#winMessageBottom img {
    cursor: pointer;
}

#winMessageTop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 310px;
    height: 40px;
    margin: 20px 0 0 0;
}

#loseMessage {
    display: none;
    position: fixed;
    top: 25%;
    left: 50%;
    width: 380px;
    height: 220px;
    margin-left: -183px;
    z-index: 1;
    padding: 0 6px 0 6px;
    overflow: auto;
    background-color: #1E1E1E;
    border-radius: 10px;
    color: white;

    border-radius: 10% 70% 10% 9% / 34% 10% 52% 22%;
    border: 4px solid #ffffff;
}

#loseMessage h1 {
    font-size: 30px;
}

#loseMessage p {
    font-size: 22px;
    font-weight: bold;
    margin-top: 15px;
    text-align: center;
}

#tryAgainBtn {
    width: 150px;
}

#loseMessageBottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 310px;
    height: 40px;
    margin: 15px 0 0 0;
}

#loseMessageBottom img {
    cursor: pointer;
}

#loseMessageTop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 310px;
    height: 40px;
    margin: 20px 0 0 0;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltipText {
    visibility: hidden;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 8px;
    border-radius: 5px;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    font-size: 0.875rem;
}

.tooltip .tooltipText::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltipText {
    visibility: visible;
    opacity: 1;
}

.copyright {
    color: #fff;
    text-align: center;
    font-size: 14px;
}

.copyright p {
    margin-bottom: 0px;
}