/* ==========================================================================
   Brilliant P - Notes & Learning Hub Stylesheet
   Modern, Clean, Professional, Accessible Educational UI
   ========================================================================== */

/* Page Background & Base Typography */
.notes-page {
    background-color: #f8fafc;
    color: #1e293b;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.7;
    min-height: 100vh;
}

/* ==========================================================================
   1. NOTES HERO SECTION
   ========================================================================== */
.notes-hero {
    background: linear-gradient(135deg, #004a8f 0%, #003366 60%, #001a3a 100%);
    position: relative;
    padding: 80px 0 70px;
    color: #ffffff;
    text-align: center;
    overflow: hidden;
}

.notes-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(216, 27, 96, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.notes-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 22px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #ffcc00;
    margin-bottom: 20px;
}

.notes-hero h1 {
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 16px;
    letter-spacing: -0.5px;
}

.notes-hero p.hero-subtitle {
    font-size: clamp(16px, 2vw, 19px);
    color: rgba(255, 255, 255, 0.88);
    max-width: 780px;
    margin: 0 auto 35px;
    font-weight: 400;
}

/* Free Education Pledge */
.free-pledge-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 211, 102, 0.15);
    border: 1px solid rgba(37, 211, 102, 0.35);
    color: #a7f3d0;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 25px;
}

/* Search Bar */
.notes-search-wrapper {
    max-width: 680px;
    margin: 0 auto 30px;
    position: relative;
}

.notes-search-wrapper input {
    width: 100%;
    padding: 18px 65px 18px 26px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.notes-search-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.65);
}

.notes-search-wrapper input:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: #ffcc00;
    box-shadow: 0 0 25px rgba(255, 204, 0, 0.35);
}

.notes-search-btn {
    position: absolute;
    right: 7px;
    top: 7px;
    bottom: 7px;
    width: 48px;
    border-radius: 50%;
    border: none;
    background: #d81b60;
    color: #ffffff;
    cursor: pointer;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.notes-search-btn:hover {
    background: #ffcc00;
    color: #004a8f;
    transform: scale(1.05);
}

/* Category Filter Pills */
.category-filter-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-pill:hover,
.filter-pill.active {
    background: #ffffff;
    color: #004a8f;
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   2. STATS & CATEGORY HERO CARDS
   ========================================================================== */
.notes-meta-bar {
    padding: 40px 0 20px;
}

.category-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.category-hero-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 74, 143, 0.06);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.category-hero-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(0, 74, 143, 0.12);
    border-color: #004a8f;
}

.category-hero-card.ai-ml-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: #004a8f;
}

.category-hero-card.python-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: #d81b60;
}

.cat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.cat-icon-badge {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
}

.cat-icon-badge.ai-ml {
    background: linear-gradient(135deg, #004a8f, #003366);
}

.cat-icon-badge.python {
    background: linear-gradient(135deg, #d81b60, #b0144d);
}

.cat-count-pill {
    font-size: 13px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #475569;
}

.category-hero-card h3 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 10px;
}

.category-hero-card p {
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 20px;
    flex-grow: 1;
}

.cat-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 14px;
    color: #004a8f;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
}

/* Overall Progress Card */
.progress-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 24px 30px;
    margin-bottom: 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.progress-info h4 {
    margin: 0 0 6px;
    font-size: 17px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-info p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.progress-track {
    flex-grow: 1;
    min-width: 200px;
    max-width: 450px;
}

.progress-bar-bg {
    height: 10px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #004a8f, #d81b60, #ffcc00);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-pct {
    font-size: 20px;
    font-weight: 800;
    color: #004a8f;
    min-width: 60px;
    text-align: right;
}

/* ==========================================================================
   3. TOPIC CARDS GRID
   ========================================================================== */
.topic-grid-section {
    padding-bottom: 80px;
}

.section-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.section-heading-row h2 {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 25px;
}

.topic-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.topic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 74, 143, 0.09);
    border-color: #cbd5e1;
}

.topic-card.completed {
    border-color: #86efac;
    background: #f0fdf4;
}

.topic-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.topic-number-pill {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #004a8f;
    background: #e0f2fe;
    padding: 4px 12px;
    border-radius: 20px;
}

.topic-card.completed .topic-number-pill {
    background: #dcfce7;
    color: #166534;
}

.topic-meta-tags {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #64748b;
}

.topic-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 10px;
    line-height: 1.4;
}

.topic-card p.topic-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 20px;
    flex-grow: 1;
}

.topic-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
}

.read-btn {
    background: #004a8f;
    color: #ffffff;
    border: none;
    padding: 9px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.read-btn:hover {
    background: #d81b60;
    transform: scale(1.03);
}

.completed-badge-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #16a34a;
    font-size: 13px;
    font-weight: 700;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

/* ==========================================================================
   4. DEDICATED TOPIC DETAIL VIEW
   ========================================================================== */
.topic-detail-container {
    padding: 40px 0 80px;
}

/* Breadcrumbs */
.notes-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 25px;
}

.notes-breadcrumb a {
    color: #004a8f;
    text-decoration: none;
    font-weight: 600;
}

.notes-breadcrumb a:hover {
    text-decoration: underline;
}

/* Detail Layout Grid: Sidebar + Content */
.topic-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* Sticky Sidebar */
.topic-sidebar {
    position: sticky;
    top: 90px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px;
}

.toc-list li {
    margin-bottom: 8px;
}

.toc-list li a {
    color: #475569;
    text-decoration: none;
    font-size: 13.5px;
    display: block;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.toc-list li a:hover,
.toc-list li a.active {
    background: #f1f5f9;
    color: #004a8f;
    font-weight: 600;
    border-left-color: #004a8f;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 2px solid #f1f5f9;
    padding-top: 20px;
}

.btn-sidebar-action {
    width: 100%;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-complete-topic {
    background: #e0f2fe;
    color: #004a8f;
}

.btn-complete-topic.completed {
    background: #22c55e;
    color: #ffffff;
}

.btn-print-topic {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.btn-print-topic:hover {
    background: #004a8f;
    color: #ffffff;
    border-color: #004a8f;
}

/* Main Content Area */
.topic-content-body {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    padding: 45px 50px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.04);
}

.topic-header-area {
    margin-bottom: 35px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 30px;
}

.topic-header-area .topic-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #004a8f;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 15px;
}

.topic-header-area h1 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    margin: 0 0 15px;
}

.topic-header-area p.topic-lead {
    font-size: 18px;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 20px;
}

.topic-meta-bar-detail {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

/* Learning Objectives Card */
.objectives-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px 30px;
    margin-bottom: 35px;
}

.objectives-card h4 {
    color: #004a8f;
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.objectives-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.objectives-list li {
    font-size: 14.5px;
    color: #334155;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.objectives-list li i {
    color: #22c55e;
    margin-top: 4px;
}

/* Exam Definition Box */
.exam-def-box {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #fde68a;
    border-radius: 16px;
    padding: 24px 30px;
    margin-bottom: 40px;
    position: relative;
}

.exam-def-header {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #92400e;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.exam-def-box p {
    font-size: 17px;
    font-weight: 600;
    color: #78350f;
    line-height: 1.6;
    margin: 0;
}

/* Detailed Explanation Typography */
.note-section {
    margin-bottom: 45px;
}

.note-section h2 {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 20px;
    position: relative;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

.note-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #004a8f;
    margin: 25px 0 15px;
}

.note-section p {
    font-size: 16px;
    color: #334155;
    margin-bottom: 18px;
    line-height: 1.8;
}

.note-section ul,
.note-section ol {
    margin: 0 0 20px 24px;
    color: #334155;
    font-size: 15.5px;
}

.note-section li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* Callout Boxes */
.note-callout {
    border-radius: 14px;
    padding: 18px 24px;
    margin: 25px 0;
    font-size: 15px;
    line-height: 1.6;
    border-left: 5px solid;
}

.note-callout.info {
    background: #f0f9ff;
    border-color: #0284c7;
    color: #0369a1;
}

.note-callout.warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #b45309;
}

.note-callout.danger {
    background: #fef2f2;
    border-color: #ef4444;
    color: #b91c1c;
}

/* Why it Matters Banner */
.why-matters-banner {
    background: linear-gradient(135deg, #004a8f 0%, #003366 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 26px 30px;
    margin-bottom: 40px;
}

.why-matters-banner h4 {
    color: #ffcc00;
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.why-matters-banner p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 15.5px;
    margin: 0;
    line-height: 1.6;
}

/* Real-Life Examples Grid */
.real-life-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.real-example-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
}

.real-example-card h5 {
    font-size: 16px;
    font-weight: 700;
    color: #004a8f;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.real-example-card p {
    font-size: 14px;
    color: #475569;
    margin: 0;
    line-height: 1.6;
}

/* Visual Diagrams / Charts */
.diagram-container {
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
}

.diagram-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.diagram-grid.three-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    text-align: left;
}

.diagram-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
}

.diagram-card.highlight {
    border-color: #f59e0b;
    background: #fffbeb;
}

.card-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.card-badge.primary { background: #e0f2fe; color: #0369a1; }
.card-badge.warning { background: #fef3c7; color: #b45309; }
.card-badge.danger  { background: #fee2e2; color: #b91c1c; }

.diagram-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    font-size: 13px;
    color: #475569;
}

.card-footer {
    font-size: 12px;
    font-style: italic;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    padding-top: 8px;
    margin-top: 10px;
}

/* Formulas & Math Display */
.formula-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    margin: 25px 0;
}

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

.formula-display {
    font-size: 18px;
    font-weight: 700;
    color: #004a8f;
    padding: 12px 18px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    margin: 10px 0;
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
}

.formula-legend ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    font-size: 14px;
    color: #475569;
}

/* Styled HTML Tables */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

.styled-table thead tr {
    background-color: #004a8f;
    color: #ffffff;
    text-align: left;
    font-weight: 700;
}

.styled-table th,
.styled-table td {
    padding: 13px 18px;
    border: 1px solid #e2e8f0;
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: #f8fafc;
}

.styled-table tbody tr:hover {
    background-color: #f1f5f9;
}

/* Code Blocks & Terminal Output */
.code-box-wrapper {
    background: #0f172a;
    border-radius: 14px;
    margin: 25px 0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.code-box-header {
    background: #1e293b;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #94a3b8;
    font-size: 13px;
    font-family: monospace;
}

.code-lang-tag {
    color: #ffcc00;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-copy-code {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-code:hover {
    background: #d81b60;
    border-color: #d81b60;
}

.code-box-body pre {
    margin: 0;
    padding: 20px;
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
    font-family: 'Fira Code', Consolas, Monaco, monospace;
}

.code-output-box {
    background: #090d16;
    border-top: 1px solid #1e293b;
    padding: 16px 20px;
}

.output-header {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.code-output-box pre {
    margin: 0;
    color: #4ade80;
    font-size: 13.5px;
    font-family: 'Fira Code', Consolas, Monaco, monospace;
    line-height: 1.5;
}

/* Common Mistakes Section */
.mistakes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 25px 0;
}

.mistake-card {
    background: #fff;
    border: 1px solid #fee2e2;
    border-radius: 12px;
    padding: 18px 22px;
    border-left: 5px solid #ef4444;
}

.mistake-title {
    color: #b91c1c;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.correction-title {
    color: #15803d;
    font-size: 14.5px;
    margin: 0;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* Key Points Cards */
.key-points-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin: 25px 0;
}

.key-point-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.key-point-card i {
    color: #004a8f;
    font-size: 18px;
    margin-top: 3px;
}

.key-point-card p {
    margin: 0;
    font-size: 14.5px;
    color: #334155;
    line-height: 1.5;
}

/* ==========================================================================
   5. EXAM PREPARATION & INTERACTIVE QUIZ
   ========================================================================== */
.exam-prep-area {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    border-radius: 20px;
    padding: 35px;
    margin: 45px 0;
}

.exam-prep-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 25px;
}

.exam-prep-header i {
    font-size: 28px;
    color: #166534;
}

.exam-prep-header h3 {
    margin: 0;
    font-size: 24px;
    color: #14532d;
    font-weight: 800;
}

.exam-qa-box {
    background: #ffffff;
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.exam-qa-question {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.exam-qa-answer {
    font-size: 15px;
    color: #334155;
    line-height: 1.7;
    margin: 0;
    padding-left: 28px;
    border-left: 3px solid #86efac;
}

/* Interactive MCQs */
.interactive-quiz-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.quiz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 15px;
}

.quiz-header h3 {
    margin: 0;
    font-size: 22px;
    color: #0f172a;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quiz-score-badge {
    background: #e0f2fe;
    color: #004a8f;
    font-weight: 700;
    font-size: 14px;
    padding: 6px 16px;
    border-radius: 20px;
}

.mcq-item {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f1f5f9;
}

.mcq-question-text {
    font-size: 16.5px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 15px;
}

.mcq-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mcq-opt-btn {
    text-align: left;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 15px;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: inherit;
}

.mcq-opt-btn:hover:not(:disabled) {
    background: #e0f2fe;
    border-color: #004a8f;
    color: #004a8f;
}

.mcq-opt-btn.correct {
    background: #dcfce7 !important;
    border-color: #22c55e !important;
    color: #15803d !important;
    font-weight: 700;
}

.mcq-opt-btn.incorrect {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #b91c1c !important;
}

.mcq-explanation-box {
    margin-top: 15px;
    padding: 14px 18px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    font-size: 14px;
    color: #166534;
    display: none;
    line-height: 1.5;
}

.mcq-explanation-box.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Practice Exercises with Expandable Solutions */
.practice-exercise-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 20px;
}

.exercise-q {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.btn-toggle-solution {
    background: #004a8f;
    color: #ffffff;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toggle-solution:hover {
    background: #d81b60;
}

.exercise-solution {
    display: none;
    margin-top: 15px;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14.5px;
    color: #334155;
    line-height: 1.6;
}

.exercise-solution.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Previous / Next Topic Navigation */
.topic-nav-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 15px;
}

.btn-nav-topic {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-nav-prev {
    background: #f1f5f9;
    color: #475569;
}

.btn-nav-prev:hover {
    background: #004a8f;
    color: #ffffff;
}

.btn-nav-next {
    background: #004a8f;
    color: #ffffff;
}

.btn-nav-next:hover {
    background: #d81b60;
}

.btn-nav-home {
    background: transparent;
    color: #004a8f;
    border-color: #004a8f;
}

.btn-nav-home:hover {
    background: #004a8f;
    color: #ffffff;
}

/* Toast Notifications */
.notes-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #0f172a;
    color: #ffffff;
    padding: 14px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 100000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.notes-toast.show {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   6. RESPONSIVENESS (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 992px) {
    .topic-layout {
        grid-template-columns: 1fr;
    }
    
    .topic-sidebar {
        position: static;
        max-height: none;
        margin-bottom: 30px;
    }

    .topic-content-body {
        padding: 30px 24px;
    }
}

@media (max-width: 768px) {
    .notes-hero {
        padding: 60px 15px 50px;
    }

    .topic-grid {
        grid-template-columns: 1fr;
    }

    .progress-card {
        flex-direction: column;
        align-items: stretch;
    }

    .progress-pct {
        text-align: left;
    }

    .topic-content-body {
        padding: 24px 18px;
    }

    .topic-nav-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-nav-topic {
        justify-content: center;
    }
}

/* ==========================================================================
   7. PRINT OPTIMIZATION (FOR "DOWNLOAD NOTES AS PDF" / PRINTING)
   ========================================================================== */
@media print {
    /* Hide navigational chrome, preloader, buttons */
    header, nav, .top-bar, .notes-hero, .topic-sidebar, .notes-breadcrumb,
    .topic-nav-buttons, .sidebar-actions, .notes-toast, footer,
    .btn-copy-code, .btn-toggle-solution, .btn-sidebar-action, .custom-cursor, .cursor-follower {
        display: none !important;
    }

    body, .notes-page {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 12pt;
    }

    .topic-content-body {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .topic-layout {
        display: block !important;
    }

    .code-box-wrapper {
        background: #f8fafc !important;
        color: #000000 !important;
        border: 1px solid #000000 !important;
    }

    .code-box-body pre, .code-output-box pre {
        color: #000000 !important;
    }

    .mcq-explanation-box, .exercise-solution {
        display: block !important;
    }

    h1, h2, h3, h4 {
        color: #000000 !important;
        page-break-after: avoid;
    }

    .note-section {
        page-break-inside: avoid;
    }
}
