.bmb-learn-wrap, .bmb-classroom-wrap {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    color: #111827;
    box-sizing: border-box;
}
.bmb-learn-wrap *, .bmb-classroom-wrap * { box-sizing: border-box; }

.bmb-hero-card, .bmb-classroom-top {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #311042 100%);
    color: #ffffff;
    border-radius: 22px;
    padding: 40px;
    box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.28);
    margin-bottom: 36px;
}
.bmb-hero-badge-row, .bmb-top-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.bmb-ai-pill, .bmb-meta-pill {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #f8fafc;
}
.bmb-wallet-pill {
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}
.bmb-hero-title, .bmb-classroom-title {
    color: #ffffff !important;
    font-size: clamp(26px, 4vw, 38px) !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    margin: 0 0 12px 0 !important;
}
.bmb-hero-sub, .bmb-classroom-desc { color: #cbd5e1; font-size: 16px; line-height: 1.6; margin: 0 0 22px 0; }

.bmb-input-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: rgba(255, 255, 255, 0.08);
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
}
.bmb-learn-wrap input[type="text"].bmb-topic-input {
    flex: 1 1 260px;
    background: #ffffff !important;
    color: #0f172a !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    font-size: 16px !important;
    margin: 0 !important;
    height: auto !important;
}
.bmb-learn-wrap select.bmb-lesson-select {
    flex: 0 0 auto;
    background: #f8fafc !important;
    color: #0f172a !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 14px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    height: auto !important;
}
.bmb-learn-wrap button.bmb-create-btn {
    background: linear-gradient(135deg, #cd2653 0%, #e11d48 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 14px 24px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: none !important;
    cursor: pointer;
}
.bmb-chips-row { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bmb-chips-label { font-size: 13px; color: #94a3b8; }
.bmb-topic-chip {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 999px !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    text-transform: none !important;
    cursor: pointer;
}

.bmb-progress-box {
    display: none;
    margin-top: 22px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 20px;
}
.bmb-progress-bar-track, .bmb-mastery-bar-wrap {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
}
.bmb-progress-bar-fill, .bmb-mastery-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #34d399, #cd2653);
    transition: width 0.5s ease;
}
.bmb-step-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; font-size: 13px; color: #94a3b8; }
.bmb-step-item.active { color: #ffffff; font-weight: 600; }
.bmb-step-item.done { color: #6ee7b7; }

.bmb-result-banner { margin-top: 20px; border-radius: 14px; padding: 20px; display: none; }
.bmb-result-success, .bmb-notice-ok { background: #ecfdf5; color: #065f46; border: 1px solid #10b981; padding: 18px 22px; border-radius: 12px; }
.bmb-result-error, .bmb-notice-err { background: #fef2f2; color: #991b1b; border: 1px solid #ef4444; padding: 18px 22px; border-radius: 12px; }
.bmb-notice-warn { background: #fef3c7; border: 1px solid #f59e0b; color: #92400e; padding: 16px 20px; border-radius: 12px; margin-bottom: 20px; }
.bmb-start-course-cta { display: inline-block; margin-top: 12px; background: #059669; color: #ffffff !important; text-decoration: none !important; padding: 10px 20px; border-radius: 10px; font-weight: 700; }

.bmb-catalog-title { font-size: 26px !important; font-weight: 800 !important; margin: 0 !important; }
.bmb-catalog-sub { margin: 4px 0 24px 0; color: #4b5563; font-size: 15px; }
.bmb-course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.bmb-course-card { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 18px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04); }
.bmb-card-tag, .bmb-lesson-badge { display: inline-block; font-size: 12px; font-weight: 700; color: #cd2653; background: #fff1f2; padding: 4px 10px; border-radius: 999px; margin-bottom: 12px; }
.bmb-card-title { font-size: 19px !important; font-weight: 700 !important; margin: 0 0 10px 0 !important; }
.bmb-card-desc { font-size: 14px; line-height: 1.55; color: #4b5563; margin: 0 0 20px 0; }
.bmb-card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px solid #f3f4f6; font-size: 13px; color: #6b7280; }
.bmb-card-link { color: #cd2653 !important; font-weight: 700; text-decoration: none !important; }
.bmb-back-link { color: #6ee7b7 !important; text-decoration: none !important; font-size: 14px; font-weight: 700; }

/* Classroom Layout */
.bmb-classroom-grid { display: grid; grid-template-columns: 290px 1fr; gap: 28px; align-items: start; }
.bmb-syllabus-nav { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 18px; padding: 18px; position: sticky; top: 24px; }
.bmb-syllabus-heading { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; font-weight: 800; margin: 0 0 12px 6px; }
.bmb-lesson-tab { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; background: transparent !important; color: #334155 !important; border: none !important; border-radius: 10px !important; padding: 12px 14px !important; font-size: 14px !important; font-weight: 600 !important; text-transform: none !important; margin-bottom: 6px; cursor: pointer; }
.bmb-lesson-tab.active { background: #cd2653 !important; color: #ffffff !important; }
.bmb-exam-tab { margin-top: 10px; border-top: 1px dashed #cbd5e1 !important; padding-top: 14px !important; font-weight: 700 !important; }
.bmb-lesson-stage { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 20px; padding: 36px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04); }
.bmb-lesson-panel { display: none; }
.bmb-lesson-panel.active { display: block; }
.bmb-lesson-heading { font-size: 26px !important; font-weight: 800 !important; margin: 0 0 20px 0 !important; }
.bmb-lesson-body { font-size: 16px; line-height: 1.78; color: #374151; }

.bmb-flashcards-section { margin-top: 30px; padding-top: 24px; border-top: 1px solid #f1f5f9; }
.bmb-flashcard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 12px; }
.bmb-flashcard { background: #0f172a; color: #ffffff; border-radius: 14px; padding: 20px; min-height: 130px; cursor: pointer; display: flex; flex-direction: column; justify-content: center; }
.bmb-flashcard.flipped { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.bmb-fc-hint { font-size: 11px; text-transform: uppercase; opacity: 0.7; margin-bottom: 6px; font-weight: 700; }
.bmb-fc-text { font-weight: 700; font-size: 15px; }

.bmb-challenge-box { margin-top: 26px; background: #fffbeb; border-left: 4px solid #f59e0b; padding: 18px 22px; border-radius: 12px; color: #78350f; }
.bmb-quiz-card { margin-top: 22px; background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 16px; padding: 24px; }
.bmb-quiz-title { font-size: 16px !important; font-weight: 700 !important; margin: 0 0 14px 0 !important; }
.bmb-quiz-option { display: flex; align-items: center; gap: 10px; background: #ffffff; border: 1px solid #e2e8f0; padding: 12px 16px; border-radius: 10px; margin-bottom: 10px; cursor: pointer; font-size: 15px; }
.bmb-quiz-feedback { margin-top: 12px; font-weight: 700; font-size: 14px; }

.bmb-tutor-box { margin-top: 28px; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 16px; padding: 20px; }
.bmb-tutor-row { display: flex; gap: 10px; margin-top: 10px; }
.bmb-tutor-input { flex: 1; background: #ffffff !important; border: 1px solid #7dd3fc !important; border-radius: 10px !important; padding: 10px 14px !important; font-size: 14px !important; }
.bmb-tutor-reply { margin-top: 12px; font-size: 14px; color: #0c4a6e; }

.bmb-lesson-nav-btns { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid #f1f5f9; }
.bmb-nav-btn { background: #0f172a !important; color: #ffffff !important; border: none !important; border-radius: 10px !important; padding: 12px 20px !important; font-size: 14px !important; font-weight: 700 !important; text-transform: none !important; cursor: pointer; }
.bmb-complete-btn { background: #059669 !important; }
.bmb-exam-submit-btn { background: #cd2653 !important; padding: 14px 28px !important; font-size: 16px !important; }

/* Certificate Unlock Card & Official Certificate */
.bmb-cert-unlock-card { margin-top: 24px; background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); color: #ffffff; border-radius: 18px; padding: 28px 32px; text-align: center; border: 1px solid rgba(251, 191, 36, 0.45); }
.bmb-cert-unlock-card h4 { color: #ffffff !important; font-size: 22px !important; margin: 12px 0 8px 0 !important; }
.bmb-cert-unlock-card p { color: #cbd5e1; font-size: 15px; max-width: 560px; margin: 0 auto; }
.bmb-unlock-pill { background: rgba(251, 191, 36, 0.18); color: #fbbf24; padding: 4px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.bmb-unlock-bal { font-size: 13px; color: #6ee7b7; margin-top: 8px; }
.bmb-unlock-btn { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important; color: #0f172a !important; border: none !important; border-radius: 12px !important; padding: 14px 28px !important; font-size: 16px !important; font-weight: 800 !important; text-transform: none !important; cursor: pointer; margin-top: 14px; }
.bmb-unlock-err { color: #fca5a5; font-size: 14px; margin-top: 10px; font-weight: 600; }

.bmb-cert-box { margin-top: 32px; padding: 14px; background: linear-gradient(135deg, #b45309 0%, #f59e0b 50%, #92400e 100%); border-radius: 18px; box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14); }
.bmb-cert-inner { background: radial-gradient(circle at top, #ffffff 0%, #fcfbf7 100%); border: 2px solid #0f172a; border-radius: 12px; padding: 44px 36px 32px; text-align: center; }
.bmb-cert-brand { display: inline-flex; align-items: center; gap: 8px; background: #0f172a; color: #fbbf24; padding: 6px 18px; border-radius: 999px; font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 14px; }
.bmb-cert-heading { font-family: 'Playfair Display', Georgia, serif !important; font-size: clamp(26px, 4vw, 36px) !important; font-weight: 800 !important; color: #0f172a !important; text-transform: uppercase; margin: 4px 0 8px !important; }
.bmb-cert-sub { font-size: 14px; color: #64748b; text-transform: uppercase; letter-spacing: 0.14em; margin: 0 0 18px; }
.bmb-cert-student { font-family: 'Playfair Display', Georgia, serif !important; font-size: clamp(28px, 4.2vw, 40px) !important; font-weight: 700 !important; color: #cd2653 !important; border-bottom: 2px solid #e2e8f0; display: inline-block; padding: 0 28px 8px; margin: 0 0 18px !important; }
.bmb-cert-body-copy { color: #475569; font-size: 15px; margin: 0; }
.bmb-cert-course { font-size: 21px !important; font-weight: 800 !important; color: #0f172a !important; margin: 10px 0 26px !important; }
.bmb-cert-bottom-grid { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; margin-top: 28px; padding-top: 20px; border-top: 1px solid #e2e8f0; }
.bmb-cert-col { flex: 1 1 160px; }
.bmb-cert-date { font-size: 15px; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.bmb-cert-sig-script { font-family: 'Great Vibes', cursive; font-size: 34px; color: #0f172a; line-height: 1.1; margin-bottom: 4px; }
.bmb-cert-sig-line { border-top: 1px solid #94a3b8; padding-top: 6px; font-size: 12px; color: #475569; font-weight: 700; }
.bmb-cert-sig-line span { font-weight: 500; font-size: 11px; }
.bmb-cert-seal { width: 82px; height: 82px; border-radius: 50%; background: radial-gradient(circle, #fbbf24 0%, #d97706 100%); border: 3px double #78350f; color: #451a03; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.bmb-cert-footer-bar { margin-top: 22px; padding-top: 12px; border-top: 1px dashed #cbd5e1; font-size: 12px; color: #64748b; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

@media print {
    body * { visibility: hidden; }
    #bmb-certificate-card, #bmb-certificate-card * { visibility: visible; }
    #bmb-certificate-card { position: fixed; left: 0; top: 0; width: 100%; margin: 0; box-shadow: none; }
    .bmb-no-print { display: none !important; }
}
@media (max-width: 768px) {
    .bmb-classroom-grid { grid-template-columns: 1fr; }
    .bmb-syllabus-nav { position: static; }
}