html, body {
    margin: 0;
    padding: 0;
    font-family: 'Libre Baskerville', serif;
    color: #e9e9e9;
    background-color: #000;
    letter-spacing: 1.5px;
    overflow-x: hidden;
    overflow-y: auto;
    touch-action: manipulation;
}

#page-content {
    height: 100%;
}

#navbar {
    display: flex;
    width: 100%;
    justify-content: center;
    border-bottom: 1px #3a3a3c solid;
}

#share-container {
    display: flex;
    position: fixed;
    width: 100%;
    justify-content: center;
    z-index: 10;
    top: 4.5rem;
    opacity: 0%;
}

#share-modal {
    border-radius: 8px;
    font-size: .75rem;
    color: black;
    background-color: white;
    border-color: black;
    padding: 8px;
    box-shadow: 0 4px 23px 0 rgba(0,0,0,.2);
}

#title-name {
    text-align: center;
}

#textboard {
    display: flex;
    flex-direction: column;
    height: fit-content;
    margin-top: 2.5%;
    margin-bottom: 2.5%;
    gap: 5px;
}

.text-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.text-row div {
    height: 62px;
    width: 62px;
    border: 2px solid #3a3a3c;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25em;
}

@keyframes stretch-big {
    0% {
        transform: scale(100%);
    }
    100% {
        transform: scale(115%);
    }
}

@keyframes stretch-small {
    0% {
        transform: scale(115%);
    }
    100% {
        transform: scale(100%);
    }
}

@keyframes shake {
    0% {
        transform: translateX(-2px);
    }
    20% {
        transform: translateX(4px);
    }
    40% {
        transform: translateX(-4px);
    }
    60% {
        transform: translateX(4px);
    }
    80% {
        transform: translateX(-4px);
    }
    100% {
        transform: translateX(2px);
    }
}

.tile-green {
    background-color: #538d4e !important;
    border-color: #538d4e !important;
}

.tile-gray {
    background-color: #3a3a3c !important;
    border-color: #3a3a3c !important;
}

.tile-yellow {
    background-color: #b59f3b !important;
    border-color: #b59f3b !important;
}

#keyboard {
    display: flex;
    flex-direction: column;
    height: fit-content;
    gap: .4em;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: .4em;
}

.keyboard-row button {
    border-radius: 5px;
    display: flex;
    text-align: center;
    justify-content: center;
    align-items: center;
    font-size: 1.25em;
    color: inherit;
    background-color: gray;
    font: inherit;
    font-weight: bold;
    height: 58px;
    width: 43px;
    border: 1px solid gray;
}

.keyboard-row button:focus {
    outline: none;
}

#k-enter, #k-backspace {
    width: 66px;
    font-size: .75em;
}

#dialogBox {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    padding: 0;
    border: none;
    justify-content: center;
    align-items: center;
    z-index: 2;
    color: inherit;
    background-color: transparent;
}

#popup {
    position: relative;
    border-radius: 8px;
    border: 1px solid #1a1a1b;
    background-color: #121213;
    color: white;
    box-shadow: 0 4px 23px 0 rgba(0,0,0,.2);
    width: 90%;
    max-height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
    max-width: 520px;
    animation: slidein 0.8s ease-in-out;
}

#resultButtons {
    width: 100%;
    display: flex;
}

#play-again {
    border-right: 1px #3a3a3c solid !important;
}

#play-again, #share {
    font: inherit;
    color: white;
    background-color: #121213 !important;
    border: none;
    padding-top: 20px;
    padding-bottom: 20px;
    border-top: 1px #3a3a3c solid !important;
    width: calc(100%/2)
}

#play-again:hover, #share:hover {
    background-color:#1a1a1b !important; 
}

@keyframes slidein {
    0% {
      top: -1900px;
    }
    100% {
      top: 0px;
    }
}

@keyframes fade-in-out {
    0% {
        opacity: 0%;
    }
    10% {
        opacity: 100%;
    }
    75% {
        opacity: 100%;
    }
    100% {
        opacity: 0%;
    }
}

#info-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: auto;
}

#word-answer {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: bold;
}

#word-part-of-speech {
    text-align: center;
    margin-bottom: 10px;
    font-style: italic;
}

#word-answer-definition {
    text-align: center;
    margin-bottom: 20px;
    margin-left: 12px;
    margin-right: 12px;
}

.spin-animation {
    transform: rotateX(180deg);
    transition: transform 1s;
    transform: rotate(360deg);
}


@media (max-width: 512px) {
    html, body {
        -webkit-text-size-adjust: none;
        zoom: .88;
    }
    #textboard {
        gap: 0.5em;
    }
    .text-row {
        gap: 0.5em;
    }
    .text-row div {
        height: 70px;
        width: 70px;
    }
    #keyboard {
        gap: .3em;
        margin-top: 10%;
    }
    .keyboard-row {
        gap: .3em;
    }
    .keyboard-row button {
        letter-spacing: 0px;
        width: 30.8px;
    }
    #k-enter, #k-backspace {
        width: 60px;
        font-size: .65em;
    }
}

@media (max-height: 900px) {
    body,html {
        overflow-y: auto;
    }
}