@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Inter:wght@400;600&display=swap');

:root {
    --theme-primary: #f24c4c;
    --theme-secondary: #ff7a7a;
    --theme-light: #e5e5e5;
    --theme-dark: #888;
    --theme-bg: #fff;
    --theme-fonts: 'Inter', arial, sans-serif;
    --text-light: #fff;
    --text-dark: #333;
    --text-medium-dark: #666;
    --correct-color: #508aa7;
    --incorrect-color: #f44336;
}

html {
    height: 100%;
    font-size: 16px;
}

body {
    display: flex;
    flex-direction: column;
    background: var(--theme-bg);
    color: var(--text-dark);
    margin: 0;
    text-align: center;
    font-family: var(--theme-fonts);
    height: 100%;
    user-select: none;
}

#score-bar {
    position: relative;
    display: flex;
    flex-direction: row;
    flex: none;
    justify-content: space-between;
    padding: 0 4%;
    height: 58px;
    background: #fff;
    font-size: 1.15rem;
    font-weight: 600;
    border-bottom: 2px solid var(--theme-light);
    z-index: 2;
}

#score-bar-left, #score-bar-right {
    display: flex;
    flex-direction: row;
}

.button {
    flex: none;
    margin: 8px auto 8px auto;
    padding: 0 12px;
    height: 42px;
    width: fit-content;
    background: var(--theme-dark);
    font-size: 1.15rem;
    font-weight: 600;
    font-family: var(--theme-fonts);
    color: #fff;
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px 0 #aaa;
}

.button > i {
    padding: 7px 0;
    font-size: 1.67rem;
}

.button > span {
    vertical-align: super;
    padding-left: 6px;
}

.button:hover {
    background: var(--theme-primary);
    cursor: pointer;
    transition: .2s ease;
}

#pvp-button {
    margin-left: 12px;
}

.score-container {
    padding: 10px 18px;
    margin: 8px 0;
    white-space: nowrap;
}

#content {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
}

#content-top, #content-bottom {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

#info-container {
    align-self: center;
    flex-direction: column;
    display: flex;
    width: 500px;
    margin-top: 2rem;
}

#banner {
    display: flex;
    flex-direction: column;
    height: 6.5rem;
    width: 100%;
    margin: 1rem;
    background: var(--theme-light);
    border-radius: 8px;
    align-self: center;
    justify-content: center;
}

#banner-text-container {
    padding: 1rem;
    width: calc(100% - 2rem);
    font-size: 1.666rem;
    font-weight: 500;
    color: var(--text-medium-dark);
}

#banner b {
    font-weight: 600;
    color: var(--text-dark);
}

#health-row {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
}

#health {
    margin-left: -3px;
    height: 34px;
}

.hearts {
    font-size: 2.25rem;
    color: var(--theme-primary);
    transition: 0.2s ease;
}

.heart-flashing {
    animation-name: "flash";
    animation-duration: .75s;
    animation-iteration-count: infinite;
}

.heart-lost {
    margin: 15px;
    font-size: 0;
    opacity: 0;
    transform: translateY(-15px);
}

#skip-button {
    padding: 4px 8px;
    background: var(--theme-bg);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--theme-fonts);
    color: var(--theme-secondary);
    cursor: pointer;
    border: 2px solid var(--theme-secondary);
    border-radius: 8px;
}

#skip-button:focus {
    outline: none;
}

#skip-button:disabled {
    color: var(--theme-dark);
    border: 2px solid var(--theme-dark);
    cursor: not-allowed;
}

#skip-button > i {
    vertical-align: top;
    font-size: 28px;
}

#info-two-player, #player-one-score, #player-two-score {
    display: none;
}

#player-turn-text {
    display: none;
    font-size: 1.5rem;
    margin: 8px;
}

#input-container {
    display: none;
    flex-direction: column;
    align-self: center;
    justify-content: center;
    margin: 24px;
    z-index: 1;
    height: 100%;
}

#input-container > p {
    text-align: left;
}

#form-container {
    display: flex;
    flex-direction: column;
    padding: 36px 32px;
    background: var(--theme-bg);
    box-shadow: 0 2px 8px 0 #00000060;
    border-radius: 8px;
}

#form-container > p {
    margin-top: 1.5rem;
    margin-bottom: 0;
    text-align: left;
    font-size: 1.15rem;
}

.form {
    height: 42px;
    width: calc(100% - 24px);
    margin: 12px 0;
    background: #f5f5f5;
    padding: 0 12px;
    color: var(--text-medium-dark);
    text-align: left;
    font-size: 1.25rem;
    font-family: var(--theme-fonts);
    border: none;
    border-radius: 8px;
}

.form-title {
    font-size: 1.75rem;
    font-weight: 600;
    text-align: center;
    margin: 1rem;
}

::placeholder {
    font-weight: 400;
    font-family: var(--theme-fonts);
}

#input-word {
    -webkit-text-security: disc;
    -moz-text-security: disc;
}

#form-submit {
    background: var(--theme-primary);
}

#word-container {
    margin: 2rem 0;
    color: var(--text-dark);
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: 8px;
}

#word {
    display: inline-block;
    padding: 0 12px 0 20px;
    border-radius: 10px;
    transition: 0.2s ease
}

.solution-win {
    background: var(--correct-color);
    color: #fff;
}

.solution-loss {
    background: var(--incorrect-color);
    color: #fff;
}

#keyboard-container {
    background: var(--theme-light);
}

#keyboard {
    padding: 12px 8px;
    background: var(--theme-light);
    text-align: center;
    width: calc(100% - 16px);
}

.keyboard-row {
    display: flex;
    max-width: 500px;
    margin: 0 auto 8px;
}

.keyboard-spacer {
    flex: 0.5;
}

.keyboard-btn {
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: center;
    margin: 0 4px;
    height: 3.67rem;
    width: 0;
    background: var(--theme-bg);
    color: var(--text-dark);
    text-align: center;
    font-size: 1.5rem;
    font-family: var(--theme-fonts);
    font-weight: 600;
    border: none;
    border-radius: 4px;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.125);
    text-transform: uppercase;
    cursor: pointer;
    visibility: visible;
}

.keyboard-btn:disabled {
    cursor: default;
}

.keyboard-btn-correct {
    background: var(--correct-color);
    color: #fff;
}

.keyboard-btn-incorrect {
    background: #aaa;
    color: #555;
}

@keyframes flash {
    0% {
        opacity: 100%;
    }
    50% {
        opacity: 25%;
    }
    100% {
        opacity: 100%;
    }
}

@media only screen and (max-width: 556px) {
    .button {
        font-size: 1rem;
    }

    .button > i {
        font-size: 1.5rem;
    }

    #pvp-button > span {
        display: none;
    }

    #score-bar {
        font-size: 1rem;
    }

    #info-container {
        width: 90%;
    }

    #banner {
        height: 6rem;
    }

    #category {
        font-size: 1.25rem;
    }

    .heart {
        font-size: 2rem;
    }

    #word-container {
        font-size: 2.33rem;
    }

    .keyboard-btn {
        font-size: 1rem;
    }
}

@supports (-webkit-overflow-scrolling: touch) {
    input {
        -webkit-appearance: none;
    }
}
