:root {
    --purple-primary: #744FC6;
    --button-primary-color: #229D00;
    --button-primary-accent: #129100;
    --button-secondary-color: #009D94;
    --button-secondary-accent: #009180;
}

@font-face {
    font-family: comicNeue;
    src: url('assets/fonts/ComicNeue-Regular.ttf');
}

@font-face {
    font-family: comicNeue;
    src: url('assets/fonts/ComicNeue-Bold.ttf');
    font-weight: bold;
}

@font-face {
    font-family: comicNeue;
    src: url('assets/fonts/ComicNeue-Italic.ttf');
    font-style: italic;
}

.bold {
    font-weight: bold;
}

button {
    cursor: pointer;
    user-select: none;
    outline: none;
    border: 0px;
    background: none;
}

button.primary {
    color: white;
    background-color: var(--button-primary-color);
    border-radius: 6px;
    box-shadow: inset 0px -6px 0px 0px rgba(18,145,0,1);
}

button.primary:hover {
    box-shadow: none;
}

button.secondary {
    color: white;
    background-color: var(--button-secondary-color);
    border-radius: 6px;
    box-shadow: inset 0px -6px 0px 0px rgba(0,145,128,1);
}

button.secondary:hover {
    box-shadow: none;
}

button.tertiary {
    color: white;
    background-color: var(--amber-600);
    border-radius: 6px;
    box-shadow: inset 0px -6px 0px 0px var(--amber-700);
}

button.tertiary:hover {
    box-shadow: none;
}

button.disabled {
    background-color: rgb(177, 177, 177);
}

button.link {
    background: none;
    border: 0px;
    text-decoration: underline;
    box-shadow: none;
    color: black;
    font-family: comicNeue;
    font-weight: bold;
    font-size: 16px;
}

button.link:hover {
    text-decoration: none;
}

.hidden {
    display: none;
}

.title {
    font-size: 18px;
    font-weight: bold;
}

section {
    display: flex;
    justify-content: center;
}

#game-canvas-wrapper {
    position: relative;
}

#game-canvas-wrapper p {
    line-height: normal;
}

/**
    Debug info
**/

.debug-ui-outer {
    display: flex;
    width: 250px;
}

.debug-ui-inner {
    padding: 10px;
    background-color: rgba(0, 128, 0, 0.356);
    color: white;
    white-space: pre-line;
    user-select: none;
}

/**
    Main Menu elements
**/

.mme-inner {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}

.mme-title-wrapper {
    padding: 0px 10px;
}

.mme-title {
    width: 590px;
    /** height: 108px; **/
}

@media screen and (width < 600px) {
    .mme-title {
        width: 392px;
    }
}

@media screen and (width <= 380px) {
    .mme-title {
        width: 300px;
    }
}

.mme-options-actions-wrapper {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mme-game-mode-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.mme-inner select {
    font-family: comicNeue;
    font-weight: bold;
    font-size: 18px;
    padding: 4px 6px;
    outline: none;
    cursor: pointer;
    max-width: 200px;
}

.mme-start-game {
    font-family: comicNeue;
    font-weight: bold;
    font-size: 24px;
    padding: 10px 0px;
    max-width: 200px;
}

.mme-score-history {
    font-family: comicNeue;
    font-weight: bold;
    font-size: 24px;
    padding: 10px 0px;
    max-width: 200px;
}

.mme-home {
    font-family: comicNeue;
    font-weight: bold;
    font-size: 24px;
    padding: 10px 0px;
    max-width: 200px;
}

/**
    Top Bar
**/

.tb-container {
    width: 100%;
    height: 76px;
}

.tb-inner, .stb-inner {
    display: flex;
    /* background-color: rgb(0, 128, 0, .5); */
    padding: 10px;
    gap: 20px;
    align-items: center;
}

.tb-turns-score-timer-labels-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    user-select: none;
    width: 100%;
}

.tb-turns-wrapper {
    position: relative;
    background: url('assets/turns_div_flat_shadow.png');
    width: 106px;
    height: 42px;
}

.tb-turns {
    position: absolute;
    left: 58px;
    top: 5px;
    color: white;
}

.tb-score-wrapper {
    position: relative;
    background: url('assets/score_div_flat_shadow.png');
    width: 128px;
    height: 44px;
}

.tb-score {
    position: absolute;
    left: 78px;
    top: 7px;
    color: white;
}

.tb-timer-wrapper {
    position: relative;
    background: url('assets/time_div_flat_shadow.png');
    width: 141px;
    height: 55px;
}

.tb-timer {
    position: absolute;
    left: 58px;
    top: 12px;
    color: white;
}

.tb-inner p, .stb-inner p {
    font-family: comicNeue;
    font-size: 24px;
    font-weight: bold;
}

.tb-pause-play-restart-wrapper {
    display: flex;
    margin-left: auto;
}

@media screen and (width < 500px) {
    .tb-container {
        height: 134px;
    }

    .tb-inner {
        flex-direction: column;
    }

    .tb-inner p, .stb-inner p {
        font-size: 20px;
    }

    .tb-pause-play-restart-wrapper {
        width: 100%;
    }

    .tb-turns-wrapper {
        background: url('assets/turns_div_mobile_flat_shadow.png');
        width: 92px;
        height: 37px;
    }

    .tb-score-wrapper {
        background: url('assets/score_div_mobile_flat_shadow.png');
        width: 102px;
        height: 39px;
    }    

    .tb-timer-wrapper {
        background: url('assets/time_div_mobile_flat_shadow.png');
        width: 117px;
        height: 46px;
    }

    .tb-turns {
        left: 54px;
        top: 3px;
    }

    .tb-score {
        left: 64px;
        top: 4px;
    }

    .tb-timer {
        left: 50px;
        top: 7px;
    }
}

@media screen and (width <= 380px) {
    .tb-inner p {
        font-size: 18px;
    }
}

.stb-container {
    width: 100%;
    height: 112px;
}

.stb-inner {
    flex-direction: column;
}

.stb-turns-left-score-buttons-wrapper {
    display: flex;
    width: 100%;
}

.stb-turns-left-score-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.stb-buttons-wrapper {
    margin-left: auto;
}

.stb-meters-wrapper {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 20px;
}

.stb-meter-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.stb-meter-wrapper img {
    width: 24px;
}

.stb-meter-bar-wrapper {
    display: flex;
    gap: 1px;
    width: 60px;
}

.stb-meter-value-bar {
    width: 60px;
    height: 10px;
    background-color: green;
}

.stb-meter-empty-bar {
    border: 1px solid black;
}

@media screen and (width > 500px) {
    .stb-meter-value-bar {
        width: 100px;
    }

    .stb-meter-bar-wrapper {
        width: 100px;
    }
}

/**
    End game panel
**/

.egp-outer {
    padding: 10px;
}

.egp-inner {
    font-family: comicNeue;
    border: 1px solid black;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background-color: white;
}

.egp-game-over {
    font-size: 48px;
    font-weight: bold;
}

.egp-timer {
    font-size: 64px;
    font-weight: bold;
}

.egp-turns-cards-correct-wrapper {
    display: flex;
    gap: 30px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
}

.egp-play-again {
    font-family: comicNeue;
    font-weight: bold;
    font-size: 24px;
    padding: 10px 20px;
}

.egp-save-form {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.egp-save-form input {
    padding: 2px 4px;
    font-size: 16px;
    width: 150px;
}

@media screen and (width <= 500px) {
    .egp-turns-cards-correct-wrapper {
        font-size: 16px;
    }
}

/**
    Score history state
**/

.ssp-container {
    width: 100%;
    height: 100%;
}

.ssp-outer {
    width: 100%;
    height: 100%;
}

.ssp-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
    gap: 20px;
    height: 100%;
}

@media screen and (width < 600px) {
    .ssp-inner {
        padding: 20px;
    }
}

.ssp-title {
    font-weight: bold;
    font-size: 48px;
    font-family: comicNeue;
}

.ssp-back-delete-wrapper {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.ssp-mm-btn {
    background-color: var(--button-secondary-color);
    color: white;
    font-size: 24px;
    font-family: comicNeue;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 6px;
    box-shadow: inset 0px -6px 0px 0px rgba(0,145,128,1);
}

.ssp-mm-btn:hover {
    box-shadow: none;
}

.ssp-delete-btn {
    background-color: rgb(187, 1, 1);
    color: white;
    font-size: 24px;
    font-family: comicNeue;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 6px;
    box-shadow: inset 0px -6px 0px 0px rgb(122, 0, 0);
}

.ssp-delete-btn:hover {
    box-shadow: none;;
}

.ssp-scores-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 500px;
    max-width: 600px;
    width: 600px;
    overflow-y: auto;
    overflow-x: auto;
}

@media screen and (width < 600px) {
    .ssp-scores-list {
        width: 100%;
        max-width: 100%;
    }
}

.ssp-scores-list li {
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 20px;
    align-items: center;
    background-color: white;
    box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.25),0px 1px 3px 0px rgba(0,0,0,0.15);
    border-radius: 6px;
    min-width: 360px;
}

.ssp-scores-list li:last-child {
    margin-bottom: 40px;
}

.ssp-delete-row {
    display: flex;
    width: 100%;
}

.ssp-delete-single-btn {
    margin-left: auto;
    color: rgb(187, 1, 1);
    font-family: comicNeue;
    font-size: 16px;
}

.ssp-delete-single-btn:hover {
    text-decoration: underline;
}

.ssp-score-item-wrapper {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

@media screen and (width < 600px) {
    .ssp-score-item-wrapper {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
}

.ssp-top-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.ssp-bottom-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media screen and (width < 600px) {
    .ssp-bottom-row {
        flex-direction: row;
        width: 100%;
    }

    .ssp-turns {
        margin-left: auto;
    }
}


.ssp-sl-time {
    font-size: 24px;
}

.ssp-sl-name-date-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100px;
}

.ssp-game-type {
    min-width: 80px;
}

.ssp-name {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.ssp-time-percent-wrapper {
    display: flex;
    flex-direction: column;
    min-width: 110px;
}