/* ===== BASE STYLES ===== */
.mcq-exam-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 9999;
    margin: 0;
    padding: 0;
    background: #f5f7fa;
}

.mcq-exam-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* ===== UPDATED HEADER ===== */
.exam-header {
    background: linear-gradient(135deg, #1a2980, #26d0ce);
    color: white;
    padding: 8px 15px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.portal-name {
    font-size: 1.2rem;
    font-weight: 700;
    white-space: nowrap;
}

.test-name {
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
}

.header-center {
    display: flex;
    align-items: center;
}

.exam-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
}

.exam-timer strong {
    font-size: 1rem;
    letter-spacing: 0.5px;
    min-width: 70px;
    display: inline-block;
    text-align: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fullscreen-btn, .pause-btn {
    padding: 6px 12px;
    border: none;
    background: rgba(255,255,255,0.9);
    color: #1a2980;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
}

.pause-btn {
    background: #FF9800;
    color: white;
}

.fullscreen-btn:hover, 
.pause-btn:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #1a2980 !important;
}

.pause-btn:hover {
    background: #F57C00 !important;
    color: white !important;
}

.exit-fullscreen-icon {
    display: none;
}

/* ===== COMPACT MAIN CONTENT ===== */
.exam-main {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    padding: 0;
    gap: 0;
    height: calc(100% - 60px);
}

/* ===== QUESTION AREA (75%) ===== */
.question-column {
    flex: 0 0 75%;
    padding: 15px;
    background: #f8faff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.section-row {
    padding: 8px 0;
    border-bottom: 1px solid #e0e6ff;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1a2980;
    font-size: 0.9rem;
}

/* ===== COMPACT QUESTION INFO ===== */
.question-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
}

.question-number, .marking-info, .time-elapsed, .language-switch {
    background: #f0f5ff;
    padding: 4px 8px;
    border-radius: 4px;
}

.marking-info {
    display: flex;
    gap: 5px;
}

.positive-mark {
    color: #1b5e20;
    font-weight: 600;
}

.negative-mark {
    color: #c62828;
    font-weight: 600;
}

/* ===== QUESTION DISPLAY WITH OPTIMAL SPACE ===== */
.question-display {
    display: flex;
    flex-direction: column;
    height: calc(100% - 120px);
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 15px;
}

.question-text {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-shrink: 0;
    overflow-y: auto;
    max-height: 40%;
    padding: 5px;
    white-space: pre-line;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    overflow-y: auto;
    padding: 5px;
}

.mcq-option {
    display: flex;
    align-items: flex-start;
    padding: 10px;
    border: 2px solid #e0e6ff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.mcq-option:hover {
    background: #f0f7ff;
    border-color: #1a75ff;
    transform: translateX(3px);
}

.mcq-option input[type="radio"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1a2980;
}

.mcq-option-letter {
    font-weight: bold;
    margin-right: 8px;
    min-width: 20px;
    display: inline-block;
    color: #1a2980;
}

.mcq-option-text {
    font-size: 1rem;
    line-height: 1.5;
}

/* ===== COMPACT ACTION BUTTONS ===== */
.action-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
    gap: 8px;
}

.button-group-left {
    display: flex;
    gap: 10px;
}

.button-group-right {
    display: flex;
    gap: 5px;
}

.action-btn {
    padding: 12px 20px !important;
    height: auto !important;
    line-height: 1.5 !important;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 46px;
}

.action-btn.primary {
    background: #1a2980;
    color: white;
}

.action-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

#mark-review-btn, 
#clear-response-btn, 
#save-next-btn {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#save-next-btn {
    padding: 12px 25px !important;
    font-weight: 700;
    background: linear-gradient(135deg, #1a2980, #26d0ce) !important;
    border: 2px solid #1a75ff;
}

.button-group-left {
    gap: 12px;
}

/* ===== SIDEBAR (25%) ===== */
.sidebar-column {
    flex: 0 0 25%;
    padding: 10px;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-left: 1px solid #e0e6ff;
}

/* ===== COMPACT USER INFO ===== */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f5ff;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a2980, #26d0ce);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a2980;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== UPDATED STATUS INDICATORS ===== */
.status-indicators {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.status-row {
    display: flex;
    gap: 8px;
}

.status-row-full {
    grid-column: span 2;
    justify-content: center;
}

.status {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.75rem;
    text-align: center;
}

.status-count {
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 3px;
}

/* Status colors */
.status.answered { background: #1b5e20; color: white; }
.status.marked { background: #e65100; color: white; }
.status.not-visited { background: #424242; color: white; }
.status.marked-answered { background: #4a148c; color: white; }
.status.not-answered { background: #c62828; color: white; }

/* ===== QUESTION NAVIGATION WITH MORE SPACE ===== */
.questions-nav {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.nav-header {
    background: linear-gradient(135deg, #1a2980, #26d0ce);
    color: white;
    padding: 8px 10px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.questions-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    flex-grow: 1;
    overflow-y: auto;
    padding: 2px;
}

.nav-btn {
    height: 30px;
    font-size: 0.85rem;
    padding: 0;
    margin: 0;
    border-radius: 6px;
    border: 2px solid #e0e6ff;
    background: #f8faff;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a2980;
}

.nav-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-btn.current {
    background: #1a2980;
    color: white;
    border-color: #1a2980;
    transform: scale(1.05);
    box-shadow: 0 0 0 2px rgba(26, 41, 128, 0.3);
}

.nav-btn.answered {
    background: #e8f5e9;
    border-color: #c8e6c9;
    color: #1b5e20;
}

.nav-btn.marked {
    background: #fff3e0;
    border-color: #ffcc80;
    color: #e65100;
}

.nav-btn.not-visited {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #424242;
}

/* ===== UPDATED SUBMIT BUTTON ===== */
.submit-btn {
    padding: 14px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 1rem;
    border: none;
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    color: white;
    width: 100%;
    margin-top: 10px;
    height: auto;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #b71c1c, #8e0000);
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

/* ===== MODALS ===== */
.pause-modal, .last-question-modal, .submit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
    top: auto;
    left: auto;
    transform: translateY(0);
}

.modal-content h3 {
    margin-bottom: 15px;
    color: #1a2980;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: none;
}

.btn.primary {
    background: #1a2980;
    color: white;
}

.btn.secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
}

/* Responsive modal width */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        max-width: 95%;
    }
}

/* ===== RESULTS CONTAINER - PROFESSIONAL STYLE ===== */
#mcq-results-container {
    display: none;
    padding: 30px;
    text-align: center;
    height: 100%;
    overflow-y: auto;
    background: #f8faff;
}

.mcq-results-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e6ff;
}

.mcq-results-header h2 {
    color: #1a2980;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.mcq-score {
    font-size: 2.5rem;
    font-weight: bold;
    color: #26d0ce;
    margin-bottom: 25px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.mcq-results-summary {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.mcq-summary-card {
    min-width: 150px;
    padding: 25px 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    background: white;
    transition: transform 0.3s ease;
}

.mcq-summary-card:hover {
    transform: translateY(-5px);
}

.mcq-summary-count {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1;
}

.mcq-summary-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #555;
}

.correct .mcq-summary-count { color: #2e7d32; }
.incorrect .mcq-summary-count { color: #d32f2f; }
.skipped .mcq-summary-count { color: #ff9800; }

/* Detailed Results Cards */
.mcq-detailed-results {
    max-width: 800px;
    margin: 0 auto 40px;
}

.mcq-result-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    padding: 20px;
    text-align: left;
    border-left: 5px solid #ddd;
}

.mcq-result-card.correct {
    border-left-color: #4CAF50;
}

.mcq-result-card.incorrect {
    border-left-color: #F44336;
}

.mcq-result-card.skipped {
    border-left-color: #FF9800;
}

.mcq-result-question {
    display: flex;
    margin-bottom: 15px;
}

.mcq-result-number {
    font-weight: bold;
    margin-right: 10px;
    color: #1a2980;
    min-width: 30px;
}

.mcq-result-text {
    flex: 1;
    font-size: 16px;
    line-height: 1.5;
}

.mcq-result-details {
    padding-left: 30px;
}

.user-answer, .correct-answer {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
}

.user-answer.correct {
    background-color: #E8F5E9;
    color: #2E7D32;
}

.user-answer.incorrect {
    background-color: #FFEBEE;
    color: #C62828;
}

.user-answer.skipped {
    background-color: #FFF3E0;
    color: #EF6C00;
}

.correct-answer {
    background-color: #E3F2FD;
    color: #1565C0;
}

.answer-status {
    font-weight: bold;
    margin-left: 10px;
}

.answer-status.correct {
    color: #2E7D32;
}

.answer-status.incorrect {
    color: #C62828;
}

.answer-status.skipped {
    color: #EF6C00;
}

.mcq-results-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.mcq-solution-btn, .mcq-retake-btn {
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    justify-content: center;
}

.mcq-solution-btn {
    background: linear-gradient(135deg, #1a2980, #26d0ce);
    color: white;
    box-shadow: 0 4px 10px rgba(26, 41, 128, 0.2);
}

.mcq-retake-btn {
    background: white;
    color: #1a2980;
    border: 2px solid #1a2980;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.mcq-solution-btn:hover, .mcq-retake-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

/* ===== SOLUTIONS CONTAINER - PROFESSIONAL STYLE ===== */
#mcq-solutions-container {
    display: none;
    padding: 30px;
    height: 100%;
    overflow-y: auto;
    background: #f8faff;
}

.mcq-solutions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e6ff;
    flex-wrap: wrap;
    gap: 15px;
}

.mcq-solutions-header h2 {
    color: #1a2980;
    font-size: 1.8rem;
    margin: 0;
}

.mcq-back-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    background: white;
    color: #1a2980;
    border: 2px solid #1a2980;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.mcq-back-btn:hover {
    background: #1a2980;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mcq-solution-item {
    margin-bottom: 40px;
    padding: 25px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.mcq-solution-question {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.mcq-solution-number {
    font-weight: 700;
    font-size: 1.3rem;
    color: #1a2980;
    min-width: 35px;
    height: 35px;
    background: #f0f5ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mcq-solution-text {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.7;
    flex: 1;
}

.mcq-user-answer {
    margin-bottom: 20px;
    padding-left: 20px;
    border-left: 3px solid #FF9800;
}

.mcq-user-answer.correct {
    border-left-color: #4CAF50;
}

.mcq-user-answer.incorrect {
    border-left-color: #F44336;
}

.mcq-user-answer h5 {
    font-size: 1.1rem;
    margin: 0 0 15px 0;
    color: #FF9800;
}

.mcq-user-answer.correct h5 {
    color: #2E7D32;
}

.mcq-user-answer.incorrect h5 {
    color: #C62828;
}

.user-answer-display {
    background: #FFF9C4;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
}

.mcq-user-answer.correct .user-answer-display {
    background: #E8F5E9;
}

.mcq-user-answer.incorrect .user-answer-display {
    background: #FFEBEE;
}

.mcq-solution-answer {
    margin-bottom: 25px;
    padding-left: 20px;
    border-left: 3px solid #4caf50;
}

.mcq-solution-answer h5 {
    font-size: 1.1rem;
    margin: 0 0 15px 0;
    color: #2e7d32;
}

.mcq-correct-option {
    background: #e6f7ee;
    padding: 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1.1rem;
}

.mcq-solution-explanation {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-top: 25px;
}

.mcq-solution-explanation h5 {
    font-size: 1.1rem;
    margin: 0 0 15px 0;
    color: #1a2980;
}

.mcq-explanation-text {
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.mcq-explanation-file {
    margin-top: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

/* ===== FULLSCREEN OPTIMIZATIONS ===== */
body:fullscreen .exam-container,
body:-webkit-full-screen .exam-container,
body:-moz-full-screen .exam-container,
body:-ms-fullscreen .exam-container {
    overflow: hidden;
    height: 100vh;
}

body:fullscreen .exam-main,
body:-webkit-full-screen .exam-main {
    height: calc(100% - 60px);
}

body:fullscreen .exit-fullscreen-icon,
body:-webkit-full-screen .exit-fullscreen-icon,
body:-moz-full-screen .exit-fullscreen-icon,
body:-ms-fullscreen .exit-fullscreen-icon {
    display: inline;
}

body:fullscreen .fullscreen-icon,
body:-webkit-full-screen .fullscreen-icon,
body:-moz-full-screen .fullscreen-icon,
body:-ms-fullscreen .fullscreen-icon {
    display: none;
}

/* Browser-specific fixes */
.edge-browser .mcq-option {
    padding: 12px 15px;
}

.firefox-browser .options-container {
    scrollbar-width: thin;
}

.safari-browser .question-text {
    -webkit-transform: translateZ(0);
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 767px) {
    .exam-header {
        flex-wrap: wrap;
        height: auto;
        padding: 8px;
        gap: 10px;
    }
    
    .header-left, .header-center, .header-right {
        flex: 1 1 100%;
        justify-content: center;
        text-align: center;
    }
    
    .portal-name {
        font-size: 1.1rem;
    }
    
    .test-name {
        font-size: 0.95rem;
    }
    
    .exam-timer {
        padding: 8px 12px;
        font-size: 0.9rem;
        justify-content: center;
    }
    
    .exam-timer strong {
        min-width: 65px;
    }
    
    .fullscreen-btn, .pause-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        flex: 1;
        margin: 2px;
    }
    
    .exam-main {
        flex-direction: column;
        height: auto;
    }
    
    .question-column, .sidebar-column {
        width: 100%;
        padding: 12px;
        flex: 0 0 auto !important;
    }
    
    .sidebar-column {
        border-top: 1px solid #e0e6ff;
        border-left: none;
        max-height: 50vh;
    }
    
    .section-row {
        font-size: 0.9rem;
        text-align: center;
    }
    
    .question-info-row {
        flex-direction: column;
        gap: 8px;
        font-size: 0.85rem;
        text-align: center;
    }
    
    .question-display {
        height: auto;
        min-height: 40vh;
        display: flex;
        flex-direction: column;
    }
    
    .question-text {
        max-height: none;
        font-size: 1rem;
        margin-bottom: 15px;
        overflow-y: auto;
        flex-shrink: 0;
    }
    
    .options-container {
        max-height: none;
        overflow-y: auto;
        flex-grow: 1;
    }
    
    .mcq-option {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }
    
    .button-group-left, .button-group-right {
        width: 100%;
        justify-content: center;
    }
    
    .button-group-left {
        flex-direction: column;
        gap: 8px;
    }
    
    .action-btn {
        width: 100%;
        padding: 12px;
        font-size: 0.9rem;
        justify-content: center;
    }
    
    /* Status indicators */
    .status-indicators {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .status {
        padding: 8px;
        font-size: 0.8rem;
    }
    
    .status-count {
        font-size: 1.1rem;
    }
    
    /* Questions navigation */
    .questions-nav {
        max-height: 200px;
    }
    
    .nav-header {
        padding: 8px;
        font-size: 0.9rem;
    }
    
    .questions-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }
    
    .nav-btn {
        height: 35px;
        font-size: 0.9rem;
    }
    
    .submit-btn {
        padding: 12px;
        font-size: 1rem;
        margin-top: 15px;
    }
    
    /* Results & Solutions */
    #mcq-results-container, 
    #mcq-solutions-container {
        padding: 15px;
        overflow-y: auto;
    }
    
    .mcq-results-header h2 {
        font-size: 1.4rem;
    }
    
    .mcq-score {
        font-size: 1.8rem;
    }
    
    .mcq-results-summary {
        flex-direction: column;
        gap: 12px;
    }
    
    .mcq-summary-card {
        width: 100%;
        padding: 15px;
    }
    
    .mcq-summary-count {
        font-size: 2rem;
    }
    
    .mcq-summary-label {
        font-size: 1rem;
    }
    
    .mcq-detailed-results {
        margin: 20px 0;
    }
    
    .mcq-result-card {
        padding: 15px;
    }
    
    .mcq-result-question {
        flex-direction: column;
    }
    
    .mcq-result-number {
        margin-bottom: 8px;
    }
    
    .mcq-result-details {
        padding-left: 0;
    }
    
    .mcq-results-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .mcq-solution-btn, .mcq-retake-btn {
        width: 100%;
        padding: 14px;
        font-size: 1rem;
    }
    
    .mcq-solutions-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .mcq-solutions-header h2 {
        font-size: 1.4rem;
    }
    
    .mcq-back-btn {
        width: 100%;
        justify-content: center;
        margin: 5px 0;
    }
    
    .mcq-solution-item {
        padding: 15px;
        margin-bottom: 25px;
    }
    
    .mcq-solution-question {
        flex-direction: column;
        gap: 8px;
    }
    
    .mcq-solution-number {
        width: 30px;
        height: 30px;
        font-size: 1.1rem;
    }
    
    .mcq-solution-text {
        font-size: 1.05rem;
    }
}

/* Orientation message for mobile */
@media screen and (max-width: 767px) {
    .orientation-message {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.95);
        z-index: 10000;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        color: white;
        text-align: center;
        padding: 20px;
    }
    
    .orientation-message i {
        font-size: 3rem;
        margin-bottom: 20px;
    }
    
    .orientation-message h3 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .orientation-message p {
        font-size: 1.1rem;
        line-height: 1.5;
    }
    
    /* Hide exam container in portrait mode */
    @media (orientation: portrait) {
        .mcq-exam-container {
            display: none !important;
        }
        
        .orientation-message {
            display: flex !important;
        }
    }
    
    /* Show exam container in landscape mode */
    @media (orientation: landscape) {
        .mcq-exam-container {
            display: flex !important;
        }
        
        .orientation-message {
            display: none !important;
        }
    }
}