/* Basic Reset and Body Style */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.6;
    color: #333;
    background-color: #fdfdfd;
    padding: 20px;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Headings */
h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

h2 {
    color: #3498db;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

h3 {
    color: #16a085;
    margin-top: 25px;
    margin-bottom: 15px;
}

h4 {
     color: #2980b9; /* Different color for term definitions */
}

/* Section Styling */
section {
    margin-bottom: 40px;
}

/* QA Item Styling */
.qa-item {
    margin-bottom: 15px;
    border-left: 3px solid transparent; /* Placeholder for potential active state */
    padding-left: 10px;
}

.question-term {
    font-weight: bold;
    cursor: pointer;
    padding: 8px 0;
    position: relative;
    transition: color 0.2s ease;
    color: #34495e;
}

.question-term:hover {
    color: #3498db;
}

/* Add indicator for collapsible items */
.question-term::before {
    content: '▶'; /* Collapsed state indicator */
    font-size: 0.8em;
    margin-right: 8px;
    color: #7f8c8d;
    display: inline-block;
    transition: transform 0.2s ease-in-out;
}

/* Indicator for expanded state */
.qa-item.expanded .question-term::before {
    transform: rotate(90deg);
    color: #3498db;
}


/* Answer Styling */
.answer {
    display: none; /* Hidden by default */
    padding: 15px;
    margin-top: 5px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 3px solid #16a085;
    border-radius: 0 4px 4px 0;
    animation: fadeIn 0.3s ease-in-out;
}

.answer.visible {
    display: block; /* Shown when 'visible' class is added */
}

/* Keyframes for fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}


/* Answer Content Styling */
.answer p,
.answer ul,
.answer ol,
.answer table,
.answer aside {
    margin-bottom: 10px;
}

.answer ul, .answer ol {
    margin-left: 20px;
    padding-left: 15px;
}

.answer li {
    margin-bottom: 5px;
}

.answer strong, .answer b {
    color: #c0392b; /* Highlight important terms */
}

.answer aside {
    font-size: 0.9em;
    color: #555;
    background-color: #eef;
    padding: 8px;
    border-left: 3px solid #77a;
    border-radius: 3px;
}

.answer table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.95em;
}

.answer th, .answer td {
    border: 1px solid #ddd;
    padding: 8px 10px;
    text-align: left;
}

.answer th {
    background-color: #e9ecef;
    font-weight: bold;
}

.answer tr:nth-child(even) {
    background-color: #f8f9fa;
}

.answer img {
    max-width: 100%;
    height: auto;
    margin-top: 10px;
    border-radius: 4px;
}

/* Placeholder for images */
.answer p[class*="[图片："] {
    font-style: italic;
    color: #777;
    padding: 10px;
    background: #eee;
    border: 1px dashed #ccc;
    text-align: center;
}


/* Toggle All Button */
.toggle-all {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    margin-bottom: 20px;
    transition: background-color 0.2s ease;
    float: right; /* Position button nicely */
}

.toggle-all:hover {
    background-color: #2980b9;
}

/* Clearfix for float */
section::after {
    content: "";
    display: table;
    clear: both;
}