/*
    =====================================================
    |   UPDATED: 'Exam' Page CSS (Full Light Theme)     |
    =====================================================
*/

/* --- General Layout and Project Wrapper --- */
.project-wrapper {
    width: 100%;
    max-width: 950px; 
    margin: 0 auto;
}

/* --- NEW: Main Container Styles --- */
#exam-section {
    background-color: #FFFFFF;  /* White background */ 
    border: 1px solid #E5E7EB; /* Light gray border */
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#article-section {
    margin-top: 2rem;
    background-color: #FFFFFF;  /* White background */ 
    
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* --- UPDATED: Text Area Container --- */
.text-area {
    background-color: #FFFFFF; /* White background */
    border: 1px solid #E5E7EB; /* Light border */
    font-size: 12px; 
    line-height: 1.8; 
    height: 250px;
    overflow-y: hidden; 
    position: relative; 
    cursor: text;
    border-radius: 0.5rem; /* Added for consistency */
    padding: 1rem; /* Added for consistency */
    
}

/* --- Main Text Styles --- */
#target-text {
    position: absolute; top: 0; left: 0; right: 0;
    transition: top 0.2s ease-out; 
    white-space: pre-wrap;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.8;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    word-break: break-all;
}
#target-text .word {
    display: inline-block;
}

/* --- Character Box Styles - Confirmed for Light Theme --- */
#target-text .char-box {
    display: inline; border: none; background-color: transparent;
    padding: 0; font-size: inherit; font-weight: inherit;
    color: #4B5563; /* Medium-dark gray for upcoming text */
}
#target-text .char-box.space-char {
    background-color: transparent !important;
    color: #16A34A !important; /* Green text for correct space */
}
#target-text .char-box.correct {
    background-color: #DCFCE7 !important; /* Light green background */
    color: #15803D !important;           /* Dark green text */
    border-radius: 3px;
}
#target-text .char-box.incorrect {
    background-color: #FEE2E2 !important; /* Light red background */
    color: #B91C1C !important;           /* Dark red text */
    border-radius: 3px;
    text-decoration: none;
}
#target-text .char-box.current {
    background-color: transparent !important;
    color: #1F2937; /* Dark text */
    text-decoration: underline;
    text-decoration-color: #3B82F6; /* Blue underline */
    text-decoration-thickness: 2px;
}
#target-text .blinking-cursor::after {
   display: none;
}

/* --- Modal Styles --- */
#modal-backdrop { 
    transition: opacity 0.2s ease-in-out; 
}
#modal-content { 
    transition: transform 0.2s ease-in-out; 
}
/* --- FIX: Modal Stacking Issue --- */
#modal-container {
    z-index: 50;
}