/* ============================================
   🔥 ROOT FIX - CRITICAL + ENHANCED FONT SIZE
   ============================================ */
html {
    font-size: 14px !important;
}

body .mock-body {
    font-size: 1.2rem !important;
}

body .mock-question-text {
    font-size: 1.5rem !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.mock-body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    padding: 0;
    font-size: 1.2rem;
    background: #f8fafc;
    overflow-x: hidden;
}

.mock-screen {
    display: none;
    width: 100%;
    max-width: 100%;
    animation: mockFadeIn 0.3s ease;
}

.mock-screen.active {
    display: block;
}

@keyframes mockFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mock-card {
    background: white;
    border-radius: 28px;
    padding: 20px;
    margin-bottom: 10px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.1);
}

.mock-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px 20px;
    border-radius: 28px;
    text-align: center;
    margin-bottom: 12px;
}

.mock-header h1 {
    font-size: 2.4rem;
    margin: 8px 0;
    font-weight: 800;
    color: white;
}

.mock-header p {
    font-size: 1.25rem;
    opacity: 0.95;
    font-weight: 500;
    text-align: center;
}

.mock-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 60px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    width: 100%;
    min-height: 44px;
}

.mock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

.mock-btn:active {
    transform: scale(0.97);
}

.mock-btn-secondary {
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.mock-btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.mock-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.mock-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.mock-btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Subject Selector */
.mock-subject-selector {
    margin-bottom: 20px;
}

.mock-subject-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
}

.mock-subject-dropdown {
    width: 100%;
    padding: 12px 16px;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mock-subject-dropdown:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

/* ============================================
   FIXED LAYOUT WITH PROPER SCROLLING
   ============================================ */
.mock-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: auto;
    min-height: 100dvh;
}

.mock-question-section {
    flex-shrink: 0;
}

.mock-navigation-section {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.mock-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 0px;
    border-bottom: 0px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 8px;
}

.mock-question-header > div:first-child {
    font-size: 1.125rem;
    font-weight: 700;
    color: #667eea;
}

.mock-timer {
    background: #0f172a;
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.125rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mock-timer-warning {
    background: #dc2626;
    animation: mockPulse 1s infinite;
}

@keyframes mockPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.mock-question-text {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
    color: #0f172a;
    margin-bottom: 12px;
    text-align: left;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 12px;
    background: #f8fafc;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.mock-image-container {
    text-align: center;
    margin: 12px 0;
    background: #f8fafc;
    border-radius: 18px;
    padding: 12px;
    border: 1px solid #e2e8f0;
}

.mock-question-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 14px;
    object-fit: contain;
}

.mock-option {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    margin: 8px 0;
    background: #f8fafc;
    min-height: 56px;
}

.mock-option:hover {
    transform: translateX(4px);
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.mock-option:active {
    transform: scale(0.98);
    background: #ede9fe;
}

.mock-option.selected {
    border-color: #667eea;
    background: #ede9fe;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.mock-option-letter {
    font-weight: 800;
    background: white;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 12px;
    color: #667eea;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    flex-shrink: 0;
    font-size: 1.4rem;
    font-weight: 800;
}

.mock-option.selected .mock-option-letter {
    background: #667eea;
    color: white;
}

.mock-option span:last-child {
    flex: 1;
    font-size: 1.125rem;
    line-height: 1.4;
    font-weight: 500;
    word-wrap: break-word;
}

.mock-nav-buttons {
    display: flex;
    gap: 10px;
    margin: 12px 0;
}

.mock-nav-buttons .mock-btn {
    flex: 1;
    padding: 10px;
    font-size: 1.0625rem;
}

.mock-navigation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.mock-question-btn {
    aspect-ratio: 1;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 800;
    font-size: 1.25rem;
    transition: all 0.2s ease;
    min-height: 40px;
}

.mock-question-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mock-question-btn:active {
    transform: scale(0.95);
}

.mock-question-btn.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.mock-question-btn.answered {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.mock-question-btn.marked {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
    border-color: #f59e0b !important;
}

.mock-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 10px 0;
    text-align: center;
}

.mock-stat-item {
    background: #f8fafc;
    border-radius: 10px;
    padding: 6px 4px;
}

.mock-stat-label {
    font-size: 0.65rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 2px;
}

.mock-stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

#mockAnsweredCount {
    color: #10b981;
}

#mockMarkedCount {
    color: #f59e0b;
}

#mockUnansweredCount {
    color: #ef4444;
}

#mockTotalCount {
    color: #667eea;
}

.mock-score-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 20px auto;
    box-shadow: 0 6px 14px rgba(0,0,0,0.1);
}

.mock-score-main {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.mock-score-total {
    font-size: 1.25rem;
    opacity: 0.9;
    font-weight: 600;
}

.mock-review-question {
    border-left: 5px solid #10b981;
    margin: 12px 0;
    padding: 14px;
    background: #f8fafc;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.mock-review-question.incorrect {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.mock-answer-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.mock-status-correct {
    color: #10b981;
    font-weight: 800;
    font-size: 1.0625rem;
}

.mock-status-incorrect {
    color: #ef4444;
    font-weight: 800;
    font-size: 1.0625rem;
}

.mock-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 22px;
    font-size: 0.9rem;
    font-weight: 700;
}

.mock-badge-image {
    background: #dbeafe;
    color: #1e40af;
}

.mock-badge-text {
    background: #e2e8f0;
    color: #334155;
}

.mock-feature-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.mock-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 16px;
    font-size: 1.0625rem;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.mock-feature-item:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.mock-feature-item span:first-child {
    font-size: 26px;
}

.mock-feature-item strong {
    font-size: 1.1rem;
    display: block;
    color: #0f172a;
}

.mock-action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.mock-action-buttons .mock-btn {
    flex: 1;
    min-width: 120px;
}

.mock-success-message {
    background: #10b981;
    color: white;
    padding: 12px;
    border-radius: 14px;
    margin: 16px 0;
    text-align: center;
    font-size: 1.0625rem;
    font-weight: 600;
    animation: fadeIn 0.3s ease;
}

.mock-legend {
    display: flex;
    gap: 14px;
    justify-content: center;
    font-size: 0.9rem;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-weight: 600;
}

.mock-legend div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mock-legend-current,
.mock-legend-answered,
.mock-legend-unanswered,
.mock-legend-marked {
    width: 22px;
    height: 22px;
    border-radius: 10px;
    display: inline-block;
}

.mock-legend-current {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.mock-legend-answered {
    background: #10b981;
}

.mock-legend-marked {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.mock-legend-unanswered {
    background: white;
    border: 2px solid #e2e8f0;
}

.mock-heading {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: #667eea;
}

.mock-subheading {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #334155;
}

.mock-text-small {
    font-size: 1rem;
    color: #64748b;
}

.mock-text-large {
    font-size: 1.35rem;
    font-weight: 700;
}

.mock-time-info {
    background: none;
    color: grey;
    padding: 10px;
    border-radius: 14px;
    text-align: center;
    margin: 12px 0;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-size: 0.95rem;
}

.negative-badge {
    background: #ef4444;
    color: white;
    padding: 3px 8px;
    border-radius: 18px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-left: 10px;
    display: inline-block;
}

.mock-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.mock-modal-content {
    background: white;
    padding: 24px 20px;
    border-radius: 28px;
    max-width: 340px;
    width: 90%;
    text-align: center;
    box-shadow: 0 12px 28px rgba(0,0,0,0.2);
    animation: modalPop 0.2s ease;
}

@keyframes modalPop {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.mock-modal-content h3 {
    font-size: 1.8rem;
    margin-bottom: 12px;
    color: #1e293b;
}

.mock-modal-content p {
    margin: 12px 0;
    font-size: 1.125rem;
    line-height: 1.45;
    color: #334155;
}

.mock-modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.mock-modal-buttons .mock-btn {
    flex: 1;
}

/* Export Section */
.mock-export-section {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mock-export-section i {
    font-size: 32px;
    color: #ef4444;
}

.mock-export-section h3 {
    margin-bottom: 4px;
}

/* Loading Spinner */
.fa-spinner,
.fa-spin {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fullscreen-btn {
    position: fixed;
    top: 90px;
    right: 10px;
    z-index: 9999;
    background: none;
    color: red;
    border: 1px;
    padding: 6px 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

.fullscreen-btn:hover {
    background: blue;
    transform: scale(1.05);
}

/* ============================================
   EXAM ACTIVE MODE
   ============================================ */
.exam-active #top-bar-wrap,
.exam-active #top-bar,
.exam-active .top-bar,
.exam-active #site-header,
.exam-active .site-header,
.exam-active header {
    display: none !important;
}

.exam-active footer,
.exam-active #colophon,
.exam-active .site-footer {
    display: none !important;
}

.exam-active .oceanwp-mobile-menu-icon {
    display: none !important;
}

.exam-active html,
.exam-active body,
.exam-active #page,
.exam-active #main,
.exam-active #content,
.exam-active .site-content,
.exam-active .container,
.exam-active .content-area,
.exam-active .wrap {
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
}

.exam-active {
    overflow: hidden;
}

/* ============================================
   MOBILE BREAKPOINT - FIXED SCROLLING
   ============================================ */
@media (max-width: 576px) {
    html {
        font-size: 17px;
    }
    
    .mock-body { 
        padding: 0px;
        font-size: 1.15rem;
        overflow-x: hidden;
    }
    
    .mock-card { 
        padding: 14px; 
        border-radius: 22px;
    }
    
    .mock-header { 
        padding: 20px 14px;
    }
    
    .mock-header h1 { 
        font-size: 2.2rem;
    }
    
    .mock-header p {
        font-size: 1.2rem;
    }
    
    /* CRITICAL FIX - Mobile layout scrolling */
    .mock-layout {
        display: flex;
        flex-direction: column;
        height: auto !important;
        min-height: 100dvh;
        gap: 12px;
    }
    
    .mock-question-section {
        flex-shrink: 0;
        overflow-y: visible;
    }
    
    .mock-navigation-section {
        flex: 0 0 auto;
        max-height: 45vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
    }
    
    .mock-question-text { 
        font-size: 1.45rem;
        line-height: 1.45;
    }
    
    .mock-question-header > div:first-child {
        font-size: 1.05rem;
    }
    
    .mock-timer {
        font-size: 1.05rem;
        padding: 6px 12px;
    }
    
    .mock-navigation-grid { 
        gap: 8px;
        grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
        max-height: 200px;
        overflow-y: auto;
        padding: 5px;
    }
    
    .mock-question-btn { 
        font-size: 1.35rem;
        min-height: 44px;
    }
    
    .mock-option { 
        padding: 12px 12px;
        min-height: 58px;
        margin: 10px 0;
    }
    
    .mock-option-letter { 
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
        margin-right: 12px;
    }
    
    .mock-option span:last-child {
        font-size: 1.05rem;
        line-height: 1.45;
    }
    
    .mock-nav-buttons .mock-btn {
        font-size: 1rem;
        padding: 12px;
    }
    
    .mock-btn {
        font-size: 1.05rem;
        min-height: 48px;
        padding: 12px 16px;
    }
    
    .mock-stat-label {
        font-size: 0.55rem;
    }
    
    .mock-stat-value { 
        font-size: 0.9rem;
    }
    
    .mock-score-circle { 
        width: 120px;
        height: 120px;
    }
    
    .mock-score-main { 
        font-size: 2rem;
    }
    
    .mock-score-total {
        font-size: 1.1rem;
    }
    
    .mock-heading {
        font-size: 1.6rem;
    }
    
    .mock-subheading {
        font-size: 1.2rem;
    }
    
    .mock-text-small {
        font-size: 0.95rem;
    }
    
    .mock-text-large {
        font-size: 1.25rem;
    }
    
    .mock-feature-list { 
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .mock-feature-item {
        font-size: 1rem;
        padding: 12px;
    }
    
    .mock-feature-item span:first-child {
        font-size: 24px;
    }
    
    .mock-legend {
        font-size: 0.85rem;
        gap: 12px;
    }
    
    .mock-time-info {
        font-size: 0.9rem;
    }
    
    .mock-review-question .mock-question-text {
        font-size: 1.15rem;
    }
    
    .mock-review-question .mock-option span:last-child {
        font-size: 0.95rem;
    }
    
    .mock-status-correct,
    .mock-status-incorrect {
        font-size: 1rem;
    }
    
    .negative-badge {
        font-size: 0.85rem;
    }
    
    .mock-modal-content h3 {
        font-size: 1.5rem;
    }
    
    .mock-modal-content p {
        font-size: 1rem;
    }
    
    .fullscreen-btn {
        top: 60px;
        right: 8px;
        padding: 6px 6px;
        font-size: 14px;
    }
}

/* ========== TABLET BREAKPOINT ========== */
@media (min-width: 577px) and (max-width: 768px) {
    .mock-feature-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mock-layout {
        flex-direction: column;
        height: auto;
    }
    
    .mock-question-section,
    .mock-navigation-section {
        max-height: none;
    }
}

/* ========== DESKTOP BREAKPOINT ========== */
@media (min-width: 769px) {
    html {
        font-size: 18px;
    }
    
    .mock-layout { 
        flex-direction: row; 
        gap: 20px;
        height: 90vh;
        min-height: auto;
    }
    
    .mock-question-section { 
        flex: 2;
        overflow-y: auto;
        min-height: 0;
    }
    
    .mock-navigation-section { 
        flex: 1;
        overflow-y: auto;
        min-height: 0;
        max-height: none;
    }
    
    .mock-btn { 
        width: auto;
        font-size: 1.1rem;
    }
    
    .mock-question-text { 
        font-size: 1.45rem;
    }
    
    .mock-option span:last-child {
        font-size: 1.1rem;
    }
    
    .mock-stat-value {
        font-size: 1.2rem;
    }
    
    .mock-stat-label {
        font-size: 0.7rem;
    }
    
    .mock-heading {
        font-size: 1.8rem;
    }
    
    .mock-subheading {
        font-size: 1.3rem;
    }
}

/* ========== LARGE DESKTOP ========== */
@media (min-width: 1200px) {
    .mock-question-text {
        font-size: 1.6rem;
    }
    
    .mock-option span:last-child {
        font-size: 1.15rem;
    }
    
    .mock-navigation-grid {
        grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    }
}

/* Print Styles */
@media print {
    .mock-btn,
    .mock-nav-buttons,
    .mock-action-buttons,
    .mock-legend,
    .mock-navigation-section {
        display: none !important;
    }
    
    .mock-screen {
        display: block !important;
    }
    
    .mock-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Scrollbar Styling */
.mock-question-section::-webkit-scrollbar,
.mock-navigation-section::-webkit-scrollbar {
    width: 8px;
}

.mock-question-section::-webkit-scrollbar-track,
.mock-navigation-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.mock-question-section::-webkit-scrollbar-thumb,
.mock-navigation-section::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.mock-question-section::-webkit-scrollbar-thumb:hover,
.mock-navigation-section::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}