/* Math Flashcard — viewport-adaptive */

@media screen and (max-height: 640px) {
    #mfcPlayShell .container.container-single {
        padding-top: 3px !important;
    }
}

#mfcPlayShell.game-worlds-play-shell {
    min-height: 0;
    box-sizing: border-box;
}

#mfcPlayShell.game-worlds-play-shell:not([data-casual-sized]) {
    height: 0;
    min-height: 0;
    max-height: none;
    overflow: hidden;
}

#mfcPlayShell .casual-outer-shell {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.game-worlds-body #mfcPlayShell #gamebox.mfc-gamebox,
#mfcPlayShell #gamebox.mfc-gamebox {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    font-family: Arial, sans-serif;
    background-color: cadetblue;
}

#mfcPlayShell #scoreAndTime {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    padding: 10px 16px;
    box-sizing: border-box;
}

#mfcPlayShell #bestScoreBoard,
#mfcPlayShell #scoreBoard,
#mfcPlayShell #remain {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    padding: 0;
    font-size: clamp(1.1rem, 2.2vw, 1.875rem);
    color: #ccc;
    text-align: center;
}

#mfcPlayShell #bestScore,
#mfcPlayShell #timer {
    padding-top: 5px;
    font-size: clamp(1.1rem, 2.2vw, 1.875rem);
    font-weight: bold;
}

#mfcPlayShell #bestScore {
    color: #ccc;
}

#mfcPlayShell #score {
    padding-top: 5px;
    font-weight: bold;
    color: #fff;
    font-size: clamp(2rem, 5vw, 3.375rem);
    text-align: center;
}

#mfcPlayShell #timer {
    color: red;
    text-align: center;
}

#mfcPlayShell #selectBoard {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 8px 16px;
    box-sizing: border-box;
}

#mfcPlayShell form {
    font-size: clamp(1rem, 1.8vw, 1.25rem);
}

#mfcPlayShell select {
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    border: 1px solid gray;
    box-shadow: 0 0 5px lightgray;
    background-color: #eee;
}

#mfcPlayShell option {
    font-size: 1.5rem;
    text-align: right;
}

#mfcPlayShell #formOne,
#mfcPlayShell #formTwo {
    float: none;
    padding: 0;
    color: #fff;
}

#mfcPlayShell .selectForbid {
    pointer-events: none;
    background-color: #333;
}

#mfcPlayShell #flashcard {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    padding: 16px;
    box-sizing: border-box;
    text-align: center;
    color: green;
}

#mfcPlayShell p#question {
    margin: 0;
    line-height: 1.2;
    font-size: clamp(1.75rem, 5vw, 3.125rem);
    font-weight: bold;
}

#mfcPlayShell #answerContainer {
    flex: 0 0 auto;
    width: min(400px, 90%);
    padding: 8px 0 20px;
    height: auto;
    text-align: center;
    display: none;
    margin: 0 auto;
}

#mfcPlayShell #answer {
    font-size: 1.625rem;
    padding: 5px 10px;
    display: block;
    margin: 0 auto 24px;
    border-radius: 8px;
    background-color: #f8f8f8;
    color: #000;
    width: min(200px, 80%);
}

#mfcPlayShell #submit-button,
#mfcPlayShell #next-button,
#mfcPlayShell #reset-button {
    padding: 5px 12px;
    font-size: 1.5rem;
    border-radius: 8px;
    background: green;
    color: #fff;
    border: 1px solid #333;
}

#mfcPlayShell #result {
    font-size: 1.5rem;
    padding: 0;
}

#mfcPlayShell #gameover {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding-top: min(120px, 18%);
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    font-size: 2.5rem;
    color: green;
    background: rgba(28, 28, 28, 0.95);
    text-align: center;
    font-weight: bold;
}

#mfcPlayShell #finalScore,
#mfcPlayShell #corrects,
#mfcPlayShell #wrongs {
    display: inline-block;
}

#mfcPlayShell span.correct {
    color: green;
}

#mfcPlayShell span.wrong {
    color: red;
}

#mfcPlayShell #restart {
    display: block;
    margin: 36px auto 0;
    width: 120px;
    padding: 6px;
    background-color: #00BB00;
    font-family: Arial, sans-serif;
    font-size: 24px;
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
}

#mfcPlayShell #restart:hover {
    background-color: #9f8b77;
}

#mfcPlayShell #start {
    display: block;
    margin: 40px auto 16px;
    width: 120px;
    padding: 6px;
    background-color: #00BB00;
    font-family: Arial, sans-serif;
    font-size: 2rem;
    color: red;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
}

#mfcPlayShell #start:hover {
    background-color: #9f8b77;
}

#mfcPlayShell input::-webkit-outer-spin-button,
#mfcPlayShell input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

#mfcPlayShell .msg.over {
    color: #fff;
}

#mfcPlayShell .stats {
    font-size: 2.25rem;
    color: #fff;
}

#mfcPlayShell .stats p {
    margin: 20px 0 0;
}

#mfcPlayShell #finalScore {
    font-size: 2.875rem;
}

#mfcPlayShell #corrects,
#mfcPlayShell #wrongs {
    font-size: 2.25rem;
}
