:root {
    --present: #c9b458;
    --absent: #3e3e3e;
    --correct: #6aaa64;
    --unknown: #818384;
    --background: #121212;
    --background-transparent: #12121200;
    --text: #d7dadc;
    --white: #ffffff;
    --slide-offset-1: 68.5px;
    --slide-offset-2: 135.5px;
    --slide-offset-3: 202.5px;
    --slide-offset-4: 269.5px;
    --slide-offset-5: 337.5px;
    --slide-offset-6: 404.5px;

    font-family: 'Clear Sans', 'Helvetica Neue', Arial, sans-serif;
}

.colorblind {
    --correct: #f5793a;
    --present: #85c0f9;
}

html {
    height: 100%;
}

body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-y: hidden;
    background-color: var(--background);
}

hr {
    background-color: var(--unknown);
}

.modal {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0%);
    width: 80%;
    max-width: 390px;
    z-index: 3;
    color: var(--white);
    font-size: 16px;
    max-height: 80%;
    overflow-y: auto;
    padding: 20px;
    margin-top: 32px;
    border: solid 2px var(--absent);
    background-color: var(--background);
}

.modal-close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 12px;
    margin: 0px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: var(--text);
}

.example {
    height: 40px;
    max-width: 200px;
}

header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.title-icon {
    padding: 6px 12px 0px 12px;
    color: var(--text);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
}

.title {
    margin-top: 6px;
    margin-bottom: 0px;
    color: var(--text);
    z-index: 2;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    text-align: center;
}

.label {
    margin-top: 6px;
    margin-bottom: 0px;
    color: var(--text);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    text-align: center;
}

.statistics {
    margin-top: 6px;
    margin-bottom: 6px;
    color: var(--text);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
}

.link {
    color: var(--text);
}

.message {
    color: var(--text);
    margin-top: 0px;
    margin-bottom: 0px;
    text-shadow: 2px 2px 10px #000000;
    background: linear-gradient(180deg, var(--background-transparent), var(--background));
    position: absolute;
    top: -39px;
    height: 39px;
    width: 100vw;
    max-width: 500px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.message-small {
    color: var(--text);
    margin-top: 0px;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    text-align: center;
}

.game {
    width: 100%;
    margin: 0 auto;
    height: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
}

.board-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    overflow: hidden;
}

.board-6 {
    position: absolute;
    display: grid;
    grid-template-rows: repeat(6, 1fr);
    width: 350px;
    height: 420px;
    grid-gap: 5px;
    padding: 10px;
    box-sizing: border-box;
}

.quadruple-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.quadruple-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    grid-gap: 10px;
    display: grid;
    justify-content: center;
    align-items: center;
    padding-bottom: 1rem;
}

.board-9 {
    display: grid;
    grid-template-rows: repeat(9, 1fr);
    width: 100%;
    height: 100%;
    grid-gap: 5px;
    padding: 0px;
    margin: auto;
    box-sizing: border-box;
}

.board-9 .row-5 .tile {
    font-size: 1rem;
    line-height: 1rem;
    height: 2rem;
    width: 2rem;
}

.board-9 .row-6 .tile {
    font-size: 0.8rem;
    line-height: 0.8rem;
    height: 1.6rem;
    width: 1.6rem;
}

.keyboard {
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    margin-left: 12px;
    margin-right: 6px;
    margin-bottom: 6px;
}

.keyboard-row {
    display: flex;
    width: 100%;
    justify-content: center;
    margin-bottom: 6px;
    user-select: none;
    -webkit-user-select: none; /* Prevent selection on iOS */
}

.keyboard-second {
    padding-left: 24px;
}

.spacer {
    flex: 0.4;
}

.keyboard-button {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    height: 50px;

    background-color: var(--unknown);
    border: none;
    border-radius: 6px;
    color: var(--white);

    touch-action: none;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none; /* Prevent selection on iOS */

    font-weight: bold;
    padding: 0.5em 0.5em;
    margin-right: 6px;

    text-transform: uppercase;
}

.keyboard-button-submit {
    flex: 4;
}

.keyboard-button-backspace {
    flex: 1.5;
}

@keyframes slideInAnimation-1 {
    0% {
        transform : translateY(var(--slide-offset-1));
    }
    100% {
        transform : translateY(0px);
     }
}

@keyframes slideOutAnimation-1 {
    0% {
        transform : translateY(var(--slide-offset-1));
        opacity: 1;
    }
    100% {
        transform : translateY(0px);
        opacity: 0;
     }
}

@keyframes slideInAnimation-2 {
    0% {
        transform : translateY(var(--slide-offset-2));
    }
    100% {
        transform : translateY(0px);
     }
}

@keyframes slideOutAnimation-2 {
    0% {
        transform : translateY(var(--slide-offset-2));
        opacity: 1;
    }
    100% {
        transform : translateY(0px);
        opacity: 0;
     }
}

@keyframes slideInAnimation-3 {
    0% {
        transform : translateY(var(--slide-offset-3));
    }
    100% {
        transform : translateY(0px);
     }
}

@keyframes slideOutAnimation-3 {
    0% {
        transform : translateY(var(--slide-offset-3));
        opacity: 1;
    }
    100% {
        transform : translateY(0px);
        opacity: 0;
     }
}

@keyframes slideInAnimation-4 {
    0% {
        transform : translateY(var(--slide-offset-4));
    }
    100% {
        transform : translateY(0px);
     }
}

@keyframes slideOutAnimation-4 {
    0% {
        transform : translateY(var(--slide-offset-4));
        opacity: 1;
    }
    100% {
        transform : translateY(0px);
        opacity: 0;
     }
}

@keyframes slideInAnimation-5 {
    0% {
        transform : translateY(var(--slide-offset-5));
    }
    100% {
        transform : translateY(0px);
     }
}

@keyframes slideOutAnimation-5 {
    0% {
        transform : translateY(var(--slide-offset-5));
        opacity: 1;
    }
    100% {
        transform : translateY(0px);
        opacity: 0;
     }
}

@keyframes slideInAnimation-6 {
    0% {
        transform : translateY(var(--slide-offset-6));
    }
    100% {
        transform : translateY(0px);
     }
}

@keyframes slideOutAnimation-6 {
    0% {
        transform : translateY(var(--slide-offset-6));
        opacity: 1;
    }
    100% {
        transform : translateY(0px);
        opacity: 0;
     }
}

.slide-out {
    position: relative;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
    animation-timing-function: ease;
    animation-duration: 1s;
}
.slide-out-1 {
    top: calc(-1 * var(--slide-offset-1));
    animation-name: slideOutAnimation-1;
}
.slide-out-2 {
    top: calc(-1 * var(--slide-offset-2));
    animation-name: slideOutAnimation-2;
}
.slide-out-3 {
    top: calc(-1 * var(--slide-offset-3));
    animation-name: slideOutAnimation-3;
}
.slide-out-4 {
    top: calc(-1 * var(--slide-offset-4));
    animation-name: slideOutAnimation-4;
}
.slide-out-5 {
    top: calc(-1 * var(--slide-offset-5));
    animation-name: slideOutAnimation-5;
}
.slide-out-6 {
    top: calc(-1 * var(--slide-offset-6));
    animation-name: slideOutAnimation-6;
    animation-duration: 1.2s;
}

.slide-in {
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
    animation-timing-function: ease;
    animation-duration: 1s;
}
.slide-in-1 {
    animation-name: slideInAnimation-1;
}
.slide-in-2 {
    animation-name: slideInAnimation-2;
}
.slide-in-3 {
    animation-name: slideInAnimation-3;
}
.slide-in-4 {
    animation-name: slideInAnimation-4;
}
.slide-in-5 {
    animation-name: slideInAnimation-5;
}
.slide-in-6 {
    animation-name: slideInAnimation-6;
    animation-duration: 1.2s;
}

@media (max-width:375px) {
    .board-container {
        align-items: flex-start;
    }
    .board-6 {
        width: 275px;
        height: 330px;
    }
    .keyboard-button {
        margin-right: 4px;
    }
    :root {
        --slide-offset-1: 52.5px;
        --slide-offset-2: 105.5px;
        --slide-offset-3: 158.5px;
        --slide-offset-4: 211.5px;
        --slide-offset-5: 264.5px;
        --slide-offset-6: 317.5px;
    }
}

@media (max-height:700px) {
    .board-container {
        align-items: flex-start;
    }
}

.row-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 5px;
}

.row-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-gap: 5px;
}

.tile {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    line-height: 2rem;
    font-weight: bold;
    vertical-align: middle;
    box-sizing: border-box;
    background-color: var(--background);
    color: var(--white);
    text-transform: uppercase;
    user-select: none;
    border: 2px solid #3a3a3c;

    user-select: none;
    -webkit-user-select: none; /* Prevent selection on iOS */
}

.present {
    background-color: var(--present);
    border: none;
}

.absent {
    background-color: var(--absent);
    border: none;
}

.correct {
    background-color: var(--correct);
    border: none;
}

.current {
    background-color: var(--unknown);
    border: none;
}

.current.present {
    border: 5px solid var(--present);
}

.current.absent {
    border: 5px solid var(--absent);
}

.current.correct {
    border: 5px solid var(--correct);
}

.select-container {
    margin-top: 8px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
}

.select {
    height: 50px;
    min-width: 80px;
    flex-grow: 1;

    background-color: var(--background);
    border: 2px solid var(--unknown);
    border-radius: 6px;
    color: var(--white);

    cursor: pointer;
    user-select: none;

    font-weight: bold;
    padding: 0.5em 0.5em;
    margin: 3px;

    text-transform: uppercase;
}

.select-active {
    background-color: var(--absent);
    border: 2px solid var(--correct);
}

.new-feature {
    background-color: var(--background);
    border: 2px solid var(--present);
}

.version {
    margin-top: 6px;
    margin-bottom: 0px;
    color: var(--absent);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.2rem;
    text-align: center;
    text-decoration: none;
}
