body {
    margin: 0;
}

/* recoletta black.tff font*/
@font-face {
    font-family: 'Recoleta Black';
    src: url('/Recoleta-Black.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}



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

.dashboard {
    /* margin-top: 320px; */
}

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



.lecture-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
    overflow-x: hidden;
    order: 1;
    flex: 1;
}

.lecture-item {
    display: flex;
    align-items: center;
    margin-left: 30px;
    border-bottom: 1px solid #e0e0e0;
    justify-content: start;
    flex-direction: row;
    font-size: 1.35em;
    cursor: pointer;
    transition: all 0.1s ease;
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

.lecture-item:hover {
    background-color: #f8f8f8;
    filter: brightness(0.97);
}

.lecture-item:active {
    background-color: #f0f0f0;

}

.lecture-checkbox .module-checkbox {
    margin-right: 10px;
    width: 15px;
}

.module-title {
    font-weight: normal;
    font-size: 1.1em;
}

.lecture-title {
    /* margin-left: 10px; */
    flex-grow: 1;
    text-wrap: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 80%;
    font-size: 0.8em;
    padding-left: 5px;
    /* font-weight: bold; */
}

.module-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.module-content.open {
    max-height: 1000px;
    /* Adjust based on your needs */
    transition: max-height 0.5s ease-in;
    margin-bottom: 10px;
}

.module-header {
    display: flex;
    align-items: start;
    cursor: pointer;
    padding: 10px;
    position: relative;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 10px;
}

.module-header::after {
    content: 'expand_more';
    font-family: 'Material Symbols Outlined';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.module-header.open::after {
    transform: rotate(180deg) translateY(50%);
}

.lecture-count {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    font-size: 0.6em;
}

.deep-learning .lecture-count {
    right: 45px;
    color: #fff;
    background-color: #9c27b0;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.9em;
    font-weight: normal;

}

.deep-learning {
    border: 1px solid #9c27b0;
    background: linear-gradient(25deg, #8927b0ab 0%, #9c27b02a 100%);
    background-size: 100% 100%;
    border-radius: 10px;
    transition: background-size 0.5s ease, background-position 0.5s ease;
}

.deep-learning:hover {
    background: linear-gradient(25deg, #9c27b08a 0%, #9c27b02a 100%);
    background-size: 150% 150%;
    background-position: center;
}

.deep-learning::after {
    content: 'lock_reset';
    font-family: 'Material Symbols Outlined';
    position: absolute;
    right: 10px;
    top: 52%;
    transform: translateY(-50%);
    font-size: 1.7em;
    color: #9c27b0;
}

.deep-learning .module-checkbox {
    border-color: #9c27b0;
}

.deep-learning .module-checkbox:checked {
    background-color: #9c27b0;
    border-color: #9c27b0;
}

.deep-learning .module-checkbox:checked:after {
    border-color: white;
}

.deep-learning .module-checkbox:hover {
    background-color: #9c27b02a;
    opacity: 0.9;
}

.deep-learning .module-checkbox:checked:hover {
    background-color: #9c27b0;
    opacity: 0.9;
}

.deep-learning .module-checkbox:indeterminate {
    background-color: #9c27b0;
}

.deep-learning .module-checkbox:indeterminate:after {
    background: white;
}

.deep-learning .module-checkbox:indeterminate:hover {
    background-color: #9c27b0;
}


.select-all {
    padding: 10px;
    border-top: 2px solid #c87e5b;
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    order: 2;
}

.select-all .module-checkbox {
    /* margin-right: 10px;
    aspect-ratio: 1/1;
    min-width: 50px;
    min-height: 50px; */
    /* min-width: 50px;
    min-height: 50px;
    max-width: 50px;
    max-height: 50px;
    display: flex;
    justify-content: center;
    align-items: center; */
}


#selectAll {
    /* margin-right: 10px; */
    height: auto;
}

.paper-stats {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
    color: #666;
}

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

.user-progress {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.study-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.instant-study,
.smart-study {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.circular-progress-small {
    width: 30px;
    height: 30px;
}

.circular-progress-large {
    width: 60px;
    height: 60px;
    stroke: var(--secondary-color);
}

#randomWord {
    font-size: 1.2em;
    margin: 10px 0;
    color: #c87e5b;
}

/* Word Cloud Animation Styles */
.word-cloud {
    position: absolute;
    height: auto;
    width: 30%;
    max-width: 230px;
    top: 50%;
    transform: translateY(-50%);
    aspect-ratio: 1/1;
    background-color: #f8f8f8;
    border-radius: 50%;
    overflow: visible;
    box-shadow: inset 0 0 13px rgba(0, 0, 0, 0.11);
    transition: all 0.3s ease;
    z-index: 1;
    border: 4px #c2815e95 solid;
    /* Changed from 1 to -1 to put it behind main element */
}

.orbit-patch {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 22.5px;
    height: 80px;
    background-color: #f8f8f8;
    background-image: radial-gradient(circle, #c87d5b45 1.2px, transparent 1.2px);

    transform: translateY(-50%);
    z-index: 1;

}

/* keep the dotted overlay above the ::before but under the content */
.word-cloud::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, #c87d5b45 1.1px, transparent 1.1px);
    background-size: 30px 30px;
    transition: all 0.3s ease;
    border-radius: 50%;
    z-index: 1;
    /* This puts the dotted overlay above the main circle */
}

/* word cloud dotted background (placed under the main circle) */
.word-cloud::before {
    /* content: '';
    position: absolute;
    top: 50%;
    left: -21px;
    width: 50px;
    height: 50px;
    background-color: #f8f8f8;
    transform: translateY(-50%);
    z-index: -1; Changed from -10 to -1, still behind the main circle */
}

.center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: #c87e5b;
    border-radius: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    animation: rotate 5s linear infinite;
}

@keyframes rotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.orbit-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    opacity: 0.2;
    transition: opacity 0.5s ease-in-out;
    will-change: transform;
    /* Remove transform-origin as it's no longer needed */
    pointer-events: none;
    /* Prevent dots from interfering with clicks */
    left: 50%;
    top: 50%;
}


.orbit-dot.lecture-dot {
    width: 12px;
    height: 12px;
    opacity: 0.8;
    background-color: var(--secondary-color);
}

.orbit-dot.entering {
    animation: dotEnter 0.5s ease-out forwards;
}

.orbit-dot.deep-learning-dot {
    width: 17px;
    height: 17px;
    opacity: 0.6;
    background-color: #8527b0;
}

.deep-learning-small-dot {
    background-color: #7927b0;
}

@keyframes dotEnter {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: inherit;
    }
}

.learn-button {
    width: 50%;
    margin-left: auto;
    height: 50px;
    font-size: 1.2em;
}

.random-topic {}

.user-progress {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.progress-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: auto;
}

.mastery-level {
    background-color: #c2815e;
    color: white;
    padding: 12px;
    border-radius: 20px;
    font-size: 2em;
}





/* Progress Circle Styles */
.circular-progress-small,
.circular-progress-large {
    transform: rotate(-90deg);
    /* Make progress start from top */
    overflow: visible;
}

.circle-bg {
    fill: none;
    stroke: #dddddd;
}

.circle-progress {
    fill: none;
    stroke: var(--secondary-color);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

/* Small circle specific styles */
.circular-progress-small .circle-bg,
.circular-progress-small .circle-progress {
    stroke-dasharray: 75;
    /* 2πr where r=12 */
}

/* Large circle specific styles */
.circular-progress-large .circle-bg,
.circular-progress-large .circle-progress {
    stroke-dasharray: 157;
    /* 2πr where r=25 */
}

.checkbox-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-direction: row;
}


/* CHECKBOX STYLES */

/* Hide the default checkbox */
.module-checkbox,
.lecture-checkbox {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    background-color: #ffffff;
    cursor: pointer;
    position: relative;
    margin-right: 8px;
    outline: none;
}

/* Create the checkmark (hidden when not checked) */
.module-checkbox:after,
.lecture-checkbox:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Show checkmark when checked */
.module-checkbox:checked:after,
.lecture-checkbox:checked:after {
    display: block;
}

/* Background when checked */
.module-checkbox:checked,
.lecture-checkbox:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Style for indeterminate state */
.module-checkbox:indeterminate {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.module-checkbox:indeterminate:after {
    content: "";
    position: absolute;
    display: block;
    left: 4px;
    top: 8px;
    width: 8px;
    height: 2px;
    background: rgb(255, 255, 255);
    border: none;
    transform: none;
    transform: translate(2px, 1px);
    font-weight: bold;
}

/* Hover state */
.module-checkbox:hover,
.module-checkbox:indeterminate:hover,
.lecture-checkbox:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1);
}

.module-checkbox:checked:hover,
.module-checkbox:indeterminate:hover,
.lecture-checkbox:checked:hover {
    background-color: var(--primary-color);
    opacity: 0.9;
}

.lecture-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    z-index: 0;
    display: flex;
    flex-direction: row;
    border-radius: 4px;
    overflow: hidden;
    margin-left: 35px;
}

.lecture-progress-segment {
    height: 100%;
    transition: width 0.3s ease;
    border: none;
}

.lecture-progress-segment.correct {
    background-color: rgba(75, 181, 67, 0.2);
}

.lecture-progress-segment.incorrect {
    background-color: rgba(255, 69, 58, 0.2);
}

.lecture-progress-segment.remaining {
    background-color: transparent;
}

.module.word-cloud {
    grid-column: span 2;
    grid-row: span 3;
}

.start-studying {
    grid-column: span 2;
    grid-row: span 3;
    display: grid;
    place-items: center;
}

.select-box {
    grid-column: span 6;
    grid-row: span 6;
    overflow-y: auto;
    /* min-width: 655px; */
    /* font-family: 'Modern Era Medium', sans-serif; */
    display: flex;
    flex-direction: column;
}

.select-box-title {
    font-size: 1.5em;
    font-weight: bold;
    /* padding: 15px; */
    /* padding-left: 20px; */
    color: #333;
    order: 0;
    /* font-family: 'Modern Era Bold', sans-serif; */
}

.title-module {
    grid-row: span 1;
    grid-column: span 4;
    font-size: 3em;
}

.top-title-module {
    grid-row: span 1;
    grid-column: span 6;
    font-size: 3.5em;
    text-align: center;
    color: white;
    padding: 20px;
    padding-top: 45px;
    box-shadow: 0 0px 6px rgba(0, 0, 0, 0.1);

    position: relative;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    font-family: 'Recoleta Black', sans-serif;

    /* background-color: #f8f8f4;
    color: #333; */
}

/* on phone */
@media (max-width: 480px) {
    .top-title-module {
        padding-top: 100px;
    }
}



.top-title-module::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/images/6.jpg');
    background-size: cover;
    background-position: center;
    filter: blur(5px) brightness(0.7);
    z-index: -1;
    transform: scale(1.3);
}

.top-title-module>* {
    position: relative;
    z-index: 1;
}


.module-button {
    width: 40%;
    position: absolute;
    bottom: 20px;
    right: 20px;
}

.dashboard {
    /* margin-top: 0; */
}


/* for phone screen */
/* Study Mode Transitions for Card Groups */
.card-group {
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    transform-origin: center;
}

/* Terms Quiz Mode - Play Button */
.card-group.terms-mode {
    width: 89px !important;
    height: 110px !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-color-hover, #a46b4a) 100%) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.card-group.terms-mode .card {
    opacity: 0 !important;
    transform: scale(0) !important;
    transition: all 0.4s ease !important;
}

.card-group.terms-mode::after {
    content: 'play_arrow';
    font-family: 'Material Symbols Outlined';
    font-size: 48px;
    color: white;
    position: absolute;
    animation: pulse 2s ease-in-out infinite;
    z-index: 100;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Cram Mode - Red/Black Box */
.card-group.cram-mode {
    width: 90px !important;
    height: 120px !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #1a1a1a 0%, #8b0000 50%, #1a1a1a 100%) !important;
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.5), inset 0 0 10px rgba(255, 0, 0, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #ff0000 !important;
}

.card-group.cram-mode .card {
    opacity: 0 !important;
    transform: scale(0) !important;
    transition: all 0.4s ease !important;
}

.card-group.cram-mode::after {
    content: 'fast_forward';
    font-family: 'Material Symbols Outlined';
    font-size: 52px;
    color: #ff0000;
    position: absolute;
    animation: cramPulse 1.5s ease-in-out infinite;
    z-index: 100;
}

@keyframes cramPulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.15);
        filter: brightness(1.3);
    }
}

/* Classic Mode - Return to normal cards */
.card-group.classic-mode {
    width: 80px !important;
    height: 106.67px !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.card-group.classic-mode .card {
    opacity: 1 !important;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Reset card transforms for classic mode */
.card-group.classic-mode .card:nth-child(1) {
    transform: rotate(-5deg) translateX(-10px) !important;
}

.card-group.classic-mode .card:nth-child(2) {
    transform: none !important;
}

.card-group.classic-mode .card:nth-child(3) {
    transform: rotate(5deg) translateX(10px) !important;
}

.card-group.classic-mode::after {
    content: none !important;
}

/* Ensure cards transition smoothly */
.card-group .card {
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (max-width: 768px) {
    .dashboard {
        width: 100vw;
        padding: 10px;
        padding-top: 0;
        display: grid;
        box-sizing: border-box;
        grid-template-columns: 1fr;
        grid-template-rows: 4;
        gap: 20px;
        max-width: 100vw;
        /* margin-top: 0px; */
    }

    .top-title-module {
        padding: 20px;
    }

    .title-module {
        text-align: center;
        width: 100%;
        justify-content: center;
        align-items: center;
    }


    .module-button {
        width: 55%;
        position: absolute;
        bottom: 20px;
        right: 20px;
    }

    .start-studying {
        grid-column: span 1;
        grid-row: span 1;
        display: grid;
        place-items: center;
        font-size: 1em;
    }

    .select-box {
        /* grid-column: span 1;
        grid-row: span 1;
        overflow-y: auto;
        font-size: 1em;
        min-width: 0; */
    }

    .lecture-list {
        max-height: 100%;
    }

    .title-module {
        grid-row: span 1;
        grid-column: span 6;
        font-size: 2.5em;
    }

    .module.word-cloud {
        grid-column: span 1;
        grid-row: span 1;
        max-width: 80vw;
        margin: auto;
    }
}