/* ============================== */
/* CHALKBOARD COMPONENTS          */
/* ============================== */

.chalkboard-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    height: 100%;
    width: 100%;
}

.chalkboard-frame {
    background: #5d4037;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 1200px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chalkboard-surface {
    background-color: #2F5D62;
    background-image: url('https://www.transparenttextures.com/patterns/black-scales.png'),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.2) 100%);
    border-radius: 4px;
    padding: 2rem;
    flex: 1;
    border: 2px solid #1F4044;
    position: relative;
    overflow-y: auto;
    color: var(--text-soft);
    display: flex;
    flex-direction: column;
}

.chalk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
    padding-bottom: 1rem;
}

.chalk-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: white;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

.chalk-score {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent);
    border: 2px solid var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

.chalk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.chalk-item {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.05);
}

.chalk-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-5px);
}

.chalk-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent);
    display: flex;
    justify-content: center;
}

.chalk-icon i {
    width: 32px;
    height: 32px;
}

.chalk-text {
    display: block;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: white;
}

.chalk-subtext {
    font-family: var(--font-body);
    font-size: 0.85rem;
    opacity: 0.7;
    color: var(--text-muted);
}

.chalk-dust {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.05), transparent);
    pointer-events: none;
}

/* Chalk Tray */
.chalk-tray {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1.5rem;
    background: #3e2723;
    border-top: 2px solid #5d4037;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.chalk-piece {
    height: 0.75rem;
    border-radius: 99px;
    opacity: 0.8;
}

.chalk-piece.white {
    width: 4rem;
    background: white;
}

.chalk-piece.yellow {
    width: 2.5rem;
    background: #fef3c7;
}

.chalk-piece.red {
    width: 5rem;
    background: #fecaca;
}

.chalk-eraser {
    width: 3rem;
    height: 1rem;
    background: #57534e;
    border-radius: 2px;
    border: 1px solid #44403c;
}

/* ============================== */
/* GAME COMPONENTS                */
/* ============================== */

.chalk-game-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.chalk-btn-back {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    transition: all 0.2s;
}

.chalk-btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.chalk-game-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: white;
}

.chalk-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: rgba(255, 255, 255, 0.7);
    gap: 1rem;
}

.chalk-game-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chalk-btn {
    background: var(--primary-dark);
    color: white;
    border: 2px solid white;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
}

.chalk-btn:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.2);
    background: #2a555a;
}

.chalk-input {
    background: transparent;
    border: none;
    border-bottom: 2px solid white;
    color: white;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    padding: 0.5rem;
    width: 100%;
    text-align: center;
    outline: none;
}

.chalk-input:focus {
    border-bottom-color: var(--accent);
}

.chalk-feedback {
    text-align: center;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 1rem;
    color: var(--accent);
}

/* ============================== */
/* TEXTBOOK / NOTEBOOK STYLES     */
/* ============================== */

.textbook-container,
.notebook-container {
    background: rgba(255, 255, 255, 0.05);
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 80vh;
    position: relative;
}

.textbook-title,
.notebook-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: white;
    margin-bottom: 2rem;
    text-align: center;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.textbook-header,
.notebook-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
}

.btn-textbook-back,
.btn-notebook-back {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    transition: all 0.2s;
}

.btn-textbook-back:hover,
.btn-notebook-back:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.index-item,
.notebook-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-soft);
    border-bottom: 1px dotted rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.index-item:hover,
.notebook-item:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
    padding-left: 1.5rem;
}

.index-number {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 700;
    min-width: 60px;
}

.index-title,
.notebook-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    flex: 1;
}

.index-dots {
    flex: 1;
    border-bottom: 2px dotted rgba(255, 255, 255, 0.2);
    margin: 0 0.5rem;
}

.index-page {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.notebook-section {
    margin-bottom: 2rem;
}

.notebook-subtitle {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.notebook-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.notebook-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    margin-left: auto;
}

/* ============================== */
/* QUIZ STYLES                    */
/* ============================== */

.quiz-paper {
    background: transparent;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
}

.question-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    line-height: 1.6;
    color: white;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.option-btn {
    width: 100%;
    text-align: left;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-soft);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

.option-btn:hover:not(:disabled) {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.option-btn:disabled {
    cursor: default;
}

.option-letter {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}

.option-btn.correct {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
}

.option-btn.incorrect {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

/* ============================== */
/* FLASHCARD STYLES               */
/* ============================== */

.flashcard-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
}

.flashcard-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.flashcard-counter {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.flashcard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
}

.flashcard-subject-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.flashcard-subject-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-5px);
}

.flashcard-subject-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.flashcard-subject-icon i {
    width: 40px;
    height: 40px;
}

.flashcard-subject-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.flashcard-subject-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

/* Card flip container */
.flashcard-wrapper {
    width: 100%;
    max-width: 700px;
    aspect-ratio: 3/2;
    perspective: 1000px;
    cursor: pointer;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s;
    transform-style: preserve-3d;
}

.flashcard-inner.flipped {
    transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.flashcard-front {
    background: var(--primary-dark);
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.flashcard-back {
    background: #1a3639;
    border: 3px solid rgba(236, 179, 144, 0.3);
    transform: rotateY(180deg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.flashcard-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.flashcard-text {
    font-family: var(--font-heading);
    font-size: 2rem;
    line-height: 1.4;
    color: white;
}

.flashcard-hint {
    position: absolute;
    bottom: 1.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.flashcard-actions {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 1rem;
}

.flashcard-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-heading);
}

.flashcard-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.flashcard-controls {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 400px;
}

.flashcard-control-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.flashcard-control-btn.retry {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.flashcard-control-btn.retry:hover {
    background: rgba(239, 68, 68, 0.2);
}

.flashcard-control-btn.know {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.flashcard-control-btn.know:hover {
    background: rgba(34, 197, 94, 0.2);
}

/* ============================== */
/* STRATEGY VIEW STYLES           */
/* ============================== */

.strategy-container {
    padding: 2rem;
}

.strategy-header {
    text-align: center;
    margin-bottom: 3rem;
}

.strategy-header h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: white;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
    margin-bottom: 0.5rem;
}

.strategy-header p {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
}

.sticky-note {
    background: #fef3c7;
    padding: 2rem;
    position: relative;
    max-width: 600px;
    margin: 0 auto 3rem;
    transform: rotate(1deg);
    transition: transform 0.3s;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
}

.sticky-note:hover {
    transform: rotate(0deg);
}

.sticky-note::before {
    content: '';
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 1rem;
    height: 1rem;
    background: #dc2626;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sticky-note p {
    color: #44403c;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    text-align: center;
    line-height: 1.6;
}

.strategy-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.strategy-tab {
    padding: 0.75rem 1.5rem;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 99px;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.strategy-tab:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.strategy-tab.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.strategy-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.strategy-stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.2s;
}

.strategy-stat-card:hover {
    transform: scale(1.03);
}

.strategy-stat-value {
    font-size: 3.5rem;
    font-weight: 900;
    color: white;
    margin-bottom: 0.5rem;
}

.strategy-stat-value.success {
    color: #86efac;
}

.strategy-stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.75rem;
}

.strategy-content {
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    min-height: 400px;
}

.strategy-content h1,
.strategy-content h2,
.strategy-content h3 {
    color: white;
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

.strategy-content h1 {
    font-size: 2rem;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.strategy-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.strategy-content h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    color: var(--accent);
}

.strategy-content p,
.strategy-content li {
    color: var(--text-soft);
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.strategy-content strong {
    color: #fef08a;
}

.strategy-content em {
    color: #86efac;
}

.strategy-subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.strategy-subject-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s;
}

.strategy-subject-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.strategy-subject-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 0.75rem;
}

.strategy-subject-name {
    font-family: var(--font-heading);
    font-weight: 700;
    color: white;
}

.strategy-subject-score {
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: var(--text-muted);
    font-family: monospace;
}

.strategy-progress-bar {
    height: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 99px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.strategy-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    border-radius: 99px;
    position: relative;
}

.strategy-progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

.strategy-empty {
    text-align: center;
    padding: 4rem 2rem;
    border: 4px dashed rgba(255, 255, 255, 0.1);
    border-radius: 24px;
}

.strategy-empty i {
    width: 64px;
    height: 64px;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
}

.strategy-empty h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: white;
    margin-bottom: 0.5rem;
}

.strategy-empty p {
    color: var(--text-muted);
}

/* ============================== */
/* LECTURE CONTENT                */
/* ============================== */

.lecture-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding-bottom: 4rem;
}

.btn-close-lecture {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    background: #f1f5f9;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.btn-close-lecture:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

.lecture-content {
    background: #fff;
    padding: 3rem;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    color: #334155;
    font-family: var(--font-body);
    line-height: 1.8;
    min-height: 600px;
    background-image: linear-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 100% 2rem;
    background-position: 0 1.5rem;
}

.lecture-content h1,
.lecture-content h2,
.lecture-content h3 {
    font-family: var(--font-heading);
    color: var(--primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.lecture-content h1 {
    font-size: 2.5rem;
    text-align: center;
    border-bottom: 3px double var(--accent);
    padding-bottom: 1rem;
}

.lecture-content h2 {
    font-size: 1.8rem;
    border-left: 5px solid var(--accent);
    padding-left: 1rem;
}

.lecture-content h3 {
    font-size: 1.4rem;
    color: var(--secondary);
}

.lecture-content p {
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    display: inline-block;
}

.lecture-content ul,
.lecture-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    background: rgba(255, 255, 255, 0.9);
}

.lecture-content li {
    margin-bottom: 0.5rem;
}

.lecture-content strong {
    color: var(--primary-dark);
    font-weight: 700;
}

.lecture-content blockquote {
    background: #fffbeb;
    border-left: 5px solid #f59e0b;
    padding: 1rem;
    margin: 2rem 0;
    font-style: italic;
}

.lecture-content pre {
    background: #1e293b;
    color: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    color: var(--text-muted);
}

.loading-state .spinner {
    margin-bottom: 1rem;
}

/* ============================== */
/* MODAL STYLES                   */
/* ============================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: #3e2723;
    border: 2px solid #5d4037;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    color: white;
}

.modal-content h2 {
    color: var(--accent);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================== */
/* 3D UTILITIES                   */
/* ============================== */

.perspective-1000 {
    perspective: 1000px;
}

.preserve-3d {
    transform-style: preserve-3d;
}

.backface-hidden {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.rotate-y-180 {
    transform: rotateY(180deg);
}

/* ============================== */
/* MOBILE RESPONSIVE              */
/* ============================== */

@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
        padding: 0;
        gap: 0;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding: 1rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border: none;
        border-bottom: 4px solid #4e342e;
        border-radius: 0;
    }

    .sidebar::before {
        display: none;
    }

    .logo-container {
        margin-bottom: 0;
        padding-bottom: 0;
        border: none;
    }

    .nav-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #3e2723;
        flex-direction: row;
        justify-content: space-around;
        padding: 0.5rem;
        z-index: 9999;
        border-top: 4px solid #4e342e;
    }

    .nav-item {
        flex-direction: column;
        gap: 0.25rem;
        font-size: 0.7rem;
        padding: 0.5rem;
        border: none;
    }

    .nav-item span {
        display: none;
    }

    .main-content {
        border-radius: 0;
        border: none;
        padding: 1rem;
        padding-bottom: 100px;
        overflow-y: auto;
    }

    .chalkboard-frame {
        border-radius: 0;
        padding: 0.5rem;
    }

    .chalkboard-surface {
        padding: 1rem;
    }

    .chalk-title {
        font-size: 1.5rem;
    }

    .chalk-grid {
        grid-template-columns: 1fr;
    }

    .flashcard-text {
        font-size: 1.5rem;
    }

    .strategy-header h1 {
        font-size: 2rem;
    }

    .strategy-tabs {
        gap: 0.5rem;
    }

    .strategy-tab {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* ============================== */
/* DASHBOARD STYLES               */
/* ============================== */

.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero Section */
.dashboard-hero {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

.level-ring-container {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

.level-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.level-ring circle {
    transition: stroke-dashoffset 0.5s ease;
}

.level-ring-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.level-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-heading);
    line-height: 1;
}

.level-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.hero-info {
    flex: 1;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: white;
    margin-bottom: 0.25rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.xp-bar-container {
    margin-bottom: 1.5rem;
}

.xp-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #f59e0b);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.xp-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-item i {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.dashboard-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.card-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: white;
}

.card-header h3 i {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.tasks-count,
.achievements-count {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 700;
}

/* Daily Tasks */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.2s;
}

.task-item.completed {
    opacity: 0.6;
}

.task-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.task-icon i {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.task-info {
    flex: 1;
}

.task-desc {
    font-size: 0.9rem;
    color: white;
    display: block;
    margin-bottom: 0.5rem;
}

.task-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.task-progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s ease;
}

.task-reward {
    text-align: right;
}

.xp-badge {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
}

.task-check {
    color: var(--success);
}

.task-check i {
    width: 20px;
    height: 20px;
}

/* Subject Mastery */
.mastery-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mastery-item {
    padding: 0.5rem 0;
}

.mastery-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.mastery-name {
    font-size: 0.9rem;
    color: white;
}

.mastery-percent {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
}

.mastery-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.mastery-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.5s ease;
}

.mastery-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Achievements */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.achievement-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s;
}

.achievement-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.achievement-item.locked {
    opacity: 0.4;
    filter: grayscale(1);
}

.achievement-icon {
    font-size: 1.5rem;
}

.achievement-name {
    font-size: 0.75rem;
    color: var(--text-soft);
}

.card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    text-align: center;
}

.btn-view-all {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-view-all i {
    width: 16px;
    height: 16px;
}

.btn-view-all:hover {
    text-decoration: underline;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.action-btn i {
    width: 32px;
    height: 32px;
    color: var(--accent);
}

.action-btn span {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Level Road */
.level-road-section {
    margin-top: 1rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: white;
    margin-bottom: 1.5rem;
}

.section-title i {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.level-road {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    position: relative;
}

.level-road::before {
    content: '';
    position: absolute;
    left: 60px;
    right: 60px;
    top: 50%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%);
    z-index: 0;
}

.road-milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.milestone-marker {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-dark);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.road-milestone.reached .milestone-marker {

    .toast-success span:first-child {
        color: var(--success);
        font-size: 1.2rem;
    }

    .toast-info {
        border-left-color: #60a5fa;
    }

    .toast-badge {
        border-left-color: #fbbf24;
        background: linear-gradient(135deg, #5d4037 0%, #4e342e 100%);
    }

    .toast-badge span:first-child {
        font-size: 1.2rem;
    }

    @keyframes slideIn {
        from {
            transform: translateX(100%);
            opacity: 0;
        }

        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    @keyframes fadeOut {
        to {
            opacity: 0;
            transform: translateX(50%);
        }
    }

    /* ============================== */
    /* QUESTION TIMER                 */
    /* ============================== */

    .question-timer {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 16px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 20px;
        font-family: 'Merriweather', serif;
        color: var(--accent);
        font-size: 1.1rem;
        font-weight: 700;
    }

    .question-timer.warning {
        color: var(--warning);
        animation: pulse 1s infinite;
    }

    .question-timer.danger {
        color: var(--error);
        animation: pulse 0.5s infinite;
    }

    /* ============================== */
    /* LEVEL UP CELEBRATION           */
    /* ============================== */

    .level-up-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.85);
        z-index: 10001;
        display: flex;
        align-items: center;
        justify-content: center;
        animation: fadeIn 0.3s ease-out;
    }

    .level-up-modal {
        text-align: center;
        animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .level-up-icon {
        font-size: 80px;
        animation: bounce 0.6s ease infinite;
    }

    .level-up-title {
        font-family: var(--font-heading);
        font-size: 3rem;
        color: var(--accent);
        text-shadow: 0 0 30px rgba(236, 179, 144, 0.5);
        margin: 20px 0;
        letter-spacing: 4px;
    }

    .level-up-levels {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px;
        margin: 30px 0;
    }

    .level-from {
        font-size: 3rem;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.5);
        font-family: var(--font-heading);
    }

    .level-arrow {
        font-size: 2.5rem;
        color: var(--accent);
        animation: arrowPulse 0.5s ease infinite alternate;
    }

    .level-to {
        font-size: 4rem;
        font-weight: 700;
        color: var(--success);
        font-family: var(--font-heading);
        text-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
    }

    .level-up-subtitle {
        font-size: 1.5rem;
        color: var(--text-muted);
        margin-top: 10px;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    @keyframes scaleIn {
        from {
            transform: scale(0.5);
            opacity: 0;
        }

        to {
            transform: scale(1);
            opacity: 1;
        }
    }

    @keyframes bounce {

        0%,
        100% {
            transform: translateY(0);
        }

        ```css right: 60px;
        top: 50%;
        height: 4px;
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-50%);
        z-index: 0;
    }

    .road-milestone {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        position: relative;
        z-index: 1;
    }

    .milestone-marker {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--primary-dark);
        border: 2px solid rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        font-weight: 700;
        font-size: 0.8rem;
        color: var(--text-muted);
    }

    .road-milestone.reached .milestone-marker {
        background: var(--accent);
        color: var(--primary-dark);
    }

    .toast-success span:first-child {
        color: var(--success);
        font-size: 1.2rem;
    }

    .toast-info {
        border-left-color: #60a5fa;
    }

    .toast-badge {
        border-left-color: #fbbf24;
        background: linear-gradient(135deg, #5d4037 0%, #4e342e 100%);
    }

    .toast-badge span:first-child {
        font-size: 1.2rem;
    }

    @keyframes slideIn {
        from {
            transform: translateX(100%);
            opacity: 0;
        }

        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    @keyframes fadeOut {
        to {
            opacity: 0;
            transform: translateX(50%);
        }
    }

    /* ============================== */
    /* QUESTION TIMER                 */
    /* ============================== */

    .question-timer {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 16px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 20px;
        font-family: 'Merriweather', serif;
        color: var(--accent);
        font-size: 1.1rem;
        font-weight: 700;
    }

    .question-timer.warning {
        color: var(--warning);
        animation: pulse 1s infinite;
    }

    .question-timer.danger {
        color: var(--error);
        animation: pulse 0.5s infinite;
    }

    /* ============================== */
    /* LEVEL UP CELEBRATION           */
    /* ============================== */

    .level-up-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.85);
        z-index: 10001;
        display: flex;
        align-items: center;
        justify-content: center;
        animation: fadeIn 0.3s ease-out;
    }

    .level-up-modal {
        text-align: center;
        animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .level-up-icon {
        font-size: 80px;
        animation: bounce 0.6s ease infinite;
    }

    .level-up-title {
        font-family: var(--font-heading);
        font-size: 3rem;
        color: var(--accent);
        text-shadow: 0 0 30px rgba(236, 179, 144, 0.5);
        margin: 20px 0;
        letter-spacing: 4px;
    }

    .level-up-levels {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px;
        margin: 30px 0;
    }

    .level-from {
        font-size: 3rem;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.5);
        font-family: var(--font-heading);
    }

    .level-arrow {
        font-size: 2.5rem;
        color: var(--accent);
        animation: arrowPulse 0.5s ease infinite alternate;
    }

    .level-to {
        font-size: 4rem;
        font-weight: 700;
        color: var(--success);
        font-family: var(--font-heading);
        text-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
    }

    .level-up-subtitle {
        font-size: 1.5rem;
        color: var(--text-muted);
        margin-top: 10px;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    @keyframes scaleIn {
        from {
            transform: scale(0.5);
            opacity: 0;
        }

        to {
            transform: scale(1);
            opacity: 1;
        }
    }

    @keyframes bounce {

        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-15px);
        }
    }

    @keyframes arrowPulse {
        from {
            transform: scale(1);
        }

        to {
            transform: scale(1.2);
        }
    }

    /* ============================== */
    /* FLASHCARDS                     */
    /* ============================== */

    .flashcard-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        height: 100%;
        overflow: hidden;
    }

    .flashcard-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        width: 100%;
        max-width: 800px;
    }

    .flashcard-subject-card {
        background: rgba(255, 255, 255, 0.08);
        border: 2px dashed rgba(255, 255, 255, 0.2);
        border-radius: 12px;
        padding: 1.5rem;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        text-align: center;
    }

    .flashcard-subject-card:hover {
        background: rgba(255, 255, 255, 0.12);
        border-color: var(--accent);
        transform: translateY(-4px);
    }

    .flashcard-subject-icon {
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(236, 179, 144, 0.2);
        border-radius: 12px;
        color: var(--accent);
    }

    .flashcard-subject-icon i {
        width: 24px;
        height: 24px;
    }

    .flashcard-subject-name {
        font-weight: 600;
        font-size: 1rem;
        color: white;
    }

    .flashcard-subject-label {
        font-size: 0.75rem;
        color: var(--text-muted);
    }

    .flashcard-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 1.5rem;
        flex-shrink: 0;
    }

    .flashcard-counter {
        font-weight: 700;
        color: var(--accent);
        font-size: 1.1rem;
    }

    /* Flashcard Wrapper - Contains the flip card */
    .flashcard-wrapper {
        width: 100%;
        max-width: 500px;
        height: 320px;
        perspective: 1000px;
        cursor: pointer;
        flex-shrink: 0;
    }

    .flashcard-inner {
        position: relative;
        width: 100%;
        height: 100%;
        transition: transform 0.6s;
        transform-style: preserve-3d;
    }

    .flashcard-inner.flipped {
        transform: rotateY(180deg);
    }

    .flashcard-front,
    .flashcard-back {
        position: absolute;
        width: 100%;
        height: 100%;
        backface-visibility: hidden;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    .flashcard-front {
        background: linear-gradient(145deg, #3e4e3b 0%, #2b3a28 100%);
        border: 2px solid rgba(255, 255, 255, 0.15);
    }

    .flashcard-back {
        background: linear-gradient(145deg, #4e342e 0%, #3e2723 100%);
        border: 2px solid rgba(236, 179, 144, 0.3);
        transform: rotateY(180deg);
    }

    .flashcard-label {
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 2px;
        color: rgba(255, 255, 255, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.2);
        padding: 4px 12px;
        border-radius: 4px;
        align-self: flex-start;
        margin-bottom: 1rem;
        flex-shrink: 0;
    }

    .flashcard-text {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        line-height: 1.6;
        color: white;
        text-align: center;
        overflow-y: auto;
        padding: 0.5rem;
    }

    .flashcard-hint {
        font-size: 0.75rem;
        color: var(--text-muted);
        text-align: center;
        margin-top: auto;
        flex-shrink: 0;
    }

    .flashcard-actions {
        display: flex;
        gap: 1rem;
        justify-content: center;
        margin-top: auto;
        flex-shrink: 0;
        padding-top: 1rem;
    }

    .flashcard-action-btn {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        color: white;
        font-size: 0.8rem;
        cursor: pointer;
        transition: all 0.2s;
    }

    .flashcard-action-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: var(--accent);
    }

    /* Flashcard Controls */
    .flashcard-controls {
        display: flex;
        gap: 1.5rem;
        justify-content: center;
        margin-top: 2rem;
        flex-shrink: 0;
    }

    .flashcard-control-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        padding: 1rem 2rem;
        border-radius: 12px;
        border: 2px solid;
        cursor: pointer;
        transition: all 0.2s;
        font-weight: 600;
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .flashcard-control-btn.retry {
        background: rgba(239, 68, 68, 0.1);
        border-color: rgba(239, 68, 68, 0.4);
        color: #ef4444;
    }

    .flashcard-control-btn.retry:hover {
        background: rgba(239, 68, 68, 0.2);
        border-color: #ef4444;
    }

    .flashcard-control-btn.know {
        background: rgba(34, 197, 94, 0.1);
        border-color: rgba(34, 197, 94, 0.4);
        color: #22c55e;
    }

    .flashcard-control-btn.know:hover {
        background: rgba(34, 197, 94, 0.2);
        border-color: #22c55e;
    }

    /* Chalk board specific overrides */
    .chalk-btn-back {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        padding: 0.5rem 1rem;
        border-radius: 8px;
        color: white;
        cursor: pointer;
        transition: all 0.2s;
        font-size: 0.9rem;
    }

    .flashcard-subject-name {
        font-weight: 600;
        font-size: 1rem;
        color: white;
    }

    .flashcard-subject-label {
        font-size: 0.75rem;
        color: var(--text-muted);
    }

    .flashcard-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 1.5rem;
        flex-shrink: 0;
    }

    .flashcard-counter {
        font-weight: 700;
        color: var(--accent);
        font-size: 1.1rem;
    }

    /* Flashcard Wrapper - Contains the flip card */
    .flashcard-wrapper {
        width: 100%;
        max-width: 500px;
        height: 320px;
        perspective: 1000px;
        cursor: pointer;
        flex-shrink: 0;
    }

    .flashcard-inner {
        position: relative;
        width: 100%;
        height: 100%;
        transition: transform 0.6s;
        transform-style: preserve-3d;
    }

    .flashcard-inner.flipped {
        transform: rotateY(180deg);
    }

    .flashcard-front,
    .flashcard-back {
        position: absolute;
        width: 100%;
        height: 100%;
        backface-visibility: hidden;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    .flashcard-front {
        background: linear-gradient(145deg, #3e4e3b 0%, #2b3a28 100%);
        border: 2px solid rgba(255, 255, 255, 0.15);
    }

    .flashcard-back {
        background: linear-gradient(145deg, #4e342e 0%, #3e2723 100%);
        border: 2px solid rgba(236, 179, 144, 0.3);
        transform: rotateY(180deg);
    }

    .flashcard-label {
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 2px;
        color: rgba(255, 255, 255, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.2);
        padding: 4px 12px;
        border-radius: 4px;
        align-self: flex-start;
        margin-bottom: 1rem;
        flex-shrink: 0;
    }

    .flashcard-text {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        line-height: 1.6;
        color: white;
        text-align: center;
        overflow-y: auto;
        padding: 0.5rem;
    }

    .flashcard-hint {
        font-size: 0.75rem;
        color: var(--text-muted);
        text-align: center;
        margin-top: auto;
        flex-shrink: 0;
    }

    .flashcard-actions {
        display: flex;
        gap: 1rem;
        justify-content: center;
        margin-top: auto;
        flex-shrink: 0;
        padding-top: 1rem;
    }

    .flashcard-action-btn {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        color: white;
        font-size: 0.8rem;
        cursor: pointer;
        transition: all 0.2s;
    }

    .flashcard-action-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: var(--accent);
    }

    /* Flashcard Controls */
    .flashcard-controls {
        display: flex;
        gap: 1.5rem;
        justify-content: center;
        margin-top: 2rem;
        flex-shrink: 0;
    }

    .flashcard-control-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        padding: 1rem 2rem;
        border-radius: 12px;
        border: 2px solid;
        cursor: pointer;
        transition: all 0.2s;
        font-weight: 600;
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .flashcard-control-btn.retry {
        background: rgba(239, 68, 68, 0.1);
        border-color: rgba(239, 68, 68, 0.4);
        color: #ef4444;
    }

    .flashcard-control-btn.retry:hover {
        background: rgba(239, 68, 68, 0.2);
        border-color: #ef4444;
    }

    .flashcard-control-btn.know {
        background: rgba(34, 197, 94, 0.1);
        border-color: rgba(34, 197, 94, 0.4);
        color: #22c55e;
    }

    .flashcard-control-btn.know:hover {
        background: rgba(34, 197, 94, 0.2);
        border-color: #22c55e;
    }

    /* Chalk board specific overrides */
    .chalk-btn-back {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        padding: 0.5rem 1rem;
        border-radius: 8px;
        color: white;
        cursor: pointer;
        transition: all 0.2s;
        font-size: 0.9rem;
    }

    .flashcard-subject-name {
        font-weight: 600;
        font-size: 1rem;
        color: white;
    }

    .flashcard-subject-label {
        font-size: 0.75rem;
        color: var(--text-muted);
    }

    .flashcard-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 1.5rem;
        flex-shrink: 0;
    }

    .flashcard-counter {
        font-weight: 700;
        color: var(--accent);
        font-size: 1.1rem;
    }

    /* Flashcard Wrapper - Contains the flip card */
    .flashcard-wrapper {
        width: 100%;
        max-width: 500px;
        height: 320px;
        perspective: 1000px;
        cursor: pointer;
        flex-shrink: 0;
    }

    .flashcard-inner {
        position: relative;
        width: 100%;
        height: 100%;
        transition: transform 0.6s;
        transform-style: preserve-3d;
    }

    .flashcard-inner.flipped {
        transform: rotateY(180deg);
    }

    .flashcard-front,
    .flashcard-back {
        position: absolute;
        width: 100%;
        height: 100%;
        backface-visibility: hidden;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    .flashcard-front {
        background: linear-gradient(145deg, #3e4e3b 0%, #2b3a28 100%);
        border: 2px solid rgba(255, 255, 255, 0.15);
    }

    .flashcard-back {
        background: linear-gradient(145deg, #4e342e 0%, #3e2723 100%);
        border: 2px solid rgba(236, 179, 144, 0.3);
        transform: rotateY(180deg);
    }

    .flashcard-label {
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 2px;
        color: rgba(255, 255, 255, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.2);
        padding: 4px 12px;
        border-radius: 4px;
        align-self: flex-start;
        margin-bottom: 1rem;
        flex-shrink: 0;
    }

    .flashcard-text {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        line-height: 1.6;
        color: white;
        text-align: center;
        overflow-y: auto;
        padding: 0.5rem;
    }

    .flashcard-hint {
        font-size: 0.75rem;
        color: var(--text-muted);
        text-align: center;
        margin-top: auto;
        flex-shrink: 0;
    }

    .flashcard-actions {
        display: flex;
        gap: 1rem;
        justify-content: center;
        margin-top: auto;
        flex-shrink: 0;
        padding-top: 1rem;
    }

    .flashcard-action-btn {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        color: white;
        font-size: 0.8rem;
        cursor: pointer;
        transition: all 0.2s;
    }

    .flashcard-action-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: var(--accent);
    }

    /* Flashcard Controls */
    .flashcard-controls {
        display: flex;
        gap: 1.5rem;
        justify-content: center;
        margin-top: 2rem;
        flex-shrink: 0;
    }

    .flashcard-control-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        padding: 1rem 2rem;
        border-radius: 12px;
        border: 2px solid;
        cursor: pointer;
        transition: all 0.2s;
        font-weight: 600;
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .flashcard-control-btn.retry {
        background: rgba(239, 68, 68, 0.1);
        border-color: rgba(239, 68, 68, 0.4);
        color: #ef4444;
    }

    .flashcard-control-btn.retry:hover {
        background: rgba(239, 68, 68, 0.2);
        border-color: #ef4444;
    }

    .flashcard-control-btn.know {
        background: rgba(34, 197, 94, 0.1);
        border-color: rgba(34, 197, 94, 0.4);
        color: #22c55e;
    }

    .flashcard-control-btn.know:hover {
        background: rgba(34, 197, 94, 0.2);
        border-color: #22c55e;
    }

    /* Chalk board specific overrides */
    .chalk-btn-back {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        padding: 0.5rem 1rem;
        border-radius: 8px;
        color: white;
        cursor: pointer;
        transition: all 0.2s;
        font-size: 0.9rem;
    }

    .flashcard-subject-name {
        font-weight: 600;
        font-size: 1rem;
        color: white;
    }

    .flashcard-subject-label {
        font-size: 0.75rem;
        color: var(--text-muted);
    }

    .flashcard-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 1.5rem;
        flex-shrink: 0;
    }

    .flashcard-counter {
        font-weight: 700;
        color: var(--accent);
        font-size: 1.1rem;
    }

    /* Flashcard Wrapper - Contains the flip card */
    .flashcard-wrapper {
        width: 100%;
        max-width: 500px;
        height: 320px;
        perspective: 1000px;
        cursor: pointer;
        flex-shrink: 0;
    }

    .flashcard-inner {
        position: relative;
        width: 100%;
        height: 100%;
        transition: transform 0.6s;
        transform-style: preserve-3d;
    }

    .flashcard-inner.flipped {
        transform: rotateY(180deg);
    }

    .flashcard-front,
    .flashcard-back {
        position: absolute;
        width: 100%;
        height: 100%;
        backface-visibility: hidden;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    .flashcard-front {
        background: linear-gradient(145deg, #3e4e3b 0%, #2b3a28 100%);
        border: 2px solid rgba(255, 255, 255, 0.15);
    }

    .flashcard-back {
        background: linear-gradient(145deg, #4e342e 0%, #3e2723 100%);
        border: 2px solid rgba(236, 179, 144, 0.3);
        transform: rotateY(180deg);
    }

    .flashcard-label {
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 2px;
        color: rgba(255, 255, 255, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.2);
        padding: 4px 12px;
        border-radius: 4px;
        align-self: flex-start;
        margin-bottom: 1rem;
        flex-shrink: 0;
    }

    .flashcard-text {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        line-height: 1.6;
        color: white;
        text-align: center;
        overflow-y: auto;
        padding: 0.5rem;
    }

    .flashcard-hint {
        font-size: 0.75rem;
        color: var(--text-muted);
        text-align: center;
        margin-top: auto;
        flex-shrink: 0;
    }

    .flashcard-actions {
        display: flex;
        gap: 1rem;
        justify-content: center;
        margin-top: auto;
        flex-shrink: 0;
        padding-top: 1rem;
    }

    .flashcard-action-btn {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        color: white;
        font-size: 0.8rem;
        cursor: pointer;
        transition: all 0.2s;
    }

    .flashcard-action-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: var(--accent);
    }

    /* Flashcard Controls */
    .flashcard-controls {
        display: flex;
        gap: 1.5rem;
        justify-content: center;
        margin-top: 2rem;
        flex-shrink: 0;
    }

    .flashcard-control-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        padding: 1rem 2rem;
        border-radius: 12px;
        border: 2px solid;
        cursor: pointer;
        transition: all 0.2s;
        font-weight: 600;
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .flashcard-control-btn.retry {
        background: rgba(239, 68, 68, 0.1);
        border-color: rgba(239, 68, 68, 0.4);
        color: #ef4444;
    }

    .flashcard-control-btn.retry:hover {
        background: rgba(239, 68, 68, 0.2);
        border-color: #ef4444;
    }

    .flashcard-control-btn.know {
        background: rgba(34, 197, 94, 0.1);
        border-color: rgba(34, 197, 94, 0.4);
        color: #22c55e;
    }

    .flashcard-control-btn.know:hover {
        background: rgba(34, 197, 94, 0.2);
        border-color: #22c55e;
    }

    /* Chalk board specific overrides */
    .chalk-btn-back {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        padding: 0.5rem 1rem;
        border-radius: 8px;
        color: white;
        cursor: pointer;
        transition: all 0.2s;
        font-size: 0.9rem;
    }

    .chalk-btn-back:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    .chalk-btn-back i {
        width: 16px;
        height: 16px;
    }

    color: var(--text-muted);
}

.flashcard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.flashcard-counter {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.1rem;
}

/* Flashcard Wrapper - Contains the flip card */
.flashcard-wrapper {
    width: 100%;
    max-width: 500px;
    height: 320px;
    perspective: 1000px;
    cursor: pointer;
    flex-shrink: 0;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flashcard-inner.flipped {
    transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.flashcard-front {
    background: linear-gradient(145deg, #3e4e3b 0%, #2b3a28 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.flashcard-back {
    background: linear-gradient(145deg, #4e342e 0%, #3e2723 100%);
    border: 2px solid rgba(236, 179, 144, 0.3);
    transform: rotateY(180deg);
}

.flashcard-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 4px;
    align-self: flex-start;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.flashcard-text {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1.6;
    color: white;
    text-align: center;
    overflow-y: auto;
    padding: 0.5rem;
}

.flashcard-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: auto;
    flex-shrink: 0;
}

.flashcard-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: auto;
    flex-shrink: 0;
    padding-top: 1rem;
}

.flashcard-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.flashcard-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent);
}

/* Flashcard Controls */
.flashcard-controls {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
    flex-shrink: 0;
}

.flashcard-control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.flashcard-control-btn.retry {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.flashcard-control-btn.retry:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.flashcard-control-btn.know {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

.flashcard-control-btn.know:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
}

/* Chalk board specific overrides */
.chalk-btn-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.chalk-btn-back:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chalk-btn-back i {
    width: 16px;
    height: 16px;
}

/* ============================== */
/* MOBILE RESPONSIVE              */
/* ============================== */

@media (max-width: 768px) {

    /* Show mobile header actions */
    .mobile-header-actions {
        display: flex !important;
    }

    /* Adjust header for mobile */
    .header h1 {
        font-size: 1.5rem !important;
    }

    .header p {
        display: none;
    }
}