:root {
    --width: 28px;
    --font: 1.5rem;
}

.main-container {
    background-color: #faffeec7;
    position: relative;
    width: 700px;
    max-height: 500px;
    max-width: 95%;
    margin: 1rem auto;
    border-radius: 7px;
    box-shadow: 0px 0px 7px grey;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: var(--font);
}

.box-container {
    margin: 1rem;
    display: flex;
    max-width: 700px;
    height: 150px;
    align-items: center;
    /* align-content: space-evenly; */
    justify-content: center;
    flex-wrap: wrap;
}

.box {
    background-color: white;
    aspect-ratio: 1/1;
    border: 1px solid blue;
}

.box.round-corner:last-child {
    border-radius: 0 10px 10px 0;
}

.box.round-corner:first-child {
    border-radius: 10px 0 0 10px;
}

.box.shrunk-round-corner:last-child {
    border-radius: 0 0 10px 10px;
}

.box.shrunk-round-corner:first-child {
    border-radius: 10px 10px 0 0;
}

.box.clicked {
    background-color: #7171ffc7;
}

.box.hover,
.box.selecting {
    background-color: #7171ff7c;
}

.level-container {
    position: absolute;
    display: flex;
    margin: 1rem;
    justify-content: space-between;
    align-items: center;
    color: blue;
    font-weight: bolder;
    align-items: center;

    width: 95%;
    font-size: calc(var(--font) - 2px);
}

.level-container span {
    color: #003811;
}

.bg-white {

    background-color: white;
}

.congrats,
.game-over {
    position: absolute;
    text-align: center;
    justify-content: center;
    line-height: 4rem;
    display: none;
    top: 35%;
    align-self: center;
    text-shadow: -1px 1px 2px grey;
    box-shadow: -1px 1px 5px grey;
    font-size: 2rem;
    border-radius: 10px;
    padding: 1rem;
}


.game-over {
    color: purple;
    height: 100%;
    width: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    align-items: center;
    flex-direction: column;
}

.question-container {
    position: relative;
    padding: 0.5rem;
    border-radius: 10px;
    background-color: white;
    text-shadow: -1px 1px grey;
    color: purple;
    margin: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0px 0px 7px purple;
}

.fraction-line {
    width: inherit;
    border-top: 2px solid green;
}

.next-button {
    display: none;
    background-color: purple;
}

.next-button:hover {
    color: yellow;
    background-color: #800080b7;
}

.restart-button {
    background-color: burlywood;
}

.check-answer {
    background-color: #00af00;
}

.check-answer:hover {
    color: #0077ff;
    background-color: #00af00b7;
}

.button {
    text-shadow: -1px 1px 2px #070707;
    box-shadow: inset 0px 0px 2px silver;
    font-weight: bold;
    font-size: inherit;
    margin: 1rem;
    border-radius: 10px;
    border: none;
    color: white;
    max-width: fit-content;
    max-height: fit-content;
    padding: 1.5rem 1rem;
}

.button:hover {
    transform: scale(1.1);
}

.pointer {
    cursor: pointer;
}

.numerator {
    display: none;
    font-size: calc((var(--font)) + 0.25rem);
    font-weight: bolder;
}

.input-container {
    margin: 1rem;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 2px;
}

.topborder {
    border-top: 4px solid grey;
    border-radius: 10px;
    width: calc(var(--width) + (var(--width) / 5));
}

.input {
    font-weight: bold;
    text-shadow: 0px 0px 10px blue;
    text-align: center;
    border-radius: 10px;
    aspect-ratio: 1/1;
    width: var(--width);
    font-size: calc(var(--font) + 0.5rem);
    outline: none;
    border: none;
    box-shadow: 0px 0px 7px grey;
}

.level-two {
    display: none;
}

.fraction-container {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.correct-answer {
    transition: 0.5s;
    top: 100%;
    position: absolute;
    text-shadow: -1px 1px 2px white;
    font-weight: bold;
    margin: 0.5rem;
    color: brown;
    padding: .25rem;
    border-radius: 7px;
    background-color: #00ff00;
    display: none;
    font-size: calc(var(--font) - 4px);
}

@media screen and (max-width: 700px) {
    .level-container {
        margin: 0.5rem 0.5rem 0 0.5rem;
        position: static;
    }

    .question-container {
        margin: 0.5rem;
        padding: 0.15rem;
    }
}

@media screen and (max-width: 475px) {
    :root {
        --font: 1rem;

        --width: 26px;
    }
}