/* --- 古風風格 CSS (包含單題檢查與詳解樣式) --- */
body {
    font-family: 'Noto Serif TC', serif;
    line-height: 1.9;
    margin: 0;
    padding: 20px;
    background-color: #f8f5f0;
    color: #4a4a4a;
}

.page-container {
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fffdfa;
    padding: 30px;
    border: 1px solid #dcd0b8;
    box-shadow: 0 3px 8px rgba(100, 80, 50, 0.1);
    border-radius: 4px;
}

h1 {
    font-family: 'Noto Serif TC', serif;
    color: #5a4631;
    text-align: center;
    margin-bottom: 25px;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 2.2em;
}

.article-selector {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f5f1e8;
    border-radius: 4px;
    border: 1px solid #e4d9c4;
}
.article-selector label {
    font-weight: 600;
    margin-right: 10px;
    color: #6b5a44;
}
.article-selector select {
    padding: 8px 12px;
    border: 1px solid #d2b48c;
    border-radius: 4px;
    font-size: 1em;
    font-family: 'Noto Serif TC', serif;
    background-color: #fffdfa;
    color: #4a4a4a;
}

.main-layout {
    display: flex;
    gap: 30px;
}
.left-panel, .right-panel {
    flex: 1;
    background-color: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

#article-container {
    border: 1px solid #e4d9c4;
    padding: 20px;
    background-color: #fffdfa;
    border-radius: 4px;
    min-height: 200px;
    cursor: pointer;
    max-height: 70vh;
    overflow-y: auto;
}
#article-container.reading-finished { cursor: default; }
#article-container h2 {
    font-family: 'Noto Serif TC', serif;
    color: #5a4631;
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 1.5em;
}
#article-content p, #article-content div, #article-content ul, #article-content li {
    margin-bottom: 1em;
    color: #4a4a4a;
}

.nutrition-info {
     border: 1px dashed #a08d74;
     background-color: #f9f6f0;
     padding: 20px;
     margin: 25px 0;
     border-radius: 4px;
 }
.nutrition-info h3 {
    text-align: center; color: #5a4631; margin-top: 0; margin-bottom: 20px;
    font-family: 'Noto Serif TC', serif;
    font-weight: 600;
}
.nutrition-info ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; }
.nutrition-info li strong { display: block; color: #8B4513; margin-bottom: 5px; font-weight: 600; }
.data-source { font-size: 0.85em; text-align: right; color: #8c7b6a; margin-top: 15px; }
.reference { font-size: 0.85em; color: #8c7b6a; margin-top: 25px; border-top: 1px solid #e4d9c4; padding-top: 15px; }
.reference ul { padding-left: 20px; }
.reference li { margin-bottom: 0.5em; }

.sentence-wrapper { display: inline; }
.highlight {
    background-color: rgba(222, 184, 135, 0.3);
    border-bottom: 1px dashed #8B4513;
    padding: 0.1em 0;
    font-weight: 600;
    color: #5a4631;
}

.right-panel {
    display: none;
    flex-direction: column;
}
#questions-container {
    max-height: 85vh; /* Increased slightly as overall feedback is separate */
    overflow-y: auto;
    padding-right: 10px;
    flex-grow: 1;
    border: 1px solid #e4d9c4;
    padding: 20px;
    background-color: #fffdfa;
    border-radius: 4px;
}
.question-block {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #e0d8c7;
    border-radius: 4px;
    background-color: transparent;
}
.question-block h3 {
    margin-top: 0;
    color: #5a4631;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.05em;
    font-family: 'Noto Serif TC', serif;
    font-weight: 700;
    margin-bottom: 15px;
}
.options-list { list-style-type: none; padding: 0; margin-top: 10px; }
.option-box {
    border: 1px solid #d2b48c;
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    font-size: 1em;
    background-color: rgba(255, 253, 250, 0.6);
}
.option-box:hover {
    background-color: #f5eadd;
    border-color: #a0522d;
}
.option-box.selected-option {
    background-color: #ede4d4;
    border-color: #8B4513;
    font-weight: 600;
    color: #5a4631;
}
/* Styles for after checking single answer */
.option-box.feedback-correct-option {
    background-color: #e6f0e6 !important; /* Pale green */
    border-color: #5a8b5a !important;
    color: #3a5f3a !important;
    cursor: default;
}
.option-box.feedback-incorrect-user-choice {
    background-color: #fbe6e6 !important; /* Pale red */
    border-color: #a55a5a !important;
    color: #721c24 !important;
    cursor: default;
}
.pisa-note { font-size: 0.85em; color: #8c7b6a; margin-top: 10px; }
.hint-button {
    padding: 6px 12px;
    background-color: #a0522d;
    color: #fdfbf5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    white-space: nowrap;
    font-family: 'Noto Serif TC', serif;
    transition: background-color 0.3s;
    margin-left: 10px;
}
.hint-button:hover {
    background-color: #8B4513;
}

/* Single Question Controls */
.single-check-btn, .next-question-btn {
    padding: 8px 18px;
    background-color: #8B4513; /* Dark Red/Brown */
    color: #fdfbf5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95em;
    font-family: 'Noto Serif TC', serif;
    transition: background-color 0.3s;
    font-weight: 600;
    margin-top: 15px;
    display: inline-block; /* For spacing if needed */
}
.single-check-btn:hover, .next-question-btn:hover {
    background-color: #5a4631; /* Darker shade */
}
.next-question-btn {
    background-color: #5a8b5a; /* A calming green for next */
    margin-left: 10px; /* Space from explanation or other elements */
}
.next-question-btn:hover {
    background-color: #4a7b4a;
}


/* Explanation Area */
.explanation-area {
    margin-top: 15px;
    padding: 10px;
    background-color: #f9f6f0; /* Slightly different from question block bg */
    border: 1px solid #e4d9c4;
    border-radius: 4px;
    font-size: 0.95em;
    color: #5a4631;
}
.explanation-area strong {
    color: #8B4513; /* Dark red for "詳解：" */
}

#click-to-continue-prompt {
    display: block;
    text-align: center;
    color: #8c7b6a;
    font-style: italic;
    margin-top: 15px;
}

@media (max-width: 992px) {
    .main-layout { flex-direction: column; }
    .left-panel, .right-panel { flex: none; width: 100%; margin-bottom: 20px; }
    .right-panel { margin-bottom: 0; }
    #article-container, #questions-container { max-height: none; }
    .page-container { padding: 20px; }
}
/* --- End 古風風格 CSS --- */