:root {
    --size: 62px;
    --font-size: 44px;
}

html {
    -ms-touch-action: manipulation;
    touch-action: manipulation;
}

#game-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#game {
    display: grid;
    grid-template-columns: repeat(5, calc(var(--size) + 8px));
    grid-template-rows: repeat(6, calc(var(--size) + 8px));
}

.square {
    border: 1px solid var(--border);
    width: var(--size);
    height: var(--size);
    font-size: var(--font-size);
    text-transform: uppercase;
}

.square.selected {
    border: 1px solid var(--text-colour);
}

.square.hint0 {
    background: var(--border);
}

.square.hint1 {
    background: #c5b902;
    border: none;
}

.square.hint2 {
    background: #479d1a;
    border: none;
}

/* confetti */
canvas {
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1000;
}

#message-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100vw;
    height: 20vh;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

#message {
    padding: 20px;
    background-color: var(--border-lighter);
    color: var(--text-colour);
    position: absolute;
    right: 20px;
    border-radius: 10px;
    z-index: 1000;
}

#keyboard {
    display: inline-block;
    width: 100vw;
}

.key {
    border-radius: 8px;
    font-size: calc(var(--font-size) * 0.6);
    text-transform: uppercase;
    width: calc(var(--size) * 1);
    height: calc(var(--size) * 1);
    padding: 0;
    margin: 2px 0;
    border: none;
    background: var(--border-light);
}

.key.hint0 {
    background: var(--bg);
}

.key.hint1 {
    background: #c5b902;
}

.key.hint2 {
    background: #479d1a;
}

.key > svg {
    fill: var(--text-colour);
    width: calc(var(--font-size) * 0.5);
    height: calc(var(--font-size) * 0.5);
}

@media (max-width: 800px) {
    :root {
        --size: 50px;
        --font-size: 40px;
    }

    #keyboard {
        display: inline-block;
        width: 100vw;
    }
    .key {
        border-radius: 8px;
        font-size: calc(var(--font-size) * 0.6);
        text-transform: uppercase;
        width: calc(var(--size) * 0.55);
        height: calc(var(--size) * 1.25);
        padding: 0;
        margin: 2px 0;
        border: none;
        background: var(--border-light);
    }

    .key.hint0 {
        background: var(--bg);
    }

    .key.hint1 {
        background: #c5b902;
    }

    .key.hint2 {
        background: #479d1a;
    }

    .key > svg {
        fill: var(--text-colour);
        width: calc(var(--font-size) * 0.5);
        height: calc(var(--font-size) * 0.5);
    }
}

@media (min-width: 1500px) {
    :root {
        --size: 80px;
        --font-size: 56px;
    }
}

#stats-popup-container {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    border: none;
    visibility: hidden;
    display: none;
}

#container.show {
    visibility: visible;
    display: block;
}

#stats {
    position: relative;
    margin: 0 auto;
    top: 25%;
    padding: 20px;
    background-color: var(--border-lighter);
    color: var(--text-colour);
    right: 20px;
    border-radius: 10px;
    z-index: 1000;
}

#share-button {
    padding-top: 2rem;
}