/* --- Global Variables and Body Style --- */
:root {
    --color-background: lightblue;
    --color-header-bg: #1a237e;
    --color-header-fg: #ffffff;
    --color-text: #34495e;
    --color-button-bg: #34495e;
    --color-button-fg: #ffffff;
    --color-button-active-bg: #5d6d7e;
    --color-correct: #27ae60;
    --color-wrong: #e74c3c;
    --font-title: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', serif;
    --font-label: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', serif;
    --font-entry: 'Arial', sans-serif;
    --font-button: 'Arial', sans-serif;
    --font-status: 'Arial', sans-serif;
    --font-question: 'Arial', sans-serif;
    --font-question-urdu: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', serif;
    --font-option: 'Arial', sans-serif;
}

body {
    font-family: var(--font-entry);
    background-color: var(--color-background);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
}

#app-container {
    width: 900px;
    height: 750px;
    background-color: var(--color-background);
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.screen {
    display: none;
    width: 100%;
    height: 100%;
    flex-direction: column;
}

.screen.active {
    display: flex;
}

/* --- Login Screen --- */
.login-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    width: 100%;
    flex-grow: 1;
}

.header-banner {
    background-color: var(--color-header-bg);
    color: var(--color-header-fg);
    width: 100%;
    padding: 5px 0 10px 0;
    margin-bottom: 30px;
}

.header-banner h1 {
    font-family: var(--font-entry);
    font-size: 28px;
    font-weight: bold;
    margin: 5px 0;
}

.header-banner h2 {
    font-family: var(--font-entry);
    font-size: 26px;
    font-weight: bold;
    margin: 0;
}

.login-title {
    font-family: var(--font-title);
    font-size: 32px;
    font-weight: bold;
    color: var(--color-header-bg);
    margin: 0 0 30px 0;
}

.info-label {
    font-family: var(--font-label);
    font-size: 22px;
    font-weight: bold;
    color: var(--color-text);
}

.info-entry {
    font-family: var(--font-entry);
    font-size: 20px;
    font-weight: bold;
    width: 400px;
    text-align: center;
    border: 2px solid #aaa;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
}

.start-button {
    font-family: var(--font-button);
    font-size: 20px;
    font-weight: bold;
    background-color: var(--color-correct);
    color: var(--color-button-fg);
    padding: 15px;
    border: 3px solid #1e8449;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 40px;
}
.start-button:hover {
    background-color: #2ecc71;
}

/* --- Quiz Screen --- */
/* === CHANGE #1: Increased header height === */
.quiz-header {
    background-color: var(--color-header-bg);
    color: var(--color-header-fg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 20px; /* Increased top/bottom padding for more height */
    flex-shrink: 0;
}

/* === CHANGE #2: Increased font sizes inside header === */
#welcome-label {
    font-family: var(--font-status);
    font-size: 16px; /* Increased from 14px */
    font-weight: bold;
}

.quiz-title {
    font-family: var(--font-question-urdu);
    font-size: 28px; /* Increased from 26px */
    font-weight: bold;
}

#view-record-btn {
    font-family: var(--font-button);
    font-size: 14px; /* Increased from 12px */
    font-weight: bold;
    background-color: var(--color-button-bg);
    color: var(--color-button-fg);
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
}
#view-record-btn:hover {
    background-color: var(--color-button-active-bg);
}

.status-bar {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    font-family: var(--font-status);
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

#progress-label {
    color: var(--color-text);
}

#score-label {
    color: var(--color-correct);
}

.question-container {
    text-align: center;
    padding: 0 25px;
    flex-shrink: 0;
}

/* === CHANGE #3: Moved English question down === */
#question-eng {
    font-family: var(--font-question);
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 0;
    margin-top: 40px; /* Increased from 20px to push it down */
}

#question-urdu {
    font-family: var(--font-question-urdu);
    font-size: 24px;
    font-weight: bold;
    margin-top: 5px;
    margin-bottom: 20px;
}

#options-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    flex-grow: 1;
}

.option-btn {
    font-family: var(--font-option);
    font-size: 20px; 
    font-weight: bold;
    width: 650px;
    padding: 15px;
    background-color: var(--color-button-bg);
    color: var(--color-button-fg);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.option-btn:hover:not(:disabled) {
    background-color: var(--color-button-active-bg);
}
.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.9;
}
.option-btn.correct {
    background-color: var(--color-correct) !important;
}
.option-btn.wrong {
    background-color: var(--color-wrong) !important;
}

#feedback-label {
    text-align: center;
    font-family: var(--font-question);
    font-size: 20px;
    font-weight: bold;
    padding: 15px;
    height: 30px;
    flex-shrink: 0;
}

/* --- Modal Styles --- */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--color-background);
    padding: 20px;
    border-radius: 10px;
    width: 400px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-content h3 {
    font-size: 18px;
    font-weight: bold;
    color: var(--color-text);
}

.modal-content p {
    font-family: var(--font-entry);
    font-size: 14px;
    color: var(--color-text);
    margin: 10px 0;
}

.modal-content p.correct-text {
    color: var(--color-correct);
}
.modal-content p.wrong-text {
    color: var(--color-wrong);
}
#record-percentage {
    font-weight: bold;
    color: var(--color-header-bg);
}

.modal-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}
.modal-buttons button {
    font-family: var(--font-button);
    font-size: 12px;
    font-weight: bold;
    background-color: var(--color-button-bg);
    color: var(--color-button-fg);
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
}

.modal-buttons button:hover {
     background-color: var(--color-button-active-bg);
}```