:root {
    --board-width: 700px;
    --board-height: calc(var(--board-width)/ 1.55555);

    --button-width: 120px;
    --button-height: 50px;
    --button-border-radius: 15px;
    --button-font-size: 18px;

    --board-title-font-size: 2rem;

    --mute-button-width: 48px;
    --mute-button-height: 48px;
}

* {
    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;
}

.main {
    display: flex;
    margin: 0 auto;
    flex-direction: column;
}

main {
    position: relative;
    display: grid;
    margin: 1rem auto;
    max-width: 100%;
    background-image: url(/imgs/myboard_svg.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: scroll;
    background-size: contain;
    background-color: rgb(141, 202, 255);
    width: var(--board-width);
    height: var(--board-height);
    padding: 0;
    grid-template-columns: 55% 25%;
    grid-template-rows: 75px 300px;
    align-items: center;
    align-content: center;
    justify-content: center;
    border-radius: 15px;
}

/* Outside board title */
.board-title {
    text-align: center;
    /* color: #0e2f77; */
    color: #1a1a1a;
    font-size: 2rem;
    margin: 1rem;
    padding: 1rem;
    text-shadow: 1px 1px #1a1a1a70;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-weight: bolder;
}

/* Inside board title */
.boardTitle {
    font-weight: bold;
    font-size: var(--board-title-font-size);
    display: grid;
    color: #f8f9f8;
    text-shadow: -2px -2px #070707;
    grid-column: 1;
    grid-row: 1;
    cursor: default;
    text-align: center;
}

/*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: 2;
    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 .congrats {
    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;
}

:root {
    --animate-duration: 1s;
    --animate-delay: 1s;
    --animate-repeat: 1;
    --rotation-degree: -2deg
}

.animate__tada {
    -webkit-animation-name: tada;
    animation-name: tada;
}

.animate__animated {
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
    -webkit-animation-duration: var(--animate-duration);
    animation-duration: var(--animate-duration);
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
}

@keyframes tada {

    0% {
        -webkit-transform: scale(1)translate(-50%, -50%);
        transform: scale(1)translate(-50%, -50%);
    }

    10%,
    20% {
        -webkit-transform: scale3d(.8, .8, .8) rotate(var(--rotation-degree))translate(-50%, -50%);
        transform: scale3d(.8, .8, .8) rotate(var(--rotation-degree))translate(-50%, -50%);
    }

    30%,
    50%,
    70%,
    90% {
        -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate(2deg)translate(-50%, -50%);
        transform: scale3d(1.1, 1.1, 1.1) rotate(2deg)translate(-50%, -50%);
    }

    40%,
    60%,
    80% {
        -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate(var(--rotation-degree))translate(-40%, -50%);
        transform: scale3d(1.1, 1.1, 1.1) rotate(var(--rotation-degree))translate(-40%, -50%);
    }

    100% {
        -webkit-transform: scale(1)rotate(-1);
        transform: scale(1)rotate(-1);
    }

}

/* Mute Button */
.mute-wrapper {
    position: absolute;
    top: 10px;
    left: 10px;
}

.mute-btn {
    background: #1a1a1a;
    border: none;
    border-radius: 50%;
    width: var(--mute-button-width);
    height: var(--mute-button-height);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.mute-btn:hover {
    background: #323232;
}

.mute-btn svg {
    fill: #ffffff;
    transition: transform 0.2s ease;
}

.mute-btn:active svg {
    transform: scale(0.9);
}

.mute-btn .sound-wave,
.mute-btn .mute-cross {
    transition: opacity 0.2 ease, transform 0.2s ease;
    transform-origin: center;
}

.mute-btn .mute-cross {
    opacity: 0;
    transform: scale(0.5);
}

.mute-btn.muted .sound-wave {
    opacity: 0;
    transform: scale(0.7);
}

.mute-btn.muted .mute-cross {
    opacity: 1;
    transform: scale(1);
}

/* Input Style */
.inputs {
    text-align: center;
    margin: 0 auto;
    color: rgb(7, 7, 7);
    border-radius: 10px;
    font-weight: bold;
    outline: none;
    border: none;
    background-color: #eae5ffb3;
    cursor: pointer;
}

.inputs:focus {
    outline: auto !important;
    background-color: aliceblue !important;
}

.carry-text {
    pointer-events: none;
    letter-spacing: 2px;
    text-align: left;
    font-size: 1rem;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    color: #f8f9f8;
    text-shadow: -1px -1px #070707;
}

.math-sign {
    text-shadow: 0 0 1px #070707;
}

/* Arrow Section */
.arrows-section {
    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;
}

/* Buttons */
.buttons-section {
    display: grid;
    gap: .8rem;
    grid-column: 2;
    grid-row: 2;
    margin: 0 auto;
    align-content: center;
}

.disabled {
    background: #cccccc;
    color: #7777;
    cursor: not-allowed !important;
    opacity: 0.6;
    filter: grayscale(100%);
}

.buttons {
    text-align: center;
    border-radius: var(--button-border-radius);
    width: var(--button-width);
    height: var(--button-height);
    font-size: var(--button-font-size);
    border: none;
    font-weight: bolder;
    cursor: pointer;
    letter-spacing: 1px;
    text-shadow: 0px 0px 1px #070707;
    box-shadow: 1px 1px 1px 1px #070707;
}

#tryit_btn {
    background-color: #fdde66;
}

#tryit_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 {
    background-color: #feaaa7;
    cursor: pointer;
}

#delete_btn:hover {
    transform: scale(1.1);
}

/* Instruction Tour Button */
.btn_tour {
    position: absolute;
    padding: .2rem 5rem;
    min-width: 270px;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
    background-color: #318d27;
    color: rgb(249, 250, 255);
    border: none;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, -0%);
    text-align: center;
    box-shadow: 0px 0px 1px 1px #070707;
    text-shadow: 1px 1px 2px #070707;
}

.btn_tour:hover {
    transform: scale(1.01) translate(-50%, -0%);
    box-shadow: 0px 0px 2px 2px #070707;
}

/* Arrow */
.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);
}

.labels {
    display: grid;
    font-size: 1rem;
    font-weight: bolder;
    align-items: center;
    align-content: center;
    grid-row: 1;
}

/* Description Section */
.description-section {
    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 {
    width: 75%;
    margin: 1rem;
}

.description-section 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: #98a8f8;
    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;
}

/* Stats Container */
:root {
    --bg-yellow: #f6e7b4;
    --bg-panel: #fff8dc;
    --text-main: #1a1a1a;
    --text-muted: #777;
    --accent: #6ed3cf;
    --radius: 16px;
}

/* Container */
.stats-container {
    width: 100%;
    font-family: sans-serif;
    /* margin: 20px auto; */
    margin: 0px auto;
    max-width: 900px;
}

/* Collapsed bar */
.stats-summary {
    display: flex;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    border-radius: var(--radius);
    border: groove;
    padding: 12px 16px;
    background: var(--bg-yellow);
    align-items: center;
    justify-content: space-evenly;
    gap: 10px;
    flex-wrap: wrap;
}

.streak-panel {
    display: inline-flex;
    align-items: center;
    position: relative;
}

.streak-shadow.active {
    display: inline-block;
}

.streak-shadow {
    pointer-events: none;
    text-align: center;
    width: 100px;
    display: none;
    opacity: 0;
    position: absolute;
    color: #007f00;
    text-shadow: 1px 1px 2px grey;
    animation: flick 1.5s ease-in-out;
    font-weight: bold;
    border-radius: 50px;
    border: none;
    padding: 5px 10px;
    font-size: 1.5rem !important;
}

@keyframes flick {
    to {
        opacity: 0;
        transform: scale(1) translate(20px, -50px);
    }

    from {
        opacity: 1;
        transform: scale(0.5) translate(0, 0);
    }
}

.stats-summary span {
    font-size: 14px;
}

.stats-toggle {
    background: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

/* Expanded panel */
.stats-panel {
    margin-top: 10px;
    animation: slideDown 0.3s ease;
    display: none;
    border: groove;
    padding: 20px;
    border-radius: var(--radius);
    background: var(--bg-panel);
}

.stats-panel.active {
    display: block;
}

/* Header */
.stats-header {
    font-weight: 700;
    margin-bottom: 16px;
    font-size: 18px;
}

/* Grid */
.stats-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

/* Individual */
.stat {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    background: white;
    border-radius: 12px;
    text-align: center;
    padding: 12px;
}

/* Icon */

.stat-icon {
    font-size: 20px;
    margin-bottom: 6px;
}

/* Values */
.stat-value {
    font-size: 22px;
    color: var(--text-main);
    font-weight: 700;
    transition: all 0, 2s ease;
}

/* Label */
.stat-label {
    margin-top: 2px;
    font-weight: 600;
    font-size: 13px;
}

/* Helper text */
.stat-sub {
    font-size: 11px;
    color: var(--text-muted);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.score_tracker {
    box-shadow: 2px 4px 2px 0px grey;
    border: groove;
    border-radius: 2px;
    height: 70px;
    width: 100%;
    max-width: 768px;
    background: rgb(255 249 200);
    margin: 1rem auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 1.15rem;
}

.button_track {
    cursor: pointer;
    border-radius: 7px;
    font-weight: bold;
    letter-spacing: 1px;
    background-color: #ece5ff;
    box-shadow: 1px 1px 2px #070707;
    border: none;
    padding: .5rem 1rem;
}

.button_track:hover {
    background-color: #e2d7ff;
    transform: scale(1.05);
}

.score_tracker_container {
    letter-spacing: 2px;
    text-shadow: 0px 0px 2px grey;
}

.track_buttons_container {
    display: flex;
    justify-content: space-between;
    width: 200px;
}

/* Stats Container */

/* Recommendation cards */
.recommendation-cards {
    display: flex;
    justify-content: center;
    max-width: 1440px;
    overflow: hidden;
    padding-bottom: 1rem;
    font-family: "Bubblegum Sans", "Comic Sans MS", sans-serif;
    text-align: center;
    margin: 1rem auto;
}

.row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-top: 1rem;
}

.column-title h2 {
    font-weight: bolder;
    text-shadow: 1px 1px #fff;
    color: #2196f3;
    margin: 1rem 0rem;
    font-size: 1.5rem;
}

.row #column1,
.row #column2,
.row #column3 {
    text-align: center;
    border: 4px solid #aca6f2;
    width: 325px;
    height: auto;
    padding: 10px 0;
    padding-top: 0;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, #fff, #e4b0e140);
    box-shadow: 5px 5px 5px grey;
    gap: 7px;
}

.train_button {
    text-decoration: none;
    text-align: center;
    display: inline-block;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #0e2f77, #1a4ab9);
    color: white;
    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: linear-gradient(135deg, #0a1f4d, #0e2f77);
    transform: scale(1.05);
}

.img_boards {
    border-bottom: 2px solid #aca6f2;
    width: 100%;
    object-fit: cover;
}

.column_paragraph_for_columns {
    text-align: left;
    padding: 1rem 1rem;
}

.more {
    display: inline-block;
    width: 100%;
    border-top: 1px solid grey;
    font-size: 1.5rem;
    text-align: center;
    font-weight: bold;
    margin-top: 1rem;
    padding-top: 1rem;
    color: #0e2f77;
    text-shadow: 0px 0px 7px grey;
}

/* Responsive */
@media all and (max-width:767px) {
    :root {
        --button-width: 150px;
        --board-title-font-size: 2rem;
    }

    main {
        max-width: 100%;
        height: auto;
        padding: 1rem;
        background-image: none;
        background-color: rgb(128, 128, 250);
        grid-template-columns: 100%;
        grid-template-rows: 50px 300px 300px 70px;
    }

    .board-title {
        padding: .5rem;
        margin: 0.5rem;
    }

    .popup {
        padding: 0 10px 18px;
        max-width: 350px;
    }

    .buttons-section {
        grid-row: 3;
        grid-column: 1;
        gap: 10px;
    }

    .arrows-section {
        grid-column: 1;
        grid-row: 4;
    }

    .description-section {
        flex-direction: column;
        margin: 1rem auto;
    }
}

@media all and (max-width: 400px) {
    :root {
        --mute-button-width: 40px;
        --mute-button-height: 40px;
    }

    .main {
        overflow: scroll;
    }

    .popup {
        width: 320px;
    }

    .mute-wrapper {
        top: 50px;
        left: 5px;
    }
}
