/* General Setup */
body { margin: 0; padding: 0; font-family: Arial, sans-serif; background-color: #f0f0f0; overflow-x: hidden; }
.screen { display: none !important; width: 100vw; height: 100vh; overflow-y: auto; } 
.active-screen { display: block !important; }
* { box-sizing: border-box; } 

/* 1. Login Page Styles */
.background-wrapper { background-color: #0bb3ff; width: 100%; min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 20px; }
.login-card { background-color: white; width: 100%; max-width: 320px; padding: 40px 30px; position: relative; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); text-align: center; border-radius: 5px; }
.headphone-status { position: absolute; top: 20px; right: 20px; border: 2px solid #ccc; padding: 6px 8px; cursor: pointer; display: flex; align-items: center; }
.headphone-status i { font-size: 20px; color: #333; }
.status-indicator { position: absolute; bottom: -5px; right: -5px; font-size: 12px; font-weight: bold; background: white; border-radius: 50%; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 2px rgba(0,0,0,0.3); }
.status-indicator.disconnected { color: red; } .status-indicator.connected { color: blue; }
.logo-container { margin-top: 30px; margin-bottom: 30px; }
.logo-circle { background-color: #0bb3ff; width: 90px; height: 90px; border-radius: 50%; display: flex; justify-content: center; align-items: center; color: white; font-size: 28px; font-weight: bold; margin: 0 auto; position: relative; overflow: hidden; }
.logo-circle::after { content: "\f0c2"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; font-size: 60px; color: white; opacity: 0.25; }
.logo-circle span { z-index: 1; }
.input-group { position: relative; margin-bottom: 15px; width: 100%; }
.input-group i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #888; font-size: 14px; }
.input-group input { width: 100%; padding: 12px 10px 12px 35px; border: 1px solid #ccc; border-radius: 3px; font-size: 14px; outline: none; }
.login-btn { background-color: #0bb3ff; color: white; border: none; width: 100%; padding: 12px; font-size: 18px; cursor: pointer; margin-top: 10px; border-radius: 3px; }
.login-btn:hover { background-color: #099add; }
.footer-text { margin-top: 25px; font-size: 11px; color: #999; }
.footer-text p { margin: 3px 0; }

/* Shared Layouts */
.header-bar { background-color: #4b5a74; color: white; height: 50px; display: flex; justify-content: center; align-items: center; position: relative; padding: 0 15px; }
.header-bar h2 { margin: 0; font-size: 16px; font-weight: normal; }
.headphone-status-header { position: absolute; right: 15px; background-color: white; padding: 4px 8px; border: 1px solid #ccc; cursor: pointer; display: flex; align-items: center; }
.headphone-status-header i { font-size: 20px; color: #333; }
.content-area { display: flex; flex-direction: column; align-items: center; padding: 40px 20px; width: 100%; max-width: 600px; margin: 0 auto; }

/* Brightness & Volume */
#brightness-screen, #volume-screen, #examinee-screen { background-color: white; }
.greyscale-box { width: 100%; max-width: 400px; height: 120px; border: 1px solid #333; margin-bottom: 20px; background: linear-gradient(to right, #000 0%, #000 10%, #1c1c1c 10%, #1c1c1c 20%, #383838 20%, #383838 30%, #555 30%, #555 40%, #717171 40%, #717171 50%, #8d8d8d 50%, #8d8d8d 60%, #aaa 60%, #aaa 70%, #c6c6c6 70%, #c6c6c6 80%, #e2e2e2 80%, #e2e2e2 90%, #fff 90%, #fff 100%); }
.media-player { width: 100%; max-width: 350px; height: 160px; border: 2px solid #333; margin-bottom: 20px; background: linear-gradient(to bottom, #4facfe 0%, #a1c4fd 100%); display: flex; justify-content: center; align-items: center; position: relative; cursor: pointer; overflow: hidden; }
.play-icon { font-size: 60px; color: #2c3e50; background: white; border-radius: 50%; z-index: 2; }
.play-icon:hover { color: #0bb3ff; }
.sound-wave-bg { position: absolute; bottom: 0; width: 100%; height: 25px; background: repeating-linear-gradient(to right, rgba(255,255,255,0.7) 0, rgba(255,255,255,0.7) 3px, transparent 3px, transparent 6px); }
.instruction-text { text-align: center; font-size: 13px; color: #333; line-height: 1.6; margin-bottom: 30px; width: 100%; }
.instruction-text p { margin: 4px 0; }
.highlight-blue { color: #0bb3ff; font-weight: bold; }
.text-red { color: #d32f2f; font-weight: bold; }
.slider-container { display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid #ccc; padding: 15px; width: 100%; max-width: 450px; }
.slider-container i { font-size: 20px; }
.dim-sun { color: #b0b0b0; } .bright-sun { color: #0bb3ff; }
.custom-slider { -webkit-appearance: none; width: 100%; height: 6px; background: #d3d3d3; outline: none; }
.custom-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; background: #0bb3ff; border-radius: 50%; cursor: pointer; }
.bottom-actions { width: 100%; max-width: 450px; display: flex; justify-content: flex-end; margin-top: 20px; }
.next-btn { background-color: #0bb3ff; color: white; border: none; padding: 10px 40px; font-size: 16px; cursor: pointer; border-radius: 3px; }
.bottom-actions-dual { width: 100%; max-width: 450px; display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }
.nav-btn { flex: 1; background-color: #0bb3ff; color: white; border: none; padding: 12px 0; font-size: 16px; cursor: pointer; border-radius: 3px; }
.nav-btn:hover, .next-btn:hover { background-color: #099add; }

/* 4. Examinee Information */
.tutorial-btn { position: absolute; right: 15px; background: transparent; color: white; border: 1px solid white; padding: 4px 15px; font-size: 12px; cursor: pointer; }
.tutorial-btn:hover { background: rgba(255,255,255,0.2); }
.examinee-content { width: 100%; max-width: 500px; padding-top: 20px; }
.center-title { text-align: center; font-size: 16px; font-weight: normal; margin-bottom: 20px; color: #333; }
.profile-row { display: flex; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; justify-content: center;} 
.photo-box { width: 110px; height: 140px; border: 1px solid #777; background: #f5f5f5; display: flex; justify-content: center; align-items: center; }
.photo-box i { font-size: 50px; color: #ccc; }
.info-col { flex: 1; display: flex; flex-direction: column; justify-content: space-between; min-width: 200px; } 
.info-field { margin-bottom: 8px; width: 100%; }
.info-label { font-size: 11px; color: #666; margin-bottom: 3px; }
.info-value { font-size: 14px; color: #000; border-bottom: 1px solid #ccc; padding-bottom: 4px; min-height: 20px; word-break: break-all; }
.split-row { display: flex; gap: 20px; margin-bottom: 30px; width: 100%; flex-wrap: wrap;} 
.split-row .info-field { flex: 1; min-width: 45%; }
#download-section { width: 100%; }
.download-btn { width: 100%; background-color: #f48fb1; color: white; border: none; padding: 12px; font-size: 16px; cursor: pointer; border-radius: 3px; }
.download-btn:hover { background-color: #f0749b; }
.progress-container { display: none; width: 100%; margin-top: 15px; }
.progress-title { text-align: center; font-size: 12px; color: #333; margin-bottom: 8px; }
.progress-track { width: 100%; height: 3px; background-color: #ddd; position: relative; }
.progress-fill { height: 100%; width: 0%; background-color: #0bb3ff; transition: width 0.1s linear; }
.progress-text { text-align: center; font-size: 11px; color: #555; margin-top: 8px; }
.start-exam-btn { display: none; width: 100%; background-color: #0bb3ff; color: white; border: none; padding: 12px; font-size: 16px; cursor: pointer; border-radius: 3px; }
.start-exam-btn:hover { background-color: #099add; }

/* 5 & 6. Exam Dashboard & Question Screen */
#exam-dashboard-screen.active-screen, #question-screen.active-screen { background-color: #f2f2f2; display: flex !important; flex-direction: column; min-height: 100vh; }
.exam-header { background-color: white; display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; border-bottom: 2px solid #ccc; box-shadow: 0 2px 5px rgba(0,0,0,0.05); flex-wrap: wrap; gap: 10px; }
.exam-header-left { display: flex; align-items: center; gap: 10px; }
.exam-avatar { width: 40px; height: 40px; border-radius: 50%; background-color: #e0e0e0; display: flex; justify-content: center; align-items: center; border: 1px solid #aaa; }
.exam-avatar i { font-size: 20px; color: #888; margin-top: 6px; }
.exam-titles { display: flex; flex-direction: column; gap: 3px; }
.exam-test-name { font-size: 13px; color: #333; font-weight: bold;}
.exam-center-name { font-size: 11px; color: #666; }
.exam-header-middle { display: flex; gap: 15px; border-left: 1px solid #eee; border-right: 1px solid #eee; padding: 0 15px; }
.stat-box { display: flex; align-items: center; gap: 8px; color: #777; }
.stat-box small { font-size: 10px; line-height: 1.1; text-align: right; }
.stat-box span { font-size: 22px; font-weight: bold; color: #333; }
.remaining-box span { color: #0bb3ff; }
.exam-header-right { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; justify-content: flex-end; flex: 1;}
.exam-candidate-info { display: flex; gap: 10px; font-size: 13px; font-weight: bold; color: #333; }
.exam-timer-box { border: 2px solid #d32f2f; padding: 5px 10px; font-size: 20px; font-weight: bold; color: #333; display: flex; align-items: center; gap: 8px; background: white;}
.timer-icon { color: #1565c0; font-size: 16px; }

/* Dashboard Grids */
.exam-body-wrapper { display: flex; gap: 20px; padding: 20px 15px; flex: 1; justify-content: center; flex-wrap: wrap; }
.exam-section { background-color: white; flex: 1; min-width: 300px; max-width: 600px; border: 1px solid #dcdcdc; box-shadow: 0 4px 6px rgba(0,0,0,0.05); padding: 15px; display: flex; flex-direction: column; }
.exam-section-title { font-size: 15px; color: #333; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; font-weight: bold;}
.exam-section-title i { color: #1976d2; }
.question-grid { display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(4, 1fr); border-top: 1px solid #ccc; border-left: 1px solid #ccc; flex: 1; min-height: 250px; }
.grid-cell { display: flex; justify-content: center; align-items: center; font-size: 20px; color: #333; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; background-color: white; cursor: pointer; transition: 0.2s; }
.grid-cell:hover { background-color: #f9f9f9; }
.grid-cell.answered { background-color: #3b5998; color: white; }
.grid-cell.answered:hover { background-color: #304a80; }
.exam-footer { background-color: white; padding: 10px 15px; border-top: 1px solid #ccc; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.exam-warning-text { font-size: 11px; color: #555; line-height: 1.4; flex: 1; min-width: 200px;}
.submit-exam-btn { border: 2px solid #d32f2f; background-color: #f2f2f2; color: #333; padding: 6px 20px; font-size: 14px; font-weight: bold; cursor: pointer; text-align: center; border-radius: 3px; }
.submit-exam-btn small { font-size: 11px; display: block; color: #666; margin-top: 2px;}
.submit-exam-btn:hover { background-color: #e0e0e0; }

/* Question View Content */
.question-view-body { display: flex; flex: 1; flex-wrap: wrap; }
.question-left-pane { flex: 1.2; min-width: 320px; background: white; border-right: 1px solid #ddd; padding: 30px; display: flex; flex-direction: column; }
.q-title-box { border: 1px solid #aaa; padding: 12px; font-size: 15px; color: #333; margin-bottom: 20px; }
.q-number-text { font-size: 18px; color: #333; margin-bottom: 20px; }
.q-image-container { align-self: center; text-align: center; cursor: pointer; }
.q-dummy-img { font-size: 140px; color: #000; margin-bottom: 20px; transition: 0.2s;}
.q-dummy-img:hover { transform: scale(1.05); }
.q-image-caption { font-size: 13px; color: #555; }
.question-right-pane { flex: 1; min-width: 300px; background: #fff; padding: 30px; display: flex; flex-direction: column; gap: 10px; }
.answer-option { display: flex; align-items: center; gap: 15px; padding: 15px 20px; border: 1px solid #e0e0e0; border-bottom: 1px solid #ccc; cursor: pointer; transition: 0.2s; }
.answer-option:hover { background-color: #f9f9f9; }
.answer-option.selected { background-color: #d0e8f2; border-color: #a0cce0; }
.opt-circle { width: 35px; height: 35px; border-radius: 50%; border: 1px solid #999; display: flex; justify-content: center; align-items: center; font-size: 16px; color: #555; background: white; flex-shrink: 0; }
.answer-option.selected .opt-circle { border-color: #1976d2; color: #1976d2; font-weight: bold; }
.opt-text { font-size: 16px; color: #333; flex: 1; }
.question-footer-nav { background-color: white; padding: 10px 20px; border-top: 1px solid #ccc; display: flex; justify-content: space-between; align-items: center; }
.nav-arrow-btn, .nav-grid-btn { background: white; border: 2px solid #d32f2f; color: #333; padding: 8px 20px; font-size: 15px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.nav-grid-btn { border-color: #ccc; color: #555; }
.nav-arrow-btn:hover, .nav-grid-btn:hover { background: #f0f0f0; }

/* Zoom Modal */
.zoom-modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.8); z-index: 10000; display: none; justify-content: center; align-items: center; padding: 20px; }
.zoom-modal-content { background: white; width: 100%; max-width: 500px; border-radius: 4px; overflow: hidden; }
.zoom-modal-header { background: #3b5998; color: white; padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: bold; }
.close-zoom { cursor: pointer; font-size: 20px; }
.zoom-modal-body { padding: 60px 20px; text-align: center; position: relative; }
.zoom-dummy-img { font-size: 200px; color: #000; }
.hand-pointer { position: absolute; font-size: 80px; color: #aaa; opacity: 0.8; right: 30%; bottom: 20%; transform: rotate(-20deg); }

/* Audio Box Styles */
.q-audio-container { display: flex; justify-content: center; align-items: center; margin-top: 20px; }
.audio-btn-box { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; border: 2px solid #ccc; border-radius: 8px; padding: 10px 15px; background: white; cursor: pointer; width: 70px; height: 70px; gap: 8px; transition: 0.2s; }
.audio-btn-box:hover { border-color: #0bb3ff; }
.audio-btn-box i.fa-headphones { font-size: 22px; color: #333; }
.audio-btn-box i.fa-play, .audio-btn-box i.fa-pause, .audio-btn-box i.fa-spinner { font-size: 18px; color: #0bb3ff; }
.audio-btn-box.disabled { opacity: 0.5; cursor: not-allowed; border-color: #ccc !important; }
.audio-btn-box.disabled i.fa-play { color: #999; }

/* Instructions Screen */
.instruction-content { max-width: 700px; text-align: left; align-items: flex-start; padding: 40px 20px; }
.info-text-box { background: white; padding: 30px; border: 1px solid #ccc; border-radius: 5px; width: 100%; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.info-text-box p { font-size: 16px; color: #333; line-height: 1.6; font-weight: bold; margin-bottom: 10px; }
.info-text-box ul { margin-top: 10px; padding-left: 20px; }
.info-text-box li { font-size: 15px; color: #444; line-height: 1.8; margin-bottom: 10px; }
.bottom-actions-right { width: 100%; display: flex; justify-content: flex-end; margin-top: 30px; }
.next-action-btn { background-color: #0bb3ff; color: white; border: none; padding: 12px 40px; font-size: 16px; cursor: pointer; border-radius: 3px; }

/* Color Vision Test Screen */
#color-test-screen.active-screen { display: flex !important; flex-direction: column; height: 100vh; background-color: white; }
.color-test-body { display: flex; flex: 1; height: calc(100vh - 50px); flex-wrap: wrap; }
.color-test-left { flex: 1.2; display: flex; flex-direction: column; justify-content: center; align-items: center; background: #fff; padding: 20px; border-right: 1px solid #ddd; }
.color-img-box { width: 100%; max-width: 450px; aspect-ratio: 1; display: flex; justify-content: center; align-items: center; }
.color-img-box img { width: 100%; height: auto; border-radius: 50%; border: 1px solid #ddd; }
.color-q-counter { margin-top: 20px; color: #777; font-size: 18px; }
.color-test-right { flex: 1; min-width: 350px; padding: 20px; display: flex; flex-direction: column; background: #fafafa; }
.color-candidate-header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; border-bottom: 2px solid #ddd; padding-bottom: 15px; }
.color-avatar-box { width: 60px; height: 60px; background: #eee; border: 1px solid #ccc; border-radius: 5px; }
.color-avatar-box img { width: 100%; }
.color-id-blue { color: #0bb3ff; font-weight: bold; font-size: 14px; }
.color-dob-small { color: #777; font-size: 12px; margin-bottom: 2px; }
.color-name-bold { font-weight: bold; font-size: 18px; color: #333; }
.color-timer-panel { background: white; border: 1px solid #ccc; border-radius: 5px; margin-bottom: 20px; padding: 10px; text-align: center; }
.color-timer-val { font-size: 32px; font-weight: bold; color: #333; border-bottom: 1px solid #eee; padding-bottom: 5px; margin-bottom: 10px; }
.color-input-display { font-size: 28px; height: 40px; font-weight: bold; color: #0bb3ff; }
.color-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; flex: 1; max-height: 300px; margin-bottom: 20px; }
.key { background: white; border: 1px solid #ddd; display: flex; justify-content: center; align-items: center; font-size: 20px; cursor: pointer; transition: 0.1s; border-radius: 3px; }
.key:hover { background: #f0f0f0; }
.key:active { background: #e0e0e0; }
.clear-key { color: #ff5722; font-weight: bold; }
.empty-key { border: none; cursor: default; pointer-events: none; background: transparent; }
.color-test-footer-btns { display: flex; gap: 10px; height: 50px; }
.skip-btn { flex: 1; background: #ff8f00; color: white; border: none; font-size: 18px; font-weight: bold; cursor: pointer; border-radius: 3px; }
.ok-btn { flex: 1.5; background: #0bb3ff; color: white; border: none; font-size: 18px; font-weight: bold; cursor: pointer; border-radius: 3px; }
.skip-btn:hover { background: #e67e00; }
.ok-btn:hover { background: #099add; }

/* 10. Results Screen */
#results-screen { background-color: #f7f9fb; }
.results-content { max-width: 700px; text-align: center; padding-top: 50px; }
.res-title { color: #333; margin-bottom: 30px; font-size: 24px; }
.res-candidate-info { display: flex; justify-content: center; flex-wrap: wrap; gap: 30px; margin-bottom: 40px; background: #fff; padding: 20px; border: 1px solid #ccc; border-radius: 5px;}
.score-cards-container { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; width: 100%; }
.score-card { background: white; border: 1px solid #ddd; border-radius: 8px; padding: 30px 20px; flex: 1; min-width: 200px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.score-card.total-card { background: #e3f2fd; border-color: #90caf9; }
.sc-title { font-size: 16px; color: #555; margin-bottom: 15px; font-weight: bold; }
.sc-value { font-size: 36px; font-weight: bold; color: #0bb3ff; }
.score-card.total-card .sc-value { color: #d32f2f; }
.sc-value small { font-size: 16px; color: #888; }
.bottom-actions-center { width: 100%; display: flex; justify-content: center; margin-top: 40px; }
.finish-btn { background-color: #0bb3ff; color: white; border: none; padding: 12px 50px; font-size: 18px; cursor: pointer; border-radius: 3px; font-weight: bold;}
.finish-btn:hover { background-color: #099add; }
#brightness-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: black; opacity: 0; pointer-events: none; z-index: 9999; display: none; }

@media (max-width: 480px) {
    .exam-header-middle { display: none; } 
    .exam-candidate-info { flex-direction: column; gap: 2px; align-items: flex-end;}
    .exam-timer-box { font-size: 16px; padding: 4px 8px; }
    .grid-cell { font-size: 16px; }
    .exam-footer { flex-direction: column; align-items: center; text-align: center; }
    .submit-exam-btn { width: 100%; }
    .question-left-pane, .question-right-pane { padding: 15px; }
    .instruction-content { padding: 20px 15px; }
    .info-text-box { padding: 20px; }
    .color-test-left { border-right: none; border-bottom: 1px solid #ddd; }
    .score-card { min-width: 100%; }
}
/* --- අලුත් වෙනස්කම් (DO NOT REMOVE) --- */

/* 1. පිළිතුරු වල පින්තූර ලොකු කිරීම සහ ෆෝන් එකට ගැලපෙන සේ සෑදීම */
.answer-label img, .option-img, .answers-container img {
    width: 200px !important; /* පින්තූරය කලින්ට වඩා ලොකු කර ඇත (ඔබට අවශ්‍ය නම් 200px වෙනස් කළ හැක) */
    max-width: 100% !important; /* ෆෝන් එකේ තිරයෙන් එළියට නොයෑමට */
    height: auto !important;
    border-radius: 8px;
    object-fit: contain;
    display: inline-block;
    margin: 10px 0;
}

/* 2. පින්තූරය විශාල කළ විට එන අතේ සලකුණ (Hand Icon / Zoom indicator) මකා දැමීම */
.modal-body::after,
.modal-body::before,
.image-modal-content::after,
.image-modal-content::before,
.zoom-indicator,
.hand-icon {
    display: none !important;
    background-image: none !important;
    content: none !important;
}

/* පින්තූරය උඩට ගිය විට මූසිකයේ ඊතලය සාමාන්‍ය ලෙස තබා ගැනීම */
.modal-body img,
.image-modal-content img {
    cursor: default !important; 
}
/* --- අලුත් වෙනස්කම් අවසන් --- */