@font-face {
    font-family: 'Copernicus';
    src: url('CopernicusTrial-Medium-BF66160450d988d.ttf') format('truetype'),
        url('CopernicusTrial-Medium-BF66160450d988d.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* @font-face {
    font-family: "Modern Era Medium";
    src: url("modern-era-medium.ttf") format("truetype");
} */

/* Color Pallete:
#f2f1ea
#c87e5b
#28261c
#ffffff
*/

/* global vars */
:root {
    --primary-color: #bd8361;
    --secondary-color: #4caf50;
    --secondary-color-hover: #35c43a;
    --background-color: #f2f1ea;

}

html {
    font-family: 'Copernicus', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: hsl(49 19.6% 13.3% / 1);
    background-color: #f2f1ea;
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
}

div {
    display: flex;
    flex-direction: column;
}

form {
    display: flex;
    flex-direction: column;
}

svg {
    transform: rotate(-90deg);
    background: transparent;
}

circle {
    fill: transparent !important;
    stroke-width: 3;
    stroke-linecap: round;
}

line {
    width: 100%;
    min-height: 1px;
    background-color: var(--primary-color);
    display: flex;
    margin: 10px 0;
}

.header-text {
    width: 100%;
    text-align: center;
}

.material-symbols-outlined {
    user-select: none;
    /* no underline */
    text-decoration: none !important;
    transition: transform 0.3s ease;
}

.content {
    max-width: 1100px;
    margin: 0 auto;
}

.main-card {
    display: flex;
    position: relative;
    background-color: #f8f8f4;
    width: 80%;
    /* min-height: 30vw; */
    padding: 20px 20px 100px;
    margin: 70px auto 0;
    margin-top: 10px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.page-number {
    font-size: 0.9rem;
    margin: 0 auto;
    margin-bottom: 10px;
    flex-direction: row;
    font-weight: bold;

}

.diagram-section {
    width: 100%;
    margin-bottom: 20px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 15px;
}

.diagram-image {
    max-width: 100%;
    max-height: 400px;
    /* min-height: 200px; */
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* on mobile */
@media (max-width: 600px) {
    .diagram-image {
        object-fit: cover;
    }
}

.diagram-key {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 16px;
    width: fit-content;
    box-sizing: border-box;
    width: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    align-self: stretch;
    /* gap: 50px; */
    /* margin-top: 10px; */

}

.diagram-value {
    font-size: 0.95rem;
    padding: 4px 0;
    color: #333;
    /* font-family: 'Courier New', monospace; */
    line-height: 1.6;
    display: inline;
}

.diagram-value:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.text {
    font-size: 1.5rem;
    margin: 0;
    flex-direction: row;
    text-wrap: wrap;
    word-wrap: break-word;
    flex-wrap: wrap;
    height: fit-content;
    margin-bottom: 10px;
}

.options {
    display: grid;
    /* 1 by 4 */
    grid-template-columns: repeat(1, 5fr);
    /* center the options */
    justify-content: center;
    gap: 10px;
    /* padding: 10px; */
    /* max-height: 10vh; */
    /* max-height: 183px; */
    position: relative;
    transition: all 0.3s ease;
}

.next-button {
    /* nice green bg color that fits with color pallete */
    background-color: #c87e5b;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);

}

.option {
    flex-direction: column;
    align-items: center;
    border: 2px solid #c87e5b;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: none;
    background-color: #ffffff15;
    z-index: 1;
    /* Add this line */
    justify-content: center;
    transition: all 0.3s ease;
    /* display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center; */
}

.option-text {
    flex-direction: row;
    width: 100%;
    /* text-align: center; */
    align-items: center;
}

.option-explination {
    display: none;
    margin-bottom: auto;
    margin-top: 10px;
    border-top: 2px solid #c87e5b;
    padding-top: 5px;
    overflow-y: auto;
}

.option-explanation {
    margin-top: 10px;
    padding: 8px;
    border-top: 1px dashed #e0e0e0;
    background-color: rgba(247, 247, 242, 0.8);
    /* Slightly transparent background */
    border-radius: 10px;
    font-size: 0.9em;
    width: 100%;
    /* Take full width of the option */
    box-sizing: border-box;
    display: none;
    /* Hidden by default, shown via direct style manipulation */
}

.option-explanation-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
    /* Left-justify text */
    width: 100%;
}

.explanation-toggle {
    position: absolute;
    /* top: 50%; */
    top: 16px;
    right: 10px;
    /* transform: translateY(-50%); */
    padding: 5px 10px;
    font-size: 0.75em;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    transition: all 0.2s ease;
    border: 2px solid #e0e0e0;
    border-right: none;
    border-top: none;
    border-bottom: none;
    border-radius: 8px;
    background-color: #f8f8f4;
    width: 55px;
    height: 100%;
    max-height: 56px;
    position: absolute;
    right: 0;
    top: 0;
    text-align: left;
    font-family: inherit;
    /* Important for button elements */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.explanation-toggle:hover {
    background-color: #f0f0ea;
    color: #c87e5b;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-color: #c87e5b;
}

.explanation-toggle:active {
    /* background-color: #f5efe8; */
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.explanation-toggle .material-symbols-outlined {
    font-size: 1em;
    font-weight: 300;
}

/* Make sure button text is aligned properly */
button.explanation-toggle {
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

.answer-explanation-container {
    /* margin-top: 20px; */
    border-top: 2px solid #e0e0e0;
    /* padding-top: 15px; */
}

.answer-explanation-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 10px;

    display: none;
}

.answer-explanation-title {
    font-weight: bold;
    color: #333;
    margin-right: 8px;
}

.answer-explanation-icon {
    color: #c87e5b;
    font-size: 20px;
}

.answer-explanation-icon-small {
    color: #c87e5b;
    font-size: 18px;
    margin-top: 2px;
}

.answer-explanation-fact-container {
    background-color: #f7f7f2;
    border-radius: 10px;
    padding-top: 10px;
    /* padding: 15px; */
    /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); */
}

.answer-explanation-fact {
    font-size: 1.1em;
    margin: 0 0 10px 0;
    color: #c87e5b;
    display: none;
}

.answer-explanation-text {
    margin: 0;
    line-height: 1.5;
}

.option::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #e8e8e0, #f8f8f400, #e8e8e0);
    transition: opacity 0.3s ease;
    z-index: -10;
    /* Add this line */
}

/* if on desktop */
@media only screen and (min-width: 600px) {
    .option:not(.correct):not(.wrong):hover {
        background-color: #c87e5b;
        color: white;
    }

    .option:hover::before {
        opacity: 0;
    }

    .option:not(.correct):not(.wrong):hover .option-number {
        background-color: white;
        color: #c87e5b;
    }
}





.option-number {
    /* roboto */
    font-family: 'Modern Era Medium', 'Roboto', sans-serif;
    font-size: 1.2rem;
    margin-right: 10px;
    padding: 3px;
    background-color: #c87e5b;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
    transition: all 0.3s ease;
}

.option-symbols {
    margin-left: auto;
    flex-direction: row;
    position: relative;
    align-items: center;
    justify-content: center;
}




.correct .option-number {
    background-color: #4caf50;
}

.wrong .option-number {
    background-color: #db3737;
}

.feedback-symbol {}

.option.active {
    background-color: #c87e5b;
    color: white;
    z-index: 12;
    border: 4px solid #c87e5b;
}

.option.active .option-number {
    background-color: white;
    color: #c87e5b;
}

.option.active::before {
    opacity: 0;
}



.header {
    width: 80vw;
    margin: 0 auto;
    font-size: 1.5em;
    font-weight: bold;
    /* margin-bottom: 10px; */
    margin-top: 10px;
    justify-content: space-between;
    flex-direction: row;
    align-items: center;
}

.header span {
    font-size: 1.5em;
    /* font-weight: bold; */
    /* margin-bottom: 10px; */
    /* margin-top: 10px; */
    justify-content: space-between;
    flex-direction: row;
    color: #c87e5b;
}

.circle-wrapper {
    min-width: 40px;
    min-height: 40px;
    padding: 8px 16px;
    box-sizing: border-box;
}

.welcome-message {
    font-size: 1.5em;
    font-weight: bold;
    justify-content: space-between;
    flex-direction: row;
    color: #c87e5b;
}

.highlight {
    /* animation: bounce 0.5s forwards; */
    text-decoration: underline;
    /* font-weight: bold; */
    color: #c87e5b;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    width: fit-content;
}

.highlight:hover {
    scale: 0.95;
    color: #b57151;
}

.highlight-small {
    color: #c87e5b;
    cursor: pointer;
}

.highlight-small:hover {
    scale: 0.9;
    color: #b57151;
}

.result-indicator {
    flex-direction: row;
    font-size: 1.5em;
    align-items: center;
    margin-bottom: 10px;
}

.result-indicator span {
    margin-left: 10px;
    font-size: 1.5em;
    font-weight: bold;
    /* transform: translateY(-1px); */
}


@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }

    100% {
        transform: translateX(0);
    }

}

.bottom-card {
    background-color: #f8f8f4;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 80%;
    margin: 0px auto;
    /* margin-bottom: 70px; */
    transition: all 0.3s ease;
    position: relative;
    z-index: 2000;
}

.bottom-layer {
    height: 100px;
    position: relative;
}


.bottom-wrapper {
    position: relative;
    margin-top: 20px;
    margin-bottom: 70px;

}

.confirm-card {
    position: absolute;
    /* Change from 'absolute' to 'relative' */
    bottom: 0px;
    right: 10vw;
    background-color: #f8f8f4;
    padding: 10px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1;
    /* Add a higher z-index to ensure it's on top */
    transition: all 0.3s ease;
    width: fit-content;
    /* height: 100px; */
}

.confirm-button {
    background-color: #c87e5b;
    flex-direction: row;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.explination-section {
    display: none;
    opacity: 0;
    min-height: 40vh;
    max-height: 70vh;
    overflow-y: auto;
    transition: all 0.3s ease;
    background-color: #f8f8f4;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin: 0px auto;
    /* transform: translateY(50px); */
    width: 80%;
    position: relative;
}

.progress-wrapper {
    position: relative;
    /* width: 80vw; */
    width: 80%;
    margin: auto;
    height: 10px;
    background-color: #dddddb;
    border-radius: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
    height: 10px;
    background-color: #c87e5b;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;

}

.correct {
    /* font-weight: bold; */
    animation: bounce 0.5s forwards;
    /* green border color */
    border: 2px solid #4caf50;
    background-color: #4caf5015;
    pointer-events: none;
}

.wrong {
    /* red border color */
    border: 2px solid #db3737;
    background-color: #db373715;
    pointer-events: none;
}

.expand-option {
    flex-direction: row;
    cursor: pointer;
    font-size: 0.8em;
    z-index: 100;
    font-family: 'Modern Era Medium', 'Roboto', sans-serif;
    text-decoration: underline;
    font-weight: bold;
    margin-right: 10px;
    display: none;
}


.correct-symbol {
    color: #4caf50;
    font-size: 2em;
    transform: translateY(-2px);
}

.wrong-symbol {
    color: #e41f1f;
    font-size: 2em;
}

.option.wrong::before,
.option.correct::before {
    opacity: 0;
}


img {
    border-radius: 5px;
    width: 50%;
    margin: 0 auto;
    display: block;
    /* margin-top: 20px;
    margin-bottom: 20px; */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.174);
    transition: all 0.3s ease;
}

.profile-picture-container {
    z-index: 10;
    position: relative;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-picture-container:hover .edit-profile {
    opacity: 1;
}

.edit-profile {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #00000077;
    color: white;
    z-index: 20;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    opacity: 0;
    font-size: 2.5em;
    cursor: pointer;
}





.system-feedback {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #c87e5b;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    color: #f8f8f8;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: absolute;
    right: 20px;
    bottom: 0px;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 100;
}

.system-feedback:hover {
    background-color: #b57151;
}

.system-feedback-text.material-symbols-outlined {
    font-size: 1.7em;
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: center;
}

#feedback-input {
    min-height: 100px;
}

.submit-feedback-button {
    background-color: #c87e5b;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.nav-bar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 80vw;
    margin: auto;
    margin-top: 30px;
    margin-bottom: 0px;
    cursor: pointer;
}

#random-topic {
    text-transform: capitalize;
}

#current-term-title {
    text-transform: capitalize;
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: 2px solid #c87e5b;
    color: #c87e5b;
}



dialog[open] {
    opacity: 1;
    display: flex;
    flex-direction: column;
}

dialog[open]::backdrop {
    background-color: rgba(0, 0, 0, 0.101);
}

dialog {
    opacity: 0;
    transition: all 0.2s ease allow-discrete;
    border: none;
    background-color: #f8f8f4;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 70vw;
    min-width: 35vw;
    /* height: 20vh; */
    min-height: 20vh;
    max-height: 70vh;
}

dialog::backdrop {
    background-color: rgb(0 0 0 / 0%);
    transition: all 0.2s ease allow-discrete;
}

@starting-style {
    dialog[open] {
        opacity: 0;
    }

    dialog[open]::backdrop {
        background-color: rgb(0 0 0 / 0%);
    }
}


.dialog-content {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    /* min-height: 30vh; */
    flex: 1;
    /* Take up remaining space */
    overflow-y: auto;
    /* In case content overflows */
    /* width: fit-content; */
}

.close-button {
    position: absolute;
    top: 0px;
    right: 0px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5em;
    color: #c87e5b;
    transition: all 0.3s ease;
    border-radius: 6px;
    padding: 5px;
    background-color: #f8f6f4;
    width: 30px;
    /* Fixed width */
    height: 30px;
    /* Fixed height */
    display: grid;
    place-items: center;
}

.close-button:hover {
    background-color: #c87e5b;
    color: white;
}


.dialog-title {
    font-size: 1.5em;
    font-weight: bold;
    border-bottom: 2px solid #c87e5b;
    flex-shrink: 0;
    /* Prevent title from shrinking */
}

.dialog-buttons {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 20px;
}

.dialog-button {
    background-color: #c87e5b;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 90px;
    text-align: center;
}

.dialog-button.cta {
    background-color: var(--secondary-color);
    color: white;

}

.dialog-button:hover {
    background-color: #b57151;
}

.dialog-footer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 20px;
}

.info-content {
    min-height: 20vh;
    font-size: 1.2em;
    flex-direction: row;
    display: inline-block;
    margin-top: 20px;
}

.explination-buttons {
    width: fit-content;
    gap: 6px;
    display: flex;
    flex-direction: row;
    position: absolute;
    top: 20px;
    right: 20px;
}

.report-button {
    /* position: absolute; */
    right: 30px;
    top: 20px;
    color: #b57151;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.report-button:hover {
    background-color: #c87e5b;
    color: white;
}

#report-dialog {
    max-width: 80vw;
}

.report-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    /* padding: 10px; */
    margin-bottom: 15px;
    /* border-bottom: 2px solid #c87e5b; */
    transition: all 0.3s ease;
    justify-content: space-between;
}

.submit-report-button {
    background-color: #c87e5b;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.submit-report-button:hover {
    background-color: #b57151;
}

#report-submitted-dialog {
    max-width: 30vw;
}

.centered-dialog-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: 2px solid #c87e5b;
    text-align: center;
}

.large-symbol span {
    font-size: 10vh;
    color: #c87e5b;
    text-align: center;
    margin: auto 0;
    height: 20vh;
    justify-content: center;
    align-items: center;
    display: flex
}

.report-submitted-content {
    text-align: center;
    /* margin-top: 50px; */
}

.comments-section-wrapper {
    width: 80%;
    margin: 25px auto;
    opacity: 0;
    display: none;
}

.comment-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: 2px solid #c87e5b;


}

.comment-wrapper {
    /* margin-top: 20px; */
    /* margin-bottom: 20px; */
    justify-content: end;
    align-items: end;
    transition: all 0.3s ease;


}

.comment-wrapper .slide-down {
    transform: translateY(50px);
}

@keyframes addComment {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }

}

.comment {
    position: relative;
    flex-direction: column;
    margin-top: 10px;
    background-color: #f8f8f4;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: addComment 0.5s forwards;
}

.comment-header {
    flex-direction: row;
    align-items: center;
}

.comment-delete {
    position: absolute;
    right: 20px;
    bottom: 15px;
    font-size: 0.7em;
    font-weight: bold;
    color: #c87e5b;
    cursor: pointer;
}

.comment-report {
    position: absolute;
    right: 20px;
    bottom: 15px;
    font-size: 0.7em;
    font-weight: bold;
    color: #c87e5b;
    cursor: pointer;
}


.comment-user-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin: 0;
    margin-right: 10px;
}

.comment-user-name {
    font-weight: bold;
}

.comment-reply {
    position: absolute;
    right: 20px;
    font-size: 0.7em;
    font-weight: bold;
    color: #c87e5b;
    cursor: pointer;
}

.comment-reply:hover {
    text-decoration: underline;
}

.comment-text {
    margin: 5px 0 5px 40px;
}

.top-comment {
    width: 100%;
    box-sizing: border-box;
}

.reply-comment {
    width: 90%;
}

input[type="text"] {
    width: 100%;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid rgb(192, 192, 192);
    /* margin-bottom: 10px; */
    box-sizing: border-box;
    font-family: Copernicus;
    height: 4vh;
    padding: 10px;
    background-color: #f8f8f7;
}

input {
    height: 4vh;
    padding: 10px;
    background-color: #f8f8f7;
    border-radius: 5px;
    border: 1px solid rgb(192, 192, 192);
    font-family: Copernicus;
    box-sizing: border-box;
}

.form-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* card styles */
.flashcard-set {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;
}

.flashcard-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
    min-width: 100px;
    text-align: center;
}

.flashcard-container {
    gap: 80px;
    /* overflow: visible; */
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    overflow: auto;
    z-index: 10;
    height: 100%;
}

.card-group {
    position: relative;
    width: 80px;
    /* Reduced from 100px */
    height: 106.67px;
    /* Reduced from 133.33px to maintain proportion */
    transition: all 0.3s ease;
}

.card {
    position: absolute;
    width: 80px;
    /* Reduced from 100px */
    height: 106.67px;
    /* Reduced from 133.33px to maintain proportion */
    background-color: #f2f0e9;
    border: 3px solid #c87e5b;
    border-radius: 8px;
    /* Slightly reduced from 10px */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-group .card:nth-child(1) {
    transform: rotate(-5deg) translateX(-10px);
    z-index: 1;
}

.card-group .card:nth-child(2) {
    z-index: 2;
}

.card-group .card:nth-child(3) {
    transform: rotate(5deg) translateX(10px);
    z-index: 3;
}

.card-group:not(.locked):hover .card:nth-child(1) {
    transform: rotate(-10deg) translateX(-20px);
}

.card-group:not(.locked):hover .card:nth-child(3) {
    transform: rotate(10deg) translateX(20px);
}

.card-group.locked:hover {
    transition: all 0.3s ease;
    scale: 1.05;
}

/* Locked card styles */
.card-group.locked .card {
    background-color: #e5e5e5;
    border-color: #999;
    cursor: pointer;
}

.card-group.locked .card-progress-container {
    opacity: 0.5;
}

.lock-icon {
    font-size: 32px;
    color: #999;
}

.card-progress-container {
    position: relative;
    width: 64px;
    height: 64px;
    background: transparent;
}

.percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    /* Reduced from 18px */
    font-weight: bold;
    color: #c87e5b;
}


.question-percentage-bar {
    position: absolute;
    height: 100%;
    width: 100%;
    /* border-radius: 8px; */
    z-index: -100;
    left: 0;
    transition: all 0.3s ease;
    /* background-color: #5ec2775c; */

}

.question-percentage-bar.correct-bar {
    background-color: #5ec2775c;
}

.question-percentage-bar.wrong-bar {
    background-color: #db4a3745;
}


.progress-background {
    stroke: #e8d1c5;
}

.progress-value {
    stroke: #c2815e;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 0.016s linear;
}

.card-group.locked .progress-background,
.card-group.locked .progress-value {
    stroke: #999;
}

.card-group.locked .progress-value {
    stroke-dashoffset: 0;
}

.lock-icon {
    font-size: 26px;
    /* Reduced from 32px */
    color: #999;
}

@media (max-width: 768px) {
    .container {
        gap: 40px;
    }
}


button:hover {
    background-color: #b57151;
}


button {
    background-color: #6cab56;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
}


.comment-input-wrapper {
    position: relative;
}

.add-comment-input {
    min-height: 40px;
}

.add-comment-button {
    position: absolute;
    right: 15px;
    bottom: 50%;
    transform: translateY(50%);
    background-color: #c87e5b;
    color: white;
    padding: 5px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);

}

.add-comment-button:hover {
    background-color: #b57151;
}

.comment-reply-input {}

.reply-wrapper {
    width: 90%;
    margin-top: 10px;
}

.reply-buttons {
    flex-direction: row;
    margin-top: 10px;
    justify-self: end;
    align-self: flex-end;
}

.reply-button {
    background-color: #c87e5b;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
    margin-left: 10px;
    font-size: 0.9em;
    justify-content: center;
}

.reply-button:hover {
    background-color: #b57151;
}

.cancel-button {
    padding: 5px;
    cursor: pointer;
    font-size: 0.9em;
    justify-content: center;


}

.confirm-delete-buttons {
    flex-direction: row;
    justify-content: space-between;
    margin-top: auto;
}

.confirm-delete-button {
    border: 2px solid #db3737;
    background-color: #db373715;
    color: #db3737;
    box-sizing: border-box;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.confirm-delete-button:hover {
    background-color: #db3737;
    color: white;
}

.cancel-delete-button {
    box-sizing: border-box;
    padding: 8px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
    justify-content: center;
}

.cancel-delete-button:hover {
    background-color: #c87e5b;
    color: white;
}

.deleting {
    animation: swipeLeft 0.3s forwards;
}

@keyframes swipeLeft {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(-10%);
        opacity: 0;
    }
}

#report-comment-dialog {
    width: 30vw;
}


#fadeText {
    opacity: 0;
    animation: fadeUp 0.5s ease forwards;
    width: 100%;
    flex-direction: row;
}

#fadeText div {
    flex-direction: row;
    display: inline-block;
}


@keyframes fadeInOption {
    0% {
        scale: 1.2;
        opacity: 0;
    }

    100% {
        scale: 1;
        opacity: 1;
    }

}

@keyframes bounce {

    /* scale bounce once */
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }

}

#fadeText .word {
    opacity: 0;
    animation: fadeUpWord 0.5s ease forwards;
    animation-delay: calc(0.03s * var(--word-index));
    position: relative;
    bottom: -10px;
    /* Start each letter below its real position */
    /* allow rotate but also spaces between words */
    display: inline-block;
    white-space: pre;
    overflow-wrap: break-word;
    text-wrap: wrap;
    /* word-wrap: break-word; */
    flex-wrap: wrap;
    /* word-break: break-all; */
    height: 36px;


}

@keyframes fadeUp {
    to {
        opacity: 1;
    }
}

@keyframes fadeUpWord {
    to {
        opacity: 1;
        bottom: 0;
        /* Animate each letter up to its real position */
    }
}

@keyframes fadeOutWord {
    0% {
        opacity: 1;
        /* Start fully visible */
        bottom: 0;
        /* Start at real position */
        transform: rotate(0deg);
        /* Start with no rotation */
    }

    50% {
        bottom: 10px;
        /* Move up a few pixels */
    }

    100% {
        transform: rotate(calc(var(--random-rotate)));
        /* Random rotation between -5 and 5 degrees */
        opacity: 0;
        /* Fade out */
        bottom: -20px;
        /* Fall down */
    }
}



.edit-button {
    position: absolute;
    top: 0;
    right: 0;
    padding: inherit
}

.edit-button.material-symbols-outlined {
    font-size: 1em;
    cursor: pointer;
}

.setting-button {
    background-color: #ba825f;
    color: white;
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
    font-size: 0.8em;
    border: 1px solid #e0e0e0;
    font-family: 'Modern Era Medium', 'Roboto', sans-serif;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.setting-button:hover {
    background-color: #ca8d68;
}

.settings-wrapper {
    margin-top: 5px;
    gap: 5px;
    width: 100%;
}

/* HEADER STYLED */
header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: fixed;
    z-index: 10;
    top: 0;
    left: 0;
    height: 55px;
    background-color: rgba(252, 251, 249, 0.98);
    backdrop-filter: blur(5px);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    /* padding: 0 15px; */
    transition: all 0.3s ease;
}

header span {
    min-width: 300px;
    text-align: end;
}

#logo {
    height: 40px;
    width: auto;
    border-radius: 0;
    box-shadow: none;
}

.mastery-logo {
    border-radius: 0 0 0 20px;
    margin-left: auto;
}

#topic-title {
    /* no wrap */
    /* max-width: 100px; */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    display: block;
}

.header-section {
    background-color: transparent;
    cursor: pointer;
    padding: 8px 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    border: none;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.header-nav {
    display: flex;
    flex-direction: row;
    gap: 10px;
    cursor: pointer;
}

.header-nav .material-symbols-outlined {
    font-size: 1.5em;
    color: #c87e5b;
}

.header-profile {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: end;
    width: fit-content;

    height: 8vmin;
    width: 8vmin;
    margin-right: 10px;
    aspect-ratio: 1/1;

}

.header-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin: 0;
    border: 2px solid #f8f8f8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}



/* DASHBOARD CSS */
.dashboard {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-gap: 10px;
    max-width: 1000px;
    margin: 75px auto 50px;
    padding: 30px 50px 50px;
}

.dashboard-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 50px auto;
    padding: 20px;
}

.module {
    background-color: #f8f8f4;
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.module:hover {
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.035);
    z-index: 1;
}

.module.hidden {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
    width: 0;
}

.module-section-button {
    padding: 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    /* box-sizing: border-box; */
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    min-width: 100px;
    position: relative;
}

.module-section-button:hover {
    background-color: #b57151;
}

.circle-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #c87e5b;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5em;
    padding: 10px;
    border: 3px solid #c87e5b;
    /* box-sizing: border-box; */
    transition: all 0.3s ease;
    cursor: pointer;
}

.circle-icon:hover {
    background-color: #ffffff;
    color: #c87e5b;
    font-size: 2.6em;
}


.progress-module {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.picture-module {
    height: 100%;
    width: 100%;
    min-width: 170px;
    min-height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    grid-column: span 3;



}

.module-image {
    height: 100%;
    width: 100%;
    border-radius: 8px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background-image: url('images/6.jpg');
    background-size: cover;
    background-position: center;
    /* border: 2px solid var(--primary-color); */

}

.box-container {
    position: relative;
    width: 135px;
    height: 135px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f8f4;
    margin: auto;
    border-radius: 10px;
}

.box-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.box-title {
    font-size: 0.8em;
    font-weight: bold;
}

.box-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #28261c;
    margin-top: 4.5px;
}

.percentage-text {
    font-size: 1.5em;
    font-weight: bold;
    color: #28261c;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateY(2px);
}

.circular-progress {
    width: 150px;
    height: 150px;
    border-radius: 50%;
}

.circular-progress {
    width: 150px;
    height: 150px;
}

.circle-bg {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 2;
}

.circle-progress {
    fill: none;
    stroke: #ba825f;
    stroke-width: 5;
    stroke-dasharray: 100;
    /* Set this to the circumference of the circle */
    stroke-dashoffset: 100;
    /* Start fully offset */
    transition: stroke-dashoffset 1s ease;
}

.progress-value {
    font-size: 0.5em;
    fill: black;
}


.circular-progress::before {
    content: "";
    width: 130px;
    height: 130px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
}

.title-module {
    font-weight: bold;
    display: flex;
    justify-content: start;
    align-items: start;
    text-align: start;
}

.small-module {
    grid-column: span 2;
    grid-row: span 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.small-square-module {
    grid-column: span 1;
    grid-row: span 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.module-title {
    font-weight: bold;
    margin-bottom: 10px;
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;

}

.small-module-title {
    font-weight: bold;
    width: 100%;
    text-align: center;
    font-size: 0.7em;
    position: absolute;
    top: 0;
    padding: inherit;
}

.module-content {
    font-size: 0.9em;
}

.text-module {
    display: inline-block;
}

.module-cta {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    /* box-sizing: border-box; */
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid #4CAF50;
}

.module-cta:hover {
    background-color: #35c43a11;
    color: #4CAF50;

}

.dotted-bg {
    position: relative;
}

.dotted-bg::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, #c87d5b45 1.3px, transparent 1.3px);
    background-size: 30px 30px;
}

.weekly-review {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: start;
    width: 100%;
    max-width: 490px;

}



/* .day {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    background-color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7em;
    font-weight: bold;
    color: #28261c;
    padding: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.day.studied {
    background-color: #4CAF50;
}

.day:hover {
    background-color: #c87e5b;
    color: white;
} */

.random-topic {
    position: relative;
}

.question-mark {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #ba825f;
    cursor: pointer;
}

.topic-content {
    margin-top: 20px;
    text-align: center;
}

.module-button {
    background-color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    /* margin-top: 10px; */
    box-sizing: border-box;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    z-index: 2;
    font-family: 'Modern Era Medium', sans-serif;
    font-size: 1.1em;
    gap: 10px;
    /* width: 300px; */

}

.name-details {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}


.module-button:hover {
    background-color: #ffffff;
    color: var(--secondary-color);
}

.module-button:hover .material-symbols-outlined {
    transform: translateX(8px);
}

.options-module {
    grid-column: span 2;
}

/* on phone */
@media (max-width: 600px) {
    .module-button {
        width: 100%;
    }

    .days-number {
        width: 100px;
    }

    .picture-module {
        min-width: 0;
        box-sizing: border-box;
        grid-column: span 4;
    }

    .name-details {
        grid-column: span 4;

    }

    .my-progress {
        grid-column: span 4;
    }

    .options-module {
        grid-column: span 4;
    }

}



.module-select {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    /* gap: 10px; */
    /* width:400px; */
    width: 100%;

}


.dialog-text {
    /* width: fit-content; */
}

.fun-button {
    background-color: #ba825f;
    border: 2px solid #ba825f;
    color: white;
    /* border: none; */
    border-radius: 50%;
    width: 6vw;
    height: 6vw;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.1s linear;
    box-shadow: 0px 0px 0px rgb(255, 255, 255);
}

#random-topic {
    transition: all 0.05s ease-in;
}

.fun-button:hover {
    transform: scale(1.1);
    background-color: #fff;
    color: #ba825f;
}

.fun-button:active {
    transform: scale(0.9);
    box-shadow: 0 0 100px #6cab56;
}

.explination-text {
    display: none;
}


.wave-container {
    position: relative;
    width: 100%;
    height: 100%;
    margin-bottom: 100px;
    z-index: 0;
    /* margin-left: auto; */
}

.wave-module {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow: hidden;
}

/*** Styles for the wave animation ***/
.wave {
    position: absolute;
    left: 0;
    width: 200%;
    height: 100px;
    mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 100"><path fill="none" stroke="white" stroke-width="8" d="M0,50 C300,50 300,100 600,100 C900,100 900,50 1200,50"/></svg>');
    mask-repeat: repeat-x;
    mask-size: 50% 100%;
    transform: translateZ(0);
    background-color: var(--primary-color);
}

.wave1 {
    top: 40%;
    opacity: 0.5;
    animation: wave 8s infinite linear;
    /* transform: translateX(-25%); */
}

.wave2 {
    top: 40%;
    opacity: 0.4;
    animation: wave-reverse 5s infinite linear;
    /* transform: translateX(25%); */
}

.wave3 {
    top: 40%;
    opacity: 0.3;
    animation: wave 3s infinite linear;
    transform: translateX(0%);
}

.flex {
    display: flex;
}

.row {
    display: flex;
    flex-direction: row;
}

.column {
    display: flex;
    flex-direction: column;
}

.center {
    display: flex;
    justify-content: center;
    align-items: center;
    /* height: 100%; */
    /* width: 100%; */
    flex: 1;
}

.between {
    justify-content: space-between;
}

.around {
    justify-content: space-around;
}

.mgl-auto {
    margin-left: auto;
}

.rel {
    position: relative;
}

.abs {
    position: absolute;
}

.abs-bottom {
    position: absolute;
    bottom: 0;
}

.width100 {
    width: 100%;
}

.text-center {
    text-align: center;
}

.flex1 {
    flex: 1;
}

.justify-center {
    justify-content: center;
}

.align-center {
    align-items: center;
}



.toggle-wrapper {
    display: inline-block;
    position: relative;
}

.toggle {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    display: block;
    width: 50px;
    height: 26px;
    background: #e0e0e0;
    border-radius: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.toggle-label::after {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle:checked+.toggle-label {
    background: var(--secondary-color);
}

.toggle:checked+.toggle-label::after {
    transform: translateX(24px);
}

.toggle:disabled+.toggle-label {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes wave {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0%);
    }
}

@keyframes wave-reverse {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Responsive Custom Slider CSS */
.custom-slider {
    position: relative;
    /* height: 7.5rem; */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.625rem;
    box-sizing: border-box;
}

.slider-track {
    position: relative;
    height: 0.5rem;
    width: 100%;
    border-radius: 9999px;
    background-color: #e5e7eb;
    cursor: pointer;
}

.slider-progress {
    position: absolute;
    height: 100%;
    border-radius: 9999px;
    background-color: #c2815e;
    pointer-events: none;
    transition: width 0.3s ease;
}

.slider-point {
    position: absolute;
    top: 50%;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    background-color: #e5e7eb;
    z-index: 1;
}

.slider-handle {
    position: absolute;
    top: 50%;
    width: 0.8rem;
    height: 1.8rem;
    background: white;
    border: 2px solid #c2815e;
    border-radius: 100px;
    transform: translate(-50%, -50%);
    cursor: grab;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    z-index: 2;
}

.slider-tooltip {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.5rem;
    background: #1f2937;
    color: white;
    font-size: 0.875rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
}

.slider-tooltip.visible {
    opacity: 1;
}

.slider-labels {
    position: absolute;
    width: 100%;
    top: 1.5rem;
}

.slider-label {
    position: absolute;
    font-size: 0.875rem;
    color: #4b5563;
    transform: translateX(-50%);
    text-align: center;
    user-select: none;
}

/* Container queries for smaller viewports */
@container (max-width: 480px) {
    .custom-slider {
        height: 6rem;
    }

    .slider-handle {
        width: 0.875rem;
        height: 1.75rem;
    }

    .slider-point {
        width: 0.625rem;
        height: 0.625rem;
    }

    .slider-tooltip {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }

    .slider-label {
        font-size: 0.75rem;
    }
}




/* Disable hover effects for options after answering */
.correct:hover,
.wrong:hover {
    /* background-color: inherit !important;
    color: inherit !important; */
}

.correct:hover .option-number,
.wrong:hover .option-number {
    /* background-color: inherit !important;
    color: inherit !important; */
}

.correct:hover::before,
.wrong:hover::before {
    opacity: 0;
}

/* on mobile */
@media only screen and (max-width: 600px) {
    /* .options {
        grid-template-columns: 1fr;
    } */

    /* .dashboard {
        grid-template-columns: 1fr;
    } */

    /* 
    .small-square-module {
        grid-column: span 2;
    }

    .small-module {
        grid-column: span 4;
    } */


}


/* CIRCLE STYLES */
.animated-circles {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    aspect-ratio: 1/1;

    max-width: 300px;
    margin: auto;

    /* CSS variables with defaults */
    --circles-incorrect-color: #9C27B0;

    cursor: pointer;
}



.animated-circles .circles-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.animated-circles .circle-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.animated-circles .circle {
    position: absolute;
    border-radius: 50%;
    background-color: var(--secondary-color);
    transition: background-color 0.5s ease-in-out;
    aspect-ratio: 1/1;
}

.animated-circles .circle-outer {
    width: 100%;
    height: 100%;
    opacity: 0.4;
}

.animated-circles .circle-middle {
    width: 75%;
    height: 75%;
    opacity: 0.6;
}

.animated-circles .circle-inner {
    width: 50%;
    height: 50%;
    opacity: 0.8;
}

/* Improved feedback square for small sizes */
.animated-circles .feedback-square {
    position: absolute;
    left: -85%;
    top: 50%;
    transform: translateY(-50%);

    /* Adaptive sizing */
    width: max(75%, 30px);
    height: max(70%, 30px);

    /* Better minimum size for small containers */
    /* min-width: 24px; */
    /* min-height: 12px; */

    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
    border-radius: 4px;
}

.animated-circles .check-icon {
    color: var(--circles-incorrect-color);
    /* Responsive font size */
    font-size: clamp(1.6rem, 1.5em, 2vw);
}

/* Improved outdent for small sizes */
.animated-circles .outdent {
    position: absolute;
    right: -6px;
    top: 50%;

    /* Adaptive sizing */
    width: max(10px, 10%);
    height: max(10px, 10%);

    /* Minimum size */
    min-width: 6px;
    min-height: 6px;

    background-color: white;
    transform: translateY(-50%) rotate(45deg);
    z-index: -1;
}

/* New +1 element styling */
.animated-circles .plus-one {
    position: absolute;
    top: 50%;
    left: -50%;
    transform: translate(-50%, -50%);
    color: var(--secondary-color);
    /* font-weight: bold; */
    font-size: clamp(1.9rem, 2.5vw, 1.5rem);
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

/* Animation for +1 element */
@keyframes fadeUpAndOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%);
    }

    40% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    60% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -120%);
    }
}

.animated-circles .plus-one.animate {
    animation: fadeUpAndOut 1.2s ease-out forwards;
}

/* Animation keyframes */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes contract {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(0.8);
    }
}

@keyframes expand {
    0% {
        transform: scale(0.8);
    }

    100% {
        transform: scale(1);
    }
}

/* Animation classes */
.animated-circles .circle.pulse {
    animation: pulse 0.8s ease-in-out;
}

.animated-circles .circle.incorrect {
    background-color: var(--circles-incorrect-color);
}

.animated-circles .circle.contract {
    animation: contract 0.5s ease-in-out forwards;
}

.animated-circles .circle.expand {
    animation: expand 0.5s ease-in-out forwards;
}

.animated-circles .feedback-visible {
    opacity: 1 !important;
}

/* Container for your circles (add height/width) */
.circle-container {
    height: 100px;
    width: 100px;
    position: relative;
}

.helper-encouragment {
    /* font-style: italic; */
    /* font-weight: bold; */
}

.helper-stat {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* padding: 5px; */
    /* border-bottom: 2px solid var(--primary-color); */
    min-width: 91px;
}

.helper-stat-title {
    font-size: 0.7em;
}

.helper-stat-value {
    font-size: 1.1em;
    font-weight: bold;
}

.helper-encouragement {
    text-align: center;
    display: inline-flex;
    align-items: center;
    margin-bottom: 5px;
    margin-top: -5px;
}

.helper-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    flex-direction: row;
    align-items: center;
    border: 1px solid;
    padding: 5px;
    box-sizing: border-box;
    border-radius: 5px;
}

.history-content {
    flex-direction: column;
    width: 90%;
}

.history-question {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8em;
    /* font-weight: bold; */
    color: #28261c;
    display: block;
}

.history-answer-wrapper {
    font-size: 0.8em;
    color: #999;
    margin-top: 5px;
    /* font-style: italic; */
    flex-direction: row;
    flex-wrap: nowrap;
    white-space: nowrap;
    text-overflow: ellipsis;
    gap: 5px;
    justify-content: space-between;
}

.history-answer-section {
    display: flex;
    flex-direction: row;
    gap: 5px;
    width: 50%;
}

.you-said {
    flex-shrink: 0;
}

.history-answer {
    flex: 1;
    width: 0;
    /* This is the key addition! */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.history-icon {
    font-size: 1.6em !important;
    margin-right: 5px;
    /* flex: 1; */
}


/* Incorrect */
.history-incorrect .history-answer {
    color: #db3737;
}


.history-incorrect .history-icon {
    color: #9C27B0;
}

.history-incorrect.history-item {
    border-color: #9C27B0;
    background-color: #9C27B015;
}


/* Correct */
.history-correct .history-answer {
    color: #5ec277;
}

.history-correct .history-icon {
    color: #5ec277;
}

.history-correct.history-item {
    border-color: #5ec277;
    background-color: #5ec27715;
}



/* -- Loading Dialog Styles -- */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 100%;
}

.star-loader {
    width: 80px;
    height: 80px;
    position: relative;
    animation: gentleRotate 8s linear infinite;
}

.ray {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 50px;
    background: linear-gradient(to top, #da6440, #e67e4a, #da6440);
    border-radius: 6px;
    transform-origin: center center;
    transform: translateX(-50%) translateY(-50%);
}

.ray:nth-child(odd) {
    height: 46px;
    width: 2.5px;
}

.ray:nth-child(3n) {
    height: 54px;
    background: linear-gradient(to top, #d15a36, #da6440, #d15a36);
}

.ray:nth-child(4n) {
    width: 3.5px;
    border-radius: 8px;
}

.style-1 .ray {
    animation: var(--anim) 3.8s ease-in-out infinite;
}

.style-2 .ray {
    animation: var(--anim) 1.8s ease-in-out infinite;
}

.style-3 .ray {
    animation: var(--anim) 3s ease-in-out infinite;
}

.style-4 .ray {
    animation: var(--anim) 3.2s ease-in-out infinite;
}

.style-5 .ray {
    animation: var(--anim) 2.8s ease-in-out infinite;
}

@keyframes anim {

    0%,
    100% {
        transform: translateX(-50%) translateY(-50%) rotate(var(--rotation)) var(--start);
        opacity: var(--op-start);
    }

    50% {
        transform: translateX(-50%) translateY(-50%) rotate(var(--rotation)) var(--mid);
        opacity: var(--op-mid);
    }
}

.loading-text {
    color: #8b5a3c;
    font-size: 16px;
    animation: textFade 2s ease-in-out infinite;
    font-weight: bold;
    font-family: 'Copernicus', sans-serif;
}

.tips-container {
    position: relative;
    height: 50px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-family: 'Copernicus', sans-serif;
}

.learning-tip {
    position: absolute;
    color: #8b5a3c;
    font-size: 14px;
    font-style: italic;
    text-align: center;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.6s ease-in-out;
    max-width: 400px;
}

.learning-tip.active {
    opacity: 1;
    transform: translateY(0);
}

.learning-tip.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

.loading-dialog {
    position: fixed;
    width: 100vw;
    height: 100vh;
    min-width: 100vw;
    min-height: 100vh;
    /* margin: 0; */
    border-radius: 0px;
    background: rgba(255, 252, 248, 0.685);
    /* display: flex; */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border: none;
    backdrop-filter: blur(3px);
    box-sizing: border-box;
    /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); */
}

.cram-outline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    box-shadow: inset 0 0 0px rgba(0, 0, 0, 0.8);
    z-index: 1000000;
    transition: all 0.8s ease;
    pointer-events: none;
    opacity: 0;
    /* visibility: hidden; */
}

.cram-outline.active {
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
    opacity: 1;
    visibility: visible;
}

@keyframes gentleRotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes textFade {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}