@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600&display=swap');

/* =========================================
   ELEGANT EXAM THEME - CBT CLEAN WHITE
   Base: Dark Dashboard
   Cards: Clean White (Anti-Theme Override)
   File Version: 1.0.70 (Ultimate Print + Fix Score UI)
   ========================================= */

.elegantexam-container * {
    box-sizing: border-box !important;
    margin: 0;
    padding: 0;
    font-family: inherit;
}

.elegantexam-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.5rem; 
    /* DASHBOARD BACKGROUND (Tetap gelap agar elegan, tapi Card di dalamnya putih) */
    background: #18181b; 
    border-radius: 20px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
    position: relative;
    padding-bottom: 120px; 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255,255,255,0.1);
    color: #f4f4f5; 
    transition: background 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
    
    /* SECURITY ANTI-CHEAT */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* KETIKA KUIS SELESAI: Hilangkan background hitam pembungkus luar */
.elegantexam-container.quiz-finished {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding-bottom: 2rem !important; /* Kurangi padding bawah karena tombol navigasi hilang */
}

/* Mengizinkan user mengetik pada input box */
.elegantexam-container input,
.elegantexam-container textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

@media (min-width: 640px) { .elegantexam-container { padding: 1rem; } }
@media (min-width: 768px) { .elegantexam-container { padding: 1.5rem; max-width: 960px; border-radius: 24px; } }
@media (min-width: 1024px) { .elegantexam-container { padding: 2rem; max-width: 1140px; } }
@media (min-width: 1280px) { .elegantexam-container { max-width: 1280px; } }

/* ====================== ANIMASI DAN EFEK ====================== */
@keyframes elegantShake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    50% { transform: translateX(8px); }
    75% { transform: translateX(-8px); }
    100% { transform: translateX(0); }
}

.shake-effect {
    animation: elegantShake 0.4s cubic-bezier(.36,.07,.19,.97) both;
    border-color: #EF4444 !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3) !important;
    background-color: #fff5f5 !important;
}

@keyframes popStar { 0% { transform: scale(0); opacity: 0; } 50% { transform: scale(1.3); } 100% { transform: scale(1); opacity: 1; } }
@keyframes ee-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ee-scale-up { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ====================== HEADER ====================== */
.elegantexam-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (min-width: 768px) { .elegantexam-header { margin-bottom: 1.25rem; padding-bottom: 1rem; } }
.elegantexam-header-top { display: flex; justify-content: space-between; width: 100%; align-items: center; }
.elegantexam-title { font-size: 1.1rem; font-weight: 700; color: #f59e0b; line-height: 1.3; }
@media (min-width: 768px) { .elegantexam-title { font-size: 1.5rem; line-height: 1.5; } }
#elegantexam-question-number { font-size: 1rem; color: #f4f4f5; font-weight: 500; line-height: 1.5; white-space: nowrap; }
@media (min-width: 768px) { #elegantexam-question-number { font-size: 1.125rem; } }
#elegantexam-timer {
    font-size: 0.8rem; font-weight: 500; color: #f4f4f5; background-color: rgba(255,255,255,0.1);
    padding: 0.4rem 0.75rem; border-radius: 6px; line-height: 1.5; align-self: center; z-index: 1000; border: 1px solid rgba(255,255,255,0.2);
}
@media (min-width: 768px) { #elegantexam-timer { font-size: 1rem; padding: 0.5rem 1rem; } }

.elegantexam-content { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 768px) { .elegantexam-content { gap: 1.25rem; } }

/* ====================== NAVIGASI NOMOR SOAL ====================== */
.elegantexam-nav-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(2rem, 1fr)); gap: 0.5rem; padding: 0.75rem;
    background-color: #27272a; border-radius: 12px; margin-bottom: 1rem; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2); border: 1px solid rgba(255,255,255,0.05);
}
@media (min-width: 768px) { .elegantexam-nav-grid { grid-template-columns: repeat(auto-fill, minmax(2.25rem, 1fr)); gap: 0.75rem; padding: 1rem; border-radius: 16px; } }

.elegantexam-nav-box {
    width: 100%; background-color: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    display: flex; justify-content: center; align-items: center; cursor: pointer; border-radius: 6px;
    font-size: 0.8rem; font-weight: 600; color: #f4f4f5; transition: all 0.3s ease; aspect-ratio: 1 / 1;
}
@media (min-width: 768px) { .elegantexam-nav-box { font-size: 1rem; } }
.elegantexam-nav-box.active { background-color: #f59e0b; color: #FFFFFF; border-color: #f59e0b; box-shadow: 0 0 10px rgba(245, 158, 11, 0.5); }
.elegantexam-nav-box.answered { background-color: #4F46E5; color: #FFFFFF; border-color: #4F46E5; }
.elegantexam-nav-box.nav-correct { background-color: #10B981 !important; border-color: #10B981 !important; color: #FFFFFF !important; }
.elegantexam-nav-box.nav-incorrect { background-color: #EF4444 !important; border-color: #EF4444 !important; color: #FFFFFF !important; }
.elegantexam-nav-box.marked { border: 2px solid #F59E0B; background-color: rgba(245, 158, 11, 0.2); color: #F59E0B; }

/* ==========================================================
   KARTU PERTANYAAN & OPSI - PAKSAAN BACKGROUND PUTIH ABSOLUT
   ========================================================== */
.elegantexam-question-container {
    width: 100%;
    background-color: #ffffff !important; 
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow-x: auto;
    word-break: break-word;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important; 
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important; 
}
@media (min-width: 768px) { .elegantexam-question-container { padding: 2rem; border-radius: 16px; margin-bottom: 1.25rem; } }

.elegantexam-question-text {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #0f172a !important; 
    line-height: 1.7;
    word-break: break-word;
    overflow-wrap: break-word;
    font-weight: 500;
}
@media (min-width: 768px) { .elegantexam-question-text { font-size: 1.2rem; margin-bottom: 2rem; } }

.elegantexam-question-image { max-width: 100%; height: auto; margin: 1rem auto; border-radius: 8px; object-fit: contain; display: block; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.elegantexam-options { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid #e2e8f0 !important; position: relative; }

/* OPSI JAWABAN (WHITE MODE) */
.elegantexam-option {
    display: flex; align-items: center; justify-content: flex-start; gap: 0.75rem;
    margin-bottom: 0.75rem; padding: 1rem;
    background-color: #ffffff !important; 
    border: 2px solid #e2e8f0 !important; 
    border-radius: 12px; transition: all 0.2s ease; cursor: pointer;
    font-size: 1rem; line-height: 1.5; position: relative;
    color: #1e293b !important; 
    box-shadow: none;
}
@media (min-width: 768px) { .elegantexam-option { padding: 1.25rem; font-size: 1.05rem; gap: 1rem; } }

.elegantexam-option:hover { background-color: #f8fafc !important; border-color: #cbd5e1 !important; transform: translateX(4px); }
.elegantexam-option.selected { background-color: #eef2ff !important; border-color: #4f46e5 !important; box-shadow: 0 0 0 1px #4f46e5 !important; }
.elegantexam-option.correct-highlight { background-color: #ecfdf5 !important; border-color: #10b981 !important; box-shadow: 0 0 0 1px #10b981 !important;}
.elegantexam-option.checked-green { background-color: #ecfdf5 !important; border-color: #10b981 !important; }
.elegantexam-option.option-disabled { opacity: 0.7; cursor: not-allowed; }

.elegantexam-option .option-circle {
    width: 2rem; height: 2rem; min-width: 2rem; min-height: 2rem;
    background-color: #f1f5f9 !important; border: 2px solid #cbd5e1 !important;
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-weight: 700; font-size: 1rem; color: #475569 !important; transition: all 0.2s ease; flex-shrink: 0;
}
.elegantexam-option.selected .option-circle { background-color: #4f46e5 !important; border-color: #4f46e5 !important; color: #ffffff !important; }
.elegantexam-option.correct-highlight .option-circle { background-color: #10B981 !important; border-color: #10B981 !important; color: #ffffff !important; }

.elegantexam-option .text { flex: 1; text-align: left; word-break: break-word; font-weight: 500; color: #1e293b !important; }
.elegantexam-option .elegantexam-icon { width: 24px; height: 24px; display: flex; justify-content: center; align-items: center; font-weight: bold; font-size: 1.2rem; flex-shrink: 0; margin-left: auto; }
.elegantexam-icon.correct-icon::after { content: '✓'; color: #10B981; }
.elegantexam-icon.incorrect-icon::after { content: '✗'; color: #EF4444; }

/* Checkbox Style for Multiple Choice */
.elegantexam-option.multiple-choice { display: flex; align-items: center; justify-content: flex-start; gap: 1rem; padding: 1rem; }
.elegantexam-option.multiple-choice input[type="checkbox"] {
    width: 1.8rem; height: 1.8rem; min-width: 1.8rem; min-height: 1.8rem;
    border: 2px solid #cbd5e1 !important; border-radius: 6px; background-color: #f1f5f9 !important;
    appearance: none; -webkit-appearance: none; -moz-appearance: none; position: relative; cursor: pointer; transition: all 0.2s ease; flex-shrink: 0;
}
.elegantexam-option.multiple-choice input[type="checkbox"]:checked { background-color: #4f46e5 !important; border-color: #4f46e5 !important; }
.elegantexam-option.multiple-choice input[type="checkbox"]:checked::after {
    content: '✓'; color: #FFFFFF; font-weight: bold; font-size: 1.1rem; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); line-height: 1;
}

/* ====================== INPUT FIELD (WHITE MODE) ====================== */
.elegantexam-free-text-container, .elegantexam-multi-free-text-input-container { position: relative; display: flex; align-items: center; width: 100%; margin-bottom: 1rem; gap: 0.75rem; }
.elegantexam-free-text, .elegantexam-multi-free-text-input {
    flex: 1; min-height: 48px; padding: 0.75rem 1rem; border: 2px solid #cbd5e1 !important;
    background: #ffffff !important; border-radius: 8px; font-size: 1rem; font-weight: 600;
    color: #1e293b !important; transition: border-color 0.3s ease, box-shadow 0.3s ease; text-align: center;
}
.elegantexam-free-text:disabled, .elegantexam-multi-free-text-input:disabled { background-color: #f1f5f9 !important; color: #64748b !important; }
.elegantexam-free-text:focus, .elegantexam-multi-free-text-input:focus { border-color: #4f46e5 !important; outline: none; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important; }

/* ====================== MATRIX / TABLE STYLES (WHITE MODE) ====================== */
.elegantexam-question-container .elegantexam-matrix-container, .detail-question-card .elegantexam-matrix-container {
    overflow-x: auto; margin: 1rem 0; width: 100%; background: #ffffff !important; border-radius: 12px; box-shadow: none; border: 2px solid #e2e8f0 !important;
}
.elegantexam-matrix-table, .elegantexam-question-container .elegantexam-matrix-table, .detail-question-card .elegantexam-matrix-table {
    width: 100%; min-width: 600px; table-layout: auto; border-collapse: collapse; margin: 0;
}
.elegantexam-matrix-table th, .elegantexam-question-container .elegantexam-matrix-table th {
    background-color: #f8fafc !important; color: #0f172a !important; font-weight: 800; padding: 14px 12px; border-bottom: 2px solid #e2e8f0 !important; border-right: 1px solid #e2e8f0 !important; font-size: 0.95rem; text-align: center; vertical-align: middle; text-transform: uppercase;
}
.elegantexam-matrix-table td, .elegantexam-question-container .elegantexam-matrix-table td {
    padding: 12px; border-bottom: 1px solid #e2e8f0 !important; border-right: 1px solid #e2e8f0 !important; vertical-align: middle; text-align: center; color: #1e293b !important; font-size: 0.95rem; background-color: #ffffff !important;
}
.elegantexam-matrix-table td:first-child { text-align: left; font-weight: 600; width: 50%; }

.elegantexam-matrix-radio-wrapper { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 30px; position: relative; }
.elegantexam-matrix-radio {
    appearance: none; -webkit-appearance: none; -moz-appearance: none; width: 1.5rem; height: 1.5rem;
    border: 2px solid #cbd5e1 !important; border-radius: 50%; background-color: #f1f5f9 !important; cursor: pointer; transition: all 0.2s ease; flex-shrink: 0;
}
.elegantexam-matrix-radio:checked { background-color: #4f46e5 !important; border-color: #4f46e5 !important; }
.elegantexam-matrix-radio:checked::after { content: ''; position: absolute; width: 0.6rem; height: 0.6rem; background-color: #fff; border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* ====================== TOMBOL NAVIGASI STICKY ====================== */
.elegantexam-button-container {
    position: fixed !important; bottom: 20px !important; left: 50% !important; transform: translateX(-50%) !important;
    width: 100%; max-width: 1280px; background: transparent; padding: 0.75rem 0.5rem; display: flex; justify-content: center; gap: 1rem; z-index: 2147483660 !important; pointer-events: auto !important; box-shadow: none;
}
.elegantexam-button {
    min-width: 140px; height: 54px; padding: 0 1.5rem; color: #FFFFFF; border: none; border-radius: 50px; 
    cursor: pointer; font-size: 1.1rem; font-weight: 700; text-align: center; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4); display: inline-flex; align-items: center; justify-content: center; line-height: 1; letter-spacing: 0.5px;
}
.elegantexam-button#elegantexam-start { background-color: #10B981; }
.elegantexam-button#elegantexam-prev { background-color: #3b82f6; }
.elegantexam-button#elegantexam-review { background-color: #475569; color: #fff; }
.elegantexam-button#elegantexam-review.marked { background-color: #F59E0B; color: #FFFFFF; }
.elegantexam-button#elegantexam-next { background-color: #3b82f6; }
.elegantexam-button#elegantexam-skip { background-color: #F59E0B; }
.elegantexam-button#elegantexam-check { background-color: #14B8A6; }
.elegantexam-button#elegantexam-submit { background-color: #10B981; }
.elegantexam-button#elegantexam-view-explanation { background-color: #64748B; }
.elegantexam-button:disabled { background-color: #52525b !important; cursor: not-allowed; box-shadow: none; opacity: 0.5; transform: none !important; }
.elegantexam-button:hover:not(:disabled) { transform: translateY(-4px); box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.5); filter: brightness(1.1); }

/* ====================== TAMPILAN HASIL GAME (DI PERBAIKI) ====================== */
.elegantexam-results-container { padding: 1rem; text-align: center; background: transparent !important; }
.elegantexam-game-result-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%); border-radius: 20px; padding: 3rem 2rem; text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15); max-width: 600px; margin: 1rem auto 2rem auto; position: relative; overflow: hidden;
    border: 1px solid #e2e8f0; color: #1e293b; 
}
.elegantexam-game-stars { font-size: 4rem; margin-bottom: 1.5rem; display: flex; justify-content: center; gap: 1rem; }
.elegantexam-star { color: #cbd5e1; transition: color 0.5s ease, transform 0.3s ease; }
.elegantexam-star.active { color: #FFD700; text-shadow: 0 0 15px rgba(255, 215, 0, 0.5); animation: popStar 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }

/* LINGKARAN SKOR RAPI DAN PRESISI */
.elegantexam-score-circle {
    width: 160px; 
    height: 160px; 
    border-radius: 50%; 
    background: #10B981; 
    color: white; 
    display: flex; 
    flex-direction: column; /* Tumpuk Vertikal */
    align-items: center; 
    justify-content: center;
    margin: 0 auto 1.5rem auto; 
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4); 
    border: 6px solid #ffffff; 
    position: relative; 
    z-index: 2;
}

/* Membungkus angka dan persen agar lurus pada garis dasarnya */
.elegantexam-score-wrapper {
    display: flex;
    align-items: baseline;
    justify-content: center;
    line-height: 1;
}

.elegantexam-score-circle .score-animate {
    font-size: 4.5rem; /* Angka lebih besar */
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.elegantexam-score-percent {
    font-size: 2rem; /* Persen lebih kecil di samping */
    font-weight: 700;
    margin-left: 2px;
    opacity: 0.9;
}

/* Tulisan "SKOR" tidak menumpuk lagi */
.elegantexam-score-label {
    font-size: 1rem; 
    font-weight: 800;
    text-transform: uppercase; 
    opacity: 0.95; 
    margin-top: 5px; /* Spasi setelah angka */
    letter-spacing: 2px;
    position: static; /* Mengubah absolute menjadi static agar flexbox bekerja sempurna */
}

.elegantexam-game-title { font-size: 1.75rem; color: #0f172a; margin-bottom: 0.5rem; font-weight: 900; }
.elegantexam-game-message { font-size: 1.1rem; color: #64748b; margin-bottom: 2rem; font-weight: 500; }

.elegantexam-action-buttons { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.elegantexam-btn-game { padding: 0.8rem 1.5rem; border-radius: 50px; border: none; font-weight: 700; font-size: 1rem; cursor: pointer; transition: all 0.3s ease; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-width: 140px; }
.elegantexam-btn-game:hover { transform: translateY(-3px); }
.btn-retake { background: #3b82f6; color: white; box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3); }
.btn-review { background: #F59E0B; color: white; box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3); }

/* ====================== LUXURIOUS POPUP STYLES (WHITE MODE FORCED) ====================== */
.elegantexam-popup-overlay, .elegantexam-review-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(8px);
    z-index: 200000 !important; display: flex; align-items: center; justify-content: center; opacity: 0; animation: ee-fade-in 0.3s forwards;
}
.elegantexam-popup, .elegantexam-review-modal {
    background: #ffffff !important; width: 90%; max-width: 900px; max-height: 90vh; border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; position: relative; overflow: hidden;
    transform: scale(0.95); animation: ee-scale-up 0.3s 0.1s forwards cubic-bezier(0.16, 1, 0.3, 1); color: #1e293b !important; border: 1px solid #e2e8f0 !important;
}
.elegantexam-popup-close, .elegantexam-review-close {
    position: absolute; top: 15px; right: 15px; width: 36px; height: 36px; border: none; background: #f1f5f9 !important;
    color: #64748b !important; font-size: 24px; line-height: 1; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; z-index: 100;
}
.elegantexam-popup-close:hover, .elegantexam-review-close:hover { background: #e2e8f0 !important; color: #ef4444 !important; }

.elegantexam-review-header { padding: 20px; border-bottom: 1px solid #e2e8f0 !important; background: #ffffff !important; display: flex; justify-content: space-between; align-items: center; color: #0f172a !important; }
.elegantexam-review-header h3 { color: #0f172a !important; font-weight: 800; margin: 0; }
.elegantexam-review-body { flex: 1; overflow-y: auto; padding: 20px; background: #f8fafc !important; }
.elegantexam-popup-content-wrapper { width: 100%; height: 100%; overflow-y: auto; display: flex; flex-direction: column; background: #ffffff !important; color: #1e293b !important; }

/* Modern Scrollbar */
.elegantexam-popup-content-wrapper::-webkit-scrollbar, .detail-questions::-webkit-scrollbar, .elegantexam-review-body::-webkit-scrollbar { width: 8px; }
.elegantexam-popup-content-wrapper::-webkit-scrollbar-track, .detail-questions::-webkit-scrollbar-track, .elegantexam-review-body::-webkit-scrollbar-track { background: #f1f5f9; }
.elegantexam-popup-content-wrapper::-webkit-scrollbar-thumb, .detail-questions::-webkit-scrollbar-thumb, .elegantexam-review-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* ====================== HISTORY & RESULT DETAIL STYLES ====================== */
.detail-questions { padding: 2rem; background: #f8fafc !important; overflow-y: auto; }
.detail-question-card {
    background: #ffffff !important; border-radius: 12px; padding: 1.5rem; box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-bottom: 1.5rem;
    border-left: 5px solid #cbd5e1; color: #1e293b !important; position: relative; border: 1px solid #e2e8f0 !important;
}
.detail-question-card.correct { border-left-color: #10B981 !important; }
.detail-question-card.incorrect { border-left-color: #EF4444 !important; }
.question-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; border-bottom: 1px solid #e2e8f0 !important; padding-bottom: 0.8rem; }
.question-number { font-weight: 700; color: #64748b !important; font-size: 0.9rem; }
.score-badge { padding: 4px 12px; border-radius: 99px; font-size: 0.85rem; font-weight: 700; }
.score-badge.success { background: #d1fae5 !important; color: #065f46 !important; }
.score-badge.danger { background: #fee2e2 !important; color: #991b1b !important; }
.explanation-wrapper { text-align: center; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px dashed #cbd5e1 !important; }

.elegantexam-detailed-results { display: none; }

/* ====================================================================
   ULTIMATE PREMIUM PRINT ENGINE
   ==================================================================== */
#elegantexam-print-area { display: none; }

@media print {
    @page { size: A4 portrait; margin: 15mm 15mm; } 
    
    * { 
        -webkit-print-color-adjust: exact !important; 
        print-color-adjust: exact !important; 
        box-shadow: none !important; 
    }
    
    body, html { 
        background: #fff !important; 
        color: #000 !important; 
        margin: 0; padding: 0; 
        font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
        
        /* --- PERBAIKAN UNTUK MEMBUKA HALAMAN YANG TERBATASI OLEH THEME --- */
        height: auto !important;
        min-height: 100% !important;
        overflow: visible !important;
        position: static !important;
    }
    
    body > *:not(#elegantexam-print-area) { display: none !important; }
    #elegantexam-print-area { display: block !important; width: 100%; position: relative; color: #000 !important; }
    
    #elegantexam-print-area::before {
        content: "BENANG LURUS.ID"; white-space: pre;
        position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-45deg);
        font-size: 45pt; font-weight: 800; line-height: 1.1; color: rgba(148, 163, 184, 0.12); 
        text-align: center; letter-spacing: 0.15em; z-index: 9999; pointer-events: none; 
    }
    #elegantexam-print-area::after {
        content: "SECURE DOC // CBT BENANGLURUS.ID // HAK CIPTA DILINDUNGI";
        position: fixed; top: 50%; left: 10px; transform: translateY(-50%) rotate(-90deg);
        font-size: 9pt; font-weight: 700; color: rgba(148, 163, 184, 0.3); letter-spacing: 4px;
        z-index: -1; pointer-events: none; white-space: nowrap;
    }

    table.elegantexam-print-engine-table, table.print-engine-table { width: 100%; border-collapse: collapse; border: none; }
    thead.elegantexam-print-space-top, thead.print-space-top { height: 110px; } 
    tfoot.elegantexam-print-space-bottom, tfoot.print-space-bottom { height: 80px; } 

    .elegantexam-fixed-page-header, .fixed-page-header { 
        position: fixed; top: 0; left: 0; width: 100%; padding-top: 10px; padding-bottom: 20px; 
        display: flex; justify-content: space-between; align-items: center; background: white; z-index: 1000;
    }
    .elegantexam-fixed-page-header::after, .fixed-page-header::after {
        content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background: linear-gradient(90deg, #1e1b4b 0%, #4f46e5 40%, #e2e8f0 100%); border-radius: 2px;
    }
    .elegantexam-header-left, .header-left { display: flex; align-items: center; gap: 14px; }
    .elegantexam-header-logo-img, .header-logo-img { width: 35px; height: 35px; object-fit: contain; border-radius: 0 !important; background: transparent; }
    .elegantexam-header-text-group, .header-text-group { display: flex; flex-direction: column; justify-content: center; }
    .elegantexam-header-title, .header-title { font-weight: 900; font-size: 14pt; color: #1e1b4b; line-height: 1.1; letter-spacing: -0.5px; }
    .elegantexam-header-subtitle, .header-subtitle { font-size: 7.5pt; color: #4f46e5; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; margin-top: 3px; }
    .elegantexam-header-right, .header-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
    .elegantexam-meta-date, .meta-date { font-size: 8pt; color: #1e293b; font-weight: 700; background: #f8fafc; padding: 4px 12px; border-radius: 6px; border: 1px solid #cbd5e1; }
    .elegantexam-meta-doc-id, .meta-doc-id { font-size: 6.5pt; color: #64748b; font-family: monospace; font-weight: 700; letter-spacing: 1px; }

    .elegantexam-fixed-page-footer, .fixed-page-footer { 
        position: fixed; bottom: 0; left: 0; width: 100%; border-top: 2px solid #e2e8f0; padding-top: 12px; padding-bottom: 15px; 
        display: flex; justify-content: space-between; align-items: center; font-size: 8pt; background: white; z-index: 1000;
    }
    .elegantexam-footer-left, .footer-left { font-weight: 700; color: #1e1b4b; }
    .elegantexam-footer-right, .footer-right { font-weight: 600; color: #64748b; font-style: italic; }

    .elegantexam-print-q, .question-item { 
        width: 100%; box-sizing: border-box;
    }

    a { text-decoration: none; color: inherit; }
}