#UIContainer,
#loadingContainer {
    font-family: arial;
    background-image: url(../assets/images/uis/menuBG.png);
    background-size: cover;
    overflow: hidden;
    color: #79cdef;
}

#layer1 {
    background-repeat: repeat;
}

#UIContainer div,
#UIContainer td {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#UIContainer .button {
    position: absolute;
    display: inline-block;
    padding: 0.1em 1em;
    font-size: 1em;
    color: #fff;
    letter-spacing: 0.04em;
    text-align: center;
    text-shadow: 0.1em 0.1em 0.3em rgba(0, 0, 0, 0.5);
    cursor: pointer;

    background: #8fd4f4;
    background: -webkit-linear-gradient(#8fd4f4 49%, #8fd4f4 1%, #71c9f1 50%);
    background: -o-linear-gradient(#8fd4f4 49%, #8fd4f4 1%, #71c9f1 50%);
    background: -moz-linear-gradient(#8fd4f4 49%, #8fd4f4 1%, #71c9f1 50%);
    background: linear-gradient(#8fd4f4 49%, #8fd4f4 1%, #71c9f1 50%);
}

#UIContainer .button:hover {
    background: #ff8737;
    background: -webkit-linear-gradient(#ff8737 49%, #ff8737 1%, #ff6600 50%);
    background: -o-linear-gradient(#ff8737 49%, #ff8737 1%, #ff6600 50%);
    background: -moz-linear-gradient(#ff8737 49%, #ff8737 1%, #ff6600 50%);
    background: linear-gradient(#ff8737 49%, #ff8737 1%, #ff6600 50%);
}

#UIContainer .button.big {
    font-size: 2.5em;
    padding: 0.2em 0em;
    font-weight: bold;
    line-height: 1.05;
}

#UIContainer .menuBox .button {
    width: 100%;
    position: relative;
}

#UIContainer .menuBox {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.5);
    top: 40%;
    height: 56%;
    width: 36%;
    left: 32%;
    color: #fff;
    text-align: center;
}

#UIContainer .menuTitle {
    text-align: center;
    padding-top: 0.1em;
    font-size: 1.6em;
    font-weight: bold;
}

#UIContainer .menuHistoryContainer {
    z-index: 101;
    display: inline-block;
    padding-top: 0.8em;
    padding-bottom: 0.5em;
}

#UIContainer .menuHistoryContainer table {
    text-align: center;
    color: #fff;
}

#UIContainer .menuHistoryContainer td {
    width: 50%;
    white-space: nowrap;
}

#UIContainer .menuBox .resetHistory {
    color: #00cccc;
    cursor: pointer;
}

#UIContainer .menuBox .resetHistory:hover {
    color: #ff6600
}

#UIContainer #levelContainer {
    position: absolute;
}

#UIContainer #levelUpCVS {
    float: left;
}

#UIContainer .smallPanel {
    position: absolute;
    float: left;
    font-size: 1.5em;
    border-radius: 0.15em;
    border: solid 1px #000;
    box-shadow: 0.1em 0.1em 0.2em rgba(0, 0, 0, 0.7);
    white-space: nowrap;
}

#UIContainer .smallPanel .smallPanelI {
    display: block;
    border-radius: 0.15em;
    border: solid 0.33em #2fd0fc;
    color: #034f66;
    background-color: #2fd0fc;
}

#UIContainer .smallPanel .smallPanelI div {
    border-radius: 0.15em;
    background-color: #fff;
    padding: 0.2em;
}

#UIContainer .smallPanel .smallPanelI div span {
    display: inline-block;
    border-radius: 0.1em;
    background-color: #d5f7ff;
    border: solid 1px #9aedf1;
    margin-left: 0.66em;
    width: 3em;
    text-align: center;
    color: #6e6761;
}

#UIContainer .smallPanel.blink .smallPanelI div {
    animation-name: scoreBlink;
    animation-duration: 0.2s;
    animation-iteration-count: 4;
    animation-timing-function: linear;
    animation-direction: alternate;
}

#UIContainer .smallPanel.blink .smallPanelI div span {
    animation-name: scoreBlink2;
    animation-duration: 0.2s;
    animation-iteration-count: 4;
    animation-timing-function: linear;
    animation-direction: alternate;
}

#UIContainer #spaceBarTutorial {
    position: absolute;
    padding: 0.5em;
    background-color: rgba(0, 0, 0, 0.6);
    font-weight: bold;
    font-size: 1.5em;
    color: white;
}

@keyframes scoreBlink {
    from {
        background-color: #fff;
    }

    to {
        background-color: #f00;
    }
}

@keyframes scoreBlink2 {
    from {
        background-color: #d5f7ff;
        border: solid 1px #9aedf1;
    }

    to {
        background-color: #f00;
        border: solid 1px #600;
    }
}

#UIContainer #livesContainer {
    text-align: center;
    height: 1.7em;
    width: 7em;
}

#UIContainer #livesContainer img {
    height: 1.3em;
    padding-left: 0.3em;
    padding-top: 0;
}

#UIContainer #typingContainer {
    text-align: center;
    height: 1.6em;
    width: 4.5em;
    font-family: Arial, "Assistant", "Segoe UI", sans-serif;
    font-weight: bold;
    color: #6e6761;
    padding-top: 0;
}

#UIContainer #questionContainer {
    text-align: center;
    height: 1.6em;
    width: 9em;
    font-family: Arial, "Assistant", "Segoe UI", sans-serif;
    font-weight: bold;
    color: #034f66;
    padding-top: 0;
}

#UIContainer .hintPanel .smallPanelI {
    overflow: visible;
}

#UIContainer #hint {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.6em;
    width: 7em;
    padding-top: 0;
}

#UIContainer #hint .hintLights {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.18em;
    width: 100%;
    height: 100%;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

#UIContainer #hint .hintLights.hidden {
    opacity: 0;
    pointer-events: none;
}

#UIContainer #hint .hintLight {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    height: 1.35em;
    width: 1.35em;
    padding: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#UIContainer #hint .hintLight img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

#UIContainer #hint .hintLight:hover {
    transform: scale(1.08);
}

#UIContainer #hint .hintLight.used {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.4);
}

#UIContainer #hint .hintAnswer {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    width: auto;
    font-family: "Comic Sans MS", cursive, sans-serif;
    font-weight: bold;
    color: #6e6761;
    background: transparent;
    border: 0;
    margin-left: 0;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s;
}

#UIContainer #hint .hintAnswer.show {
    opacity: 1;
}

#UIContainer #typingContainer b {
    color: #0006f6;
    text-decoration: underline;
}

#UIContainer #topBar div {
    position: absolute;
    top: 0.3em;
}

#UIContainer #topBar #startPause {
    position: relative;
    top: 0.1em;
    background-repeat: no-repeat;
    background-size: auto 100%;
    cursor: pointer;
    height: 1.3em;
    width: 2em;
}

#UIContainer #topBar #muteButton {
    position: relative;
    top: 0.1em;
    background-repeat: no-repeat;
    background-size: auto 100%;
    cursor: pointer;
    height: 1.3em;
    width: 2em;
}

#UIContainer h1 {
    color: #fdffcb;
    font-size: 3em;
    margin: 0px;
    padding: 0px;
    margin-top: 0.3em;
}

#UIContainer h2 {
    color: #fff;
    margin: 0px;
    padding: 0px;
}

#UIContainer .historyNameBox {
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0em 0em 0.4em rgba(0, 0, 0, 0.5);
    padding: 1em;
    color: #fff;
    font-weight: bold;
    margin-top: 0.8em;
}

#UIContainer .historyNameBox input {
    background-color: #fff;
    border: none;
    color: #000;
    width: 10em;
    font-size: 1em;
    font-weight: normal;
    display: block;
    margin-top: 0.3em;
    text-align: center;
}


@-ms-keyframes spin {
    from {
        -ms-transform: rotate(0deg);
    }

    to {
        -ms-transform: rotate(360deg);
    }
}

@-moz-keyframes spin {
    from {
        -moz-transform: rotate(0deg);
    }

    to {
        -moz-transform: rotate(360deg);
    }
}

@-webkit-keyframes spin {
    from {
        -webkit-transform: rotate(0deg);
    }

    to {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.levels {
    margin: 0.6em auto 0;
    padding: 0;
    list-style: none;
    width: 28em;
    max-width: 90%;

}

label.roww {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    column-gap: 1em;
    width: 100%;
    align-items: center;
    padding: 5px 8px;
    border-radius: 18px;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

label.roww:hover {
    background-color: rgba(255, 255, 210, 0.12);
}

.text {

    /* <-- pushes the mark to the same right edge */
    font: 900 2em/1.1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    letter-spacing: .2px;
    min-width: 0;
    text-align: left;
}

html[dir="rtl"] .text,
body[dir="rtl"] .text,
#UIContainer[dir="rtl"] .text {
    text-align: right;
    justify-self: end;
}

.levels.rtl label.roww {
    direction: ltr;
    grid-template-columns: 38px minmax(0, 1fr);
    column-gap: 0.7em;
}

.levels.rtl label.roww .mark {
    grid-column: 1;
}

.levels.rtl label.roww .text {
    grid-column: 2;
    justify-self: end;
    text-align: right;
    direction: rtl;
}

.levels.rtl {
    width: 22em;
}

html[dir="rtl"] label.roww,
body[dir="rtl"] label.roww,
#UIContainer[dir="rtl"] label.roww {
    direction: rtl;
    grid-template-columns: 38px minmax(0, 1fr);
}

html[dir="rtl"] label.roww .mark,
body[dir="rtl"] label.roww .mark,
#UIContainer[dir="rtl"] label.roww .mark {
    grid-column: 1;
}

html[dir="rtl"] label.roww .text,
body[dir="rtl"] label.roww .text,
#UIContainer[dir="rtl"] label.roww .text {
    grid-column: 2;
}

.levels.rtl {
    width: 18em;
}

.levels.rtl li {
    margin: 0.35em 0;
}

.levels.rtl label.roww {
    display: flex !important;
    direction: ltr !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.7em;
    width: 100%;
}

.levels.rtl label.roww .mark {
    order: 1;
    flex: 0 0 38px;
}

.levels.rtl label.roww .text {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    direction: rtl;
    text-align: right;
    justify-self: auto;
}

.mark {
    width: 38px;
    height: 38px;
    position: relative;
    flex: 0 0 38px;
    border-radius: 50%;
    background: rgba(255, 255, 236, 0.16);
    border: 3px solid rgba(255, 255, 236, 0.72);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.18);
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

@media (max-width: 768px) {
    #UIContainer .menuBox {
        top: calc(28% - 20px);
        left: 12%;
        width: 76%;
        height: 75%;
        min-height: 17em;
        padding: 0 0 0;
        box-sizing: border-box;
        background-color: rgba(0, 0, 0, 0.62);
    }

    #UIContainer .menuBox .button.big {
        font-size: 3em;
        width: 100%;
        margin: 0 0 0.1em;
        box-sizing: border-box;
    }

    #UIContainer .menuBox h1 {
        font-size: 2em !important;
        margin-top: 0.32em !important;
        margin-bottom: 0.3em !important;
    }

    #UIContainer .menuBox .levels {
        width: 100%;
        max-width: 100%;
        margin-top: 0.25em;
        padding: 0 1em;
        box-sizing: border-box;
    }

    #UIContainer .menuBox .levels li {
        margin: 0.28em 0;
    }

    #UIContainer .menuBox label.roww,
    #UIContainer .menuBox .levels.rtl label.roww {
        grid-template-columns: minmax(0, 1fr) 34px;
        gap: 0.45em;
        padding: 0.2em 0.25em;
    }

    #UIContainer .menuBox .text,
    #UIContainer .menuBox .levels.rtl label.roww .text {
        font-size: 1.9em;
        line-height: 1.12;
        white-space: normal;
    }

    #UIContainer .menuBox .mark,
    #UIContainer .menuBox .levels.rtl label.roww .mark {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    #UIContainer #questionContainer {
        width: 6.9em;
        height: 1.7em;
        font-size: 1.34em;
        line-height: 1.25;
    }

    #UIContainer #typingContainer {
        width: 3.1em;
        height: 1.7em;
        font-size: 1.28em;
        line-height: 1.25;
    }

    #UIContainer #hint {
        width: 4.3em;
        height: 1.7em;
    }

    #UIContainer .questionPanel {
        left: 32% !important;
    }

    #UIContainer .answerPanel {
        left: 62.8% !important;
    }

    #UIContainer .hintPanel {
        left: 80.6% !important;
    }

    #UIContainer .questionPanel,
    #UIContainer .answerPanel,
    #UIContainer .hintPanel {
        height: 2.35em;
        box-sizing: border-box;
    }

    #UIContainer .questionPanel .smallPanelI,
    #UIContainer .answerPanel .smallPanelI,
    #UIContainer .hintPanel .smallPanelI {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        box-sizing: border-box;
    }

    #UIContainer .questionPanel .smallPanelI>div,
    #UIContainer .answerPanel .smallPanelI>div,
    #UIContainer .hintPanel .smallPanelI>div {
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    #UIContainer #repeatBtn {
        width: 3em !important;
        height: 3em !important;
        left: 24% !important;
        top: 60% !important;
    }

    #UIContainer #hint .hintLights {
        gap: 0.08em;
    }

    #UIContainer #hint .hintLight {
        width: 1.05em;
        height: 1.05em;
    }

    #UIContainer .smallPanel .smallPanelI div {
        padding: 0.16em;
    }

    #UIContainer #topBar div {
        font-size: 1.08em;
    }

    #UIContainer #gOverBox {
        top: 2%;
        z-index: 130;
    }

    #UIContainer #gOverBox h1 {
        font-size: 2.2em;
        margin-top: 0;
    }

    #UIContainer #gOverBox h2 {
        font-size: 2.4em;
        line-height: 1.05;
    }

    #UIContainer .historyNameBox {
        position: relative;
        z-index: 135;
        margin-top: 0.3em;
        padding: 0.45em 0.8em;
    }

    #UIContainer .historyNameBox input {
        height: 1.45em;
        font-size: 1.05em;
        margin-top: 0.15em;
    }

    #UIContainer .gameOverMenu {
        top: 42%;
        left: 12%;
        width: 76%;
        height: 48%;
        min-height: 0;
        z-index: 120;
        padding: 0;
    }

    #UIContainer .gameOverMenu .button.big {
        font-size: 2.4em;
        margin-bottom: 0.05em;
    }

    #UIContainer .gameOverMenu .menuTitle {
        font-size: 1.4em;
        padding-top: 0;
    }

    #UIContainer .gameOverMenu .menuHistoryContainer {
        padding-top: 0.15em;
        padding-bottom: 0.15em;
    }

    #UIContainer .gameOverMenu .resetHistory {
        font-size: 0.95em;
    }
}

@media (orientation: landscape) {
    #UIContainer .menuBox {
        top: 42%;
        left: 20%;
        width: 58%;
        height: 55%;
        min-height: 0;
        padding: 0;
        box-sizing: border-box;
        background-color: rgba(0, 0, 0, 0.62);
    }

    #UIContainer .menuBox .button.big {
        width: 100%;
        margin: 0 0 0.08em;
        box-sizing: border-box;
        font-size: 2.45em;
        line-height: 1.05;
    }

    #UIContainer .menuBox h1 {
        font-size: 1.55em !important;
        margin-top: 0.22em !important;
        margin-bottom: 0.15em !important;
        line-height: 1.1 !important;
    }

    #UIContainer .menuBox .levels {
        width: 100%;
        max-width: 100%;
        margin-top: 0.05em;
        padding: 0 2.2em;
        box-sizing: border-box;
    }

    #UIContainer .menuBox .levels li {
        margin: 0.08em 0;
    }

    #UIContainer .menuBox label.roww,
    #UIContainer .menuBox .levels.rtl label.roww {
        grid-template-columns: minmax(0, 1fr) 30px;
        gap: 0.8em;
        padding: 0.12em 0.2em;
    }

    #UIContainer .menuBox .text,
    #UIContainer .menuBox .levels.rtl label.roww .text {
        font-size: 1.55em;
        line-height: 1.05;
        white-space: normal;
    }

    #UIContainer .menuBox .mark,
    #UIContainer .menuBox .levels.rtl label.roww .mark {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    #UIContainer #questionContainer {
        width: 7.1em;
        height: 1.7em;
        font-size: 1.28em;
        line-height: 1.25;
    }

    #UIContainer #typingContainer {
        width: 3.2em;
        height: 1.7em;
        font-size: 1.22em;
        line-height: 1.25;
    }

    #UIContainer #hint {
        width: 4.9em;
        height: 1.7em;
    }

    #UIContainer .questionPanel {
        left: 30.5% !important;
    }

    #UIContainer .answerPanel {
        left: 63% !important;
    }

    #UIContainer .hintPanel {
        left: 80% !important;
    }

    #UIContainer .questionPanel,
    #UIContainer .answerPanel,
    #UIContainer .hintPanel {
        height: 2.25em;
        box-sizing: border-box;
    }

    #UIContainer .questionPanel .smallPanelI,
    #UIContainer .answerPanel .smallPanelI,
    #UIContainer .hintPanel .smallPanelI {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        box-sizing: border-box;
    }

    #UIContainer .questionPanel .smallPanelI>div,
    #UIContainer .answerPanel .smallPanelI>div,
    #UIContainer .hintPanel .smallPanelI>div {
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    #UIContainer #repeatBtn {
        width: 2.9em !important;
        height: 2.9em !important;
        left: 24% !important;
        top: 60% !important;
    }

    #UIContainer #hint .hintLights {
        gap: 0.08em;
    }

    #UIContainer #hint .hintLight {
        width: 1.05em;
        height: 1.05em;
    }
}

.mark::before,
.mark::after {
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 18px !important;
    height: 4px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 999px !important;
    background: #f2f46c !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28) !important;
    transform: translate(-50%, -50%) rotate(45deg) !important;
}

.mark::after {
    transform: translate(-50%, -50%) rotate(-45deg) !important;
}

.radio:checked+.text+.mark {
    background: rgba(242, 244, 108, 0.22);
    border-color: #f8f4c8;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.16), 0 0 14px rgba(242, 244, 108, 0.35);
}

.radio:checked+.text+.mark::before {
    left: 42% !important;
    top: 58% !important;
    width: 12px !important;
    transform: translate(-50%, -50%) rotate(45deg) !important;
}

.radio:checked+.text+.mark::after {
    left: 58% !important;
    top: 48% !important;
    width: 20px !important;
    transform: translate(-50%, -50%) rotate(-52deg) !important;
}

.radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mark {
    width: 38px;
    height: 38px;
    position: relative;
    flex: 0 0 38px;
    border-radius: 50%;
    background: rgba(255, 255, 236, 0.16);
    border: 3px solid rgba(255, 255, 236, 0.72);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.18);
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

/* Default icon is ✖, checked becomes ✓ */
.mark::before {
    padding: 0.1em;
    margin: 0.2em;
    background-color: #00151e;
    color: #b7cb00;
    content: "✖";
}

.radio:checked+.text+.mark::before {
    content: "✔";
}