/* Paper Style CSS */
:root {
    --text-color: #000;
    --paper-bg: #fff;
    --success: #15803d;
    --error: #dc2626;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #e5e7eb;
    color: var(--text-color);
    margin: 0;
    padding: 2rem;
    line-height: 1.5;
}

.app-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--paper-bg);
    padding: 3rem 4rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.app-header {
    text-align: center;
    margin-bottom: 2rem;
}

.app-header h1 {
    font-size: 14pt;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0 0 1rem 0;
    letter-spacing: 1px;
}

.top-titles {
    text-align: left;
    font-size: 10pt;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.part-header {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 12pt;
    font-weight: bold;
    text-transform: uppercase;
}

.part-title { font-weight: bold; }
.part-instruction {
    font-size: 10pt;
    font-weight: normal;
    text-transform: none;
    font-style: italic;
    margin-bottom: 1rem;
}

h3.section-title {
    text-align: center;
    font-size: 14pt;
    font-weight: bold;
    margin: 1.5rem 0;
}

.question-item {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
}

.q-text {
    font-size: 11pt;
    width: 100%;
    margin-bottom: 0.25rem;
}

.gap-input {
    border: none;
    border-bottom: 1.5px dotted #000;
    background: transparent;
    font-family: inherit;
    font-size: 11pt;
    text-align: center;
    width: 120px;
    margin: 0 0.5rem;
    outline: none;
    padding: 0;
}

.gap-input.short-gap {
    width: 40px;
}

/* For Part 5 alignment */
.flex-between {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.opinions-box {
    border: 1px solid #000;
    padding: 1rem 2rem;
    margin-bottom: 1.5rem;
}
.opinions-box .opinions-title {
    font-weight: bold;
    text-align: center;
    margin-bottom: 0.5rem;
}
.opinion-line {
    font-size: 11pt;
    margin-bottom: 0.25rem;
}

.q-options {
    display: flex;
    flex-direction: column;
    padding-left: 2rem;
    width: 100%;
}

.option-label {
    display: flex;
    align-items: center;
    font-size: 11pt;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.option-label input {
    margin-right: 0.5rem;
}

.status-correct .gap-input, .status-correct .option-label {
    color: var(--success);
    font-weight: bold;
}
.status-incorrect .gap-input, .status-incorrect .option-label {
    color: var(--error);
}
.correction-text {
    font-size: 10pt;
    color: var(--error);
    margin-left: 1rem;
    display: none;
}

.action-bar {
    margin-top: 3rem;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #ccc;
}

.btn {
    padding: 0.5rem 1.5rem;
    font-size: 11pt;
    cursor: pointer;
    background: #f0f0f0;
    border: 1px solid #000;
    margin: 0 0.5rem;
}
.btn:hover { background: #e0e0e0; }

.svg-container {
    border: 1px solid #000;
    width: 100%;
    max-width: 600px;
    margin: 1.5rem auto;
    display: block;
}

.score-display {
    text-align: center;
    font-size: 12pt;
    font-weight: bold;
    margin-top: 1rem;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    body {
        padding: 0;
        background-color: var(--paper-bg);
    }
    .app-container {
        padding: 1.5rem 1rem;
        box-shadow: none;
    }
    .top-titles {
        font-size: 8pt;
        text-align: center;
    }
    .app-header h1 {
        font-size: 12pt;
        display: block;
        margin-right: 0 !important;
        margin-bottom: 1rem !important;
    }
    .test-selector-container select {
        width: 100%;
        margin-top: 0.5rem;
    }
    .part-header {
        flex-direction: column;
        text-align: center;
    }
    h3.section-title {
        font-size: 12pt;
    }
    .q-text {
        font-size: 11pt;
    }
    .gap-input {
        width: 80px;
    }
    .gap-input.short-gap {
        width: 40px;
    }
    .opinions-box {
        padding: 1rem;
    }
    .q-options {
        padding-left: 0.5rem;
    }
    /* Wrap flex-between inputs on very small screens */
    .flex-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
