* {
    box-sizing: border-box;
    margin: 0;
}

body {
    background: hsla(245, 75%, 80%, 0.25);
    color: #070707;
    font-size: 1rem;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.board-title {
    text-align: center;
    color: rgb(255, 7, 7);
    font-size: 1.5rem;
    margin: 1rem;
    text-shadow: 0px 0px 7px green;
    font-weight: bold;
}

.main {
    display: flex;
    padding: 2rem;
    margin: 0 auto;
    flex-direction: column;
}

main {
    display: grid;
    margin: 0 auto;
    max-width: 70%;
    background-image: url(/imgs/myboard_svg.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: scroll;
    background-color: rgb(141, 202, 255);
    width: 650px;
    position: relative;
    padding: 1rem;
    grid-template-columns: 50% 26%;
    grid-template-rows: 45px 299px;
    align-items: center;
    justify-content: center;
    cursor: url(/imgs/chalk.png), auto;
    border-radius: 15px;
}

/*Popup*/
.popup {
    max-width: 400px;
    width: 400px;
    min-width: 300px;
    background: #fff;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    border-radius: 6px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.1);
    text-align: center;
    padding: 0 30px 60px;
    color: hsl(126, 100%, 29%);
    visibility: hidden;
    transition: all 0.2s ease-in-out;
    z-index: 1;
    box-shadow: 5px 5px 2px hsl(0, 0%, 45%, 0.7);
}

.open-popup {
    visibility: visible;
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
}

.popup img {
    max-width: 100px;
    margin-top: -50px;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background-color: hsl(126, 100%, 42%);
}

.popup h2 {
    font-size: 1.7rem;
    font-weight: 500;
    margin: 30px 0 10px;
    text-shadow: none;
}

.popup button {
    width: 100%;
    margin-top: 50px;
    padding: 10px 0;
    background-color: hsl(126, 100%, 46%);
    color: #fff;
    border: 0;
    outline: none;
    font-size: 1.2rem;
    border-radius: 4px;
    box-shadow: 5px 5px 2px hsl(0, 0%, 45%, 0.7);
    cursor: pointer;
}

/*Popup*/
/* Section 1 */
.boardTitle {
    display: grid;
    grid-column: 1;
    grid-row: 1;
    cursor: default;
    text-align: center;
}

.fractions-container {
    position: relative;
    display: grid;
    gap: 7px;
    justify-content: center;
    grid-auto-flow: column;
    align-items: center;
    font-weight: bold;
}

.fraction1,
.fraction2,
.fraction3 {
    display: grid;
    position: relative;
    gap: 7px;
    justify-items: center
}


/* Improper to mixed fraction */
.text-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
}

.fraction-numbers {
    display: flex;
    gap: 7px;
    align-items: center;
}

.whole-number {
    font-size: 1.5rem;
    color: red;
}

.mixed-fraction-result-container {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
}

.arrow {
    font-size: 2rem;
    font-style: oblique;
    font-family: serif;
    font-weight: bold;
    color: green;
    text-shadow: 0px 0px 7px grey;
}

.fraction {
    display: grid;
    padding: 0.25rem;
    border-radius: 10px;
    background-color: yellow;
    justify-items: center;
}

.open-mixed-fraction-container {
    position: absolute;
    background-color: yellow;
    padding: 0.5rem .75rem;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    left: 0px;
    top: -28px;
    font-weight: bold;
    display: none;
}

.open-mixed-fraction-container:hover {
    transform: scale(1.1);
}

.mixed-fraction {
    /* Disable Text Selection for this Container */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Disable Text Selection for this Container */
    box-shadow: 0px 0px 7px white;
    background-color: white;
    padding: 1rem;
    border-radius: 10px;
    z-index: 1;
    display: none;
    text-shadow: 0px 0px 7px violet;
    flex-direction: column;
    font-family: cursive;
    font-weight: bold;
    font-size: 1.25rem;
    justify-content: space-evenly;
    align-items: center;
    position: absolute;
    height: 100%;
    width: 100%;
    cursor: move;
}

.close-improper-fraction {
    cursor: pointer;
    border-radius: 7px;
    font-weight: bold;
    right: 0;
    top: 0;
    position: absolute;
    padding: 0.5rem 0.75rem;
    display: flex;
    background-color: red;
    border: none;
}

/* Improper to mixed fraction */

.topborder {
    border-top: 4px solid rgb(7, 7, 7);
    width: calc(4rem);
}

.slash-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.hcf-sign {
    font-family: serif;
    display: none;
    text-shadow: 0px 0px 7px red;
    font-size: 1.25rem;
    color: rgb(47, 255, 0);
    justify-content: flex-end;
    width: 100%;
    position: absolute;
    margin-left: 70px;
    gap: 2px;
}

.slash:hover {
    opacity: 0.1
}

.slash {
    display: none;
    transition: 1s;
    transform: rotate(42deg);
    font-family: cursive;
    position: absolute;
    color: red;
    font-size: 2.5rem;
}

.simplifying-inputs {
    width: 45px;
    height: 45px;
    outline: none;
    border: none;
    background-color: white;
    cursor: url(/imgs/chalk.png), auto;
    text-align: center;
    font-size: 1.25rem;
    border-radius: 7px;
    font-weight: bold;
}

.inputs {
    text-align: center;
    height: 2.9rem;
    width: 4rem;
    margin: 0 auto;
    color: rgb(7, 7, 7);
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.75rem;
    cursor: url(/imgs/chalk.png), auto;
    outline: none;
    border: none;
    background-color: hsla(250, 100%, 95%, 0.700);
}

.section2 {
    gap: .8rem;
    display: grid;
    grid-column: 2;
    grid-row: 2;
}

.section4 {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    justify-items: center;
    padding: 1.8rem;
}

.labels {
    display: grid;
    font-size: 1rem;
    font-weight: bolder;
    align-items: center;
    align-content: center;
    grid-row: 1;

}

.arrows {
    display: grid;
    width: 42px;
    grid-row: 2;
    justify-content: center;
    height: 1.6rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background-color: rgb(170, 251, 170);
}

/* Buttons */
.buttons {
    border-radius: 15px;
    width: 80px;
    height: 45px;
    align-content: center;
    justify-content: center;
    display: grid;
    font-size: 1rem;
    border: none;
    padding: 1rem;
    margin: 0 auto;
    font-weight: bolder;
    cursor: pointer;
}

#tryit_btn:hover {
    transform: scale(1.1);
}

#delete_btn {
    color: rgb(248, 52, 52);
    cursor: url(/imgs/eraser_12333615.png), auto;
    background-color: beige;
}

#delete_btn:hover {
    transform: scale(1.1);
}

#verify_btn {
    color: rgb(1, 117, 32);
    background-color: rgb(132, 254, 254);
}

#verify_btn:hover {
    transform: scale(1.1);
}

#showresults_btn {
    color: rgb(7, 7, 7);
    background-color: rgb(186, 186, 186);
}

#showresults_btn:hover {
    transform: scale(1.1);
}

#delete_btn {
    color: rgb(248, 52, 52);
    cursor: url(/imgs/eraser_12333615.png), auto;
}

#delete_btn:hover {
    transform: scale(1.1);
}

/* Section 1 */
.paragraph_text {
    padding: 1px 0;
    max-width: 1024px;
    margin-top: 20px;
    margin: 2rem auto;
    font-size: 1.25rem;
    border-bottom: 1px solid grey;
    text-align: left;
    line-height: 1.5;
    display: flex;
    align-items: center;
}

.head_text {
    margin: 1rem;
}

.paragraph_text p {
    text-wrap: balance;
}

.head_subtitle {
    text-align: left;
    font-size: 2.5rem;
    margin-bottom: 1.1rem;
    color: green;
    line-height: 1.25;
}

.head_subtitle2 {
    text-align: left;
    margin-bottom: 1.1rem;
}

.image-section {
    width: auto;
    background-color: #98f8f8;
    box-shadow: 7px 5px 2px rgba(0, 255, 38, 0.711);
    margin: 1rem 0;
    border-radius: 10px;
    display: flex;
    padding: 1.5rem;
}

.head_section_li_n {
    line-height: 1.1;
}

.head_section_li_span {
    color: green;
    font-weight: 700;
}

.test_section {
    padding: 2rem;
    background-color: #3fa9f5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    border: 1px solid grey;
    margin: 1rem auto;
    max-width: 750px;
}

.test_btn {
    height: 100px;
    width: 250px;
    font-size: 2rem;
    font-weight: 900;
    font-family: cursive;
    border-radius: 18px;
    background-color: #b4ffff;
    letter-spacing: 1px;
    cursor: pointer;
}

.test_btn:hover {
    transform: scale(1.1);
}

.test_lb {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    color: white;
}

/* Section 1 */

/* Section 2 */
.section_2 {
    max-width: 1440px;
    margin: 0 auto;
    overflow: hidden;
    /* margin-top: 1rem;
    padding-top: 1rem; */
    padding-bottom: 1rem;

    text-align: center;
    display: flex;
    justify-content: center;
}

.row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-top: 1rem;
}

.column-title h2 {
    margin: 1rem 0rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.row #column1,
.row #column2,
.row #column3 {
    width: 325px;
    height: auto;
    padding: 10px 0;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: rgba(100, 250, 250, 0.252);
    box-shadow: 5px 5px 5px grey;
    gap: 7px;
}
.row #column3{background-color: rgba(255, 50, 50, 0.717);}

.train_button {
    text-decoration: none;
    text-align: center;
    display: inline-block;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 1px;
    background-color: #4CAF50;
    color: white;
    border: 2px solid #4CAF50;
    border-radius: 10px;
    padding: 16px 32px;
    margin: 4px 2px 1rem 2px;
    -webkit-transition-duration: 0.2s;
    /* Safari */
    transition-duration: 0.2s;
    cursor: pointer;
    margin-top: auto;
    align-self: center;
    box-shadow: 0px 0px 10px grey;
}

.train_button:hover {
    background-color: rgb(255, 255, 255);
    color: #4CAF50;
    transform: scale(1.1);
}

.img_boards {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.column_paragraph_for_columns {
    text-align: left;
    padding: 1rem 1rem;
}

.more {
    border-top: 1px solid grey;
    margin: .5rem;
    font-size: 1.5rem;
    text-align: center;
    font-weight: bold;
    padding: 1rem;
    color: rgb(255, 7, 7);
    text-shadow: 0px 0px 7px grey;
}

/* Section 2 */

/* Buttons */
@media all and (max-width:875px) {
    .main {
        padding: 1rem;
    }

    main {
        grid-template-columns: 55% 22%;
        grid-template-rows: 29px 270px;
    }

    .section2 {
        justify-content: center;
        gap: .5rem;
    }

    .buttons {
        width: 70px;
        height: 35px;
        font-size: .9rem;
    }
}

@media all and (max-width:975px) {

    .section1 {
        grid-template-columns: repeat(4, 3.75rem);
        grid-template-rows: 1.8rem 5rem repeat(2, 2.5rem);
        row-gap: .2rem;
    }

    .carry_over {
        grid-template-columns: repeat(4, 3.75rem);
    }

    .ad {
        grid-template-columns: repeat(3, 3.75rem);
        row-gap: .1rem;
    }

    .additionSign {
        grid-template-columns: 3.75rem repeat(3, 3.75rem);
    }

    .bordertop {
        width: calc(3.75rem * 4);
        grid-template-columns: repeat(4, 3.75rem);
    }

    .carryOver {
        height: 1.7rem;
        width: 1.7rem;
        font-size: 1rem;
    }

    .plusSign {
        font-size: 28px;
    }

    .inputs {
        height: 2.5rem;
        width: 3.5rem;
        font-size: 1.2rem;

    }

    .buttons {
        width: 75px;
        height: 42px;
        font-size: .9rem;
    }

    main {
        max-width: 100%;
        grid-template-columns: 55% 25%;
        grid-template-rows: 59px 280px;
    }
}

@media all and (max-width:650px) {
    .section1 {
        grid-template-columns: repeat(4, 3.2rem);
        grid-template-rows: 2.1rem 4.8rem repeat(2, 2.4rem);
        row-gap: .1 rem;
    }

    .carry_over {
        grid-template-columns: repeat(4, 3.2rem);
    }

    .ad {
        grid-template-columns: repeat(3, 3.2rem);
        row-gap: .1rem;
    }

    .additionSign {
        grid-template-columns: 3.2rem repeat(3, 3.2rem);
    }

    .bordertop {
        width: calc(3.2rem * 4);
        grid-template-columns: repeat(4, 3.2rem);
    }

    .carryOver {
        height: 2rem;
        width: 2rem;
        font-size: 1.5rem;
    }

    .plusSign {
        font-size: 27px;
    }

    .inputs {
        height: 2.4rem;
        width: 2.99rem;
        font-size: 24px;
    }

    main {
        grid-template-columns: 55% 29%;
        grid-template-rows: 42px 260px;
    }
}

@media all and (max-width:600px) {
    .test_section {
        flex-direction: column;
    }

    .test_btn {
        height: 70px;
    }

    .test_lb {
        font-size: 1.25rem;
    }

    .paragraph_text {
        flex-direction: column;
        margin: 1rem auto;
    }

    .image-section {

        width: auto;
        padding: 1rem;
        margin: 1rem;
    }

    .hcf-sign {
        margin-left: 45px;
    }

    .section1 {
        grid-row: 2;
        grid-template-columns: repeat(4, 3.75rem);
        grid-template-rows: 1.8rem 5rem repeat(2, 2.5rem);
        row-gap: .2rem;
    }

    .carry_over {
        grid-template-columns: repeat(4, 3.75rem);
    }

    .ad {
        grid-template-columns: repeat(3, 3.75rem);
        row-gap: .1rem;
    }

    .additionSign {
        grid-template-columns: 3.75rem repeat(3, 3.75rem);
    }

    .bordertop {
        width: calc(3.75rem * 4);
        grid-template-columns: repeat(4, 3.75rem);
    }

    .carryOver {
        height: 1.7rem;
        width: 1.7rem;
        font-size: 1rem;
    }

    .plusSign {
        font-size: 28px;
    }

    .inputs {
        height: 2.5rem;
        width: 3.5rem;
        font-size: 1.2rem;
        background-color: white;
    }

    .section2 {
        grid-row: 3;
        grid-column: 1;
        gap: 10px;
    }

    .section4 {
        grid-column: 1;
        grid-row: 4;
    }

    .buttons {
        width: 105px;
        height: 42px;
        font-size: 1rem;
    }

    .main {
        width: 100%;
        padding: .1rem;
    }

    main {
        max-width: 100%;
        width: 645px;
        padding: 1rem;
        background-image: none;
        background-color: rgb(155, 155, 255);
        grid-template-columns: 100%;
        grid-template-rows: 45px 250px 242px 50px;
    }

    .popup {
        padding: 0 10px 18px;
        max-width: 310px;
    }
}

@media all and (max-width:300px) {
    .main {
        overflow: scroll;
    }
}