<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Flashcard System with Pagination and Review Tracking</title>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
    <style>
        /* General Styles */
        body {
            font-family: 'Roboto', sans-serif;
            background-color: #f5f5f5;
            margin: 0;
            padding: 0;
            overflow-x: hidden;
        }
        .container {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
            padding: 20px;
            box-sizing: border-box;
        }
        .app-header {
            width: auto;
            background-color: #6200ea;
            padding: 15px 20px;
            box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
            color: white;
            font-size: 24px;
            font-weight: 500;
            text-align: center;
        }
        .log-container {
            margin-top: 20px;
            width: 100%;
            max-width: 600px;
            background-color: #ffffff;
            border-radius: 8px;
            box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
            padding: 15px;
            overflow-y: auto;
            max-height: 200px;
        }
        .log {
            font-size: 14px;
            color: #333;
            line-height: 1.5;
        }
    </style>

    <style>
/* General Styles */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}



.date-changer {
    margin-bottom: 20px;
    font-size: 16px;
}

.topic-filter, #layout-select {
    width: 100%;
    font-size: 16px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: #ffffff;
    color: #333;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    appearance: none;
    cursor: pointer;
    text-align: left;
}

.filter-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 300px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.filter-btn, .show-all-btn, .apply-btn {
    background-color: #6200ea;
    color: #fff;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.15);
}

.filter-btn:hover, .apply-btn:hover {
    background-color: #3700b3;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

/* Show All Button Distinct Style */
.show-all-btn {
    background-color: #03dac6;
    color: #fff;
}

.show-all-btn:hover {
    background-color: #018786;
}

.badge {
    background-color: #fff;
    color: #6200ea;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

.modern-card {
    position: relative;
    background-color: white;
    border-radius: 15px;
    width: 100%; /* Use full width */
    max-width: 800px; /* Full width to avoid scrolling in vertical layout */
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s;
    border: 2px solid #ddd;
    box-sizing: border-box; /* Ensure padding is contained within the card */
}

.question {
    font-size: 20px;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
    padding-right: 30px; /* Space for the bookmark */
}

.answer {
    font-size: 18px;
    color: #333;
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    background-color: #f9f9f9;
    display: none;
}

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

.dont-know-btn, .know-btn {
    padding: 10px 20px;
    width: auto;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: #fff;
}

.dont-know-btn {
    background-color: #e53935;
}

.know-btn {
    background-color: #388e3c;
}

/* Hover effect for dont-know-btn */
.dont-know-btn:hover {
    background-color: #d32f2f; /* Darker shade of red */
}

/* Hover effect for know-btn */
.know-btn:hover {
    background-color: #2e7d32; /* Darker shade of green */
}


.bookmark {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 18px;
    color: #ddd;
    cursor: default;
    transition: color 0.3s;
}

.review-metric {
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #555;
    margin-top: 15px;
}

.filter-info {
    background-color: #e3f2fd;
    color: #1e88e5;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 20px;
    text-align: center;
    width: 95%;
    max-width: 600px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.topic-header {
    font-size: 24px;
    font-weight: 700;
    color: #6200ea;
    margin: 20px 0 10px;
    text-align: center;
    width: 100%;
}






/* Hide extra elements in horizontal layout */
.horizontal-layout .modern-card {
    display: none; /* Only the current flashcard will be displayed in the horizontal layout */
}

.horizontal-layout .navigation-buttons {
    display: flex; /* Show navigation buttons in horizontal layout */
}

.horizontal-layout .flashcard-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 110%; /* Use full width */
    max-width: none; /* Adjust max-width if needed for screen fit */
    padding: 0 20px;
    box-sizing: border-box;
}

.horizontal-layout .modern-card {
    width: 110%; /* Stretch to fill container */
    max-width: 800px; /* Optional: adjust for full screen width */
}

/* Horizontal layout info box styling */
#horizontal-info {
    display: none; /* Only visible in horizontal layout */
    text-align: center;
    margin: 15px 0;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-family: 'Roboto', sans-serif;
}

#horizontal-topic {
    font-size: 20px;
    font-weight: 700;
    color: #6200ea;
    margin-bottom: 5px;
}

#horizontal-position {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}


 .navigation-buttons {
    display: flex;
    justify-content: center; /* Center buttons on smaller screens */
        gap: 30px;
    width: 100%;
    max-width: 800px; /* Adjust as needed */
    margin: 20px auto;
    padding: 10px 20px;
    box-sizing: border-box;
    margin-bottom: 40px;
}

.navigation-buttons button {
    background-color: #6200ea; /* Primary color */
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.15);
}

.navigation-buttons button:disabled {
    background-color: #9e9e9e; /* Gray color when disabled */
    cursor: not-allowed;
    box-shadow: none;
}

.navigation-buttons button:hover:not(:disabled) {
    background-color: #3700b3; /* Darker color on hover */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}


/* Dropdown container styling */
.dropdown {
    display: none; /* Hidden by default */
    position: absolute;
    background-color: #ffffff;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15);
    width: 600px;
    z-index: 1000;
}

.dropdown-content {
    color: #333;
    font-size: 16px;
}

.close {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}



  /* Ensure flashcards-container stretches fully in vertical layout */
.vertical-layout .flashcard-container {
    width: 100%; /* Use full width in vertical layout */
    max-width: none; /* Remove max-width constraint */
    padding: 0; /* Optional: remove padding if added */
    box-sizing: border-box;
    margin: 0 auto; /* Center align in the container */
}

/* Ensure container and flashcards align correctly in all layouts */
.flashcard-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Add this class to body or main container when in vertical layout mode */
.vertical-layout .container {
    width: 100%; /* Ensure container width is full */
}



    #toggleButton {
        background-color: #4CAF50; /* Green background */
        border: none;
        color: white; /* White text color */
        padding: 12px 24px; /* Padding for better spacing */
        text-align: center;
        text-decoration: none;
        display: inline-block;
        font-size: 16px; /* Font size */
        cursor: pointer; /* Pointer cursor on hover */
        border-radius: 8px; /* Rounded corners */
        transition: background-color 0.3s ease; /* Smooth transition on hover */
    }

    #toggleButton:hover {
        background-color: #45a049; /* Darker green on hover */
    }

    #toggleButton:focus {
        outline: none; /* Remove outline on focus */
    }

    #toggleButton:active {
        background-color: #388e3c; /* Even darker green when button is clicked */
    }


    .star-btn {
    color: lightgray;
    font-size: 20px;
    margin: 0 10px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.star-btn.active {
    color: gold;
}

.bookmark {
    cursor: pointer;
    margin-left: auto;
}

/* Emoji styling */
        .emoji {
            font-size: 24px;  /* Larger font size */
            vertical-align: middle;
            display: inline-block;
            animation: slow-bounce 2s infinite;  /* Animation applied */
        }

        /* Slow bounce animation */
        @keyframes slow-bounce {
            0%, 100% {
                transform: translateY(0);
            }
            50% {
                transform: translateY(-5px); /* Small bounce */
            }
        }




    </style>

    <style>
      .header-image, .hr-image {
            width: 50px;
            height: 50px;
            cursor: pointer;
            vertical-align: middle;
            margin-right: 10px;
        }

         /* Modal Styles */
        .modal97 {
            display: none;
            position: fixed;
            z-index: 10;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0,0,0,0.9);
        }

        .modal-top-bar97 {
            width: 80%;
            max-width: 700px;
            margin: auto;
            padding: 10px;
            display: flex;
            justify-content: flex-end;
            border-bottom: 5px solid #007bff;
            background-color: rgba(255, 255, 255, 0.8);
            z-index: 20;
            position: relative;
        }

        .modal-controls97 {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
        }

        .close97 {
            color: #333;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            margin-bottom: 5px;
        }

        .zoom-buttons97 {
            display: flex;
            gap: 5px;
        }

        .zoom-button97 {
            background-color: #007bff;
            color: white;
            border: none;
            padding: 5px 10px;
            border-radius: 5px;
            font-size: 16px;
            cursor: pointer;
        }

        .zoom-button97:hover {
            background-color: #0056b3;
        }

        .modal-content-wrapper97 {
            position: relative;
            width: 80%;
            max-width: 700px;
            margin: auto;
        }

        .modal-content97 {
            display: block;
            width: 100%;
            height: auto;
            margin: auto;
        }

         .header-image, .hr-image {
            width: 50px;
            height: 50px;
            cursor: pointer;
            vertical-align: middle;
            margin-right: 10px;
        }

        .popup {
            display: none;
            position: fixed;
            z-index: 999;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
        }

        .popup-content {
            position: relative;
            margin: 10% auto;
            width: 80%;
            max-width: 600px;
            background-color: #fff;
            padding: 20px;
            border-radius: 10px;
            text-align: center;
        }

        .popup-image {
            width: 100%;
            height: auto;
        }

        .close {
            position: absolute;
            top: 1px;
            right: 8px;
            color: #333;
            font-size: 24px;
            font-weight: bold;
            cursor: pointer;
        }

</style>
</head>
<body>

<!-- App Header -->
<div class="app-header">
    <img src="https://firebasestorage.googleapis.com/v0/b/akrass-plus.appspot.com/o/ContentImage%2Fimage_search_1735012996661.jpg?alt=media&token=3ef27804-d6e3-4e1d-beef-62934f342808" alt="Header Image" class="header-image" onclick="openModal('header-popup-97')" />
    MBBS Flashcards Study
</div>

<hr>
<p style="margin-left: 20px;"><b>Chapter</b>: 4. Pathology</p>
<p style="margin-left: 20px;"><b>BOOK Reference</b>: FIRST AID for the USMLE STEP 1 - 2024 , <img src="https://firebasestorage.googleapis.com/v0/b/akrass-plus.appspot.com/o/ContentImage%2FIMG_20241224_093648.jpg?alt=media&token=e867e2f3-7487-4ab8-803e-943b16cba5e4" alt="HR Image" class="hr-image" onclick="openModal('hr-popup-97')" />👈                                                                                                              </p>
<p style="margin-left: 20px;"><b>Total Flashcards</b>: 342</p>
<hr>


    <!-- Modal Pop-Up for Header Image -->
    <div id="header-popup-97" class="modal97">
        <div class="modal-top-bar97">
            <div class="modal-controls97">
                <span class="close97" onclick="closeModal('header-popup-97')">Close</span>
                 <div class="zoom-buttons97">
                    <button class="zoom-button97" onclick="zoomImage('header-popup-97', 0.9)">zoom -</button>
                    <button class="zoom-button97" onclick="zoomImage('header-popup-97', 1.1)">+</button>
                </div>
             </div>
        </div>
      <div class="modal-content-wrapper97">
             <img class="modal-content97" src="https://firebasestorage.googleapis.com/v0/b/akrass-plus.appspot.com/o/ContentImage%2Fimage_search_1735012996661.jpg?alt=media&token=3ef27804-d6e3-4e1d-beef-62934f342808" alt="Header Image Full View" class="popup-image" />
         </div>
    </div>

    <!-- Modal Pop-Up for HR Image -->
    <div id="hr-popup-97" class="modal97">
         <div class="modal-top-bar97">
             <div class="modal-controls97">
               <span class="close97" onclick="closeModal('hr-popup-97')">Close</span>
                <div class="zoom-buttons97">
                 <button class="zoom-button97" onclick="zoomImage('hr-popup-97', 0.9)">zoom -</button>
                    <button class="zoom-button97" onclick="zoomImage('hr-popup-97', 1.1)">+</button>
                 </div>
            </div>
         </div>
      <div class="modal-content-wrapper97">
            <img class="modal-content97" src="https://firebasestorage.googleapis.com/v0/b/akrass-plus.appspot.com/o/ContentImage%2FIMG_20241224_093648.jpg?alt=media&token=e867e2f3-7487-4ab8-803e-943b16cba5e4" alt="HR Image Full View" class="popup-image" />
       </div>
   </div>


<!-- Main Container -->
<div class="container">

<button id="toggleButton" onclick="toggleDropdownContent(event)">How to Use the Flashcard System (Step-by-Step - Click Here👈)</button>

<div id="dropdownContent" class="dropdown" style="display: none;">
    <div class="dropdown-content">
        <button class="close" onclick="closeDropdown('dropdownContent')">Close</button>
        <br><h2>How to Use the Flashcard System</h2>

        <ol>
            <li><strong>Select Layout:</strong>
                <ul>
                    <li>Choose how you want to view flashcards:</li>
                    <li><strong>Horizontal Layout:</strong> One flashcard displayed at a time.</li>
                    <li><strong>Vertical Layout (Default):</strong> Flashcards shown one below another.</li>
                </ul>
            </li>
            <br>
            <hr style="border: 1px solid #007BFF;">

            <li><strong>Select Topics:</strong>
                <ul>
                    <li>Pick multiple topics you want to study.</li>
                    <li>At the end of each topic, you’ll see:
                        <ul>
                            <li>Total flashcards in that topic.</li>
                            <li>Flashcards you’ve reviewed at least once (e.g., <strong>(2/6)</strong> means 2 out of 6 reviewed).</li>
                        </ul>
                    </li>
                </ul>
            </li>
            <br>
            <hr style="border: 1px solid #28A745;">

            <li><strong>Apply Filter:</strong>
                <ul>
                    <li>Click <strong>Apply Filter</strong> to display selected topics.</li>
                    <li>All Flashcards of selected topics will appear in your chosen layout (horizontal or vertical).</li>
                </ul>
            </li>
            <br>
            <hr style="border: 1px solid #DC3545;">

            <li><strong>Review Flashcards:</strong>
                <ul>
                    <li>View the flashcard to read the question and try to recall the answer.</li>
        <li>After attempting to recall, use the buttons:</li>
                    <li>Use the buttons:
                        <ul>
                            <li><strong>Know:</strong> If you know the answer.</li>
                            <li><strong>Don’t Know:</strong> If unsure or don’t know the answer.</li>
                            <li>If you initially clicked "Know" but later feel unsure, click "Don’t Know" to adjust your response.</li>
                        </ul>
                    </li>
                </ul>
            </li>
            <br>
            <hr style="border: 1px solid #FFC107;">

            <li><strong>Review Stages:</strong>
                <ul>
                    <li>Each reviewed flashcard shows the next review date.</li>
                    <li>Review stages based on time intervals:
                        <ul>
                            <li><strong>First Review:</strong> 3 days after the first read.</li>
                            <li><strong>Second Review:</strong> 7 days after the first review.</li>
                            <li><strong>Third Review:</strong> 14 days after the second review.</li>
                            <li><strong>Final Review:</strong> 28 days after the third review.</li>
                            <li><strong>Completed:</strong> No further reviews needed.</li>
                        </ul>
                    </li>
                </ul>
            </li>
            <br>
            <hr style="border: 1px solid #17A2B8;">

            <li><strong>Pending Review Flashcards:</strong>
                <ul>
                    <li>Flashcards ready for review are shown in the <strong>Pending Review</strong> section.</li>
                    <li>Pending cards only show from selected topics.</li>
                    <li>To view all pending flashcards from all topics, select and apply <strong>"All Topics"</strong> in the topic section (by default, "All Topics" is applied).</li>
                    <li>When you are inside the Pending Flashcards Review section, to exit this section, click the <strong>"Show All Flashcards"</strong> button. It displays all flashcards (including pending flashcards) from the selected topics.</li>
                </ul>
            </li>
            <br>
            <hr style="border: 1px solid #6C757D;">

            <li><strong>Bookmark Colors:</strong>
                <ul>
                    <li>Flashcard review stages are visually represented:</li>
                    <li><strong>Red:</strong> First Review.</li>
                    <li><strong>Pink:</strong> Second Review.</li>
                    <li><strong>Blue:</strong> Third Review.</li>
                    <li><strong>Green:</strong> Final Review.</li>
                    <li><strong>Gold:</strong> Completed.</li>
                </ul>
            </li>
            <br>
            <hr style="border: 1px solid #343A40;">

             <li><strong>Star Mark Flashcards:</strong>
                <ul>
                    <li>Mark very important or difficult flashcards using the <strong>Star Mark</strong> button.</li>
                    <li>These star-marked flashcards are ideal for focused review before exams.</li>
                    <li>Click the <strong>Starred Flashcards</strong> button to filter and view only the star-marked flashcards from the selected topics.</li>
                    <li>When you click <strong>Starred Ready for Review</strong>, it displays all star-marked flashcards that are ready for review, including those in any review stage (First, Second, Third, or Final).</li>
                    <li>This feature ensures you spend your time efficiently by focusing on critical flashcards when time is limited.</li>
                </ul>
            </li>
            <br>
            <hr style="border: 1px solid #007BFF;">

            <li><strong>Efficient Learning:</strong>
                <ul>
                    <li>The system ensures:</li>
                    <li><strong>Easy Points Flashcards:</strong> Reviewed in fewer rounds.</li>
                    <li><strong>Moderate/Difficult Points:</strong> Reviewed more frequently in more number of rounds.</li>
                    <li>Saves your time by allocating appropriate focus on difficult flashcards.</li>
                    <li>You can utilize your time efficiently and complete your syllabus within your time schedule.</li>
                </ul>
            </li>


        </ol>
    </div>
</div>

 <br>




     <!-- Dropdown for Layout Selection -->
    <div class="custom-select-container">
        <label for="layout-select"><b>Select Layout:</b></label>
        <select id="layout-select" class="custom-select" onchange="selectLayout(this.value)">
            <option value="vertical">Vertical Layout</option>
            <option value="horizontal">Horizontal Layout</option>
        </select>
    </div>

    <!-- Topic Selection Multi-select -->
    <div class="custom-select-container">
        <label for="topic-filter"><b>Select Multiple Topics & Apply Filter:</b></label>
        <select id="topic-filter" class="topic-filter" multiple>
            <!-- Options will be dynamically populated -->
        </select>
    </div>

    <!-- Apply Filter and Show All Buttons -->
    <button class="apply-btn" onclick="applySelectedTopics()">Apply Selected Topics</button><br>
    <button class="show-all-btn" onclick="showAllFlashcards()">Show All Flashcards</button>

     <div class="filter-container">
        <button class="filter-btn" onclick="filterFlashcards(0)">First Review<br> (Red) <span id="count-stage-0" class="badge">0</span></button>
        <button class="filter-btn" onclick="filterFlashcards(1)">Second Review<br> (Pink) <span id="count-stage-1" class="badge">0</span></button>
        <button class="filter-btn" onclick="filterFlashcards(2)">Third Review<br> (Blue) <span id="count-stage-2" class="badge">0</span></button>
        <button class="filter-btn" onclick="filterFlashcards(3)">Final Review<br> (Green) <span id="count-stage-3" class="badge">0</span></button>
        <button class="filter-btn" id="completed-flashcards-btn" onclick="filterFlashcards(4)">Completed Flashcards<br> 🏆 <span id="count-completed" class="badge">0 completed</span></button>
     </div>
 <div class="filter-container">
    <button class="filter-btn" onclick="showStarredFlashcards()">⭐ Starred Flashcards: <span id="count-starred" class="badge">0 Marked</span>, <span id="count-pending" class="badge">0 Pending</span></button>
    <button class="filter-btn" onclick="showStarredReadyFlashcards()">🌟 Starred Ready Review: <span id="count-starred-ready" class="badge">0 Marked</span>, <span id="count-ready-pending" class="badge">0 Pending</span></button>
</div>


    <div id="filter-info-container"></div> <!-- Filter info container for separate line display -->

<div id="horizontal-info" style="display: none;">
    <div id="horizontal-topic"></div>
    <div id="horizontal-position"></div>
</div>



    <!-- Flashcard Display Area -->
    <div id="flashcards-container" class="flashcard-container">
        <!-- Flashcards will be rendered here dynamically -->
    </div>

    <!-- Navigation for Horizontal Layout -->
    <div class="navigation-buttons" style="display: none;">
        <button id="prev-btn" onclick="navigateFlashcards('prev')" disabled>Previous</button>
        <button id="next-btn" onclick="navigateFlashcards('next')">Next</button>
    </div>
</div>




<!-- Dropdown content that replaces the modal -->
<div id="bookmarkDropdown1" class="dropdown">
    <div class="dropdown-content">
        <!-- Close button -->
        <span class="close" onclick="closeDropdown('bookmarkDropdown1')">×</span>
        <h2>Review Stage Colors</h2>
        <ul>
            <li><span style="color: red;"><i class="fas fa-bookmark"></i></span> First Review</li>
            <li><span style="color: pink;"><i class="fas fa-bookmark"></i></span> Second Review</li>
            <li><span style="color: blue;"><i class="fas fa-bookmark"></i></span> Third Review</li>
            <li><span style="color: green;"><i class="fas fa-bookmark"></i></span> Final Review</li>
            <li><span style="color: gold;"><i class="fas fa-bookmark"></i></span> Completed</li>
        </ul>
    </div>
</div>



<!-- Dropdown for Inactive Know Button Click -->
<div id="inactiveKnowDropdown" class="dropdown">
    <div class="dropdown-content">
        <span class="close" onclick="closeDropdown('inactiveKnowDropdown')">&times;</span>
        <h2>Button Inactive</h2>
        <p>The "Know" button is inactive until the review is ready. Please wait until the next review date.</p>
    </div>
</div>


<script>

 document.addEventListener('DOMContentLoaded', () => {
    openDatabase();
    const layoutSelect = document.getElementById('layout-select');
    const initialLayout = layoutSelect.value || 'vertical';
    selectLayout(initialLayout);
});

const dbName = "FlashcardDBFA4";
const storeName = "flashcardProgress";

 const flashcards = [
    {
        "id": 1,
        "topic": "topic1",
        "question": "What are cellular adaptations?",
        "answer": "<li>Reversible changes that can be physiologic or pathologic.</li>",
        "memoryTip": "Think of cellular adaptations as cells doing yoga to stretch and adapt to stress!",
        "emoji": "🧘‍♂️"
    },
    {
        "id": 2,
        "topic": "topic1",
        "question": "Give an example of a physiologic cellular adaptation.",
        "answer": "<li>Uterine enlargement during pregnancy.</li>",
        "memoryTip": "Just like a balloon inflates, the uterus expands to accommodate a growing baby!",
        "emoji": "🎈"
    },
    {
        "id": 3,
        "topic": "topic1",
        "question": "Give an example of a pathologic cellular adaptation.",
        "answer": "<li>Myocardial hypertrophy due to systemic hypertension.</li>",
        "memoryTip": "When the heart lifts weights from high blood pressure, it gets bigger but not necessarily stronger!",
        "emoji": "💪"
    },
    {
        "id": 4,
        "topic": "topic1",
        "question": "What can happen if stress on a cell is excessive or persistent?",
        "answer": "<li>Adaptations can progress to cell injury.</li>",
        "memoryTip": "Too much stress can turn a calm cell into a panicked one, leading to injury!",
        "emoji": "😱"
    },
    {
        "id": 5,
        "topic": "topic2",
        "question": "What is hypertrophy?",
        "answer": "<li>An increase in the size of cells due to structural proteins and organelles.</li>",
        "memoryTip": "Hypertrophy is like a cell hitting the gym and bulking up!",
        "emoji": "🏋️"
    },
    {
        "id": 6,
        "topic": "topic2",
        "question": "What is an example of hypertrophy?",
        "answer": "<li>Cardiac hypertrophy.</li>",
        "memoryTip": "The heart gets swole when it has to pump harder, just like a bodybuilder!",
        "emoji": "❤️"
    },
    {
        "id": 7,
        "topic": "topic3",
        "question": "What is hyperplasia?",
        "answer": "<li>Controlled proliferation of stem cells and differentiated cells leading to an increase in the number of cells.</li>",
        "memoryTip": "Hyperplasia is like a cell party where more and more friends keep showing up!",
        "emoji": "🎉"
    },
    {
        "id": 8,
        "topic": "topic3",
        "question": "What is an example of benign hyperplasia?",
        "answer": "<li>Benign prostatic hyperplasia.</li>",
        "memoryTip": "Think of the prostate as a club that keeps letting more members in, but it's still a friendly gathering!",
        "emoji": "🕺"
    },
    {
        "id": 9,
        "topic": "topic3",
        "question": "What can excessive stimulation lead to in terms of hyperplasia?",
        "answer": "<li>Pathologic hyperplasia, which may progress to dysplasia and cancer.</li>",
        "memoryTip": "Too many partygoers can lead to chaos, just like excessive stimulation can lead to cell trouble!",
        "emoji": "🚨"
    },
    {
        "id": 10,
        "topic": "topic4",
        "question": "What is atrophy?",
        "answer": "<li>A decrease in tissue mass due to a reduction in cell size and/or number.</li>",
        "memoryTip": "Atrophy is like a cell going on a diet and losing weight!",
        "emoji": "🥗"
    },
    {
        "id": 11,
        "topic": "topic4",
        "question": "What are some causes of atrophy?",
        "answer": "<li>Disuse, denervation, loss of blood supply, loss of hormonal stimulation, and poor nutrition.</li>",
        "memoryTip": "Cells can lose their spark just like a plant wilts without water!",
        "emoji": "🌱"
    },
    {
        "id": 12,
        "topic": "topic5",
        "question": "What is metaplasia?",
        "answer": "<li>Reprogramming of stem cells leading to the replacement of one cell type by another that can adapt to a new stressor.</li>",
        "memoryTip": "Metaplasia is like a cell changing its job to better handle stress, like a barista becoming a bartender!",
        "emoji": "🍹"
    },
    {
        "id": 13,
        "topic": "topic5",
        "question": "What is an example of metaplasia due to gastric acid exposure?",
        "answer": "<li>Esophageal epithelium replaced by intestinal epithelium, known as Barrett esophagus.</li>",
        "memoryTip": "When the esophagus gets too much acid, it decides to dress up like the intestine for protection!",
        "emoji": "🥴"
    },
    {
        "id": 14,
        "topic": "topic5",
        "question": "What can metaplasia progress to with persistent insult?",
        "answer": "<li>Dysplasia and potentially malignant transformation.</li>",
        "memoryTip": "If a cell keeps getting picked on, it might turn into a bully itself—dysplasia!",
        "emoji": "😈"
    },
    {
        "id": 15,
        "topic": "topic6",
        "question": "What is dysplasia?",
        "answer": "<li>Disordered, precancerous epithelial cell growth characterized by loss of uniformity of cell size and shape.</li>",
        "memoryTip": "Dysplasia is like a messy room where everything is out of order and chaotic!",
        "emoji": "🏚️"
    },
    {
        "id": 16,
        "topic": "topic6",
        "question": "What are some characteristics of dysplasia?",
        "answer": "<li>Pleomorphism, loss of tissue orientation, and nuclear changes.</li>",
        "memoryTip": "Dysplastic cells are like a group of friends who can't agree on what to wear—everyone looks different!",
        "emoji": "👗"
    },
    {
        "id": 17,
        "topic": "topic6",
        "question": "What can happen to mild and moderate dysplasias?",
        "answer": "<li>They may regress with the alleviation of the inciting cause.</li>",
        "memoryTip": "Like a bad haircut, mild dysplasia can grow out if you stop the bad styling!",
        "emoji": "✂️"
    },
    {
        "id": 18,
        "topic": "topic6",
        "question": "What often precedes severe dysplasia?",
        "answer": "<li>Persistent metaplasia or pathologic hyperplasia.</li>",
        "memoryTip": "Severe dysplasia is like a bad sequel to a movie that started with a mediocre plot!",
        "emoji": "🎬"
    },
    {
        "id": 19,
        "topic": "topic7",
        "question": "What is reversible cell injury?",
        "answer": "<li>A condition where cells experience changes but can recover if the stress is removed.</li>",
        "memoryTip": "Reversible cell injury is like a hangover—painful but you can bounce back with some rest!",
        "emoji": "🍳"
    },
    {
        "id": 20,
        "topic": "topic7",
        "question": "What are some features of reversible cell injury?",
        "answer": "<li>Cellular swelling, ribosomal detachment, plasma membrane changes, and nuclear changes.</li>",
        "memoryTip": "Reversible injury is like a cell throwing a tantrum but still being able to calm down!",
        "emoji": "😤"
    },
    {
        "id": 21,
        "topic": "topic7",
        "question": "What is irreversible cell injury?",
        "answer": "<li>A condition where cells cannot recover, leading to cell death.</li>",
        "memoryTip": "Irreversible injury is like a cell hitting rock bottom—there's no coming back!",
        "emoji": "🪦"
    },
    {
        "id": 22,
        "topic": "topic7",
        "question": "What happens during irreversible cell injury?",
        "answer": "<li>Breakdown of the plasma membrane, mitochondrial damage, rupture of lysosomes, and nuclear degradation.</li>",
        "memoryTip": "Irreversible injury is like a cell throwing in the towel and giving up on life!",
        "emoji": "🥺"
    },
    {
        "id": 23,
        "topic": "topic7",
        "question": "What are some nuclear changes associated with irreversible cell injury?",
        "answer": "<li>Pyknosis, karyorrhexis, and karyolysis.</li>",
        "memoryTip": "Nuclear changes are like a cell's final farewell party—everything gets messy!",
        "emoji": "🎉"
    },
    {
        "id": 24,
        "topic": "topic8",
        "question": "What is apoptosis?",
        "answer": "<li>Apoptosis is ATP-dependent programmed cell death.</li>",
        "memoryTip": "Think of apoptosis as the \"ATP-ocalypse\" where cells decide to take a peaceful exit!",
        "emoji": "⚰️"
    },
    {
        "id": 25,
        "topic": "topic8",
        "question": "What pathways activate caspases during apoptosis?",
        "answer": "<li>The intrinsic, extrinsic, and perforin/granzyme B pathways activate caspases.</li>",
        "memoryTip": "Caspases are like the \"cellular executioners\" that get activated by different pathways to carry out the death sentence!",
        "emoji": "⚔️"
    },
    {
        "id": 26,
        "topic": "topic8",
        "question": "What are the key features of cellular breakdown during apoptosis?",
        "answer": "<li>Key features include cell shrinkage, chromatin condensation, membrane blebbing, and formation of apoptotic bodies.</li>",
        "memoryTip": "Apoptosis is like a cell's farewell party, where it shrinks, condenses, and blebs out before being cleaned up!",
        "emoji": "🎉"
    },
    {
        "id": 27,
        "topic": "topic8",
        "question": "How is apoptosis characterized histologically?",
        "answer": "<li>It is characterized by deeply eosinophilic cytoplasm, basophilic nucleus, pyknosis, and karyorrhexis.</li>",
        "memoryTip": "Think of apoptosis as a cell's dramatic makeover: it goes from vibrant to \"eosinophilic\" in a flash!",
        "emoji": "🎭"
    },
    {
        "id": 28,
        "topic": "topic8",
        "question": "How does the cell membrane behave during apoptosis?",
        "answer": "<li>The cell membrane typically remains intact without significant inflammation, unlike necrosis.</li>",
        "memoryTip": "Apoptosis is the polite way to die; it leaves the door intact and doesn’t cause a ruckus!",
        "emoji": "🚪"
    },
    {
        "id": 29,
        "topic": "topic8",
        "question": "What is DNA laddering, and what does it indicate?",
        "answer": "<li>DNA laddering shows fragments in multiples of 180 bp and is a sensitive indicator of apoptosis.</li>",
        "memoryTip": "DNA laddering is like a cell's way of saying, \"I'm stepping down in style!\"",
        "emoji": "🪜"
    },
    {
        "id": 30,
        "topic": "topic9",
        "question": "What triggers the intrinsic (mitochondrial) pathway of apoptosis?",
        "answer": "<li>It is triggered by the withdrawal of a regulating factor from a proliferating cell population or exposure to injurious stimuli.</li>",
        "memoryTip": "Think of the intrinsic pathway as a cell's \"time-out\" when it realizes it’s in a bad situation!",
        "emoji": "⏳"
    },
    {
        "id": 31,
        "topic": "topic9",
        "question": "Which proteins regulate the intrinsic pathway of apoptosis?",
        "answer": "<li>The Bcl-2 family of proteins regulates this pathway.</li>",
        "memoryTip": "Bcl-2 is like the bouncer at the club of life, deciding who gets to stay and who has to leave!",
        "emoji": "🚷"
    },
    {
        "id": 32,
        "topic": "topic9",
        "question": "What role do Bax and Bak play in the intrinsic pathway?",
        "answer": "<li>Bax and Bak are proapoptotic proteins that form pores in the mitochondrial membrane, leading to the release of cytochrome C.</li>",
        "memoryTip": "Bax and Bak are like the troublemakers that open the gates for cytochrome C to crash the party!",
        "emoji": "🎈"
    },
    {
        "id": 33,
        "topic": "topic9",
        "question": "What is the effect of Bcl-2 overexpression?",
        "answer": "<li>Bcl-2 overexpression prevents cytochrome C release, leading to decreased caspase activation and tumorigenesis.</li>",
        "memoryTip": "Bcl-2 is like a cell's overprotective parent, keeping it from facing the consequences of its actions!",
        "emoji": "👨‍👧"
    },
    {
        "id": 34,
        "topic": "topic10",
        "question": "What initiates the extrinsic (death receptor) pathway of apoptosis?",
        "answer": "<li>It is initiated by ligand-receptor interactions, such as FasL binding to Fas (CD95) or TNF-α binding to its receptor.</li>",
        "memoryTip": "The extrinsic pathway is like a cell getting a \"you’re fired\" notice from its boss!",
        "emoji": "📄"
    },
    {
        "id": 35,
        "topic": "topic10",
        "question": "What is the role of Fas-FasL interaction in the immune system?",
        "answer": "<li>It is necessary for thymic medullary negative selection.</li>",
        "memoryTip": "Fas-FasL is like the immune system's way of saying, \"You're not cut out for this job!\"",
        "emoji": "🧑‍⚕️"
    },
    {
        "id": 36,
        "topic": "topic10",
        "question": "What condition is caused by defective Fas-FasL interaction?",
        "answer": "<li>Autoimmune lymphoproliferative syndrome is caused by this defect, leading to failure of clonal deletion and increased self-reacting lymphocytes.</li>",
        "memoryTip": "Think of it as a cell party gone wrong, where everyone is invited, even the troublemakers!",
        "emoji": "🎊"
    },
    {
        "id": 37,
        "topic": "topic11",
        "question": "What is the function of perforin in the perforin/granzyme B pathway?",
        "answer": "<li>Perforin forms a pore in the target cell's membrane, allowing granzyme B to enter.</li>",
        "memoryTip": "Perforin is like a bouncer who opens the door for granzyme B to do its job!",
        "emoji": "🚪"
    },
    {
        "id": 38,
        "topic": "topic11",
        "question": "Which immune cells are involved in the perforin/granzyme B pathway?",
        "answer": "<li>Cytotoxic T-cells and natural killer cells are involved in this pathway.</li>",
        "memoryTip": "Think of cytotoxic T-cells and NK cells as the \"hit squad\" of the immune system!",
        "emoji": "🦸‍♂️"
    },
    {
        "id": 39,
        "topic": "topic12",
        "question": "What is necrosis?",
        "answer": "<li>Necrosis is cell death due to exogenous injury, leading to plasma membrane damage and local inflammatory reaction.</li>",
        "memoryTip": "Necrosis is like a messy breakup; it leaves a lot of drama and chaos behind!",
        "emoji": "💔"
    },
    {
        "id": 40,
        "topic": "topic12",
        "question": "What are the histological features of coagulative necrosis?",
        "answer": "<li>It shows preserved cellular architecture with disappearing nuclei and increased eosinophilia.</li>",
        "memoryTip": "Coagulative necrosis is like a cell's final portrait, where the outline remains but the details fade away!",
        "emoji": "🖼️"
    },
    {
        "id": 41,
        "topic": "topic12",
        "question": "In which conditions is liquefactive necrosis typically seen?",
        "answer": "<li>It is seen in bacterial abscesses and CNS infarcts.</li>",
        "memoryTip": "Liquefactive necrosis is like a cell's way of saying, \"I can't take the heat, I'm melting!\"",
        "emoji": "🌊"
    },
    {
        "id": 42,
        "topic": "topic12",
        "question": "What characterizes caseous necrosis?",
        "answer": "<li>It is characterized by fragmented cells and debris surrounded by lymphocytes and macrophages, resembling a granuloma.</li>",
        "memoryTip": "Caseous necrosis is like a cheesy casserole left out too long—looks good on the outside but a mess inside!",
        "emoji": "🧀"
    },
    {
        "id": 43,
        "topic": "topic12",
        "question": "What causes fat necrosis?",
        "answer": "<li>It can be caused by enzymatic processes in acute pancreatitis or traumatic injury to breast tissue.</li>",
        "memoryTip": "Fat necrosis is like a cooking disaster where the fat just can't handle the heat!",
        "emoji": "🍳"
    },
    {
        "id": 44,
        "topic": "topic12",
        "question": "What is fibrinoid necrosis associated with?",
        "answer": "<li>It is associated with immune vascular reactions and nonimmune vascular reactions, such as hypertensive emergencies.</li>",
        "memoryTip": "Fibrinoid necrosis is like a cell's way of saying, \"I’m in a sticky situation!\"",
        "emoji": "🥴"
    },
    {
        "id": 45,
        "topic": "topic12",
        "question": "What is gangrenous necrosis?",
        "answer": "<li>It occurs in distal extremities and the GI tract after chronic ischemia, with dry and wet forms.</li>",
        "memoryTip": "Gangrenous necrosis is like a cell's way of saying, \"I'm out of circulation!\"",
        "emoji": "🦶"
    },
    {
        "id": 46,
        "topic": "topic13",
        "question": "What is ischemia?",
        "answer": "<li>Ischemia is an inadequate blood supply to meet the demand of tissues.</li>",
        "memoryTip": "Ischemia is like a party with no snacks—everyone's hungry but there's just not enough to go around!",
        "emoji": "🍕"
    },
    {
        "id": 47,
        "topic": "topic13",
        "question": "What are some mechanisms that can cause ischemia?",
        "answer": "<li>Mechanisms include arterial perfusion issues (e.g., atherosclerosis), venous drainage problems (e.g., testicular torsion, Budd-Chiari syndrome), and shock.</li>",
        "memoryTip": "Ischemia is like a traffic jam—sometimes the arteries are blocked, and the blood just can't get through!",
        "emoji": "🚦"
    },
    {
        "id": 48,
        "topic": "topic13",
        "question": "Which regions are most vulnerable to hypoxia/ischemia and subsequent infarction in the brain?",
        "answer": "<li>The ACA/MCA/PCA boundary areas are most vulnerable.</li>",
        "memoryTip": "The brain's vulnerable spots are like the edges of a pizza—always at risk of getting burnt!",
        "emoji": "🍕"
    },
    {
        "id": 49,
        "topic": "topic13",
        "question": "What part of the heart is most susceptible to ischemia?",
        "answer": "<li>The subendocardium of the left ventricle is most susceptible to ischemia.</li>",
        "memoryTip": "The heart's subendocardium is like the undercooked part of a cake—always at risk of being left out!",
        "emoji": "🎂"
    },
    {
        "id": 50,
        "topic": "topic13",
        "question": "Which regions of the kidney are most susceptible to ischemia?",
        "answer": "<li>The straight segment of the proximal tubule and the thick ascending limb in the medulla are most susceptible.</li>",
        "memoryTip": "The kidney's vulnerable spots are like the last cookie in the jar—everyone wants it, but it’s at risk of being taken!",
        "emoji": "🍪"
    },
    {
        "id": 51,
        "topic": "topic13",
        "question": "What area of the liver is most susceptible to ischemia?",
        "answer": "<li>The area around the central vein (zone III) is most susceptible to ischemia.</li>",
        "memoryTip": "The liver's zone III is like the back row at a concert—often overlooked but still important!",
        "emoji": "🎤"
    },
    {
        "id": 52,
        "topic": "topic13",
        "question": "Which parts of the colon are most susceptible to ischemia?",
        "answer": "<li>The splenic flexure (Griffith point) and the rectosigmoid junction (Sudeck point) are most susceptible.</li>",
        "memoryTip": "The colon's vulnerable points are like the corners of a dance floor—easy to miss but crucial for the moves!",
        "emoji": "💃"
    },
    {
        "id": 53,
        "topic": "topic14",
        "question": "What is a red infarct?",
        "answer": "<li>A red infarct occurs in venous occlusion and tissues with multiple blood supplies, and with reperfusion.</li>",
        "memoryTip": "A red infarct is like a party that gets crashed—everyone's there, but it’s a chaotic mess!",
        "emoji": "🎉"
    },
    {
        "id": 54,
        "topic": "topic14",
        "question": "What is a pale infarct?",
        "answer": "<li>A pale infarct occurs in solid organs with a single (end-arterial) blood supply.</li>",
        "memoryTip": "A pale infarct is like a solo act at a concert—no backup, just one star shining alone!",
        "emoji": "🌟"
    },
    {
        "id": 55,
        "topic": "topic15",
        "question": "How do free radicals damage cells?",
        "answer": "<li>Free radicals damage cells via membrane lipid peroxidation, protein modification, and DNA breakage.</li>",
        "memoryTip": "Free radicals are like party crashers—they mess up everything and leave a trail of destruction!",
        "emoji": "🚫"
    },
    {
        "id": 56,
        "topic": "topic15",
        "question": "What can initiate free radical injury?",
        "answer": "<li>Free radical injury can be initiated by radiation exposure, metabolism of drugs, redox reactions, nitric oxide, transition metals, and WBC oxidative bursts.</li>",
        "memoryTip": "Free radicals are like a bad hangover—caused by too much fun and leave you feeling terrible!",
        "emoji": "🤢"
    },
    {
        "id": 57,
        "topic": "topic15",
        "question": "How can free radicals be eliminated?",
        "answer": "<li>Free radicals can be eliminated by scavenging enzymes, spontaneous decay, antioxidants, and certain metal carrier proteins.</li>",
        "memoryTip": "Free radicals are like bad guests—thankfully, there are bouncers (antioxidants) to kick them out!",
        "emoji": "🚪"
    },
    {
        "id": 58,
        "topic": "topic16",
        "question": "What type of damage does ionizing radiation cause?",
        "answer": "<li>Ionizing radiation causes DNA damage and cellular damage through the production of free radicals.</li>",
        "memoryTip": "Ionizing radiation is like a bad haircut—once it’s done, it’s hard to fix!",
        "emoji": "✂️"
    },
    {
        "id": 59,
        "topic": "topic16",
        "question": "What are some complications of significant exposure to ionizing radiation?",
        "answer": "<li>Complications include localized inflammation, fibrosis, and neoplasia (e.g., leukemia, thyroid cancer).</li>",
        "memoryTip": "Significant radiation exposure is like a bad sunburn—painful and can lead to long-term issues!",
        "emoji": "☀️"
    },
    {
        "id": 60,
        "topic": "topic16",
        "question": "What is acute radiation syndrome?",
        "answer": "<li>Acute radiation syndrome develops after sudden whole-body exposure to high doses of ionizing radiation, causing nausea, vomiting, diarrhea, hair loss, erythema, cytopenias, headache, and altered mental status.</li>",
        "memoryTip": "Acute radiation syndrome is like a really bad day at the amusement park—everything goes wrong at once!",
        "emoji": "🎢"
    },
    {
        "id": 61,
        "topic": "topic16",
        "question": "Which cells are most susceptible to radiation injury?",
        "answer": "<li>Stem cells of rapidly regenerating tissues (e.g., skin, bone marrow, GI tract, gonads) are most susceptible to radiation injury.</li>",
        "memoryTip": "Rapidly regenerating cells are like eager beavers—they're always busy and can get hurt easily!",
        "emoji": "🦫"
    },
    {
        "id": 62,
        "topic": "topic17",
        "question": "What is dystrophic calcification?",
        "answer": "<li>Dystrophic calcification refers to calcium deposits in abnormal (diseased) tissues.</li>",
        "memoryTip": "Dystrophic calcification is like a bad paint job—looks out of place and is a sign of underlying issues!",
        "emoji": "🎨"
    },
    {
        "id": 63,
        "topic": "topic17",
        "question": "What is metastatic calcification?",
        "answer": "<li>Metastatic calcification refers to calcium deposits in normal tissues.</li>",
        "memoryTip": "Metastatic calcification is like a surprise guest at a dinner party—unexpected and can change the atmosphere!",
        "emoji": "🎉"
    },
    {
        "id": 64,
        "topic": "topic17",
        "question": "What are some associated conditions with dystrophic calcification?",
        "answer": "<li>Associated conditions include tuberculosis, granulomatous infections, liquefactive necrosis, fat necrosis, infarcts, and atherosclerotic plaques.</li>",
        "memoryTip": "Dystrophic calcification is like a collection of bad memories—each one tells a story of past troubles!",
        "emoji": "📚"
    },
    {
        "id": 65,
        "topic": "topic17",
        "question": "What are psammoma bodies?",
        "answer": "<li>Psammoma bodies are concentrically laminated calcified spherules usually seen in certain types of tumors.</li>",
        "memoryTip": "Psammoma bodies are like fancy cake decorations—beautiful but often a sign of something deeper!",
        "emoji": "🎂"
    },
    {
        "id": 66,
        "topic": "topic17",
        "question": "In which tumors are psammoma bodies commonly found?",
        "answer": "<li>Psammoma bodies are commonly found in papillary thyroid carcinoma, meningioma, serous ovarian carcinoma, mesothelioma, and prolactinoma.</li>",
        "memoryTip": "Psammoma bodies are like VIP tickets to the tumor show—only certain tumors get them!",
        "emoji": "🎟️"
    },
    {
        "id": 67,
        "topic": "topic18",
        "question": "What is amyloidosis characterized by?",
        "answer": "<li>Amyloidosis is characterized by extracellular deposition of protein in an abnormal fibrillar form, specifically in a β-pleated sheet configuration.</li>",
        "memoryTip": "Think of amyloidosis as a \"protein party\" where everyone shows up in the wrong outfit—fibrils instead of normal proteins!",
        "emoji": "🎉"
    },
    {
        "id": 68,
        "topic": "topic18",
        "question": "What are the renal manifestations of amyloidosis?",
        "answer": "<li>The renal manifestation of amyloidosis is nephrotic syndrome.</li>",
        "memoryTip": "Nephrotic syndrome is like a leaky faucet—too much protein is spilling out!",
        "emoji": "🚰"
    },
    {
        "id": 69,
        "topic": "topic18",
        "question": "What cardiac condition is associated with amyloidosis?",
        "answer": "<li>Amyloidosis can lead to restrictive cardiomyopathy.</li>",
        "memoryTip": "Restrictive cardiomyopathy is like a tight pair of shoes—your heart can't expand properly!",
        "emoji": "👟"
    },
    {
        "id": 70,
        "topic": "topic18",
        "question": "What gastrointestinal manifestation can occur due to amyloidosis?",
        "answer": "<li>Hepatosplenomegaly is a gastrointestinal manifestation of amyloidosis.</li>",
        "memoryTip": "Hepatosplenomegaly sounds like a party for your liver and spleen—too much protein makes them grow!",
        "emoji": "🎈"
    },
    {
        "id": 71,
        "topic": "topic18",
        "question": "What neurologic condition is associated with amyloidosis?",
        "answer": "<li>Peripheral neuropathy is a neurologic manifestation of amyloidosis.</li>",
        "memoryTip": "Peripheral neuropathy is like your nerves getting a little too cozy—too much amyloid makes them tingle!",
        "emoji": "⚡"
    },
    {
        "id": 72,
        "topic": "topic18",
        "question": "What musculoskeletal symptoms can arise from amyloidosis?",
        "answer": "<li>Musculoskeletal symptoms of amyloidosis include muscle enlargement (e.g., macroglossia) and carpal tunnel syndrome.</li>",
        "memoryTip": "Macroglossia means your tongue is ready for a big speech—just don’t let it get too big!",
        "emoji": "👅"
    },
    {
        "id": 73,
        "topic": "topic18",
        "question": "What skin changes are associated with amyloidosis?",
        "answer": "<li>Skin manifestations of amyloidosis include waxy thickening and easy bruising.</li>",
        "memoryTip": "Waxy skin is like a candle—too much amyloid makes you shine a little too much!",
        "emoji": "🕯️"
    },
    {
        "id": 74,
        "topic": "topic18",
        "question": "How are amyloid deposits visualized?",
        "answer": "<li>Amyloid deposits are visualized by Congo red stain (red/orange on nonpolarized light, apple-green birefringence on polarized light) and H&E stain (amorphous pink).</li>",
        "memoryTip": "Think of Congo red as the \"party light\" that reveals the hidden amyloid dance floor!",
        "emoji": "🔦"
    },
    {
        "id": 75,
        "topic": "topic19",
        "question": "What is primary amyloidosis also known as?",
        "answer": "<li>Primary amyloidosis is also known as AL amyloidosis, which is derived from immunoglobulin light chains.</li>",
        "memoryTip": "AL amyloidosis is like a light show—only the light chains are invited!",
        "emoji": "💡"
    },
    {
        "id": 76,
        "topic": "topic19",
        "question": "In which conditions is secondary amyloidosis (AA) seen?",
        "answer": "<li>Secondary amyloidosis (AA) is seen in chronic inflammatory conditions such as rheumatoid arthritis, inflammatory bowel disease, familial Mediterranean fever, and protracted infections.</li>",
        "memoryTip": "Secondary amyloidosis is like a chronic guest at the inflammation party—always showing up uninvited!",
        "emoji": "🎭"
    },
    {
        "id": 77,
        "topic": "topic19",
        "question": "What is the cause of transthyretin amyloidosis?",
        "answer": "<li>Transthyretin amyloidosis is caused by the protein transthyretin, which can be sporadic (associated with aging) or hereditary (leading to familial amyloid polyneuropathy and/or cardiomyopathy).</li>",
        "memoryTip": "Transthyretin is like a family heirloom—sometimes it’s inherited, and sometimes it just ages poorly!",
        "emoji": "🏺"
    },
    {
        "id": 78,
        "topic": "topic19",
        "question": "What type of amyloidosis is associated with long-term dialysis?",
        "answer": "<li>Dialysis-related amyloidosis is associated with β2-microglobulin.</li>",
        "memoryTip": "Dialysis-related amyloidosis is like a long-term relationship gone wrong—too much β2-microglobulin leads to trouble!",
        "emoji": "💔"
    },
    {
        "id": 79,
        "topic": "topic19",
        "question": "What amyloid protein is associated with Alzheimer disease?",
        "answer": "<li>The amyloid protein associated with Alzheimer disease is β-amyloid protein, which is cleaved from amyloid precursor protein.</li>",
        "memoryTip": "β-amyloid is like a forgetful friend—always getting cleaved and causing confusion!",
        "emoji": "🧠"
    },
    {
        "id": 80,
        "topic": "topic19",
        "question": "What is the amyloid protein associated with isolated atrial amyloidosis?",
        "answer": "<li>The amyloid protein associated with isolated atrial amyloidosis is ANP (atrial natriuretic peptide).</li>",
        "memoryTip": "ANP in atrial amyloidosis is like a party crasher—shows up with age and increases the risk of atrial fibrillation!",
        "emoji": "🎶"
    },
    {
        "id": 81,
        "topic": "topic19",
        "question": "What causes islet amyloid polypeptide deposition in type 2 diabetes mellitus?",
        "answer": "<li>Islet amyloid polypeptide deposition in type 2 diabetes mellitus is caused by the deposition of amylin in pancreatic islets.</li>",
        "memoryTip": "Amylin in diabetes is like a sugar rush—too much sweetness leads to a sticky situation!",
        "emoji": "🍭"
    },
    {
        "id": 82,
        "topic": "topic19",
        "question": "What is the amyloid protein secreted from tumor cells in medullary thyroid cancer?",
        "answer": "<li>The amyloid protein secreted from tumor cells in medullary thyroid cancer is calcitonin.</li>",
        "memoryTip": "Calcitonin in medullary thyroid cancer is like a secret agent—hiding in the tumor and causing trouble!",
        "emoji": "🕵️"
    },
    {
        "id": 83,
        "topic": "topic20",
        "question": "What is the primary purpose of inflammation?",
        "answer": "<li>The primary purpose of inflammation is to eliminate the initial cause of cell injury, remove necrotic cells, and initiate tissue repair.</li>",
        "memoryTip": "Inflammation is like a cleanup crew—always ready to tidy up after a party gone wrong!",
        "emoji": "🧹"
    },
    {
        "id": 84,
        "topic": "topic20",
        "question": "What are the two main types of inflammation?",
        "answer": "<li>The two main types of inflammation are acute and chronic inflammation.</li>",
        "memoryTip": "Acute inflammation is like a quick fire drill, while chronic inflammation is the never-ending meeting!",
        "emoji": "🔥"
    },
    {
        "id": 85,
        "topic": "topic20",
        "question": "What can excessive inflammation lead to?",
        "answer": "<li>Excessive inflammation can lead to harmful conditions such as septic shock, prolonged infections (e.g., TB), or autoimmune diseases (e.g., SLE).</li>",
        "memoryTip": "Too much inflammation is like a party that gets out of control—everyone ends up in trouble!",
        "emoji": "🚨"
    },
    {
        "id": 86,
        "topic": "topic20",
        "question": "What are the cardinal signs of inflammation?",
        "answer": "<li>The cardinal signs of inflammation are rubor (redness), calor (warmth), tumor (swelling), dolor (pain), and functio laesa (loss of function).</li>",
        "memoryTip": "Remember the five signs of inflammation as the \"Raging Calor Tumor Dancers\"—they're always putting on a show!",
        "emoji": "🎭"
    },
    {
        "id": 87,
        "topic": "topic20",
        "question": "What causes rubor and calor in inflammation?",
        "answer": "<li>Rubor (redness) and calor (warmth) are caused by vasodilation, which is mediated by histamine, prostaglandins, bradykinin, and nitric oxide.</li>",
        "memoryTip": "Rubor and calor are like a hot date—everything heats up when the blood flow increases!",
        "emoji": "❤️"
    },
    {
        "id": 88,
        "topic": "topic20",
        "question": "What causes tumor (swelling) in inflammation?",
        "answer": "<li>Tumor (swelling) is caused by endothelial contraction/disruption leading to increased vascular permeability and leakage of protein-rich fluid into the interstitial space.</li>",
        "memoryTip": "Tumor is like a balloon that keeps getting filled—too much fluid makes it swell!",
        "emoji": "🎈"
    },
    {
        "id": 89,
        "topic": "topic20",
        "question": "What is the mechanism behind dolor (pain) in inflammation?",
        "answer": "<li>Dolor (pain) is caused by the sensitization of sensory nerve endings, mediated by bradykinin, PGE2, and histamine.</li>",
        "memoryTip": "Dolor is like a surprise party for your nerves—always ready to make you feel something!",
        "emoji": "🎉"
    },
    {
        "id": 90,
        "topic": "topic20",
        "question": "What does functio laesa refer to in inflammation?",
        "answer": "<li>Functio laesa refers to the loss of function due to inflammation impairing normal activities, such as the inability to make a fist due to hand cellulitis.</li>",
        "memoryTip": "Functio laesa is like a broken toy—when inflammation hits, it just doesn’t work right anymore!",
        "emoji": "🧸"
    },
    {
        "id": 91,
        "topic": "topic20",
        "question": "What are systemic manifestations of acute-phase reaction?",
        "answer": "<li>Systemic manifestations of acute-phase reaction include fever and leukocytosis.</li>",
        "memoryTip": "Acute-phase reactions are like a feverish dance party—everyone's moving and shaking!",
        "emoji": "💃"
    },
    {
        "id": 92,
        "topic": "topic20",
        "question": "How does fever occur during inflammation?",
        "answer": "<li>Fever occurs when pyrogens induce macrophages to release IL-1 and TNF, which increase COX activity in the anterior hypothalamus, raising the temperature set point.</li>",
        "memoryTip": "Fever is like your body's thermostat going haywire—turning up the heat to fight off invaders!",
        "emoji": "🌡️"
    },
    {
        "id": 93,
        "topic": "topic20",
        "question": "What is leukocytosis?",
        "answer": "<li>Leukocytosis is an increase in white blood cell count, with the predominant cell type depending on the inciting agent or injury.</li>",
        "memoryTip": "Leukocytosis is like a WBC party—everyone shows up to defend the body!",
        "emoji": "🎊"
    },
    {
        "id": 94,
        "topic": "topic20",
        "question": "What are positive acute-phase reactants?",
        "answer": "<li>Positive acute-phase reactants include C-reactive protein, ferritin, fibrinogen, haptoglobin, hepcidin, and procalcitonin.</li>",
        "memoryTip": "Positive acute-phase reactants are like the VIPs of inflammation—always ready to help out!",
        "emoji": "🌟"
    },
    {
        "id": 95,
        "topic": "topic20",
        "question": "What is the role of C-reactive protein in inflammation?",
        "answer": "<li>C-reactive protein acts as an opsonin, fixing complement and facilitating phagocytosis, and is measured clinically as a nonspecific sign of ongoing inflammation.</li>",
        "memoryTip": "C-reactive protein is like a bouncer at the inflammation club—making sure the right cells get in!",
        "emoji": "🚪"
    },
    {
        "id": 96,
        "topic": "topic20",
        "question": "What does ferritin do during inflammation?",
        "answer": "<li>Ferritin binds and sequesters iron to inhibit microbial iron scavenging during inflammation.</li>",
        "memoryTip": "Ferritin is like a security guard for iron—keeping it away from the microbial party crashers!",
        "emoji": "🛡️"
    },
    {
        "id": 97,
        "topic": "topic20",
        "question": "What is the function of fibrinogen in inflammation?",
        "answer": "<li>Fibrinogen is a coagulation factor that promotes endothelial repair and correlates with erythrocyte sedimentation rate (ESR).</li>",
        "memoryTip": "Fibrinogen is like a repairman—always fixing things up after the inflammation mess!",
        "emoji": "🔧"
    },
    {
        "id": 98,
        "topic": "topic20",
        "question": "What does haptoglobin do in inflammation?",
        "answer": "<li>Haptoglobin binds extracellular hemoglobin, protecting against oxidative stress during inflammation.</li>",
        "memoryTip": "Haptoglobin is like a superhero for hemoglobin—saving it from oxidative villains!",
        "emoji": "🦸"
    },
    {
        "id": 99,
        "topic": "topic20",
        "question": "What is the role of hepcidin in inflammation?",
        "answer": "<li>Hepcidin decreases iron absorption and release from macrophages, contributing to anemia of chronic disease.</li>",
        "memoryTip": "Hepcidin is like a traffic cop for iron—directing it away when inflammation is in town!",
        "emoji": "🚦"
    },
    {
        "id": 100,
        "topic": "topic20",
        "question": "What happens to albumin during inflammation?",
        "answer": "<li>Albumin levels decrease during inflammation to conserve amino acids for positive reactants.</li>",
        "memoryTip": "Albumin is like a frugal friend—saving resources for the important guests at the inflammation party!",
        "emoji": "💰"
    },
    {
        "id": 101,
        "topic": "topic20",
        "question": "What is the role of transferrin in inflammation?",
        "answer": "<li>Transferrin is internalized by macrophages to sequester iron during inflammation.</li>",
        "memoryTip": "Transferrin is like a taxi service for iron—taking it away from the inflammation scene!",
        "emoji": "🚖"
    },
    {
        "id": 102,
        "topic": "topic20",
        "question": "What is transthyretin also known as?",
        "answer": "<li>Transthyretin is also known as prealbumin, and its reduction during inflammation conserves amino acids for positive reactants.</li>",
        "memoryTip": "Transthyretin is like a pre-party planner—making sure the important stuff is saved for the main event!",
        "emoji": "🎉"
    },
    {
        "id": 103,
        "topic": "topic21",
        "question": "What normally keeps RBCs separated in the bloodstream?",
        "answer": "<li>RBCs are normally kept separated by negative charges.</li>",
        "memoryTip": "RBCs are like introverts at a party, keeping their distance thanks to their negative vibes!",
        "emoji": "🎉"
    },
    {
        "id": 104,
        "topic": "topic21",
        "question": "What product of inflammation coats RBCs and affects their charge?",
        "answer": "<li>Fibrinogen coats RBCs, altering their negative charge and leading to aggregation.</li>",
        "memoryTip": "Fibrinogen is like the party crasher that gets everyone to mingle and stick together!",
        "emoji": "🎈"
    },
    {
        "id": 105,
        "topic": "topic21",
        "question": "What happens to denser RBC aggregates in a pipette tube?",
        "answer": "<li>Denser RBC aggregates fall at a faster rate, which is measured as the ESR.</li>",
        "memoryTip": "Think of denser aggregates as the heavyweights of the RBC world, sinking to the bottom like a rock!",
        "emoji": "🪨"
    },
    {
        "id": 106,
        "topic": "topic21",
        "question": "What is often co-tested with ESR as a marker of inflammation?",
        "answer": "<li>C-reactive protein (CRP) is often co-tested with ESR.</li>",
        "memoryTip": "ESR and CRP are like best friends at a health check-up, always hanging out together!",
        "emoji": "👯"
    },
    {
        "id": 107,
        "topic": "topic21",
        "question": "What are some conditions associated with an elevated ESR?",
        "answer": "<li>Conditions include infections, inflammation (e.g., giant cell arteritis), cancer, renal disease, pregnancy, sickle cell anemia, and polycythemia.</li>",
        "memoryTip": "An elevated ESR is like a red flag at a beach party—many reasons to be cautious!",
        "emoji": "🚩"
    },
    {
        "id": 108,
        "topic": "topic22",
        "question": "What characterizes acute inflammation?",
        "answer": "<li>Acute inflammation is characterized by neutrophils in tissue and often associated with edema.</li>",
        "memoryTip": "Acute inflammation is like a surprise party—quick, chaotic, and full of guests (neutrophils)!",
        "emoji": "🎊"
    },
    {
        "id": 109,
        "topic": "topic22",
        "question": "What is the typical onset and duration of acute inflammation?",
        "answer": "<li>Acute inflammation has a rapid onset (seconds to minutes) and a short duration (minutes to days).</li>",
        "memoryTip": "Acute inflammation is like a flash sale—quick and over before you know it!",
        "emoji": "⚡"
    },
    {
        "id": 110,
        "topic": "topic22",
        "question": "What type of immune response does acute inflammation represent?",
        "answer": "<li>Acute inflammation represents a reaction of the innate immune system, which is less specific than chronic inflammation.</li>",
        "memoryTip": "The innate immune system is like a general store—ready for anything but not specialized!",
        "emoji": "🏪"
    },
    {
        "id": 111,
        "topic": "topic22",
        "question": "What are common stimuli for acute inflammation?",
        "answer": "<li>Common stimuli include infections, trauma, necrosis, and foreign bodies.</li>",
        "memoryTip": "Acute inflammation is triggered by the \"big four\": infections, trauma, necrosis, and uninvited guests!",
        "emoji": "🚪"
    },
    {
        "id": 112,
        "topic": "topic23",
        "question": "What are some mediators of acute inflammation?",
        "answer": "<li>Mediators include toll-like receptors, arachidonic acid metabolites, neutrophils, eosinophils, antibodies, mast cells, basophils, complement, and Hageman factor.</li>",
        "memoryTip": "Think of mediators as the party planners of inflammation, making sure everything runs smoothly!",
        "emoji": "🎉"
    },
    {
        "id": 113,
        "topic": "topic23",
        "question": "What is the role of the inflammasome in inflammation?",
        "answer": "<li>The inflammasome is a cytoplasmic protein complex that recognizes products of dead cells and microbial products, activating IL-1 and the inflammatory response.</li>",
        "memoryTip": "The inflammasome is like a smoke detector—alerting the body when there's trouble!",
        "emoji": "🚨"
    },
    {
        "id": 114,
        "topic": "topic23",
        "question": "What are the vascular components of acute inflammation?",
        "answer": "<li>Vascular components include vasodilation (increased blood flow and stasis) and increased endothelial permeability.</li>",
        "memoryTip": "Vascular changes in inflammation are like opening the floodgates—more flow and less resistance!",
        "emoji": "🌊"
    },
    {
        "id": 115,
        "topic": "topic23",
        "question": "What is the main cellular component involved in acute inflammation?",
        "answer": "<li>The main cellular component is the extravasation of leukocytes, primarily neutrophils, from postcapillary venules.</li>",
        "memoryTip": "Neutrophils are like the first responders at an emergency scene, rushing in to help!",
        "emoji": "🚑"
    },
    {
        "id": 116,
        "topic": "topic24",
        "question": "What are the possible outcomes of acute inflammation?",
        "answer": "<li>Outcomes include resolution and healing, persistent acute inflammation, abscess formation, chronic inflammation, and scarring.</li>",
        "memoryTip": "The outcomes of acute inflammation are like a choose-your-own-adventure book—many paths to take!",
        "emoji": "📖"
    },
    {
        "id": 117,
        "topic": "topic24",
        "question": "Which cytokines are involved in the resolution and healing of acute inflammation?",
        "answer": "<li>IL-10 and TGF-β are involved in resolution and healing.</li>",
        "memoryTip": "IL-10 and TGF-β are like the peacekeepers, helping to wrap up the inflammation party!",
        "emoji": "✌️"
    },
    {
        "id": 118,
        "topic": "topic24",
        "question": "What role do macrophages play in acute inflammation?",
        "answer": "<li>Macrophages predominate in the late stages of acute inflammation and influence outcomes by secreting cytokines.</li>",
        "memoryTip": "Macrophages are like the cleanup crew after a party, making sure everything is in order!",
        "emoji": "🧹"
    },
    {
        "id": 119,
        "topic": "topic25",
        "question": "Where does leukocyte extravasation predominantly occur?",
        "answer": "<li>Leukocyte extravasation predominantly occurs at postcapillary venules.</li>",
        "memoryTip": "Think of postcapillary venules as the VIP entrance for leukocytes to get into the action!",
        "emoji": "🎟️"
    },
    {
        "id": 120,
        "topic": "topic25",
        "question": "What is the first step in leukocyte extravasation?",
        "answer": "<li>The first step is margination and rolling, which can be defective in leukocyte adhesion deficiency type 2.</li>",
        "memoryTip": "Margination and rolling are like the warm-up lap before the big race—getting ready to go!",
        "emoji": "🏃"
    },
    {
        "id": 121,
        "topic": "topic25",
        "question": "What molecules are involved in tight binding (adhesion) during leukocyte extravasation?",
        "answer": "<li>Molecules involved include ICAM-1, VCAM-1, and CD11/18 integrins.</li>",
        "memoryTip": "Tight binding is like a strong handshake—making sure leukocytes stick around!",
        "emoji": "🤝"
    },
    {
        "id": 122,
        "topic": "topic25",
        "question": "What is diapedesis in the context of leukocyte extravasation?",
        "answer": "<li>Diapedesis is the process where white blood cells travel between endothelial cells and exit the blood vessel.</li>",
        "memoryTip": "Diapedesis is like a secret escape route for leukocytes—sneaking out to the site of injury!",
        "emoji": "🕵️"
    },
    {
        "id": 123,
        "topic": "topic25",
        "question": "What guides leukocytes during migration to the site of injury or infection?",
        "answer": "<li>Leukocytes are guided by chemotactic signals such as C5a, IL-8, and LTB4.</li>",
        "memoryTip": "Chemotactic signals are like a GPS for leukocytes, directing them to the right location!",
        "emoji": "🗺️"
    },
    {
        "id": 124,
        "topic": "topic26",
        "question": "What characterizes chronic inflammation?",
        "answer": "<li>Chronic inflammation is characterized by prolonged inflammation with mononuclear infiltration, including macrophages, lymphocytes, and plasma cells, leading to simultaneous tissue destruction and repair.</li>",
        "memoryTip": "Chronic inflammation is like a long-term relationship—there's a lot of back and forth, but no one is really happy!",
        "emoji": "💔"
    },
    {
        "id": 125,
        "topic": "topic26",
        "question": "What can precede chronic inflammation?",
        "answer": "<li>Chronic inflammation may be preceded by acute inflammation.</li>",
        "memoryTip": "Think of it as the warm-up act before the main concert—acute inflammation gets the crowd ready for the long show!",
        "emoji": "🎤"
    },
    {
        "id": 126,
        "topic": "topic27",
        "question": "What are some persistent infections that can lead to chronic inflammation?",
        "answer": "<li>Persistent infections that can lead to chronic inflammation include tuberculosis (TB), Treponema pallidum, certain fungi, and viruses.</li>",
        "memoryTip": "Persistent infections are like that one friend who just won't leave the party—always hanging around!",
        "emoji": "🎉"
    },
    {
        "id": 127,
        "topic": "topic27",
        "question": "What types of hypersensitivity are associated with chronic inflammation?",
        "answer": "<li>Type IV hypersensitivity is associated with chronic inflammation.</li>",
        "memoryTip": "Type IV hypersensitivity is like a slow burn—takes time to ignite but can cause a lot of damage!",
        "emoji": "🔥"
    },
    {
        "id": 128,
        "topic": "topic27",
        "question": "What autoimmune diseases can lead to chronic inflammation?",
        "answer": "<li>Autoimmune diseases can lead to chronic inflammation.</li>",
        "memoryTip": "Autoimmune diseases are like a body fighting itself—it's the ultimate sibling rivalry!",
        "emoji": "🤼"
    },
    {
        "id": 129,
        "topic": "topic27",
        "question": "What are some toxic agents that can cause chronic inflammation?",
        "answer": "<li>Prolonged exposure to toxic agents, such as silica, can cause chronic inflammation.</li>",
        "memoryTip": "Silica is like that annoying dust that just keeps coming back—no matter how much you clean!",
        "emoji": "🧹"
    },
    {
        "id": 130,
        "topic": "topic28",
        "question": "Which cells are dominant in chronic inflammation?",
        "answer": "<li>Macrophages are the dominant cells in chronic inflammation.</li>",
        "memoryTip": "Macrophages are like the bouncers of inflammation—keeping everything in check!",
        "emoji": "🚷"
    },
    {
        "id": 131,
        "topic": "topic28",
        "question": "What do Th1 cells secrete, and what is its effect?",
        "answer": "<li>Th1 cells secrete IFN-γ, which leads to macrophage classical activation and is pro-inflammatory.</li>",
        "memoryTip": "Th1 cells are like the cheerleaders of inflammation—always hyping up the macrophages!",
        "emoji": "📣"
    },
    {
        "id": 132,
        "topic": "topic28",
        "question": "What do Th2 cells secrete, and what is its effect?",
        "answer": "<li>Th2 cells secrete IL-4 and IL-13, which lead to macrophage alternative activation, promoting repair and anti-inflammatory responses.</li>",
        "memoryTip": "Th2 cells are like the peacekeepers—always trying to calm things down!",
        "emoji": "☮️"
    },
    {
        "id": 133,
        "topic": "topic29",
        "question": "What are some outcomes of chronic inflammation?",
        "answer": "<li>Outcomes of chronic inflammation include scarring, amyloidosis, and neoplastic transformation.</li>",
        "memoryTip": "Chronic inflammation can lead to a lot of drama—like a soap opera with scarring and unexpected twists!",
        "emoji": "🎭"
    },
    {
        "id": 134,
        "topic": "topic29",
        "question": "How can chronic HCV infection lead to cancer?",
        "answer": "<li>Chronic HCV infection can lead to chronic inflammation, which may result in hepatocellular carcinoma.</li>",
        "memoryTip": "Chronic HCV is like a bad plot twist—what starts as a simple infection can turn into a full-blown drama!",
        "emoji": "🎬"
    },
    {
        "id": 135,
        "topic": "topic29",
        "question": "What is the relationship between Helicobacter pylori infection and gastric cancer?",
        "answer": "<li>Helicobacter pylori infection can cause chronic gastritis, which may lead to gastric adenocarcinoma.</li>",
        "memoryTip": "Helicobacter pylori is like a sneaky villain—causing trouble in the stomach that can lead to serious consequences!",
        "emoji": "🦠"
    },
    {
        "id": 136,
        "topic": "topic30",
        "question": "What are the phases of wound healing?",
        "answer": "<li>The phases of wound healing include inflammatory, proliferative, and remodeling phases.</li>",
        "memoryTip": "Wound healing is like a three-act play—first, there's the drama, then the action, and finally, the resolution!",
        "emoji": "🎭"
    },
    {
        "id": 137,
        "topic": "topic30",
        "question": "What cells are involved in the inflammatory phase of wound healing?",
        "answer": "<li>Platelets, neutrophils, and macrophages are involved in the inflammatory phase of wound healing.</li>",
        "memoryTip": "Think of these cells as the cleanup crew—getting rid of the mess before the real work begins!",
        "emoji": "🧹"
    },
    {
        "id": 138,
        "topic": "topic30",
        "question": "What occurs during the proliferative phase of wound healing?",
        "answer": "<li>During the proliferative phase, fibroblasts, myofibroblasts, endothelial cells, and keratinocytes work on granulation tissue deposition, angiogenesis, and wound contraction.</li>",
        "memoryTip": "The proliferative phase is like a construction crew—building back better and stronger!",
        "emoji": "🏗️"
    },
    {
        "id": 139,
        "topic": "topic30",
        "question": "What happens during the remodeling phase of wound healing?",
        "answer": "<li>In the remodeling phase, type III collagen is replaced by type I collagen, increasing the tensile strength of the tissue.</li>",
        "memoryTip": "Remodeling is like a home renovation—upgrading from flimsy to fabulous!",
        "emoji": "🏡"
    },
    {
        "id": 140,
        "topic": "topic31",
        "question": "What is granulomatous inflammation?",
        "answer": "<li>Granulomatous inflammation is a pattern of chronic inflammation characterized by a persistent T-cell response to certain infections, immune-mediated diseases, and foreign bodies.</li>",
        "memoryTip": "Granulomas are like the body's way of putting up a \"Do Not Disturb\" sign—trying to isolate the problem!",
        "emoji": "🚫"
    },
    {
        "id": 141,
        "topic": "topic31",
        "question": "What are the two types of granulomas?",
        "answer": "<li>The two types of granulomas are caseating (associated with central necrosis) and noncaseating (no central necrosis).</li>",
        "memoryTip": "Caseating granulomas are like a bad cheese—smelly and necrotic, while noncaseating ones are just plain!",
        "emoji": "🧀"
    },
    {
        "id": 142,
        "topic": "topic32",
        "question": "How do APCs contribute to granulomatous inflammation?",
        "answer": "<li>Antigen-presenting cells (APCs) present antigens to CD4+ Th cells and secrete IL-12, leading to the differentiation of Th1 cells.</li>",
        "memoryTip": "APCs are like the teachers of the immune system—educating T cells on what to fight!",
        "emoji": "📚"
    },
    {
        "id": 143,
        "topic": "topic32",
        "question": "What is the role of Th1 cells in granulomatous inflammation?",
        "answer": "<li>Th1 cells secrete IFN-γ, which activates macrophages and leads to the formation of epithelioid macrophages and giant cells.</li>",
        "memoryTip": "Th1 cells are like the drill sergeants—getting macrophages ready for action!",
        "emoji": "🎖️"
    },
    {
        "id": 144,
        "topic": "topic33",
        "question": "What are some infectious etiologies of granulomatous inflammation?",
        "answer": "<li>Infectious etiologies include Mycobacteria (e.g., tuberculosis), Bartonella henselae, Listeria monocytogenes, and Treponema pallidum.</li>",
        "memoryTip": "Granulomatous infections are like a bad party guest list—full of troublemakers!",
        "emoji": "🎉"
    },
    {
        "id": 145,
        "topic": "topic33",
        "question": "What are some non-infectious causes of granulomatous inflammation?",
        "answer": "<li>Non-infectious causes include sarcoidosis, Crohn disease, primary biliary cholangitis, and certain types of thyroiditis.</li>",
        "memoryTip": "Non-infectious granulomas are like the drama queens of the immune system—always making a scene without a real cause!",
        "emoji": "👑"
    },
    {
        "id": 146,
        "topic": "topic33",
        "question": "What types of vasculitis are associated with granulomatous inflammation?",
        "answer": "<li>Granulomatous inflammation is associated with vasculitis such as granulomatosis with polyangiitis, eosinophilic granulomatosis with polyangiitis, giant cell arteritis, and Takayasu arteritis.</li>",
        "memoryTip": "Vasculitis is like a traffic jam in the blood vessels—everyone's stuck and causing a ruckus!",
        "emoji": "🚦"
    },
    {
        "id": 147,
        "topic": "topic33",
        "question": "What foreign body reactions can lead to granulomatous inflammation?",
        "answer": "<li>Foreign body reactions can include berylliosis, talcosis, and hypersensitivity pneumonitis.</li>",
        "memoryTip": "Foreign bodies are like uninvited guests at a party—causing chaos and inflammation!",
        "emoji": "🎈"
    },
    {
        "id": 148,
        "topic": "topic34",
        "question": "What occurs when repair cannot be accomplished by cell regeneration alone?",
        "answer": "<li>Scar formation occurs when repair cannot be accomplished by cell regeneration alone.</li>",
        "memoryTip": "Think of scars as the body's way of saying, \"I tried my best, but I needed a backup plan!\"",
        "emoji": "🩹"
    },
    {
        "id": 149,
        "topic": "topic34",
        "question": "What replaces nonregenerated cells due to severe acute or chronic injury?",
        "answer": "<li>Nonregenerated cells are replaced by connective tissue.</li>",
        "memoryTip": "Connective tissue is like the body's construction crew, building a bridge where the road got bumpy!",
        "emoji": "🏗️"
    },
    {
        "id": 150,
        "topic": "topic34",
        "question": "What percentage of tensile strength is regained at 3 months post-injury?",
        "answer": "<li>70–80% of tensile strength is regained at 3 months.</li>",
        "memoryTip": "After 3 months, your scar is like a teenager—strong but still a bit awkward!",
        "emoji": "💪"
    },
    {
        "id": 151,
        "topic": "topic34",
        "question": "How much tensile strength is regained after the initial 3 months?",
        "answer": "<li>Little tensile strength is regained thereafter.</li>",
        "memoryTip": "After 3 months, scars are like that friend who promises to work out but just keeps eating pizza!",
        "emoji": "🍕"
    },
    {
        "id": 152,
        "topic": "topic34",
        "question": "What is excess TGF-β associated with?",
        "answer": "<li>Excess TGF-β is associated with aberrant scarring, such as hypertrophic and keloid scars.</li>",
        "memoryTip": "TGF-β is like the overzealous gardener who just can't stop watering the plants—too much can lead to a jungle!",
        "emoji": "🌱"
    },
    {
        "id": 153,
        "topic": "topic34",
        "question": "What type of collagen is primarily synthesized in hypertrophic scars?",
        "answer": "<li>Hypertrophic scars primarily synthesize type III collagen.</li>",
        "memoryTip": "Type III collagen is like the rookie in the collagen league—still learning but trying hard!",
        "emoji": "🏆"
    },
    {
        "id": 154,
        "topic": "topic34",
        "question": "What types of collagen are synthesized in keloid scars?",
        "answer": "<li>Keloid scars synthesize types I and III collagen.</li>",
        "memoryTip": "Keloid scars are like overachievers, bringing home two types of collagen trophies!",
        "emoji": "🥇"
    },
    {
        "id": 155,
        "topic": "topic34",
        "question": "How is collagen organized in hypertrophic scars?",
        "answer": "<li>Collagen in hypertrophic scars is organized in parallel.</li>",
        "memoryTip": "Think of hypertrophic scars as a well-organized marching band—everyone in line!",
        "emoji": "🎺"
    },
    {
        "id": 156,
        "topic": "topic34",
        "question": "How is collagen organized in keloid scars?",
        "answer": "<li>Collagen in keloid scars is disorganized.</li>",
        "memoryTip": "Keloid scars are like a chaotic rock concert—everyone's everywhere!",
        "emoji": "🎸"
    },
    {
        "id": 157,
        "topic": "topic34",
        "question": "What is the extent of a hypertrophic scar?",
        "answer": "<li>A hypertrophic scar is confined to the borders of the original wound.</li>",
        "memoryTip": "Hypertrophic scars are like a well-behaved pet—staying in their own yard!",
        "emoji": "🐶"
    },
    {
        "id": 158,
        "topic": "topic34",
        "question": "What is the extent of a keloid scar?",
        "answer": "<li>A keloid scar extends beyond the borders of the original wound with \"clawlike\" projections.</li>",
        "memoryTip": "Keloid scars are like that friend who just can't take a hint and keeps crashing the party!",
        "emoji": "🎉"
    },
    {
        "id": 159,
        "topic": "topic34",
        "question": "What is the recurrence rate of hypertrophic scars?",
        "answer": "<li>The recurrence of hypertrophic scars is infrequent.</li>",
        "memoryTip": "Hypertrophic scars are like a rare guest appearance—nice to see but not often!",
        "emoji": "👀"
    },
    {
        "id": 160,
        "topic": "topic34",
        "question": "What is the recurrence rate of keloid scars?",
        "answer": "<li>The recurrence of keloid scars is frequent.</li>",
        "memoryTip": "Keloid scars are like that one friend who always shows up uninvited—hard to get rid of!",
        "emoji": "🚪"
    },
    {
        "id": 161,
        "topic": "topic34",
        "question": "What predisposition is associated with hypertrophic scars?",
        "answer": "<li>There is no predisposition associated with hypertrophic scars.</li>",
        "memoryTip": "Hypertrophic scars are like a neutral party—no favorites here!",
        "emoji": "⚖️"
    },
    {
        "id": 162,
        "topic": "topic34",
        "question": "What predisposition is associated with keloid scars?",
        "answer": "<li>Keloid scars have a higher incidence in people with darker skin.</li>",
        "memoryTip": "Keloid scars are like a VIP club—certain folks just have a better chance of getting in!",
        "emoji": "🎟️"
    },
    {
        "id": 163,
        "topic": "topic35",
        "question": "What is neoplasia?",
        "answer": "<li>Neoplasia is the uncontrolled, monoclonal proliferation of cells.</li>",
        "memoryTip": "Neoplasia is like a party that got out of hand—too many guests and no one knows how to leave!",
        "emoji": "🎊"
    },
    {
        "id": 164,
        "topic": "topic35",
        "question": "What are the two components of any neoplastic growth?",
        "answer": "<li>Any neoplastic growth has two components: parenchyma (neoplastic cells) and supporting stroma (non-neoplastic).</li>",
        "memoryTip": "Think of neoplastic growth as a sandwich—cells are the filling, and stroma is the bread holding it all together!",
        "emoji": "🥪"
    },
    {
        "id": 165,
        "topic": "topic35",
        "question": "What is dysplasia?",
        "answer": "<li>Dysplasia is the loss of uniformity in cell size and shape, loss of tissue orientation, and nuclear changes.</li>",
        "memoryTip": "Dysplasia is like a messy room—everything is out of place and needs some organizing!",
        "emoji": "🧹"
    },
    {
        "id": 166,
        "topic": "topic35",
        "question": "What are the characteristics of carcinoma in situ?",
        "answer": "<li>Carcinoma in situ is irreversible severe dysplasia that involves the entire thickness of the epithelium but does not penetrate the basement membrane.</li>",
        "memoryTip": "Carcinoma in situ is like a locked door—it's serious but hasn't broken through yet!",
        "emoji": "🚪"
    },
    {
        "id": 167,
        "topic": "topic35",
        "question": "What happens in invasive carcinoma?",
        "answer": "<li>In invasive carcinoma, cells have invaded the basement membrane using collagenases and hydrolases.</li>",
        "memoryTip": "Invasive carcinoma is like a burglar breaking into a house—crossing boundaries and causing trouble!",
        "emoji": "🏠"
    },
    {
        "id": 168,
        "topic": "topic35",
        "question": "What is the role of E-cadherin in invasive carcinoma?",
        "answer": "<li>In invasive carcinoma, cell-cell contacts are lost by inactivation of E-cadherin.</li>",
        "memoryTip": "E-cadherin is like the glue holding friends together—without it, they just drift apart!",
        "emoji": "🧪"
    },
    {
        "id": 169,
        "topic": "topic35",
        "question": "How does metastasis occur?",
        "answer": "<li>Metastasis occurs through the spread to distant organ(s) via lymphatics or blood.</li>",
        "memoryTip": "Metastasis is like a road trip gone wrong—cancer cells hitch a ride to new destinations!",
        "emoji": "🚗"
    },
    {
        "id": 170,
        "topic": "topic36",
        "question": "What does the term \"carcinoma\" imply about a tumor's origin?",
        "answer": "<li>Carcinoma implies epithelial origin.</li>",
        "memoryTip": "Carcinoma is like a \"carpet\" covering the epithelial floor!",
        "emoji": "🧼"
    },
    {
        "id": 171,
        "topic": "topic36",
        "question": "What does the term \"sarcoma\" denote regarding tumor origin?",
        "answer": "<li>Sarcoma denotes mesenchymal origin.</li>",
        "memoryTip": "Sarcoma sounds like \"sarcophagus,\" which is where mesenchymal tissues might rest!",
        "emoji": "⚰️"
    },
    {
        "id": 172,
        "topic": "topic36",
        "question": "What are the characteristics of benign tumors?",
        "answer": "<li>Benign tumors are usually well-differentiated, well-demarcated, have low mitotic activity, no metastases, and no necrosis.</li>",
        "memoryTip": "Benign tumors are like well-behaved guests at a party—polite and not causing any trouble!",
        "emoji": "🎉"
    },
    {
        "id": 173,
        "topic": "topic36",
        "question": "What are the characteristics of malignant tumors?",
        "answer": "<li>Malignant tumors may show poor differentiation, erratic growth, local invasion, metastasis, and apoptosis.</li>",
        "memoryTip": "Malignant tumors are like party crashers—uninvited and causing chaos!",
        "emoji": "🚨"
    },
    {
        "id": 174,
        "topic": "topic37",
        "question": "What is a hamartoma?",
        "answer": "<li>A hamartoma is a disorganized overgrowth of tissues in their native location.</li>",
        "memoryTip": "Hamartomas are like a messy room—everything is there, just not in the right order!",
        "emoji": "🛏️"
    },
    {
        "id": 175,
        "topic": "topic37",
        "question": "What is a choristoma?",
        "answer": "<li>A choristoma is normal tissue located in a foreign location.</li>",
        "memoryTip": "Choristomas are like a tourist who sets up camp in the wrong city—out of place but still normal!",
        "emoji": "🏕️"
    },
    {
        "id": 176,
        "topic": "topic38",
        "question": "What is the benign tumor of epithelial origin called?",
        "answer": "<li>The benign tumor of epithelial origin is called an adenoma or papilloma.</li>",
        "memoryTip": "Adenomas are like \"add-a-nice\" touch to the epithelium—just benign!",
        "emoji": "✨"
    },
    {
        "id": 177,
        "topic": "topic38",
        "question": "What is the malignant counterpart of an adenoma?",
        "answer": "<li>The malignant counterpart of an adenoma is adenocarcinoma or papillary carcinoma.</li>",
        "memoryTip": "Adenocarcinomas are like the \"bad apples\" of the epithelial orchard!",
        "emoji": "🍏"
    },
    {
        "id": 178,
        "topic": "topic38",
        "question": "What is the benign tumor of blood vessels called?",
        "answer": "<li>The benign tumor of blood vessels is called a hemangioma.</li>",
        "memoryTip": "Hemangiomas are like \"hem-ing and haw-ing\" over their benign nature!",
        "emoji": "💉"
    },
    {
        "id": 179,
        "topic": "topic38",
        "question": "What is the malignant tumor of blood vessels?",
        "answer": "<li>The malignant tumor of blood vessels is called angiosarcoma.</li>",
        "memoryTip": "Angiosarcoma is like a \"dangerous river\"—it can flow into trouble!",
        "emoji": "🌊"
    },
    {
        "id": 180,
        "topic": "topic38",
        "question": "What is the benign tumor of smooth muscle called?",
        "answer": "<li>The benign tumor of smooth muscle is called leiomyoma.</li>",
        "memoryTip": "Leiomyomas are like \"laying low\"—they're benign and chill!",
        "emoji": "🛌"
    },
    {
        "id": 181,
        "topic": "topic38",
        "question": "What is the malignant counterpart of a leiomyoma?",
        "answer": "<li>The malignant counterpart of a leiomyoma is leiomyosarcoma.</li>",
        "memoryTip": "Leiomyosarcoma is like a \"smooth criminal\"—it’s up to no good!",
        "emoji": "🕵️"
    },
    {
        "id": 182,
        "topic": "topic38",
        "question": "What is the benign tumor of fat called?",
        "answer": "<li>The benign tumor of fat is called lipoma.</li>",
        "memoryTip": "Lipomas are like \"lumpy pillows\"—soft and benign!",
        "emoji": "🛏️"
    },
    {
        "id": 183,
        "topic": "topic38",
        "question": "What is the malignant tumor of fat?",
        "answer": "<li>The malignant tumor of fat is called liposarcoma.</li>",
        "memoryTip": "Liposarcoma is like a \"fat chance\" of being benign—it's trouble!",
        "emoji": "🍔"
    },
    {
        "id": 184,
        "topic": "topic39",
        "question": "What does tumor grade refer to?",
        "answer": "<li>Tumor grade refers to the degree of cell differentiation and mitotic activity on histology.</li>",
        "memoryTip": "Tumor grade is like grading a paper—higher grades mean more chaos!",
        "emoji": "📄"
    },
    {
        "id": 185,
        "topic": "topic39",
        "question": "What is the range of tumor grades?",
        "answer": "<li>Tumor grades range from low-grade (well differentiated) to high-grade (poorly differentiated or undifferentiated).</li>",
        "memoryTip": "Low-grade tumors are like \"A students,\" while high-grade tumors are the \"class clowns!\"",
        "emoji": "🎓"
    },
    {
        "id": 186,
        "topic": "topic39",
        "question": "What does tumor stage indicate?",
        "answer": "<li>Tumor stage indicates the degree of invasion and spread from the initial site.</li>",
        "memoryTip": "Tumor stage is like a travel itinerary—how far has it gone?",
        "emoji": "🗺️"
    },
    {
        "id": 187,
        "topic": "topic39",
        "question": "What is the TNM staging system?",
        "answer": "<li>The TNM staging system assesses primary tumor size/invasion, regional lymph node metastasis, and distant metastasis.</li>",
        "memoryTip": "TNM is like a \"travel guide\" for tumors—where have they been?",
        "emoji": "🧳"
    },
    {
        "id": 188,
        "topic": "topic39",
        "question": "Why is tumor stage generally more prognostic than grade?",
        "answer": "<li>Stage generally has more prognostic value than grade because it determines survival, with higher stage often indicating worse outcomes.</li>",
        "memoryTip": "Stage is like the final score in a game—it's what really matters!",
        "emoji": "🏆"
    },
    {
        "id": 189,
        "topic": "topic40",
        "question": "What causes cancer according to the hallmarks of cancer?",
        "answer": "<li>Cancer is caused by mostly acquired DNA mutations that affect fundamental cellular processes.</li>",
        "memoryTip": "Cancer is like a \"bad script\"—mutations lead to a plot twist!",
        "emoji": "🎬"
    },
    {
        "id": 190,
        "topic": "topic40",
        "question": "What is the hallmark of \"self-sufficiency in growth signals\"?",
        "answer": "<li>It involves mutations in genes encoding proto-oncogenes, growth factors, growth factor receptors, signaling molecules, transcription factors, and cell cycle regulators.</li>",
        "memoryTip": "Self-sufficiency is like a \"self-service buffet\"—cancer cells help themselves!",
        "emoji": "🍽️"
    },
    {
        "id": 191,
        "topic": "topic40",
        "question": "What does \"anti-growth signal insensitivity\" refer to?",
        "answer": "<li>It refers to mutations in tumor suppressor genes and loss of E-cadherin function, leading to loss of contact inhibition.</li>",
        "memoryTip": "Anti-growth signal insensitivity is like ignoring a \"Do Not Disturb\" sign—cancer cells just keep growing!",
        "emoji": "🚫"
    },
    {
        "id": 192,
        "topic": "topic40",
        "question": "What is the hallmark of \"evasion of apoptosis\"?",
        "answer": "<li>It involves mutations in genes that regulate apoptosis, such as TP53 and BCL2.</li>",
        "memoryTip": "Evasion of apoptosis is like a cat with nine lives—cancer cells just won't quit!",
        "emoji": "🐱"
    },
    {
        "id": 193,
        "topic": "topic40",
        "question": "What does \"limitless replicative potential\" mean?",
        "answer": "<li>It refers to the reactivation of telomerase, which maintains and lengthens telomeres, preventing chromosome shortening and cell aging.</li>",
        "memoryTip": "Limitless replicative potential is like a \"never-ending story\"—cancer cells just keep going!",
        "emoji": "📖"
    },
    {
        "id": 194,
        "topic": "topic40",
        "question": "What is sustained angiogenesis?",
        "answer": "<li>It involves pro-angiogenic factors or inhibitory factors produced by tumor or stromal cells, leading to new blood vessel formation.</li>",
        "memoryTip": "Sustained angiogenesis is like a \"new highway\" for tumors—more routes to spread!",
        "emoji": "🛣️"
    },
    {
        "id": 195,
        "topic": "topic40",
        "question": "What is the Warburg effect?",
        "answer": "<li>The Warburg effect is the shift of glucose metabolism from mitochondrial oxidative phosphorylation to glycolysis, even in the presence of oxygen.</li>",
        "memoryTip": "The Warburg effect is like a \"party in the glycolysis lane\"—cancer cells love to dance!",
        "emoji": "🎶"
    },
    {
        "id": 196,
        "topic": "topic40",
        "question": "How do tumor cells evade the immune system?",
        "answer": "<li>Tumor cells evade the immune system by downregulating MHC class I expression, secreting immunosuppressive factors, and upregulating immune checkpoint molecules.</li>",
        "memoryTip": "Tumor cells are like sneaky ninjas—hiding from the immune system!",
        "emoji": "🥷"
    },
    {
        "id": 197,
        "topic": "topic40",
        "question": "What is the process of tissue invasion in cancer?",
        "answer": "<li>Tissue invasion involves loss of E-cadherin function, loosening of intercellular junctions, degradation of the basement membrane and ECM, and migration through degraded ECM.</li>",
        "memoryTip": "Tissue invasion is like a \"break-in\"—cancer cells are determined to get in!",
        "emoji": "🚪"
    },
    {
        "id": 198,
        "topic": "topic40",
        "question": "How do tumor cells metastasize?",
        "answer": "<li>Tumor cells metastasize by spreading via lymphatics or blood, adhering to endothelium, extravasating, and homing to target organs.</li>",
        "memoryTip": "Metastasis is like a \"road trip\" for tumor cells—always looking for new places to settle!",
        "emoji": "🚗"
    },
    {
        "id": 199,
        "topic": "topic41",
        "question": "What do immune checkpoint interactions modulate?",
        "answer": "<li>They modulate T-cell activation and function in the immune response against tumor cells.</li>",
        "memoryTip": "Think of T-cells as party-goers who need a bouncer (checkpoints) to keep the party (immune response) under control!",
        "emoji": "🎉"
    },
    {
        "id": 200,
        "topic": "topic41",
        "question": "Which immune checkpoint interaction involves PD-1?",
        "answer": "<li>The interaction between PD-1 on T cells and PD-L1/2 on tumor cells or immune cells in the tumor microenvironment.</li>",
        "memoryTip": "PD-1 is like a T-cell that forgot its ID at the door, leading to dysfunction!",
        "emoji": "🆔"
    },
    {
        "id": 201,
        "topic": "topic41",
        "question": "What is the effect of PD-1 and PD-L1/2 interaction?",
        "answer": "<li>It leads to T-cell dysfunction or exhaustion.</li>",
        "memoryTip": "Exhausted T-cells are like marathon runners who forgot to hydrate—no energy left!",
        "emoji": "🏃‍♂️💧"
    },
    {
        "id": 202,
        "topic": "topic41",
        "question": "What type of therapies target PD-1?",
        "answer": "<li>Antibodies against PD-1, such as cemiplimab, nivolumab, and pembrolizumab.</li>",
        "memoryTip": "Think of these antibodies as T-cell energy drinks, giving them a boost to fight!",
        "emoji": "🥤"
    },
    {
        "id": 203,
        "topic": "topic41",
        "question": "What is the role of CTLA-4 in T-cell activation?",
        "answer": "<li>CTLA-4 on T cells outcompetes CD28 for B7 on antigen-presenting cells (APCs), leading to a loss of T-cell costimulatory signal.</li>",
        "memoryTip": "CTLA-4 is like a party crasher who takes the best snacks, leaving T-cells hungry for activation!",
        "emoji": "🍕"
    },
    {
        "id": 204,
        "topic": "topic41",
        "question": "Which antibody inhibits CTLA-4?",
        "answer": "<li>Ipilimumab inhibits CTLA-4.</li>",
        "memoryTip": "Ipilimumab is like a bouncer who kicks out the party crasher (CTLA-4) to let T-cells enjoy the party!",
        "emoji": "🚷"
    },
    {
        "id": 205,
        "topic": "topic42",
        "question": "What is the most common cancer in males?",
        "answer": "<li>Prostate cancer is the most common cancer in males.</li>",
        "memoryTip": "Prostate cancer is like the popular kid in school—everyone knows it!",
        "emoji": "👦"
    },
    {
        "id": 206,
        "topic": "topic42",
        "question": "What is the most common cancer in females?",
        "answer": "<li>Breast cancer is the most common cancer in females.</li>",
        "memoryTip": "Breast cancer is like the leading lady in a movie—always in the spotlight!",
        "emoji": "🎬"
    },
    {
        "id": 207,
        "topic": "topic42",
        "question": "What is the most common cancer in children aged 0-14?",
        "answer": "<li>Leukemia is the most common cancer in children aged 0-14.</li>",
        "memoryTip": "Leukemia is like the kid who always gets picked first in dodgeball—unfortunately, it’s not a good thing!",
        "emoji": "🏐"
    },
    {
        "id": 208,
        "topic": "topic42",
        "question": "How has lung cancer incidence changed in males?",
        "answer": "<li>Lung cancer incidence has decreased in males.</li>",
        "memoryTip": "Lung cancer in males is like a bad trend that finally went out of style!",
        "emoji": "📉"
    },
    {
        "id": 209,
        "topic": "topic42",
        "question": "What is the second leading cause of death in the United States?",
        "answer": "<li>Cancer is the second leading cause of death in the United States.</li>",
        "memoryTip": "Cancer is like the runner-up in a race—always close behind heart disease!",
        "emoji": "🏁"
    },
    {
        "id": 210,
        "topic": "topic43",
        "question": "How do most carcinomas spread?",
        "answer": "<li>Most carcinomas spread via lymphatics.</li>",
        "memoryTip": "Carcinomas are like gossip—spreading through the lymphatic network!",
        "emoji": "🗣️"
    },
    {
        "id": 211,
        "topic": "topic43",
        "question": "How do most sarcomas spread?",
        "answer": "<li>Most sarcomas spread hematogenously.</li>",
        "memoryTip": "Sarcomas are like a bad rumor that travels through the bloodstream!",
        "emoji": "🩸"
    },
    {
        "id": 212,
        "topic": "topic43",
        "question": "Which four carcinomas route hematogenously?",
        "answer": "<li>Follicular thyroid carcinoma, choriocarcinoma, renal cell carcinoma, and hepatocellular carcinoma route hematogenously.</li>",
        "memoryTip": "These four are like the VIPs of hematogenous spread—always getting the best routes!",
        "emoji": "🚗"
    },
    {
        "id": 213,
        "topic": "topic43",
        "question": "Where do metastases commonly appear?",
        "answer": "<li>Metastases often appear as multiple lesions, while primary tumors generally appear as solitary lesions.</li>",
        "memoryTip": "Metastases are like a group of friends showing up together, while primary tumors are the solo act!",
        "emoji": "👯‍♂️"
    },
    {
        "id": 214,
        "topic": "topic44",
        "question": "What is the most common primary tumor that metastasizes to bone?",
        "answer": "<li>Prostate cancer is the most common primary tumor that metastasizes to bone.</li>",
        "memoryTip": "Prostate cancer loves to hang out in the bone like a couch potato!",
        "emoji": "🛋️"
    },
    {
        "id": 215,
        "topic": "topic44",
        "question": "What types of bone metastasis can occur?",
        "answer": "<li>Bone metastasis can be blastic, mixed, or lytic.</li>",
        "memoryTip": "Think of bone metastasis types as different pizza toppings—everyone has their favorite!",
        "emoji": "🍕"
    },
    {
        "id": 216,
        "topic": "topic44",
        "question": "Which primary tumor is most likely to metastasize to the liver?",
        "answer": "<li>Colon cancer is the most common primary tumor that metastasizes to the liver.</li>",
        "memoryTip": "Colon cancer is like a party that spills over into the liver—everyone's invited!",
        "emoji": "🎉"
    },
    {
        "id": 217,
        "topic": "topic44",
        "question": "What is the typical pattern of lung metastasis?",
        "answer": "<li>Lung metastasis typically involves both lungs.</li>",
        "memoryTip": "Lung metastasis is like a double feature movie—always showing in stereo!",
        "emoji": "🎥"
    },
    {
        "id": 218,
        "topic": "topic44",
        "question": "Which primary tumor most commonly metastasizes to the brain?",
        "answer": "<li>Lung cancer is the most common primary tumor that metastasizes to the brain.</li>",
        "memoryTip": "Lung cancer is like a brainiac that just can’t stay away from the smartest crowd!",
        "emoji": "🧠"
    },
    {
        "id": 219,
        "topic": "topic45",
        "question": "What is the effect of a gain of function mutation on a proto-oncogene?",
        "answer": "<li>It converts a proto-oncogene (normal gene) to an oncogene, increasing cancer risk.</li>",
        "memoryTip": "Think of it as a proto-oncogene getting a \"superpower\" that makes it a villain in the cancer story!",
        "emoji": "🦸‍♂️"
    },
    {
        "id": 220,
        "topic": "topic45",
        "question": "How many alleles of a proto-oncogene need to be damaged to increase cancer risk?",
        "answer": "<li>Only one allele of a proto-oncogene needs to be damaged.</li>",
        "memoryTip": "Just one bad apple can spoil the whole bunch, especially in the gene orchard!",
        "emoji": "🍏"
    },
    {
        "id": 221,
        "topic": "topic45",
        "question": "What type of gene product does the ALK gene encode?",
        "answer": "<li>ALK encodes a receptor tyrosine kinase.</li>",
        "memoryTip": "ALK is like a \"receptionist\" for signals that can lead to lung adenocarcinoma!",
        "emoji": "📞"
    },
    {
        "id": 222,
        "topic": "topic45",
        "question": "Which neoplasm is associated with the EGFR gene?",
        "answer": "<li>Lung adenocarcinoma.</li>",
        "memoryTip": "EGFR is like the \"EGG\" that hatches lung cancer!",
        "emoji": "🥚"
    },
    {
        "id": 223,
        "topic": "topic45",
        "question": "What type of cancer is associated with HER2?",
        "answer": "<li>Breast and gastric carcinomas.</li>",
        "memoryTip": "HER2 is like a \"herald\" announcing the arrival of breast and gastric cancers!",
        "emoji": "📣"
    },
    {
        "id": 224,
        "topic": "topic45",
        "question": "What is the gene product of RET and its associated neoplasms?",
        "answer": "<li>RET encodes a receptor tyrosine kinase and is associated with MEN2A and 2B, medullary and papillary thyroid carcinoma, and pheochromocytoma.</li>",
        "memoryTip": "RET is like a \"retail\" store for thyroid tumors, selling them in various types!",
        "emoji": "🏬"
    },
    {
        "id": 225,
        "topic": "topic45",
        "question": "What type of kinase is BCR-ABL?",
        "answer": "<li>BCR-ABL is a non-receptor tyrosine kinase.</li>",
        "memoryTip": "BCR-ABL is like a \"bouncer\" at the cancer club, letting in leukemia and ALL!",
        "emoji": "🚷"
    },
    {
        "id": 226,
        "topic": "topic45",
        "question": "What neoplasms are associated with JAK2?",
        "answer": "<li>Myeloproliferative neoplasms.</li>",
        "memoryTip": "JAK2 is like a \"jackpot\" for blood cancers!",
        "emoji": "🎰"
    },
    {
        "id": 227,
        "topic": "topic45",
        "question": "What type of cancer is associated with BRAF?",
        "answer": "<li>BRAF is associated with melanoma, non-Hodgkin lymphoma, colorectal carcinoma, papillary thyroid carcinoma, and hairy cell leukemia.</li>",
        "memoryTip": "BRAF is like a \"brave\" knight fighting multiple types of cancer dragons!",
        "emoji": "🐉"
    },
    {
        "id": 228,
        "topic": "topic45",
        "question": "What does c-KIT encode and what is its associated neoplasm?",
        "answer": "<li>c-KIT encodes a cytokine receptor (CD117) and is associated with gastrointestinal stromal tumors (GIST) and mastocytosis.</li>",
        "memoryTip": "c-KIT is like a \"kit\" for gastrointestinal troubles!",
        "emoji": "🎒"
    },
    {
        "id": 229,
        "topic": "topic45",
        "question": "What type of cancer is associated with MYCC (c-myc)?",
        "answer": "<li>Burkitt lymphoma.</li>",
        "memoryTip": "MYCC is like a \"mythical creature\" causing Burkitt lymphoma!",
        "emoji": "🦄"
    },
    {
        "id": 230,
        "topic": "topic45",
        "question": "What is the function of KRAS and its associated cancers?",
        "answer": "<li>KRAS is a RAS GTPase associated with pancreatic, colorectal, lung, and endometrial cancers.</li>",
        "memoryTip": "KRAS is like a \"race car\" speeding towards multiple cancer types!",
        "emoji": "🏎️"
    },
    {
        "id": 231,
        "topic": "topic45",
        "question": "What type of molecule is BCL-2 and what cancers is it associated with?",
        "answer": "<li>BCL-2 is an antiapoptotic molecule associated with follicular and diffuse large B-cell lymphomas.</li>",
        "memoryTip": "BCL-2 is like a \"bouncer\" preventing cells from leaving the party (apoptosis)!",
        "emoji": "🎉"
    },
    {
        "id": 232,
        "topic": "topic46",
        "question": "What is the effect of a loss of function mutation in tumor suppressor genes?",
        "answer": "<li>It increases cancer risk; both alleles of a tumor suppressor gene must be lost for expression of disease (the Knudson 2-hit hypothesis).</li>",
        "memoryTip": "Losing both alleles is like losing both your shoes before a race—you're not going anywhere!",
        "emoji": "👟"
    },
    {
        "id": 233,
        "topic": "topic46",
        "question": "What is the gene product of APC and its associated condition?",
        "answer": "<li>APC is a negative regulator of the β-catenin/WNT pathway and is associated with colorectal cancer (FAP).</li>",
        "memoryTip": "APC is like a \"traffic cop\" directing cells away from colorectal cancer!",
        "emoji": "🚦"
    },
    {
        "id": 234,
        "topic": "topic46",
        "question": "What cancers are associated with BRCA1/BRCA2?",
        "answer": "<li>Breast, ovarian, prostate, and pancreatic cancers.</li>",
        "memoryTip": "BRCA1/BRCA2 are like \"brave\" knights protecting against multiple cancers!",
        "emoji": "🛡️"
    },
    {
        "id": 235,
        "topic": "topic46",
        "question": "What does CDKN2A encode and what cancers is it associated with?",
        "answer": "<li>CDKN2A encodes p16, which blocks the G1 to S phase, and is associated with many cancers, including melanoma, lung, and pancreatic cancers.</li>",
        "memoryTip": "CDKN2A is like a \"traffic light\" stopping cells from moving too fast into cancer!",
        "emoji": "🚥"
    },
    {
        "id": 236,
        "topic": "topic46",
        "question": "What does DCC stand for and what is its associated condition?",
        "answer": "<li>DCC stands for \"Deleted in Colorectal Cancer\" and is associated with colorectal cancer.</li>",
        "memoryTip": "DCC is like a \"missing person\" report for colorectal cancer!",
        "emoji": "🕵️‍♂️"
    },
    {
        "id": 237,
        "topic": "topic46",
        "question": "What is the function of SMAD4 (DPC4) and its associated condition?",
        "answer": "<li>SMAD4 is deleted in pancreatic cancer and colorectal cancer.</li>",
        "memoryTip": "SMAD4 is like a \"smad\" face when it gets deleted, leading to cancer!",
        "emoji": "😠"
    },
    {
        "id": 238,
        "topic": "topic46",
        "question": "What is the gene product of MEN1 and its associated condition?",
        "answer": "<li>MEN1 encodes menin and is associated with Multiple Endocrine Neoplasia type 1.</li>",
        "memoryTip": "MEN1 is like a \"men's club\" for endocrine tumors!",
        "emoji": "👔"
    },
    {
        "id": 239,
        "topic": "topic46",
        "question": "What is the function of NF1 and its associated condition?",
        "answer": "<li>NF1 encodes neurofibromin, a Ras GTPase activating protein, and is associated with Neurofibromatosis type 1.</li>",
        "memoryTip": "NF1 is like a \"neuro\" friend helping to keep Ras in check!",
        "emoji": "🧠"
    },
    {
        "id": 240,
        "topic": "topic46",
        "question": "What does NF2 encode and what is its associated condition?",
        "answer": "<li>NF2 encodes the Merlin (schwannomin) protein and is associated with Neurofibromatosis type 2.</li>",
        "memoryTip": "NF2 is like a \"merlin\" wizard casting spells against tumors!",
        "emoji": "🧙‍♂️"
    },
    {
        "id": 241,
        "topic": "topic46",
        "question": "What is the function of PTEN and its associated cancers?",
        "answer": "<li>PTEN is a negative regulator of the PI3K/AKT pathway and is associated with prostate, breast, and endometrial cancers.</li>",
        "memoryTip": "PTEN is like a \"pen\" that writes off cancer growth!",
        "emoji": "🖊️"
    },
    {
        "id": 242,
        "topic": "topic46",
        "question": "What is the role of RB1 and its associated conditions?",
        "answer": "<li>RB1 inhibits E2F and blocks the G1 to S phase, associated with retinoblastoma and osteosarcoma.</li>",
        "memoryTip": "RB1 is like a \"bouncer\" at the cell cycle club, keeping cancer out!",
        "emoji": "🚷"
    },
    {
        "id": 243,
        "topic": "topic46",
        "question": "What is the function of TP53 and its associated conditions?",
        "answer": "<li>TP53 encodes p53, which activates p21 and blocks the G1 to S phase, associated with most cancers and Li-Fraumeni syndrome.</li>",
        "memoryTip": "TP53 is like a \"timekeeper\" ensuring cells don’t rush into cancer!",
        "emoji": "⏰"
    },
    {
        "id": 244,
        "topic": "topic46",
        "question": "What do TSC1 and TSC2 encode and what is their associated condition?",
        "answer": "<li>TSC1 encodes hamartin and TSC2 encodes tuberin, both associated with tuberous sclerosis complex.</li>",
        "memoryTip": "TSC1 and TSC2 are like a \"team\" working together to keep tumors at bay!",
        "emoji": "🤝"
    },
    {
        "id": 245,
        "topic": "topic46",
        "question": "What is the function of VHL and its associated condition?",
        "answer": "<li>VHL inhibits hypoxia-inducible factor 1a and is associated with von Hippel-Lindau disease.</li>",
        "memoryTip": "VHL is like a \"valve\" controlling the flow of cancer growth!",
        "emoji": "🚰"
    },
    {
        "id": 246,
        "topic": "topic46",
        "question": "What is the role of WT1 and its associated condition?",
        "answer": "<li>WT1 is a urogenital development transcription factor associated with Wilms Tumor (nephroblastoma).</li>",
        "memoryTip": "WT1 is like a \"wizard\" for kidney development, but sometimes it casts the wrong spell!",
        "emoji": "🧙‍♂️"
    },
    {
        "id": 247,
        "topic": "topic47",
        "question": "What are aflatoxins and their associated impact?",
        "answer": "<li>Aflatoxins are toxins from Aspergillus found in stored grains and nuts, leading to hepatocellular carcinoma.</li>",
        "memoryTip": "Aflatoxins are like \"bad apples\" in the grain basket causing liver trouble!",
        "emoji": "🍏"
    },
    {
        "id": 248,
        "topic": "topic47",
        "question": "What type of cancer is associated with alkylating agents?",
        "answer": "<li>Alkylating agents are associated with leukemia and lymphoma.</li>",
        "memoryTip": "Alkylating agents are like \"alky\" friends causing a ruckus in the blood!",
        "emoji": "🍻"
    },
    {
        "id": 249,
        "topic": "topic47",
        "question": "What is the impact of aromatic amines and where are they found?",
        "answer": "<li>Aromatic amines, found in the textile industry and tobacco smoke, lead to transitional cell carcinoma of the bladder.</li>",
        "memoryTip": "Aromatic amines are like \"aromas\" that stink up the bladder!",
        "emoji": "🚽"
    },
    {
        "id": 250,
        "topic": "topic47",
        "question": "What is the impact of arsenic exposure?",
        "answer": "<li>Arsenic exposure can lead to hepatic angiosarcoma, lung cancer, and skin cancer.</li>",
        "memoryTip": "Arsenic is like a \"toxic friend\" causing multiple cancers!",
        "emoji": "☠️"
    },
    {
        "id": 251,
        "topic": "topic47",
        "question": "What type of cancer is associated with asbestos exposure?",
        "answer": "<li>Asbestos exposure is associated with bronchogenic carcinoma and mesothelioma.</li>",
        "memoryTip": "Asbestos is like a \"dusty villain\" causing lung trouble!",
        "emoji": "🏭"
    },
    {
        "id": 252,
        "topic": "topic47",
        "question": "What cancers are associated with tobacco smoke?",
        "answer": "<li>Tobacco smoke is associated with transitional cell carcinoma, squamous cell carcinoma, adenocarcinoma, renal cell carcinoma, and pancreatic adenocarcinoma.</li>",
        "memoryTip": "Tobacco smoke is like a \"smoky bandit\" robbing multiple organs!",
        "emoji": "🚬"
    },
    {
        "id": 253,
        "topic": "topic47",
        "question": "What types of cancer are associated with ethanol exposure?",
        "answer": "<li>Ethanol exposure is associated with squamous cell carcinoma of the esophagus, hepatocellular carcinoma, and breast cancer.</li>",
        "memoryTip": "Ethanol is like a \"party crasher\" causing chaos in the body!",
        "emoji": "🍷"
    },
    {
        "id": 254,
        "topic": "topic47",
        "question": "What is the impact of ionizing radiation?",
        "answer": "<li>Ionizing radiation is associated with leukemia and papillary thyroid carcinoma.</li>",
        "memoryTip": "Ionizing radiation is like a \"radiant\" villain causing blood and thyroid trouble!",
        "emoji": "⚡"
    },
    {
        "id": 255,
        "topic": "topic47",
        "question": "What cancers are associated with nickel, chromium, beryllium, and silica?",
        "answer": "<li>These substances are associated with lung cancer due to occupational exposure.</li>",
        "memoryTip": "These metals are like \"heavyweights\" in the lung cancer ring!",
        "emoji": "🥊"
    },
    {
        "id": 256,
        "topic": "topic47",
        "question": "What is the impact of nitrosamines?",
        "answer": "<li>Nitrosamines, found in smoked foods, are associated with gastric cancer (intestinal type).</li>",
        "memoryTip": "Nitrosamines are like \"smoky flavors\" that can lead to stomach trouble!",
        "emoji": "🍖"
    },
    {
        "id": 257,
        "topic": "topic47",
        "question": "What is the impact of radon exposure?",
        "answer": "<li>Radon exposure, a byproduct of uranium decay, is associated with lung cancer.</li>",
        "memoryTip": "Radon is like a \"ghost\" lurking in basements, causing lung issues!",
        "emoji": "👻"
    },
    {
        "id": 258,
        "topic": "topic47",
        "question": "What is field cancerization?",
        "answer": "<li>Field cancerization is the replacement of a large area of normal cells by premalignant cells due to widespread carcinogen exposure, increasing the risk of multiple independent primary malignancies.</li>",
        "memoryTip": "Field cancerization is like a \"cancer field day\" where multiple tumors can sprout!",
        "emoji": "🌾"
    },
    {
        "id": 259,
        "topic": "topic48",
        "question": "What cancer is associated with Epstein-Barr Virus (EBV)?",
        "answer": "<li>Burkitt lymphoma, Hodgkin lymphoma, nasopharyngeal carcinoma, and primary CNS lymphoma in immunocompromised patients.</li>",
        "memoryTip": "EBV is like that friend who brings drama to every party—always associated with multiple cancers!",
        "emoji": "🎭"
    },
    {
        "id": 260,
        "topic": "topic48",
        "question": "Which cancers are linked to Hepatitis B Virus (HBV) and Hepatitis C Virus (HCV)?",
        "answer": "<li>Hepatocellular carcinoma.</li>",
        "memoryTip": "HBV and HCV are like the liver's worst enemies—always plotting to cause hepatocellular havoc!",
        "emoji": "🍺"
    },
    {
        "id": 261,
        "topic": "topic48",
        "question": "What cancer is associated with Human Herpesvirus 8 (HHV-8)?",
        "answer": "<li>Kaposi sarcoma.</li>",
        "memoryTip": "HHV-8 is like a sneaky magician—turning normal cells into Kaposi sarcoma with a wave of its wand!",
        "emoji": "🎩"
    },
    {
        "id": 262,
        "topic": "topic48",
        "question": "Which types of cancer are associated with Human Papillomavirus (HPV), particularly types 16 and 18?",
        "answer": "<li>Cervical and penile/anal carcinoma, as well as head and neck cancer.</li>",
        "memoryTip": "HPV is like a bad date—leaving you with more than just a bad memory, but also some serious cancers!",
        "emoji": "💔"
    },
    {
        "id": 263,
        "topic": "topic48",
        "question": "What cancers are linked to Helicobacter pylori?",
        "answer": "<li>Gastric adenocarcinoma and MALT lymphoma.</li>",
        "memoryTip": "H. pylori is like a bad chef—cooking up gastric cancer instead of a nice meal!",
        "emoji": "🍽️"
    },
    {
        "id": 264,
        "topic": "topic48",
        "question": "What cancer is associated with Human T-lymphotropic virus type 1 (HTLV-1)?",
        "answer": "<li>Adult T-cell leukemia/lymphoma.</li>",
        "memoryTip": "HTLV-1 is like a party crasher—showing up uninvited and causing a ruckus in your T-cells!",
        "emoji": "🎉"
    },
    {
        "id": 265,
        "topic": "topic48",
        "question": "Which cancer is linked to the liver fluke (Clonorchis sinensis)?",
        "answer": "<li>Cholangiocarcinoma.</li>",
        "memoryTip": "The liver fluke is like a bad roommate—taking up space and causing cholangiocarcinoma chaos!",
        "emoji": "🦠"
    },
    {
        "id": 266,
        "topic": "topic48",
        "question": "What cancer is associated with Schistosoma haematobium?",
        "answer": "<li>Squamous cell bladder cancer.</li>",
        "memoryTip": "Schistosoma haematobium is like a pesky mosquito—biting you and leaving behind squamous cell cancer!",
        "emoji": "🦟"
    },
    {
        "id": 267,
        "topic": "topic49",
        "question": "Should tumor markers be used as the primary tool for cancer diagnosis or screening?",
        "answer": "<li>No, tumor markers should not be used as the primary tool for cancer diagnosis or screening.</li>",
        "memoryTip": "Relying on tumor markers for diagnosis is like using a map to find a restaurant that’s closed—better to check in person!",
        "emoji": "🗺️"
    },
    {
        "id": 268,
        "topic": "topic49",
        "question": "What is the important association of alkaline phosphatase?",
        "answer": "<li>It is associated with metastases to bone or liver, Paget disease of bone, and seminoma (PLAP).</li>",
        "memoryTip": "Alkaline phosphatase is like a detective—always on the case of bone and liver metastases!",
        "emoji": "🕵️"
    },
    {
        "id": 269,
        "topic": "topic49",
        "question": "What does α-fetoprotein indicate?",
        "answer": "<li>It indicates hepatocellular carcinoma, endodermal sinus tumor, mixed germ cell tumor, ataxia-telangiectasia, and neural tube defects.</li>",
        "memoryTip": "α-fetoprotein is like a baby’s first drawing—normally made by the fetus but can signal serious issues if it’s too high!",
        "emoji": "👶"
    },
    {
        "id": 270,
        "topic": "topic49",
        "question": "What conditions are associated with hCG?",
        "answer": "<li>Hydatidiform moles, choriocarcinomas, testicular cancer, and mixed germ cell tumor.</li>",
        "memoryTip": "hCG is like a pregnancy test on steroids—showing up for both moles and tumors!",
        "emoji": "🍼"
    },
    {
        "id": 271,
        "topic": "topic49",
        "question": "What cancer is associated with CA 15-3/CA 27-29?",
        "answer": "<li>Breast cancer.</li>",
        "memoryTip": "CA 15-3 is like a bra—supporting the fight against breast cancer!",
        "emoji": "👙"
    },
    {
        "id": 272,
        "topic": "topic49",
        "question": "What does CA 19-9 indicate?",
        "answer": "<li>It indicates pancreatic adenocarcinoma.</li>",
        "memoryTip": "CA 19-9 is like a warning sign on a road—pointing straight to pancreatic trouble!",
        "emoji": "🚧"
    },
    {
        "id": 273,
        "topic": "topic49",
        "question": "What cancer is associated with CA 125?",
        "answer": "<li>Epithelial ovarian cancer.</li>",
        "memoryTip": "CA 125 is like a secret code for ovarian cancer—only the savvy can decode it!",
        "emoji": "🔍"
    },
    {
        "id": 274,
        "topic": "topic49",
        "question": "What is calcitonin associated with?",
        "answer": "<li>Medullary thyroid carcinoma, both alone and in MEN2A and MEN2B.</li>",
        "memoryTip": "Calcitonin is like a thyroid’s alarm system—ringing for medullary carcinoma!",
        "emoji": "🚨"
    },
    {
        "id": 275,
        "topic": "topic49",
        "question": "What cancers are associated with CEA?",
        "answer": "<li>Colorectal and pancreatic cancers, with minor associations to gastric, breast, and medullary thyroid carcinomas.</li>",
        "memoryTip": "CEA is like a multi-tasker—juggling several cancers at once!",
        "emoji": "🤹"
    },
    {
        "id": 276,
        "topic": "topic49",
        "question": "What tumors are indicated by chromogranin?",
        "answer": "<li>Neuroendocrine tumors.</li>",
        "memoryTip": "Chromogranin is like a neon sign for neuroendocrine tumors—bright and hard to miss!",
        "emoji": "🌈"
    },
    {
        "id": 277,
        "topic": "topic49",
        "question": "What does LDH indicate?",
        "answer": "<li>It indicates testicular germ cell tumors, ovarian dysgerminoma, and other cancers, and can be used as an indicator of tumor burden.</li>",
        "memoryTip": "LDH is like a weight scale for tumors—measuring how much trouble they’re causing!",
        "emoji": "⚖️"
    },
    {
        "id": 278,
        "topic": "topic49",
        "question": "What tumors are associated with neuron-specific enolase?",
        "answer": "<li>Neuroendocrine tumors, such as small cell lung cancer, carcinoid tumor, and neuroblastoma.</li>",
        "memoryTip": "Neuron-specific enolase is like a brainy detective—solving the case of neuroendocrine tumors!",
        "emoji": "🧠"
    },
    {
        "id": 279,
        "topic": "topic49",
        "question": "What cancer is associated with PSA?",
        "answer": "<li>Prostate cancer.</li>",
        "memoryTip": "PSA is like a VIP pass for prostate cancer—only the important guests get in!",
        "emoji": "🎟️"
    },
    {
        "id": 280,
        "topic": "topic50",
        "question": "What tumors are identified by chromogranin and synaptophysin stains?",
        "answer": "<li>Small cell carcinoma of the lung, carcinoid tumor, and neuroblastoma.</li>",
        "memoryTip": "Chromogranin and synaptophysin are like the dynamic duo—spotting neuroendocrine tumors together!",
        "emoji": "🦸‍♂️"
    },
    {
        "id": 281,
        "topic": "topic50",
        "question": "What does cytokeratin stain identify?",
        "answer": "<li>Epithelial tumors, such as squamous cell carcinoma.</li>",
        "memoryTip": "Cytokeratin is like a badge for epithelial cells—showing who’s who in the tumor world!",
        "emoji": "🏷️"
    },
    {
        "id": 282,
        "topic": "topic50",
        "question": "What tumors are identified by desmin stain?",
        "answer": "<li>Muscle tumors, such as rhabdomyosarcoma.</li>",
        "memoryTip": "Desmin is like a gym membership for muscle tumors—only the strong get in!",
        "emoji": "💪"
    },
    {
        "id": 283,
        "topic": "topic50",
        "question": "What does GFAP stain identify?",
        "answer": "<li>Tumors like astrocytoma and glioblastoma.</li>",
        "memoryTip": "GFAP is like a brainy badge—identifying glial tumors with style!",
        "emoji": "🧠"
    },
    {
        "id": 284,
        "topic": "topic50",
        "question": "What tumors are identified by neurofilament stain?",
        "answer": "<li>Neuronal tumors, such as neuroblastoma.</li>",
        "memoryTip": "Neurofilament is like a neon sign for neurons—lighting up the path to neuronal tumors!",
        "emoji": "💡"
    },
    {
        "id": 285,
        "topic": "topic50",
        "question": "What cancer is identified by PSA stain?",
        "answer": "<li>Prostate cancer.</li>",
        "memoryTip": "PSA is like a secret handshake for prostate cancer—only the insiders know it!",
        "emoji": "🤝"
    },
    {
        "id": 286,
        "topic": "topic50",
        "question": "What tumors are identified by PECAM-1/CD-31 stain?",
        "answer": "<li>Vascular tumors, such as angiosarcoma.</li>",
        "memoryTip": "PECAM-1/CD-31 is like a VIP pass for blood vessels—letting vascular tumors through!",
        "emoji": "🩸"
    },
    {
        "id": 287,
        "topic": "topic50",
        "question": "What tumors are identified by S-100 stain?",
        "answer": "<li>Melanoma, schwannoma, and Langerhans cell histiocytosis.</li>",
        "memoryTip": "S-100 is like a fashion label for neural crest cells—only the chicest tumors wear it!",
        "emoji": "👗"
    },
    {
        "id": 288,
        "topic": "topic50",
        "question": "What does TRAP stain identify?",
        "answer": "<li>Hairy cell leukemia.</li>",
        "memoryTip": "TRAP is like a hair salon for leukemia—making those cells look hairy!",
        "emoji": "💇"
    },
    {
        "id": 289,
        "topic": "topic50",
        "question": "What tumors are identified by vimentin stain?",
        "answer": "<li>Mesenchymal tumors, such as sarcoma, and many other tumors like endometrial carcinoma, renal cell carcinoma, and meningioma.</li>",
        "memoryTip": "Vimentin is like a Swiss Army knife—useful for identifying a variety of tumors!",
        "emoji": "🛠️"
    },
    {
        "id": 290,
        "topic": "topic50",
        "question": "What is P-glycoprotein?",
        "answer": "<li>An ATP-dependent efflux pump also called multidrug resistance protein 1 (MDR1), expressed in some cancer cells to pump out toxins, including chemotherapeutic agents.</li>",
        "memoryTip": "P-glycoprotein is like a bouncer at a club—kicking out the unwanted toxins and drugs!",
        "emoji": "🚷"
    },
    {
        "id": 291,
        "topic": "topic51",
        "question": "What is dermatomyositis and what are its manifestations?",
        "answer": "<li>Dermatomyositis is characterized by progressive proximal muscle weakness, Gottron papules, and a heliotrope rash.</li>",
        "memoryTip": "Think of dermatomyositis as a \"derma-tough\" condition that makes your muscles weak but your skin pop with rashes!",
        "emoji": "🌼"
    },
    {
        "id": 292,
        "topic": "topic51",
        "question": "Which tumors are most commonly associated with dermatomyositis?",
        "answer": "<li>Dermatomyositis is most commonly associated with adenocarcinomas, especially ovarian cancer.</li>",
        "memoryTip": "Ovarian cancer is like the \"queen\" of dermatomyositis—ruling over the skin and muscle kingdom!",
        "emoji": "👑"
    },
    {
        "id": 293,
        "topic": "topic51",
        "question": "What is acanthosis nigricans and its appearance?",
        "answer": "<li>Acanthosis nigricans presents as hyperpigmented velvety plaques in the axilla and neck.</li>",
        "memoryTip": "Acanthosis nigricans is like a velvet cloak for your armpits—fashionable but not in a good way!",
        "emoji": "🧥"
    },
    {
        "id": 294,
        "topic": "topic51",
        "question": "Which malignancies are associated with acanthosis nigricans?",
        "answer": "<li>Acanthosis nigricans is associated with gastric adenocarcinoma and other visceral malignancies.</li>",
        "memoryTip": "Think of gastric adenocarcinoma as the \"gastro\" villain behind the velvet cloak of acanthosis!",
        "emoji": "🎭"
    },
    {
        "id": 295,
        "topic": "topic51",
        "question": "What is the Sign of Leser-Trélat?",
        "answer": "<li>The Sign of Leser-Trélat is characterized by the sudden onset of multiple seborrheic keratoses.</li>",
        "memoryTip": "It’s like a surprise party for your skin—too many keratoses showing up uninvited!",
        "emoji": "🎉"
    },
    {
        "id": 296,
        "topic": "topic51",
        "question": "Which tumors are associated with the Sign of Leser-Trélat?",
        "answer": "<li>The Sign of Leser-Trélat is associated with gastrointestinal adenocarcinomas and other visceral malignancies.</li>",
        "memoryTip": "GI adenocarcinomas are the party planners for the sudden keratosis bash!",
        "emoji": "🎈"
    },
    {
        "id": 297,
        "topic": "topic51",
        "question": "What is hypertrophic osteoarthropathy?",
        "answer": "<li>Hypertrophic osteoarthropathy involves abnormal proliferation of skin and bone at distal extremities, leading to clubbing, arthralgia, joint effusions, and periostosis of tubular bones.</li>",
        "memoryTip": "Think of it as your bones throwing a growth party—everyone's invited, but it gets a bit crowded!",
        "emoji": "🎊"
    },
    {
        "id": 298,
        "topic": "topic51",
        "question": "Which cancer is most commonly associated with hypertrophic osteoarthropathy?",
        "answer": "<li>Hypertrophic osteoarthropathy is most commonly associated with adenocarcinoma of the lung.</li>",
        "memoryTip": "Lung cancer is the \"host\" of this bone growth party—everyone's getting a little too big for their britches!",
        "emoji": "🎈"
    },
    {
        "id": 299,
        "topic": "topic51",
        "question": "What causes hypercalcemia in paraneoplastic syndromes?",
        "answer": "<li>Hypercalcemia can be caused by PTHrP and increased levels of 1,25-(OH)2 vitamin D3 (calcitriol).</li>",
        "memoryTip": "Hypercalcemia is like a calcium overload—too much of a good thing can be a bad thing!",
        "emoji": "🧀"
    },
    {
        "id": 300,
        "topic": "topic51",
        "question": "Which tumors are associated with hypercalcemia?",
        "answer": "<li>Hypercalcemia is associated with squamous cell carcinomas of the lung, head and neck, as well as renal, bladder, breast, and ovarian carcinomas.</li>",
        "memoryTip": "Think of these cancers as calcium \"overachievers\"—always raising the bar!",
        "emoji": "📈"
    },
    {
        "id": 301,
        "topic": "topic51",
        "question": "What is Cushing syndrome in the context of paraneoplastic syndromes?",
        "answer": "<li>Cushing syndrome is characterized by increased ACTH levels.</li>",
        "memoryTip": "Cushing syndrome is like your body’s way of saying, \"I need more ACTH to keep things interesting!\"",
        "emoji": "🎭"
    },
    {
        "id": 302,
        "topic": "topic51",
        "question": "Which cancer is most commonly associated with Cushing syndrome?",
        "answer": "<li>Cushing syndrome is most commonly associated with small cell lung cancer.</li>",
        "memoryTip": "Small cell lung cancer is the \"Cushing\" king, ruling over the ACTH kingdom!",
        "emoji": "👑"
    },
    {
        "id": 303,
        "topic": "topic51",
        "question": "What is SIADH and its effect on sodium levels?",
        "answer": "<li>SIADH (Syndrome of Inappropriate Antidiuretic Hormone secretion) leads to hyponatremia due to excess ADH.</li>",
        "memoryTip": "SIADH is like a water balloon fight gone wrong—too much water, not enough sodium!",
        "emoji": "💧"
    },
    {
        "id": 304,
        "topic": "topic51",
        "question": "What is polycythemia in paraneoplastic syndromes?",
        "answer": "<li>Polycythemia is characterized by a paraneoplastic rise in erythropoietin leading to high hematocrit levels.</li>",
        "memoryTip": "Polycythemia is like your blood getting a VIP upgrade—everyone's getting thicker!",
        "emoji": "🩸"
    },
    {
        "id": 305,
        "topic": "topic51",
        "question": "Which tumors are associated with polycythemia?",
        "answer": "<li>Polycythemia is associated with pheochromocytoma, renal cell carcinoma, hepatocellular carcinoma (HCC), hemangioblastoma, and leiomyoma.</li>",
        "memoryTip": "These tumors are like the \"blood thickening squad\"—always ready to pump up the hematocrit!",
        "emoji": "💪"
    },
    {
        "id": 306,
        "topic": "topic51",
        "question": "What is pure red cell aplasia?",
        "answer": "<li>Pure red cell aplasia is characterized by anemia with low reticulocyte counts.</li>",
        "memoryTip": "Pure red cell aplasia is like a party where all the red blood cells forgot to show up!",
        "emoji": "🎉"
    },
    {
        "id": 307,
        "topic": "topic51",
        "question": "Which tumor is associated with pure red cell aplasia?",
        "answer": "<li>Pure red cell aplasia is associated with thymoma.</li>",
        "memoryTip": "Thymoma is the \"no-show\" host of the red blood cell party—leaving everyone anemic!",
        "emoji": "🚫"
    },
    {
        "id": 308,
        "topic": "topic51",
        "question": "What is Good syndrome?",
        "answer": "<li>Good syndrome is characterized by hypogammaglobulinemia.</li>",
        "memoryTip": "Good syndrome is like a \"goodbye\" to your antibodies—leaving you a bit defenseless!",
        "emoji": "👋"
    },
    {
        "id": 309,
        "topic": "topic51",
        "question": "What is Trousseau syndrome?",
        "answer": "<li>Trousseau syndrome is characterized by migratory superficial thrombophlebitis.</li>",
        "memoryTip": "Trousseau syndrome is like your veins playing hide and seek—always moving around!",
        "emoji": "🕵️‍♂️"
    },
    {
        "id": 310,
        "topic": "topic51",
        "question": "Which tumors are associated with Trousseau syndrome?",
        "answer": "<li>Trousseau syndrome is associated with adenocarcinomas, especially pancreatic cancer.</li>",
        "memoryTip": "Pancreatic cancer is the \"migratory\" master, always keeping your veins on their toes!",
        "emoji": "👣"
    },
    {
        "id": 311,
        "topic": "topic51",
        "question": "What is nonbacterial thrombotic endocarditis?",
        "answer": "<li>Nonbacterial thrombotic endocarditis involves the deposition of sterile platelet thrombi on heart valves.</li>",
        "memoryTip": "It’s like your heart valves getting a \"thrombus\" makeover—no bacteria allowed!",
        "emoji": "💔"
    },
    {
        "id": 312,
        "topic": "topic51",
        "question": "What is anti-NMDA receptor encephalitis?",
        "answer": "<li>Anti-NMDA receptor encephalitis is characterized by psychiatric disturbances, memory deficits, seizures, dyskinesias, autonomic instability, and language dysfunction.</li>",
        "memoryTip": "Anti-NMDA receptor encephalitis is like your brain throwing a chaotic party—everyone's losing their minds!",
        "emoji": "🧠"
    },
    {
        "id": 313,
        "topic": "topic51",
        "question": "Which tumor is associated with anti-NMDA receptor encephalitis?",
        "answer": "<li>Anti-NMDA receptor encephalitis is associated with ovarian teratoma.</li>",
        "memoryTip": "Ovarian teratoma is the \"party crasher\" causing all the brain chaos!",
        "emoji": "🎉"
    },
    {
        "id": 314,
        "topic": "topic51",
        "question": "What is opsoclonus-myoclonus ataxia syndrome?",
        "answer": "<li>Opsoclonus-myoclonus ataxia syndrome is characterized by \"dancing eyes, dancing feet.\"</li>",
        "memoryTip": "It’s like your eyes and feet are having a dance-off—who will win?",
        "emoji": "💃"
    },
    {
        "id": 315,
        "topic": "topic51",
        "question": "Which tumors are associated with opsoclonus-myoclonus ataxia syndrome?",
        "answer": "<li>Opsoclonus-myoclonus ataxia syndrome is associated with neuroblastoma in children and small cell lung cancer in adults.</li>",
        "memoryTip": "Neuroblastoma and small cell lung cancer are the \"dance partners\" in this wild eye-foot tango!",
        "emoji": "🕺"
    },
    {
        "id": 316,
        "topic": "topic51",
        "question": "What is paraneoplastic cerebellar degeneration?",
        "answer": "<li>Paraneoplastic cerebellar degeneration involves antibodies against antigens in Purkinje cells.</li>",
        "memoryTip": "It’s like your cerebellum losing its balance—thanks to those pesky antibodies!",
        "emoji": "⚖️"
    },
    {
        "id": 317,
        "topic": "topic51",
        "question": "Which tumors are associated with paraneoplastic cerebellar degeneration?",
        "answer": "<li>Paraneoplastic cerebellar degeneration is associated with small cell lung cancer (anti-Hu), gynecologic and breast cancers (anti-Yo), and Hodgkin lymphoma (anti-Tr).</li>",
        "memoryTip": "These cancers are like the \"culprits\" behind the cerebellar chaos—always causing a ruckus!",
        "emoji": "🔍"
    },
    {
        "id": 318,
        "topic": "topic51",
        "question": "What is paraneoplastic encephalomyelitis?",
        "answer": "<li>Paraneoplastic encephalomyelitis involves antibodies against Hu antigens in neurons.</li>",
        "memoryTip": "It’s like your neurons getting a \"Hu\" makeover—changing their function!",
        "emoji": "🧩"
    },
    {
        "id": 319,
        "topic": "topic51",
        "question": "Which tumor is associated with paraneoplastic encephalomyelitis?",
        "answer": "<li>Paraneoplastic encephalomyelitis is associated with small cell lung cancer.</li>",
        "memoryTip": "Small cell lung cancer is the \"neuron disruptor,\" causing all sorts of brain mischief!",
        "emoji": "🎭"
    },
    {
        "id": 320,
        "topic": "topic51",
        "question": "What is Lambert-Eaton myasthenic syndrome?",
        "answer": "<li>Lambert-Eaton myasthenic syndrome involves antibodies against presynaptic (P/Q-type) calcium channels at the neuromuscular junction.</li>",
        "memoryTip": "It’s like your calcium channels are on a coffee break—slowing down the signal!",
        "emoji": "☕"
    },
    {
        "id": 321,
        "topic": "topic51",
        "question": "What is myasthenia gravis?",
        "answer": "<li>Myasthenia gravis involves antibodies against postsynaptic acetylcholine receptors at the neuromuscular junction.</li>",
        "memoryTip": "Myasthenia gravis is like your muscles saying, \"We can't hear you!\" due to blocked signals!",
        "emoji": "🔇"
    },
    {
        "id": 322,
        "topic": "topic51",
        "question": "Which tumor is associated with myasthenia gravis?",
        "answer": "<li>Myasthenia gravis is associated with thymoma.</li>",
        "memoryTip": "Thymoma is the \"signal blocker\" in the neuromuscular junction—keeping the muscles from hearing!",
        "emoji": "🚫"
    },
    {
        "id": 323,
        "topic": "topic52",
        "question": "What is normal aging?",
        "answer": "<li>Normal aging is a time-dependent progressive decline in organ function, resulting in increased susceptibility to disease.</li>",
        "memoryTip": "Aging is like a slow computer—eventually, it just can't keep up with the demands!",
        "emoji": "⏳"
    },
    {
        "id": 324,
        "topic": "topic52",
        "question": "What genetic factors are associated with aging?",
        "answer": "<li>Aging is associated with genetic factors such as telomere shortening.</li>",
        "memoryTip": "Think of telomeres as the \"shoelaces\" of your DNA—once they fray, it's hard to keep it together!",
        "emoji": "👟"
    },
    {
        "id": 325,
        "topic": "topic52",
        "question": "What epigenetic changes occur with aging?",
        "answer": "<li>Aging involves epigenetic changes such as DNA methylation.</li>",
        "memoryTip": "DNA methylation is like putting a \"do not disturb\" sign on your genes—keeping them quiet!",
        "emoji": "🚫"
    },
    {
        "id": 326,
        "topic": "topic52",
        "question": "What metabolic alterations are associated with aging?",
        "answer": "<li>Aging is associated with metabolic alterations like mitochondrial dysfunction.</li>",
        "memoryTip": "Mitochondrial dysfunction is like your cell's battery running low—time for a recharge!",
        "emoji": "🔋"
    },
    {
        "id": 327,
        "topic": "topic52",
        "question": "How does aging affect cardiovascular function?",
        "answer": "<li>Aging leads to decreased arterial compliance, increased aortic diameter, and changes in left ventricular cavity size and shape.</li>",
        "memoryTip": "Aging hearts are like old rubber bands—less stretchy and more likely to snap!",
        "emoji": "💔"
    },
    {
        "id": 328,
        "topic": "topic52",
        "question": "What gastrointestinal changes occur with aging?",
        "answer": "<li>Aging results in decreased lower esophageal sphincter (LES) tone, reduced gastric mucosal protection, and decreased colonic motility.</li>",
        "memoryTip": "Aging GI tracts are like old cars—less smooth and more prone to breakdowns!",
        "emoji": "🚗"
    },
    {
        "id": 329,
        "topic": "topic52",
        "question": "How does aging affect hematopoietic function?",
        "answer": "<li>Aging leads to decreased bone marrow mass and fat, resulting in a less vigorous response to stressors like blood loss.</li>",
        "memoryTip": "Aging bone marrow is like a tired old man—less energy to respond to emergencies!",
        "emoji": "🧓"
    },
    {
        "id": 330,
        "topic": "topic52",
        "question": "What changes occur in the immune system with aging?",
        "answer": "<li>Aging predominantly affects adaptive immunity, leading to decreased naïve B and T cells while preserving memory B and T cells.</li>",
        "memoryTip": "Aging immune systems are like seasoned veterans—great at remembering but slow to adapt!",
        "emoji": "🎖️"
    },
    {
        "id": 331,
        "topic": "topic52",
        "question": "What musculoskeletal changes occur with aging?",
        "answer": "<li>Aging results in decreased skeletal muscle mass (sarcopenia), decreased bone mass (osteopenia), and thinning of joint cartilage.</li>",
        "memoryTip": "Aging muscles are like old rubber bands—losing their elasticity and strength!",
        "emoji": "🏋️‍♂️"
    },
    {
        "id": 332,
        "topic": "topic52",
        "question": "How does aging affect the nervous system?",
        "answer": "<li>Aging leads to decreased brain volume and cerebral blood flow, although function is preserved despite mild cognitive decline.</li>",
        "memoryTip": "Aging brains are like old computers—slower but still capable of running the programs!",
        "emoji": "💻"
    },
    {
        "id": 333,
        "topic": "topic52",
        "question": "What changes occur in special senses with aging?",
        "answer": "<li>Aging results in impaired accommodation (presbyopia), decreased hearing (presbycusis), and reduced smell and taste.</li>",
        "memoryTip": "Aging senses are like a radio with bad reception—harder to tune in to the good stuff!",
        "emoji": "📻"
    },
    {
        "id": 334,
        "topic": "topic52",
        "question": "What skin changes occur with aging?",
        "answer": "<li>Aging skin shows atrophy with flattening of the dermal-epidermal junction, decreased collagen and elastin, and reduced sweat and sebaceous glands.</li>",
        "memoryTip": "Aging skin is like an old book—wrinkled and fragile but full of stories!",
        "emoji": "📚"
    },
    {
        "id": 335,
        "topic": "topic52",
        "question": "What is intrinsic aging?",
        "answer": "<li>Intrinsic aging (chronological aging) refers to the decreased biosynthetic capacity of dermal fibroblasts.</li>",
        "memoryTip": "Intrinsic aging is like a factory running out of materials—less production over time!",
        "emoji": "🏭"
    },
    {
        "id": 336,
        "topic": "topic52",
        "question": "What is extrinsic aging?",
        "answer": "<li>Extrinsic aging (photoaging) is the degradation of dermal collagen and elastin due to sun exposure (UVA).</li>",
        "memoryTip": "Extrinsic aging is like a sunburned beach ball—losing its bounce from too much sun!",
        "emoji": "🏖️"
    },
    {
        "id": 337,
        "topic": "topic52",
        "question": "How does aging affect renal function?",
        "answer": "<li>Aging leads to decreased glomerular filtration rate (GFR), reduced renal blood flow (RBF), and hormonal function, along with voiding dysfunction.</li>",
        "memoryTip": "Aging kidneys are like old sponges—less effective at soaking up the good stuff!",
        "emoji": "🧽"
    },
    {
        "id": 338,
        "topic": "topic52",
        "question": "What reproductive changes occur in aging males?",
        "answer": "<li>Aging males experience testicular atrophy, prostate enlargement, slower erection/ejaculation, and a longer refractory period.</li>",
        "memoryTip": "Aging males are like old cars—still running but with a few more hiccups!",
        "emoji": "🚗"
    },
    {
        "id": 339,
        "topic": "topic52",
        "question": "What reproductive changes occur in aging females?",
        "answer": "<li>Aging females experience vulvovaginal atrophy, vaginal shortening, thinning, dryness, and increased pH due to decreased estrogen from ovarian follicle exhaustion (menopause).</li>",
        "memoryTip": "Aging females are like a garden in winter—needing a little extra care to bloom again!",
        "emoji": "🌷"
    },
    {
        "id": 340,
        "topic": "topic52",
        "question": "How does aging affect respiratory function?",
        "answer": "<li>Aging leads to decreased lung compliance, chest wall compliance, respiratory muscle strength, and changes in lung volumes (FEV1, FVC, RV) while TLC remains unchanged.</li>",
        "memoryTip": "Aging lungs are like old balloons—less flexible and harder to inflate!",
        "emoji": "🎈"
    },
    {
        "id": 341,
        "topic": "topic52",
        "question": "What is lipofuscin?",
        "answer": "<li>Lipofuscin is a yellow-brown \"wear and tear\" pigment associated with normal aging, composed of polymers of lipids and phospholipids complexed with protein.</li>",
        "memoryTip": "Lipofuscin is like the \"dust bunnies\" of aging cells—just a sign of a life well-lived!",
        "emoji": "🧹"
    },
    {
        "id": 342,
        "topic": "topic52",
        "question": "Where can lipofuscin deposits be found in older adults?",
        "answer": "<li>Lipofuscin deposits can be found in the heart, colon, liver, kidney, eye, and other organs during autopsy of older adults.</li>",
        "memoryTip": "Lipofuscin is like the \"souvenirs\" of aging—collecting in all the wrong places!",
        "emoji": "🎁"
    }
];

const topics = {
    "topic1": "1. Cellular Adaptations",
    "topic2": "2. Hypertrophy",
    "topic3": "3. Hyperplasia",
    "topic4": "4. Atrophy",
    "topic5": "5. Metaplasia",
    "topic6": "6. Dysplasia",
    "topic7": "7. Cell Injury",
    "topic8": "8. Apoptosis",
    "topic9": "9. Intrinsic Pathway",
    "topic10": "10. Extrinsic Pathway",
    "topic11": "11. Perforin/Granzyme B Pathway",
    "topic12": "12. Necrosis",
    "topic13": "13. Pathology - Cellular Injury: Ischemia",
    "topic14": "14. Pathology - Types of Infarcts",
    "topic15": "15. Pathology - Free Radical Injury",
    "topic16": "16. Pathology - Ionizing Radiation Toxicity",
    "topic17": "17. Pathology - Types of Calcification",
    "topic18": "18. Pathology - Amyloidosis",
    "topic19": "19. Pathology - Common Types of Amyloidosis",
    "topic20": "20. Pathology - Inflammation",
    "topic21": "21. Pathology - Inflammation: Erythrocyte Sedimentation Rate (ESR)",
    "topic22": "22. Pathology - Inflammation: Acute Inflammation",
    "topic23": "23. Pathology - Inflammation: Mediators and Components",
    "topic24": "24. Pathology - Inflammation: Outcomes of Acute Inflammation",
    "topic25": "25. Pathology - Inflammation: Leukocyte Extravasation",
    "topic26": "26. Chronic Inflammation",
    "topic27": "27. Stimuli of Chronic Inflammation",
    "topic28": "28. Mediators of Chronic Inflammation",
    "topic29": "29. Outcomes of Chronic Inflammation",
    "topic30": "30. Wound Healing",
    "topic31": "31. Granulomatous Inflammation",
    "topic32": "32. Mechanism of Granulomatous Inflammation",
    "topic33": "33. Etiologies of Granulomatous Inflammation",
    "topic34": "34. Pathology - Scar Formation",
    "topic35": "35. Pathology - Neoplasia",
    "topic36": "36. Tumor Nomenclature",
    "topic37": "37. Non-Neoplastic Malformations",
    "topic38": "38. Tumor Types by Cell Type",
    "topic39": "39. Tumor Grade vs Stage",
    "topic40": "40. Hallmarks of Cancer",
    "topic41": "41. Immune Checkpoint Interactions",
    "topic42": "42. Cancer Epidemiology",
    "topic43": "43. Common Metastases",
    "topic44": "44. Site of Metastasis",
    "topic45": "45. Oncogenes",
    "topic46": "46. Tumor Suppressor Genes",
    "topic47": "47. Carcinogens",
    "topic48": "48. Oncogenic Microbes and Associated Cancers",
    "topic49": "49. Serum Tumor Markers",
    "topic50": "50. Important Immunohistochemical Stains",
    "topic51": "51. Paraneoplastic Syndromes",
    "topic52": "52. Aging Pathology"
};












let filteredTopics = [];
let filterStage = null;
let reviewStages = {};
let completedFlashcards = [];
let currentDate = new Date();
const reviewStageColors = { 0: 'red', 1: 'pink', 2: 'blue', 3: 'green' };
let db;
let isStarFilterActive = false;
let isStarReadyFilterActive = false;
let currentFlashcardIndex = 0;
let isHorizontal = false;
let starMarked = {};

function toggleStar(starElement, flashcardId) {
        const isStarred = !starMarked[flashcardId]; // Toggle starred status
      starMarked[flashcardId] = isStarred; // Update local state


      // Update UI Immediately
        starElement.classList.toggle('fas', isStarred);
        starElement.classList.toggle('far', !isStarred);
       starElement.style.color = isStarred ? 'gold' : 'lightgray';
       updateStarredCount(); // Recalculate and update counts
    const transaction = db.transaction([storeName], 'readwrite');
    const store = transaction.objectStore(storeName);
    const request = store.get(flashcardId);

    request.onsuccess = (event) => {
        let data = event.target.result;

        if (data) {
            // Only update the starred field, keep review metrics unchanged
            data.starred = isStarred;
            store.put(data); // Save the updated data with starred status
        } else {
            // Add a new entry with only the starred field (no review metrics)
            store.put({
                id: flashcardId,
                starred: isStarred // Only starred field
            });
        }
    };

    request.onerror = (event) => {
        console.error('Error updating star status:', event.target.errorCode);
    };
}



function openDatabase() {
    const request = indexedDB.open(dbName, 1); // Ensure the version is correct

    request.onupgradeneeded = (event) => {
        db = event.target.result;
        if (!db.objectStoreNames.contains(storeName)) {
            const store = db.createObjectStore(storeName, { keyPath: 'id' });
            store.createIndex('reviewStage', 'reviewStage', { unique: false });
            store.createIndex('dueDate', 'dueDate', { unique: false });
            store.createIndex('starred', 'starred', { unique: false }); // Ensure 'starred' is defined
        }
    };

    request.onsuccess = (event) => {
        db = event.target.result;
        loadProgress(() => {
            updateTopicProgress();
            updateStarredCount();
            renderFlashcards();
        });
    };

    request.onerror = (event) => {
        console.error('Database error:', event.target.errorCode);
    };
}


function saveProgress(id, reviewStage = 0, dueDate = null, revealedTimestamp = null, starred = false) {
    const transaction = db.transaction([storeName], 'readwrite');
    const store = transaction.objectStore(storeName);

    const data = {
        id,
        reviewStage,
        dueDate,
        revealedTimestamp,
        starred // Include starred in the saved data
    };

    store.put(data); // Save both review metrics and starred status together
}



function loadProgress(callback) {
    const transaction = db.transaction([storeName], 'readonly');
    const store = transaction.objectStore(storeName);
    const request = store.getAll();

    request.onsuccess = (event) => {
        const progressData = event.target.result;

        progressData.forEach(progress => {
            if (progress.reviewStage !== undefined && progress.dueDate !== undefined) {
                // Only initialize reviewStages for flashcards with valid review metrics
                reviewStages[progress.id] = {
                    reviewStage: progress.reviewStage,
                    dueDate: progress.dueDate,
                    revealedTimestamp: progress.revealedTimestamp || null
                };
            }
            starMarked[progress.id] = progress.starred ?? false; // Initialize starred state
        });

        console.log('Progress loaded:', progressData);
        if (callback) callback();
    };

    request.onerror = (event) => {
        console.error('Load error:', event.target.errorCode);
    };
}




// Flashcard functions
function selectLayout(value) {
    if (value === 'horizontal') {
        switchToHorizontalLayout();
    } else {
        switchToVerticalLayout();
    }
    applyCurrentFilters();
}

function switchToHorizontalLayout() {
    isHorizontal = true;
    document.body.classList.add('horizontal-layout');
    document.body.classList.remove('vertical-layout');
    currentFlashcardIndex = 0;
    document.getElementById('horizontal-info').style.display = 'block';
    document.querySelector('.navigation-buttons').style.display = 'flex';
    applyCurrentFilters();
}

function switchToVerticalLayout() {
    isHorizontal = false;
    document.body.classList.add('vertical-layout');
    document.body.classList.remove('horizontal-layout');
    document.getElementById('horizontal-info').style.display = 'none';
    document.querySelector('.navigation-buttons').style.display = 'none';
    applyCurrentFilters();
}

function showFlashcard(index) {
    const flashcards = document.querySelectorAll('.modern-card');
    if (index < 0 || index >= flashcards.length) return;

    flashcards.forEach(flashcard => flashcard.style.display = 'none');

    const currentFlashcard = flashcards[index];
    const topic = currentFlashcard.dataset.topic;
    const topicFlashcards = Array.from(flashcards).filter(f => f.dataset.topic === topic);
    const currentPosition = topicFlashcards.indexOf(currentFlashcard) + 1;
    const totalInTopic = topicFlashcards.length;

    document.getElementById('horizontal-topic').textContent = topics[topic];
    document.getElementById('horizontal-position').textContent = `Flashcard ${currentPosition} of ${totalInTopic}`;

    currentFlashcard.style.display = 'block';

    document.getElementById('prev-btn').disabled = index === 0;
    document.getElementById('next-btn').disabled = index === flashcards.length - 1;
}

function navigateFlashcards(direction) {
    const flashcards = document.querySelectorAll('.modern-card');
    if (direction === 'next' && currentFlashcardIndex < flashcards.length - 1) {
        currentFlashcardIndex++;
    } else if (direction === 'prev' && currentFlashcardIndex > 0) {
        currentFlashcardIndex--;
    }
    showFlashcard(currentFlashcardIndex);
}

function updateTopicProgress() {
    const topicSelect = document.getElementById('topic-filter');
    topicSelect.innerHTML = '';

    const allOption = document.createElement('option');
    allOption.value = 'all';
    allOption.textContent = 'All Topics';
    topicSelect.appendChild(allOption);

    Object.keys(topics).forEach(topicKey => {
        const topicName = topics[topicKey];
        const totalFlashcards = flashcards.filter(card => card.topic === topicKey).length;
        const reviewedFlashcards = flashcards.filter(card => card.topic === topicKey && reviewStages[card.id]).length;

        const option = document.createElement('option');
        option.value = topicKey;

        if (reviewedFlashcards === totalFlashcards && totalFlashcards > 0) {
            option.textContent = `${topicName} 🔹(${reviewedFlashcards}/${totalFlashcards}) ✔️`;
        } else {
            option.textContent = `${topicName} 🔹(${reviewedFlashcards}/${totalFlashcards})`;
        }

        topicSelect.appendChild(option);
    });
}

function applySelectedTopics() {
    const topicSelect = document.getElementById('topic-filter');
    const selectedOptions = Array.from(topicSelect.selectedOptions);
    const selectedTopicValues = selectedOptions.map(option => option.value);

    if (selectedTopicValues.includes('all')) {
        filteredTopics = [];
    } else {
        filteredTopics = selectedTopicValues.filter(value => value !== 'all');
    }

    currentFlashcardIndex = 0;
    renderFlashcards();
}

function renderInitialFlashcards() {
    renderFlashcards(true); // Render only the first 50 cards initially
}


function loadRestOfFlashcardsInBackground() {
  // Use a timeout to defer the loading, ensuring the UI thread doesn't get blocked
  setTimeout(() => {
        renderFlashcards(false, true); // Load the rest of the flashcards in the background
  }, 0);
}



    function renderFlashcards(initialLoad = false, appendOnly = false) {
        const flashcardsContainer = document.getElementById('flashcards-container');
        const filterInfoContainer = document.getElementById('filter-info-container');

        if (appendOnly === false) {
            flashcardsContainer.innerHTML = '';
        }
        if (appendOnly === false) {
            filterInfoContainer.innerHTML = '';
        }
        const allTopicsSelected = filteredTopics.length === 0 || filteredTopics.length === Object.keys(topics).length;

        // Update topics and review stage info dynamically
        const selectedTopicsText = allTopicsSelected
            ? 'All Topics'
            : filteredTopics.slice(0, 2).map(topic => topics[topic] || 'All Topics').join(', ') +
            (filteredTopics.length > 2 ? ', <button id="showMoreBtn" onclick="showAllTopics()">More</button>' : '');

        let selectedFilterText = ''; // Dynamic filter text based on active filters

        if (isStarFilterActive) {
            selectedFilterText = `⭐ Showing: Star-marked flashcards of selected topics <br>
                <span style="font-size: 0.9em; color: gray;">(To Exit the Review stage, Click "Show All Flashcards" Button)</span>`;
        } else if (isStarReadyFilterActive) {
            selectedFilterText = `🌟 Showing: Star-marked Ready-for-review flashcards of selected topics <br>
                <span style="font-size: 0.9em; color: gray;">(To Exit the Review stage, Click "Show All Flashcards" Button)</span>`;
        } else if (filterStage !== null) {
            selectedFilterText = `
                Review Stage: ${getReviewStageLabel(filterStage)} <br>
                <span style="font-size: 0.9em; color: gray;">(To Exit the Review stage, Click "Show All Flashcards" Button)</span>`;
        } else {
            selectedFilterText = `Showing all flashcards of selected topics`;
        }

        // Create and display filter info only once for initial load or for all load
        if (appendOnly === false) {
            const filterInfo = document.createElement('div');
            filterInfo.className = 'filter-info';

            // Topics selected line
            const topicsLine = document.createElement('div');
            topicsLine.innerHTML = `<strong style="color: black;">Topics selected:</strong>  ${selectedTopicsText}`;
            filterInfo.appendChild(topicsLine);

            // Add an <hr> for separation
            const separator = document.createElement('hr');
            separator.style.border = '1px solid #ccc';
            separator.style.margin = '10px 0';
            filterInfo.appendChild(separator);

            // Review stage or filter line
            const filterLine = document.createElement('div');
            filterLine.innerHTML = selectedFilterText; // Use innerHTML to support HTML rendering
            filterInfo.appendChild(filterLine);

            filterInfoContainer.appendChild(filterInfo);
        }

        let currentTopic = null;
        let cardsLoaded = 0;
    const limit = initialLoad ? 50 : flashcards.length; // set a limit if its a initial load
        for (let i = 0; i < flashcards.length; i++) {
            if (cardsLoaded >= limit) break; // break out of the loop if the limit is reached

            const flashcard = flashcards[i];
             const reviewStageData = reviewStages[flashcard.id];
              const isStarred = starMarked[flashcard.id];
            const isDue = reviewStageData && new Date(reviewStageData.dueDate) <= currentDate;
            const isTopicMatch = filteredTopics.length === 0 || filteredTopics.includes(flashcard.topic);

            // Match against the "Starred" filter
            let isStarredMatch = isStarFilterActive ? isStarred : true;
           // Match against the "Starred Ready Review" filter
            let isReadyMatch = isStarReadyFilterActive ? (isStarred && isDue) : true;

            // Match against the stage filter
            let isStageMatch = filterStage === null || (reviewStageData?.reviewStage === filterStage && isDue);
             if (filterStage === 4) {
               isStageMatch = reviewStageData?.reviewStage === 4;
            }

            if (isTopicMatch && isStarredMatch && isStageMatch && isReadyMatch) {
                if (!isHorizontal && currentTopic !== flashcard.topic) {
                    currentTopic = flashcard.topic;
                    const topicHeader = document.createElement('div');
                    topicHeader.className = 'topic-header';
                    topicHeader.textContent = topics[flashcard.topic];
                   flashcardsContainer.appendChild(topicHeader);
                }
                 const isAnswerVisible = reviewStageData?.revealedTimestamp &&
                (new Date() - new Date(reviewStageData.revealedTimestamp)) < 24 * 60 * 60 * 1000;

                const memoryTip = flashcard.memoryTip || '';
                const emojiSymbol = flashcard.emoji || '✨';
                const emojiExplanation = flashcard.emojiExplanation || '';

                const card = document.createElement('div');
                card.className = 'modern-card';
                card.dataset.flashcardId = flashcard.id;
                card.dataset.topic = flashcard.topic;
                card.innerHTML = `
                    <div class="question">${flashcard.question}</div>
                    <div class="answer" style="display: ${isAnswerVisible ? 'block' : 'none'}">
                        ${flashcard.answer}
                        <br>
                        <hr style="border: 1px solid black; margin: 10px 0;">
                        <em><strong>Memory Tip:</strong> ${memoryTip}</em>
                         <br><br>
                        <span class="emoji">${emojiSymbol}</span>
                    </div>
                    <div class="review-metric"></div>
                    <div class="buttons">
                       <button class="dont-know-btn" onclick="handleReviewClick(${flashcard.id}, false)">Don't Know</button>
                     <i class="${isStarred ? 'fas' : 'far'} fa-star star-btn"
                            style="color: ${isStarred ? 'gold' : 'lightgray'};"
                             onclick="toggleStar(this, ${flashcard.id})"></i>
                       <button class="know-btn" onclick="handleReviewClick(${flashcard.id}, true)" ondblclick="handleInactiveKnowClick(event)">Know</button>
                     </div>
                    <i class="fas fa-bookmark bookmark" onclick="toggleDropdown(event, 'bookmarkDropdown')"></i>
                    `;
                flashcardsContainer.appendChild(card);
                cardsLoaded++;
           }
       }
        applyReviewMetrics();
        updatePendingCounts();

        if (isHorizontal) {
             showFlashcard(currentFlashcardIndex);
         }
        attachBookmarkListeners();
     }


function showAllTopics() {
    const showMoreBtn = document.getElementById('showMoreBtn');
    const topicsLine = showMoreBtn.parentElement;
    const allTopicsText = filteredTopics.map(topic => topics[topic] || 'All Topics').join(', ');
    topicsLine.innerHTML = `<strong style="color: black;">Topics selected:</strong>  ${allTopicsText} <button id="hideMoreBtn" onclick="hideAllTopics()">Hide</button>`;
}

function hideAllTopics() {
    const hideMoreBtn = document.getElementById('hideMoreBtn');
    const topicsLine = hideMoreBtn.parentElement;
    const selectedTopicsText = filteredTopics.slice(0, 2).map(topic => topics[topic] || 'All Topics').join(', ') +
          (filteredTopics.length > 2 ? ', <button id="showMoreBtn" onclick="showAllTopics()">More</button>' : '');
    topicsLine.innerHTML = `<strong style="color: black;">Topics selected:</strong>  ${selectedTopicsText}`;
}



function showStarredFlashcards() {
    // Set the filter for starred flashcards to active and reset others
    isStarFilterActive = true;
    isStarReadyFilterActive = false; // Disable "Ready for Review" filter
    filterStage = null; // Reset the review stage filter

    renderFlashcards(); // Re-render flashcards based on updated filters
    updateStarredCount(); // Update the count of starred flashcards
}



function showStarredReadyFlashcards() {
    // Set the filter for starred and ready-to-review flashcards to active and reset others
    isStarReadyFilterActive = true;
    isStarFilterActive = false; // Disable the "Starred" filter
    filterStage = null; // Reset the review stage filter

    renderFlashcards(); // Re-render flashcards based on updated filters
    updateStarredCount(); // Update the count of starred ready-to-review flashcards
}



function attachBookmarkListeners() {
    const bookmarks = document.querySelectorAll('.bookmark');
    bookmarks.forEach(bookmark => {
        bookmark.addEventListener('click', (event) => {
            toggleDropdown(event, 'bookmarkDropdown');
        });
    });
}

function filterFlashcards(stage) {
    filterStage = stage;
    isStarFilterActive = false;
    isStarReadyFilterActive = false;
    currentFlashcardIndex = 0;
    renderFlashcards();
}

function showAllFlashcards() {
    if (filteredTopics.length === 0) {
        const topicSelect = document.getElementById('topic-filter');
        const selectedOptions = Array.from(topicSelect.selectedOptions);
        filteredTopics = selectedOptions.map(option => option.value).filter(value => value !== 'all');
    }
    filterStage = null;
    isStarFilterActive = false;
    isStarReadyFilterActive = false;
    currentFlashcardIndex = 0;
    renderFlashcards();
}

function applyReviewMetrics() {
    document.querySelectorAll('.modern-card').forEach(card => {
        const flashcardId = parseInt(card.dataset.flashcardId);
        const reviewMetric = card.querySelector('.review-metric');
        const bookmark = card.querySelector('.bookmark');
        const knowButton = card.querySelector('.know-btn');

        if (reviewStages[flashcardId]) {
            const { reviewStage, dueDate } = reviewStages[flashcardId];
            reviewMetric.dataset.reviewStage = reviewStage;
            reviewMetric.dataset.dueDate = dueDate;

            const timeRemaining = (new Date(dueDate).getTime() - currentDate.getTime()) / (1000 * 60 * 60 * 24);

            if (reviewStage === 4) {
                reviewMetric.textContent = '🏆 Final Review: Completed';
                reviewMetric.style.color = 'gold';
                bookmark.style.color = 'gold';
                card.style.borderColor = 'gold';
                knowButton.disabled = true;
                knowButton.style.backgroundColor = 'gray';
            } else if (timeRemaining <= 0) {
                reviewMetric.textContent = '🔔 Ready for Review';
                reviewMetric.style.color = '#388e3c';
                knowButton.disabled = false;
                knowButton.style.backgroundColor = '#388e3c';
                bookmark.style.color = reviewStageColors[reviewStage];
                card.style.borderColor = reviewStageColors[reviewStage];
            } else {
                const stageColor = reviewStageColors[reviewStage];
                reviewMetric.textContent = `${getReviewText(reviewStage, dueDate)}`;
                reviewMetric.style.color = stageColor;
                bookmark.style.color = stageColor;
                card.style.borderColor = stageColor;
                knowButton.disabled = true;
                knowButton.style.backgroundColor = 'gray';
            }
        } else {
            bookmark.style.color = '';
            card.style.borderColor = '';
            reviewMetric.textContent = '';
        }
    });
}


  function handleReviewClick(flashcardId, isKnow) {
    const flashcard = document.querySelector(`[data-flashcard-id="${flashcardId}"]`);
    const answer = flashcard.querySelector('.answer');
        answer.style.display = 'block';


    let reviewStage = reviewStages[flashcardId]?.reviewStage || 0;
    const dueDate = new Date(currentDate);
          const revealedTimestamp = new Date().toISOString();
        const isStarred = starMarked[flashcardId] || false;

         if (isKnow) {
        reviewStage = getNextStage(reviewStage, dueDate); // Move to next stage
    } else {
        reviewStage = 0;
            dueDate.setDate(dueDate.getDate() + 3); // Set the review in 3 days
        }
        reviewStages[flashcardId] = { reviewStage, dueDate: dueDate.toISOString(), revealedTimestamp };
         saveProgress(flashcardId, reviewStage, dueDate.toISOString(), revealedTimestamp, isStarred); // Save starred state with review metrics

          applyReviewMetrics();
        updatePendingCounts();
        updateTopicProgress();
       }


function getNextStage(reviewStage, dueDate) {
    if (reviewStage === 0) {
        dueDate.setDate(dueDate.getDate() + 7);
        return 1;
    } else if (reviewStage === 1) {
        dueDate.setDate(dueDate.getDate() + 14);
        return 2;
    } else if (reviewStage === 2) {
        dueDate.setDate(dueDate.getDate() + 28);
        return 3;
    }
    return 4;
}

function getReviewText(reviewStage, dueDate) {
    const timeRemaining = (new Date(dueDate) - currentDate) / (1000 * 60 * 60 * 24);
    return `${["First Review", "Second Review", "Third Review", "Final Review"][reviewStage]} in ${Math.ceil(timeRemaining)} days`;
}

function getReviewStageLabel(stage) {
    const labels = ["First Review", "Second Review", "Third Review", "Final Review"];
    return labels[stage] || " 🏆 Completed Flashcards List";
}

function updatePendingCounts() {
    const counts = [0, 0, 0, 0, 0];
    flashcards.forEach(flashcard => {
        const flashcardData = reviewStages[flashcard.id];
        if (flashcardData) {
            if (flashcardData.reviewStage < 4 && new Date(flashcardData.dueDate) <= currentDate) {
                counts[flashcardData.reviewStage]++;
            } else if (flashcardData.reviewStage === 4) {
                counts[4]++;
            }
        }
    });
    counts.forEach((count, index) => {
        if (index < 4) {
            document.getElementById(`count-stage-${index}`).textContent = `${count} pending`;
        } else {
            document.getElementById('count-completed').textContent = `${count} completed`;
        }
    });
}

function simulateDateTimeChange() {
    const dateInput = document.getElementById('current-date').value;
    const timeInput = document.getElementById('current-time').value;

    if (dateInput && timeInput) {
        currentDate = new Date(`${dateInput}T${timeInput}:00`);
    } else {
        currentDate = new Date();
    }
    refreshFlashcards();
}

function refreshFlashcards() {
    applyReviewMetrics();
    updatePendingCounts();
}

function applyCurrentFilters() {
    if (filterStage !== null) {
        filterFlashcards(filterStage);
    } else {
        renderFlashcards();
    }

    if (isHorizontal) {
        currentFlashcardIndex = 0;
        showFlashcard(currentFlashcardIndex);
    }
}


// Handle inactive "Know" button click to show dropdown
function handleInactiveKnowClick(event) {
    if (event.target.disabled) {
        toggleDropdownBelowButton(event, 'inactiveKnowDropdown');
    }
}

// Function to toggle dropdown visibility below the button
function toggleDropdownBelowButton(event, dropdownId) {
    event.stopPropagation();

    const dropdown = document.getElementById(dropdownId);
    const isVisible = dropdown.style.display === "block";

    if (isVisible) {
        dropdown.style.display = "none";
        return;
    }

    const dropdowns = document.querySelectorAll('.dropdown');
    dropdowns.forEach(d => {
        d.style.display = 'none';
    });

    dropdown.style.display = "block";
    dropdown.style.position = "absolute";

    const rect = event.target.getBoundingClientRect();
    dropdown.style.top = `${rect.bottom + window.scrollY}px`;
    dropdown.style.left = "50%";
    dropdown.style.transform = "translateX(-50%)";
    dropdown.style.maxWidth = "90vw";
}

// Close dropdown when clicking outside of it
window.addEventListener('click', function (event) {
    const dropdown = document.getElementById('inactiveKnowDropdown');
    if (dropdown && dropdown.style.display === "block" && !dropdown.contains(event.target)) {
        dropdown.style.display = "none";
    }
});

// Optional: Close dropdown function for specific dropdowns
function closeDropdown(dropdownId) {
    const dropdown = document.getElementById(dropdownId);
    if (dropdown) {
        dropdown.style.display = "none";
    }
}


function updateStarredCount() {

    const totalStarredCount = flashcards.filter(flashcard => starMarked[flashcard.id]).length;
    const totalStarredReadyCount = flashcards.filter(flashcard => {
          const reviewStageData = reviewStages[flashcard.id];
          const isDue = reviewStageData && new Date(reviewStageData.dueDate) <= currentDate;
        return starMarked[flashcard.id] && isDue;
        }).length;
        const count = flashcards.filter(flashcard => {
             const isTopicMatch = filteredTopics.length === 0 || filteredTopics.includes(flashcard.topic);
             return isTopicMatch && starMarked[flashcard.id]
         }).length;

        const countReady = flashcards.filter(flashcard => {
             const isTopicMatch = filteredTopics.length === 0 || filteredTopics.includes(flashcard.topic);
                const reviewStageData = reviewStages[flashcard.id];
                const isDue = reviewStageData && new Date(reviewStageData.dueDate) <= currentDate;
                return isTopicMatch &&  starMarked[flashcard.id] && isDue;
           }).length;
    const starFilterBtn = document.querySelector('.filter-btn[onclick="showStarredFlashcards()"]');
    if (starFilterBtn) {
        starFilterBtn.innerHTML = `Starred Flashcards <br> ⭐  <span id="count-starred" class="badge">${totalStarredCount} marked</span>`;
    }
    const starReadyFilterBtn = document.querySelector('.filter-btn[onclick="showStarredReadyFlashcards()"]');
    if (starReadyFilterBtn) {
        starReadyFilterBtn.innerHTML = ` Starred Ready for Review <br> 🌟 <span id="count-starred-ready" class="badge">${totalStarredReadyCount} pending</span>`
      }
}


function attachBookmarkListeners() {
    const cards = document.querySelectorAll('.modern-card');
       cards.forEach(card =>{
         card.addEventListener('click', function(event){
            const bookmark = event.target.closest('.bookmark');
             if(bookmark){
                toggleDropdown1(event, 'bookmarkDropdown1')
              }

        });
    });

}


// Toggle dropdown near the clicked bookmark icon, centered horizontally in the viewport
function toggleDropdown1(event, dropdownId) {
    event.stopPropagation();

    const dropdown = document.getElementById(dropdownId);
  const computedStyle = window.getComputedStyle(dropdown);
    const isVisible = computedStyle.display === "block";


    if (isVisible) {
        dropdown.style.display = "none";
        return;
    }

    dropdown.style.display = "block";
    dropdown.style.position = "absolute";

    const rect = event.target.getBoundingClientRect();

    dropdown.style.top = `${rect.bottom + window.scrollY}px`;
    dropdown.style.left = "50%";
    dropdown.style.transform = "translateX(-50%)";
    dropdown.style.maxWidth = "90vw";
}


// Close dropdown when clicking outside of it
window.addEventListener('click', function (event) {
    const dropdown = document.getElementById('bookmarkDropdown1');
   const bookmark = event.target.closest('.bookmark');
   if (dropdown && dropdown.style.display === "block" && !bookmark && !dropdown.contains(event.target)) {
        dropdown.style.display = "none";
    }
});

// Close dropdown manually
function closeDropdown(dropdownId) {
    const dropdown = document.getElementById(dropdownId);
    if (dropdown) {
        dropdown.style.display = "none";
    }
}


</script>



<script>
// Function to Toggle the Dropdown Below the Button
function toggleDropdownContent(event) {
    event.stopPropagation();  // Prevent immediate closing due to outside click listener

    const dropdown = document.getElementById('dropdownContent');
    const isVisible = dropdown.style.display === "block";

    // Hide dropdown if already visible
    if (isVisible) {
        dropdown.style.display = "none";
        return;
    }

    // Hide any other open dropdowns
    const dropdowns = document.querySelectorAll('.dropdown');
    dropdowns.forEach(d => {
        d.style.display = 'none';
    });

       // Show and position dropdown
    dropdown.style.display = "block";
    dropdown.style.position = "absolute";

    const rect = event.target.getBoundingClientRect();

    // Set top position just below the clicked bookmark icon
    dropdown.style.top = `${rect.bottom + window.scrollY}px`;

    // Center horizontally in the viewport, using transform for responsive centering
    dropdown.style.left = "50%";
    dropdown.style.transform = "translateX(-50%)";  // Center align horizontally

    // Optional: Set max width for small screens
    dropdown.style.maxWidth = "90vw";  // Allow dropdown to adjust within viewport
}

// Close dropdown when clicking outside of it
window.addEventListener('click', function(event) {
    const dropdown = document.getElementById('dropdownContent');
    const toggleButton = document.getElementById('toggleButton'); // Assuming the button to open dropdown has ID "toggleButton"

    // Close dropdown if clicked outside of it and not on the toggle button
    if (dropdown && dropdown.style.display === "block" &&
        !dropdown.contains(event.target) &&
        event.target !== toggleButton) {
        dropdown.style.display = "none";
    }
});

// Function to Close Dropdown Explicitly
function closeDropdown(dropdownId) {
    const dropdown = document.getElementById(dropdownId);
    if (dropdown) {
        dropdown.style.display = "none";
    }
}


</script>

 <script>
         function openModal(modalId) {
            document.getElementById(modalId).style.display = "block";
        }

        function closeModal(modalId) {
            document.getElementById(modalId).style.display = "none";
        }

         function zoomImage(modalId, zoomFactor) {
             var image = document.getElementById(modalId).querySelector('.modal-content97');
            if (image) {
                var currentWidth = image.clientWidth;
                image.style.width = (currentWidth * zoomFactor) + 'px';
            } else {
                console.error('Zoom image not found for modal:', modalId);
             }
         }


        function openPopup(popupId) {
             document.getElementById(popupId).style.display = "block";
         }

         function closePopup(popupId) {
            document.getElementById(popupId).style.display = "none";
         }

    </script>



<!-- Include the rest of your JavaScript here -->

</body>
</html>