.nm-topic-wrap {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.nm-topic-stats-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 20px;
    margin: 0 0 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25);
}

.nm-topic-stats-header h1 {
    margin: 0 0 10px;
    font-size: 1.5em;
    font-weight: 700;
    color: white;
    line-height: 1.3;
}

.nm-topic-description {
    font-size: 0.95em;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto 15px;
    line-height: 1.5;
}

.nm-stats-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.nm-stat-box {
    background: rgba(255,255,255,0.2);
    padding: 12px 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    min-width: 90px;
}

.nm-stat-number {
    font-size: 1.6em;
    font-weight: 700;
    display: block;
    margin-bottom: 3px;
}

.nm-stat-label {
    font-size: 0.8em;
    opacity: 0.9;
}

.nm-topic-stats-header p {
    margin: 12px 0 0;
    font-size: 0.85em;
    opacity: 0.9;
}

.nm-topic-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.nm-filter-select {
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 180px;
    flex: 1;
    line-height: 1.5;
    height: auto;
}

.nm-filter-select option {
    padding: 8px;
    line-height: 1.6;
}

.nm-filter-select:hover, .nm-filter-select:focus {
    border-color: #667eea;
    background: #f8f9ff;
    outline: none;
}

.nm-quiz-section {
    margin-bottom: 30px;
}

.nm-quiz-intro {
    background: #f8f9fa;
    padding: 20px;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    margin-bottom: 25px;
}

.nm-quiz-intro h3 {
    margin: 0 0 8px;
    color: #2c3e50;
    font-size: 1.2em;
}

.nm-quiz-intro p {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.6;
}

.nm-mcq-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 2px solid #f0f0f0;
    transition: all 0.3s;
}

.nm-mcq-card:hover {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.12);
}

.nm-mcq-card.answered-correct {
    border-color: #4caf50;
    background: linear-gradient(135deg, #f1f8f4 0%, #ffffff 100%);
}

.nm-mcq-card.answered-wrong {
    border-color: #f44336;
    background: linear-gradient(135deg, #fef5f5 0%, #ffffff 100%);
}

.nm-mcq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 8px;
}

.nm-meta-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    background: #f0f0f0;
    color: #666;
    display: inline-block;
}

.nm-meta-badge.number {
    background: #667eea;
    color: white;
}

.nm-meta-badge.topic {
    background: #e3f2fd;
    color: #1976d2;
}

.nm-mcq-question {
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.6;
}

.nm-mcq-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.nm-option-btn {
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95em;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nm-option-btn:hover:not(.disabled) {
    border-color: #667eea;
    background: #e8eaf6;
    color: #1a237e;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.nm-option-btn.correct {
    border-color: #4caf50;
    background: #4caf50;
    color: white;
}

.nm-option-btn.wrong {
    border-color: #f44336;
    background: #f44336;
    color: white;
}

.nm-option-btn.disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.nm-option-label {
    font-weight: 700;
    font-size: 1.05em;
    min-width: 30px;
    flex-shrink: 0;
}

.nm-result-message {
    padding: 14px 18px;
    border-radius: 8px;
    margin-top: 12px;
    font-weight: 600;
    display: none;
    animation: slideDown 0.3s ease;
}

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

.nm-result-message.correct {
    background: #e8f5e9;
    border: 2px solid #4caf50;
    color: #2e7d32;
}

.nm-result-message.wrong {
    background: #ffebee;
    border: 2px solid #f44336;
    color: #c62828;
}

.nm-result-message.visible {
    display: block;
}

.nm-explanation {
    margin-top: 12px;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #667eea;
    font-size: 0.95em;
    line-height: 1.6;
}

.nm-view-link {
    display: inline-block;
    margin-top: 10px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
}

.nm-view-link:hover {
    text-decoration: underline;
}

/* FIXED: Score Tracker Position */
.nm-score-tracker {
    position: fixed;
    bottom: 80px; /* Above back-to-top button */
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 998; /* Below back-to-top (usually 999) */
    min-width: 140px;
    display: none;
    border: 2px solid #667eea;
}

.nm-score-tracker.visible {
    display: block;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.nm-score-title {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 6px;
}

.nm-score-number {
    font-size: 1.8em;
    font-weight: 700;
    color: #667eea;
}

.nm-score-label {
    font-size: 0.8em;
    color: #999;
}

/* Load More Button */
.nm-load-more-wrap {
    text-align: center;
    margin: 30px 0;
}

.nm-load-more-btn {
    padding: 14px 35px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.nm-load-more-btn:hover:not(:disabled) {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.nm-load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

/* Content sections (keeping existing styles) */
.nm-content-section {
    background: white;
    padding: 30px 25px;
    border-radius: 10px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nm-content-section h2 {
    margin: 0 0 15px;
    color: #2c3e50;
    font-size: 1.5em;
}

.nm-content-section ul {
    line-height: 1.8;
}

.nm-content-section li {
    margin-bottom: 8px;
}

.nm-related-topics {
    margin: 30px 0;
    padding: 30px 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nm-related-topics h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 1.5em;
}

.nm-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.nm-topic-card {
    display: block;
    padding: 20px 18px;
    background: white;
    border-radius: 10px;
    text-decoration: none;
    border: 2px solid #e0e0e0;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.nm-topic-card:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.2);
}

.nm-topic-card-title {
    font-size: 1em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.nm-topic-card-count {
    font-size: 0.9em;
    color: #667eea;
    font-weight: 600;
}

/* Mobile Responsive */
@media (min-width: 768px) {
    .nm-topic-stats-header {
        padding: 35px 25px;
    }
    
    .nm-topic-stats-header h1 {
        font-size: 1.9em;
    }
    
    .nm-topic-description {
        font-size: 1.05em;
    }
    
    .nm-stat-number {
        font-size: 2em;
    }
    
    .nm-mcq-card {
        padding: 28px;
    }
    
    .nm-mcq-question {
        font-size: 1.15em;
    }
    
    .nm-option-btn {
        font-size: 1em;
        padding: 15px 20px;
    }
}

@media (max-width: 767px) {
    .nm-topic-wrap {
        padding: 0 15px;
    }
    
    .nm-topic-stats-header {
        padding: 20px 18px;
        margin: 0 0 20px;
    }
    
    .nm-topic-stats-header h1 {
        font-size: 1.3em;
    }
    
    .nm-topic-description {
        font-size: 0.9em;
    }
    
    .nm-stats-grid {
        gap: 12px;
    }
    
    .nm-stat-box {
        padding: 10px 16px;
        min-width: 80px;
    }
    
    .nm-stat-number {
        font-size: 1.4em;
    }
    
    .nm-stat-label {
        font-size: 0.75em;
    }
    
    .nm-mcq-card {
        padding: 18px;
        margin-bottom: 18px;
    }
    
    .nm-mcq-question {
        font-size: 1.05em;
    }
    
    .nm-option-btn {
        padding: 12px 14px;
        font-size: 0.9em;
        gap: 10px;
    }
    
    .nm-option-label {
        min-width: 25px;
    }   
    /* Score tracker position on mobile */
    .nm-score-tracker {
        bottom: 70px;
        right: 15px;
        padding: 12px 16px;
        min-width: 120px;
        font-size: 0.9em;
    }
    
    .nm-score-title {
        font-size: 0.75em;
        margin-bottom: 4px;
    }
    
    .nm-score-number {
        font-size: 1.5em;
    }
    
    .nm-score-label {
        font-size: 0.7em;
    }
    
    .nm-content-section {
        padding: 20px 18px;
    }
    
    .nm-content-section h2 {
        font-size: 1.3em;
    }
    
    .nm-related-topics {
        padding: 20px 18px;
    }
    
    .nm-topics-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
/* Custom Breadcrumb Styling */
.nm-custom-breadcrumb {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 12px 20px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 1200px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.nm-custom-breadcrumb a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nm-custom-breadcrumb a:hover {
    color: #764ba2;
}

.nm-custom-breadcrumb .separator {
    color: #999;
    font-weight: 300;
    margin: 0 5px;
}

.nm-custom-breadcrumb .current {
    color: #2c3e50;
    font-weight: 600;
}

@media (max-width: 767px) {
    .nm-custom-breadcrumb {
        padding: 10px 15px;
        font-size: 0.85em;
    }
}
/* Improved Contrast for Accessibility */
.nm-custom-breadcrumb a {
    color: #5056d6; /* Darker blue for better contrast */
}

.nm-custom-breadcrumb a:hover {
    color: #3d42a8; /* Even darker on hover */
}

.nm-topic-tab {
    color: #2c3e50; /* Dark text */
}

.nm-answer-btn,
.nm-load-more-btn {
    background: #5056d6; /* WCAG AAA compliant */
}

.nm-answer-btn:hover,
.nm-load-more-btn:hover {
    background: #3d42a8;
}

/* Ensure links are visually distinct */
a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover {
    text-decoration-thickness: 2px;
}
