/* Exam Interface Styling */
.exam-fullscreen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 9999;
    flex-direction: column;
    overflow: hidden;
}

.exam-fullscreen.exam-active {
    display: flex !important;
    visibility: visible !important;
}

.exam-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.exam-content {
    flex: 1;
    overflow-y: auto;
    background-color: #f8f9fa;
    padding: 2rem 0;
}

.exam-navigation {
    background: white;
    border-top: 2px solid #e9ecef;
    padding: 1rem 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.exam-question-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.exam-progress-bar {
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.question-area {
    min-height: 400px;
    padding: 2rem;
}

.exam-sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.question-navigator-container {
    padding: 1.5rem;
}

.question-navigator-container h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.timer-display {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* Force exam to display when active */
body.exam-mode {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

body.exam-mode .exam-fullscreen {
    display: flex !important;
}

body.exam-mode #mainContent,
body.exam-mode #mainNavbar {
    display: none !important;
}

/* Existing styles... */

.exam-fullscreen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            z-index: 9999;
            display: none !important;
            flex-direction: column;
            visibility: hidden;
            opacity: 0;
            transition: all 0.3s ease;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        .exam-fullscreen.active {
            display: flex !important;
            visibility: visible;
            opacity: 1;
        }

        /* Enhanced Exam Navbar */
        .exam-navbar {
            background: linear-gradient(135deg, var(--primary, #b18d4d), #8b6e3e);
            color: white;
            padding: 20px 0;
            box-shadow: 0 4px 20px rgba(0,0,0,0.15);
            z-index: 10000;
            position: relative;
            overflow: hidden;
        }

        .exam-navbar::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.03)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.04)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
            opacity: 0.3;
        }

        .exam-navbar .container-fluid {
            position: relative;
            z-index: 1;
        }

        .exam-navbar h5 {
            font-weight: 700;
            font-size: 1.3rem;
            margin: 0;
            text-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }

        /* Enhanced Progress Bar */
        .exam-progress-bar {
            background: rgba(255,255,255,0.2);
            height: 8px;
            border-radius: 50px;
            overflow: hidden;
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
            position: relative;
        }

        .exam-progress-fill {
            background: linear-gradient(90deg, #28a745, #20c997);
            height: 100%;
            border-radius: 50px;
            transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .exam-progress-fill::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
            animation: progressShine 2s infinite;
        }

        @keyframes progressShine {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        /* Enhanced Timer */
        .exam-timer {
            background: rgba(255,255,255,0.15);
            -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
            padding: 8px 16px;
            border-radius: 25px;
            border: 1px solid rgba(255,255,255,0.2);
            font-weight: 600;
            font-size: 0.95rem;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        }

        /* Enhanced Exam Content */
        .exam-content {
            flex: 1;
            overflow-y: auto;
            padding: 40px 0 120px;
            background: linear-gradient(180deg, rgba(248,249,250,0.5) 0%, rgba(233,236,239,0.3) 100%);
        }

        /* Enhanced Question Card */
        .question-card {
            background: white;
            border-radius: 20px;
            padding: 3rem;
            box-shadow: 0 10px 40px rgba(0,0,0,0.08);
            border: 1px solid rgba(0,0,0,0.05);
            margin-bottom: 2rem;
            position: relative;
            overflow: hidden;
        }

        .question-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--primary, #b18d4d), #17a2b8, #28a745);
        }

        .question-header {
            display: flex;
            justify-content: between;
            align-items: center;
            margin-bottom: 2rem;
            padding-bottom: 1rem;
            border-bottom: 2px solid #f8f9fa;
        }

        .question-number {
            background: linear-gradient(135deg, var(--primary, #b18d4d), #8b6e3e);
            color: white;
            padding: 8px 16px;
            border-radius: 25px;
            font-weight: 700;
            font-size: 0.9rem;
            box-shadow: 0 4px 15px rgba(177, 141, 77, 0.3);
        }

        .question-difficulty {
            padding: 6px 12px;
            border-radius: 15px;
            font-size: 0.8rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .difficulty-easy { background: #d4edda; color: #155724; }
        .difficulty-medium { background: #fff3cd; color: #856404; }
        .difficulty-hard { background: #f8d7da; color: #721c24; }

        .question-text {
            font-size: 1.1rem;
            line-height: 1.7;
            color: #2c3e50;
            margin-bottom: 2rem;
            font-weight: 500;
        }

        /* Enhanced Answer Options */
        .answer-options {
            display: grid;
            gap: 1rem;
            margin-bottom: 2rem;
        }

        .answer-option {
            background: #f8f9fa;
            border: 2px solid #e9ecef;
            border-radius: 15px;
            padding: 1.5rem;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .answer-option::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(177, 141, 77, 0.1), transparent);
            transition: left 0.5s;
        }

        .answer-option:hover::before {
            left: 100%;
        }

        .answer-option:hover {
            border-color: var(--primary, #b18d4d);
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(177, 141, 77, 0.15);
        }

        .answer-option.selected {
            background: linear-gradient(135deg, rgba(177, 141, 77, 0.1), rgba(177, 141, 77, 0.05));
            border-color: var(--primary, #b18d4d);
            box-shadow: 0 8px 25px rgba(177, 141, 77, 0.2);
        }

        .answer-option.correct {
            background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
            border-color: #28a745;
            box-shadow: 0 8px 25px rgba(40, 167, 69, 0.2);
        }

        .answer-option.incorrect {
            background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
            border-color: #dc3545;
            box-shadow: 0 8px 25px rgba(220, 53, 69, 0.2);
        }

        .answer-letter {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            background: var(--primary, #b18d4d);
            color: white;
            border-radius: 50%;
            font-weight: 700;
            margin-right: 1rem;
            font-size: 0.9rem;
            box-shadow: 0 4px 10px rgba(177, 141, 77, 0.3);
        }

        .answer-option.selected .answer-letter {
            background: #fff;
            color: var(--primary, #b18d4d);
        }

        .answer-option.correct .answer-letter {
            background: #28a745;
            color: white;
        }

        .answer-option.incorrect .answer-letter {
            background: #dc3545;
            color: white;
        }

        .answer-text {
            flex: 1;
            font-size: 1rem;
            line-height: 1.5;
            color: #495057;
            font-weight: 500;
        }

        /* Enhanced Explanation Box */
        .explanation-box {
            background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
            border: 1px solid #bbdefb;
            border-radius: 15px;
            padding: 2rem;
            margin-top: 2rem;
            position: relative;
            overflow: hidden;
        }

        .explanation-box::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, #2196f3, #9c27b0);
        }

        .explanation-title {
            font-weight: 700;
            color: #1976d2;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .explanation-text {
            color: #37474f;
            line-height: 1.6;
            font-size: 1rem;
        }

        /* Enhanced Navigation */
        .exam-navigation {
            background: white;
            border-top: 1px solid #e9ecef;
            padding: 20px 0;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            z-index: 10001;
            box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
            -webkit-backdrop-filter: blur(20px);
            backdrop-filter: blur(20px);
        }

        /* Enhanced Question Navigator */
        .question-navigator {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 8px;
            max-width: 600px;
            margin: 0 auto;
        }

        .question-nav-btn {
            width: 40px;
            height: 40px;
            border: 2px solid #dee2e6;
            background: #f8f9fa;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.3s ease;
            color: #495057;
        }

        .question-nav-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        }

        .question-nav-btn.current {
            background: var(--primary, #b18d4d);
            border-color: var(--primary, #b18d4d);
            color: white;
            box-shadow: 0 4px 15px rgba(177, 141, 77, 0.4);
        }

        .question-nav-btn.answered {
            background: #28a745;
            border-color: #28a745;
            color: white;
        }

        .question-nav-btn.flagged {
            background: #ffc107;
            border-color: #ffc107;
            color: #212529;
        }

        .question-nav-btn.flagged::after {
            content: '🚩';
            position: absolute;
            top: -5px;
            right: -5px;
            font-size: 12px;
        }

        /* Enhanced Action Buttons */
        .exam-actions .btn {
            border-radius: 25px;
            font-weight: 600;
            padding: 12px 24px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .exam-actions .btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            transition: left 0.5s;
        }

        .exam-actions .btn:hover::before {
            left: 100%;
        }

        .exam-actions .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        }

        /* Loading States */
        .question-loading {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 400px;
            flex-direction: column;
            gap: 1rem;
        }

        .loading-spinner {
            width: 50px;
            height: 50px;
            border: 4px solid #f3f3f3;
            border-top: 4px solid var(--primary, #b18d4d);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Enhanced Results Modal */
        .exam-results-modal .modal-content {
            border-radius: 20px;
            border: none;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        }

        .exam-results-header {
            background: linear-gradient(135deg, var(--primary, #b18d4d), #8b6e3e);
            color: white;
            padding: 2rem;
            text-align: center;
            border-radius: 20px 20px 0 0;
        }

        .score-circle {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            background: linear-gradient(135deg, #28a745, #20c997);
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1rem;
            box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
        }

        .score-text {
            font-size: 2rem;
            font-weight: 800;
            color: white;
        }

        /* Fix training navigation tab colors */
        .training-nav {
            background: white;
            border-radius: 15px;
            padding: 15px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
            border: 1px solid #e9ecef;
            position: relative;
            z-index: 1;
            margin-bottom: 2rem;
            overflow: hidden;
        }
        
        .training-nav .nav-pills {
            --bs-nav-pills-border-radius: 10px;
            margin-bottom: 0 !important;
            flex-wrap: nowrap;
            position: relative;
            z-index: 2;
            width: 100%;
            display: flex !important;
        }
        
        .training-nav .nav-pills .nav-item {
            flex: 1;
            position: relative !important;
            z-index: 3;
        }
        
        .training-nav .nav-pills .nav-link {
            background: #f8f9fa !important;
            color: #495057 !important;
            border-radius: 10px !important;
            padding: 12px 15px;
            font-weight: 500;
            transition: all 0.3s ease;
            border: 2px solid #dee2e6 !important;
            margin: 3px;
            text-align: center;
            white-space: nowrap;
            position: relative !important;
            display: flex !important;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: calc(100% - 6px) !important;
            box-sizing: border-box;
        }
        
        .training-nav .nav-pills .nav-link:hover {
            background: rgba(177, 141, 77, 0.15) !important;
            color: var(--primary, #b18d4d) !important;
            border-color: var(--primary, #b18d4d) !important;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(177, 141, 77, 0.2);
        }
        
        .training-nav .nav-pills .nav-link.active {
            background: linear-gradient(135deg, var(--primary, #b18d4d), #c19851) !important;
            color: white !important;
            border-color: var(--primary, #b18d4d) !important;
            box-shadow: 0 4px 15px rgba(177, 141, 77, 0.4);
        }
        
        .training-nav .nav-pills .nav-link i {
            font-size: 1rem;
            margin-right: 0;
        }

        .training-nav .nav-pills .nav-link span {
            font-size: 0.9rem;
            font-weight: 600;
        }

        /* Force nav items to stay within container */
        .training-nav .nav-pills .nav-item[role="presentation"] {
            position: relative !important;
            top: auto !important;
            left: auto !important;
            right: auto !important;
            bottom: auto !important;
            transform: none !important;
            z-index: 3 !important;
        }

        /* Override Bootstrap positioning */
        .training-nav .nav {
            display: flex !important;
            flex-wrap: nowrap !important;
            padding-left: 0 !important;
            margin-bottom: 0 !important;
            list-style: none !important;
            position: relative !important;
            width: 100% !important;
        }

        /* Prevent any absolute positioning on tab items */
        .training-nav * {
            position: relative !important;
        }

        .training-nav .nav-pills * {
            position: relative !important;
        }

        /* Ensure container constraints */
        .training-nav {
            contain: layout style !important;
        }

        /* Force content to stay in proper place */
        .tab-content {
            position: relative;
            z-index: 1;
            margin-top: 0;
        }

        .tab-pane {
            display: none;
        }

        .tab-pane.active,
        .tab-pane.show.active {
            display: block;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .training-nav .nav-pills .nav-link {
                padding: 10px 8px;
                font-size: 0.8rem;
                flex-direction: column;
                gap: 4px;
            }
            
            .training-nav .nav-pills .nav-link i {
                font-size: 0.9rem;
            }
            
            .training-nav .nav-pills .nav-link span {
                font-size: 0.75rem;
            }
        }

        /* Enhanced white card design for all tabs */
        .content-card {
            background: white;
            border-radius: 15px;
            padding: 2rem;
            box-shadow: 0 5px 15px rgba(0,0,0,0.08);
            border: 1px solid #e9ecef;
            margin-bottom: 2rem;
            transition: all 0.3s ease;
        }
        
        .content-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 25px rgba(0,0,0,0.12);
        }
        
        /* Enhanced exam mode cards */
        .exam-mode-card {
            background: white;
            border-radius: 15px;
            padding: 2rem;
            border: 2px solid transparent;
            transition: all 0.3s ease;
            height: 100%;
            display: flex;
            flex-direction: column;
            box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        }
        
        .exam-mode-card:hover {
            transform: translateY(-5px);
            border-color: var(--primary, #b18d4d);
            box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        }

        .exam-mode-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--primary, #b18d4d), var(--secondary, #6c757d));
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }

        .exam-mode-card:hover::before {
            transform: scaleX(1);
        }

        .mode-icon {
            width: 80px;
            height: 80px;
            background: linear-gradient(135deg, var(--primary, #b18d4d), var(--secondary, #6c757d));
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            color: white;
            margin: 0 auto 1.5rem;
        }
        
        /* Module cards */
        .module-card {
            background: white;
            border-radius: 15px;
            padding: 1.5rem;
            border: 1px solid #e9ecef;
            transition: all 0.3s ease;
            height: 100%;
        }
        
        .module-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        }
        
        .module-icon {
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, var(--primary, #b18d4d), var(--secondary, #6c757d));
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            color: white;
        }
        
        /* Performance cards */
        .performance-card {
            background: white;
            border-radius: 15px;
            padding: 1.5rem;
            border: 1px solid #e9ecef;
            transition: all 0.3s ease;
        }
        
        .performance-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.1);
        }
        
        .performance-icon {
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, var(--primary, #b18d4d), var(--secondary, #6c757d));
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            color: white;
        }
        
        .stat-card {
            background: white;
            border-radius: 15px;
            padding: 1.5rem;
            text-align: center;
            border: 1px solid #e9ecef;
            transition: all 0.3s ease;
        }
        
        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        }
        
        .stat-number {
            font-size: 2.5rem;
            font-weight: 700;
            color: var(--primary, #b18d4d);
            margin-bottom: 0.5rem;
        }
        
        .stat-label {
            color: #6c757d;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        /* Progress bars */
        .progress-modern {
            height: 10px;
            background: #e9ecef;
            border-radius: 5px;
            overflow: hidden;
        }
        
        .progress-bar-modern {
            background: linear-gradient(90deg, var(--primary, #b18d4d), var(--secondary, #6c757d));
            height: 100%;
            transition: width 0.6s ease;
        }
        
        /* Enhanced buttons */
        .btn-modern {
            position: relative;
            overflow: hidden;
            border-radius: 10px;
            font-weight: 600;
            transition: all 0.3s ease;
        }
        
        .btn-modern::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            transition: left 0.5s;
        }
        
        .btn-modern:hover::before {
            left: 100%;
        }
        
        /* Tab content headers */
        .tab-header {
            text-align: center;
            margin-bottom: 3rem;
        }

        .tab-header h3 {
            color: #333;
            font-weight: 700;
            margin-bottom: 1rem;
        }

        .tab-header .lead {
            color: #6c757d;
            font-size: 1.1rem;
        }

        /* Access Control Overlay */
        .access-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 999999;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .access-content {
            background: white;
            padding: 3rem;
            border-radius: 15px;
            text-align: center;
            max-width: 500px;
            margin: 2rem;
        }

        /* Question content styling */
        .question-content .question-header h5 {
            font-size: 1.25rem;
            margin-bottom: 0.5rem;
        }

        .question-content .question-text {
            font-size: 1.1rem;
            line-height: 1.6;
            color: #495057;
        }

        .question-content .options .form-check {
            border: 2px solid #e9ecef;
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 1rem;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .question-content .options .form-check:hover {
            border-color: #007bff;
            background-color: #f8f9ff;
        }

        .question-content .options .form-check input:checked + label {
            color: #28a745;
            font-weight: 600;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .exam-content .row {
                flex-direction: column;
            }
            
            .exam-sidebar {
                position: static;
                margin-top: 2rem;
            }
            
            .question-area {
                padding: 1rem;
            }
            
            .exam-progress-bar {
                padding: 1rem;
            }
        }

        /* Review mode styling */
        .correct-answer {
            border: 2px solid #28a745 !important;
            background-color: rgba(40, 167, 69, 0.1) !important;
            position: relative;
        }

        .incorrect-answer {
            border: 2px solid #dc3545 !important;
            background-color: rgba(220, 53, 69, 0.1) !important;
            position: relative;
        }

        .explanation {
            background-color: #f8f9fa;
            border-radius: 8px;
            border-left: 4px solid #17a2b8;
            padding: 1rem;
            margin-top: 1.5rem;
        }

        .explanation h6 {
            color: #17a2b8;
            margin-bottom: 0.5rem;
        }

        .explanation p {
            color: #495057;
            margin-bottom: 0;
        }

        /* Answer status badges */
        .badge.bg-success,
        .badge.bg-danger,
        .badge.bg-warning {
            padding: 0.5rem 0.75rem;
            font-size: 0.9rem;
            font-weight: 500;
        }

        /* Enhanced exit button styling - more specific selectors */
        .exam-header .btn-outline-secondary.btn-sm {
            background: rgba(255, 255, 255, 0.25) !important;
            color: white !important;
            border: 2px solid rgba(255, 255, 255, 0.6) !important;
            font-weight: 700 !important;
            padding: 0.6rem 1.2rem !important;
            border-radius: 10px !important;
            transition: all 0.3s ease !important;
            backdrop-filter: blur(15px) !important;
            -webkit-backdrop-filter: blur(15px) !important;
            font-size: 0.9rem !important;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
        }

        .exam-header .btn-outline-secondary.btn-sm:hover {
            background: rgba(255, 255, 255, 0.35) !important;
            color: white !important;
            border-color: white !important;
            transform: translateY(-2px) !important;
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25) !important;
        }

        .exam-header .btn-outline-secondary.btn-sm:focus,
        .exam-header .btn-outline-secondary.btn-sm:active {
            background: rgba(255, 255, 255, 0.4) !important;
            color: white !important;
            border-color: white !important;
            box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.4) !important;
        }

        /* Force better visibility for exit button */
        .exam-header .d-flex .btn {
            position: relative !important;
            z-index: 100 !important;
            visibility: visible !important;
            opacity: 1 !important;
        }

        /* Enhanced question count styling */
        .exam-progress-bar #examProgressText {
            font-size: 1.1rem !important;
            font-weight: 700 !important;
            color: #2c3e50 !important;
            margin-top: 1rem !important;
            text-align: left !important;
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
            z-index: 20 !important;
            position: relative !important;
            line-height: 1.5 !important;
            padding: 0.5rem 0 !important;
            background: rgba(255, 255, 255, 0.9) !important;
            border-radius: 6px !important;
            padding-left: 0.5rem !important;
            border-left: 4px solid var(--primary, #b18d4d) !important;
        }

        /* Ensure progress bar container has enough space */
        .exam-progress-bar {
            padding: 1.5rem 2rem 2rem 2rem !important;
            background: #f8f9fa !important;
            border-bottom: 1px solid #e9ecef !important;
        }

        .exam-progress-bar .progress {
            margin-bottom: 1rem !important;
            height: 10px !important;
            border-radius: 6px !important;
        }

        /* Force text visibility with higher specificity */
        #examProgressText.progress-text {
            font-size: 1.1rem !important;
            font-weight: 700 !important;
            color: #2c3e50 !important;
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
            position: relative !important;
            z-index: 25 !important;
            background: transparent !important;
            padding: 0.5rem 0 !important;
            margin-top: 0.75rem !important;
            line-height: 1.4 !important;
            text-shadow: none !important;
            border: none !important;
            border-left: 3px solid var(--primary, #b18d4d) !important;
            padding-left: 0.75rem !important;
        }
