:root {
    --col1: #0d1b2a;
    --col2: #1b263b;
    --col3: #415a77;
    --col4: #778da9;
    --col5: #e0e1dd;
}
* {
    margin: 0;
    padding: 0;
    color: var(--col5);
    font-family: Arial, Helvetica, sans-serif;
}
body {
    background-color: var(--col2);
    height: 100vh;
    width: 100vw;
}
/*############################################################################*/
header {
    background-color: var(--col1);
    width: 100%;
    height: fit-content;
    display: flex;
    flex-wrap: wrap;
}
#appName {
    font-size: 52px;
    width: 500px;
    min-width: 300px;
    text-align: center;
    padding: 12px;
}
#appName:hover {
    cursor: pointer;
}
#gameOptionsContainer {
    width: 80%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    flex: 1 1 300px;
}
.gameOptions {
    font-size: 32px;
    width: 20%;
    min-width: 200px;
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: center;
    padding: 12px;
}
.gameOptions:hover {
    cursor: pointer;
}
/*############################################################################*/
main {
    width: 100%;
    height: fit-content;
    min-height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
}
#mainPage {
    height: 100%;
    width: 100%;
    padding: 5rem;
    color: var(--col5);
    text-align: center;
    font-size: 4rem;
}
#gameModeText {
    height: fit-content;
    margin-bottom: 5rem;
}
#mainGameOptionsContainer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.mainGameOption {
    border: 12px solid var(--col4);
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    border-radius: 16px;
    cursor: pointer;
    padding: 2rem;
}
#gameOptionDemon {
    grid-row: span 2;
}
.mainGameOption div {
    width: 100%;
}
.mainGameOption img {
    height: 4rem;
    width: 4rem;
    padding: 1rem;
}
/*############################################################################*/
#guideButtonContainer {
    position: fixed;
    top: 90%;
    left: 90%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    width: fit-content;
    height: fit-content;
    background-color: var(--col1);
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
}

/*############################################################################*/
.allGameContainer {
    width: fit-content;
    height: fit-content;
    display: none;
    justify-content: center;
    flex-wrap: wrap;
    flex-direction: column;
    position: relative;
    padding: 3rem;
    border: 12px solid var(--col4);
    border-radius: 16px;
    background-color: var(--col2);
}
.streakContainer {
    position: absolute;
    top: 4%;
    right: 4%;
    display: flex;
    align-items: flex-end;
}
.streakTextContainer {
    color: #f27d0c;
    font-size: 2rem;
    display: flex;
}
.streakCount {
    color: #f27d0c;
}
.streakContainer img {
    width: 3rem;
    height: 3rem;
}
.mainHeader {
    width: 100%;
    height: fit-content;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
.operationName {
    width: 100%;
    text-align: center;
    font-size: 4rem;
    margin-bottom: 8px;
}
.level {
    width: fit-content;
    font-size: 3rem;
    display: flex;
}
.progressBarContainer {
    width: 300px;
    background-color: black;
    height: 40px;
    border-radius: 8px;
    position: relative;
    margin-left: 48px;
    margin-top: 12px;
}
.progressBarPrecent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
}
.progressBar {
    width: 90%;
    height: 100%;
    background-color: green;
    border-radius: 8px;
}
.gameContainer {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}
.gameProblem {
    width: fit-content;
    min-width: 300px;
    height: fit-content;
    padding: 32px;
    margin-top: 48px;
    font-size: 96px;
    text-align: center;
    border-radius: 12px;
}
.answerField {
    width: 60%;
    height: 64px;
    font-size: 32px;
    text-align: center;
    background-color: var(--col3);
    border: 8px solid var(--col4);
    border-radius: 12px;
    outline: 0;
    margin-top: 16px;
}
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type='number'] {
    -moz-appearance: textfield;
}
.goodBad {
    position: absolute;
    bottom: -8%;
    left: 6%;
}
.goodBad img {
    width: 8rem;
    height: 8rem;
    display: none;
}
/*############################################################################*/
#winPage {
    display: none;
    font-size: 120px;
    flex-wrap: wrap;
    text-align: center;
}
#winText {
    width: 100%;
    display: flex;
    text-align: center;
    justify-content: center;
    color: rgb(0, 224, 0);
}
#winText div {
    color: rgb(0, 224, 0);
}
#winTypeText {
    color: rgb(0, 224, 0);
}
#restartButtonContainer {
    font-size: 32px;
    text-align: center;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}
#restartButton {
    color: red;
    padding: 12px;
    width: fit-content;
    margin-top: 24px;
    background-color: var(--col1);
    cursor: pointer;
    border-radius: 8px;
}
/*############################################################################*/
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
    display: none;
}
#popupInstructions {
    position: fixed;
    top: 50%;
    left: 50%;
    width: fit-content;
    height: fit-content;
    background-color: var(--col1);
    transform: translate(-50%, -50%);
    padding: 3rem;
    border-radius: 16px;
    display: none;
    z-index: 100;
}
#welcomeText {
    font-size: 3rem;
    text-align: center;
    width: 100%;
    height: fit-content;
    padding: 0.5rem;
    margin-bottom: 1rem;
}
#gameDescription {
    font-size: 1.5rem;
    color: #0d1b2a;
    list-style-type: disc;
    height: fit-content;
    width: fit-content;
    margin-left: 1rem;
}
#gameDescription li {
    margin: 12px;
}
#gameDescription a {
    color: var(--col4);
    text-decoration: none;
}
#closePopupContainer {
    margin-top: 60px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
#closePopupText {
    font-size: 3rem;
    width: 100%;
    text-align: center;
}
#closePopupInput {
    margin: 12px;
    border: 0;
    border-radius: 12px;
    outline: 0;
    width: 400px;
    height: 60px;
    background-color: var(--col3);
    font-size: 2rem;
    text-align: center;
}

/*############################################################################*/
/*############################################################################*/
/*############################################################################*/
@media (max-width: 700px) {
    main {
        height: fit-content;
        min-height: 0;
        padding: 1rem 0;
    }
    #mainPage {
        padding: 0;
        width: 100%;
    }
    #mainGameOptionsContainer {
        grid-template-columns: 1fr;
    }
    #gameOptionDemon {
        grid-row: span 1;
    }
    .mainGameOption {
        width: 280px;
        font-size: 3rem;
    }
    /*############################################################################*/
    #guideButtonContainer {
        top: 96%;
        left: 84%;
        z-index: 999;
    }
    /*############################################################################*/
    #popupInstructions {
        padding: 1rem;
    }
    #welcomeText {
        font-size: 2rem;
    }
    #gameDescription {
        font-size: 1.2rem;
        margin-left: 1rem;
    }
    #closePopupContainer {
        margin-top: 1rem;
    }
    #closePopupInput {
        width: 300px;
        height: 60px;
        font-size: 2rem;
    }
    /*############################################################################*/
    .allGameContainer {
        padding: 1rem 0;
    }
    .operationName {
        font-size: 2.5rem;
        margin-top: 0.5rem;
    }
    .level {
        font-size: 1.5rem;
    }
    .progressBarContainer {
        margin-top: 12px;
        margin-left: 0;
    }
    .gameProblem {
        padding: 0.2rem;
        margin-top: 0.5rem;
        font-size: 4rem;
    }
    .answerField {
        margin-top: 0;
        width: 80%;
    }
    /*############################################################################*/
    #winPage {
        font-size: 3rem;
    }
    #winText div {
        color: rgb(0, 224, 0);
        width: fit-content;
        white-space: nowrap;
    }
    /*############################################################################*/
    #gameModeText {
        margin-bottom: 2rem;
    }
    .mainGameOption {
        margin: 0 auto;
    }
    .gameOptions {
        padding: 4px 0rem;
        font-size: 1.5rem;
        width: fit-content;
    }
    /*############################################################################*/
    .streakContainer {
        top: 2%;
        right: 2%;
    }
    .streakTextContainer {
        font-size: 1rem;
    }
    .streakContainer img {
        width: 1.5rem;
        height: 1.5rem;
    }
}
