/* 测试页面专用样式 */

/* 部分切换标签样式调整 */
.section-tabs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 录音稿按钮样式 */
.transcript-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: auto;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.transcript-btn:hover {
    background: #0056b3;
}

/* 录音稿弹窗样式 */
.transcript-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
}

.transcript-content {
    position: relative;
    background: white;
    width: 90%;
    max-width: 900px;
    height: 80%;
    margin: 5% auto;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.transcript-header {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transcript-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.close-transcript {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.close-transcript:hover {
    color: #333;
}

.transcript-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.transcript-tab {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-weight: 500;
}

.transcript-tab.active {
    background: white;
    border-bottom-color: #007bff;
    color: #007bff;
}

.transcript-tab:hover {
    background: #e9ecef;
}

.transcript-body {
    flex: 1;
    overflow: hidden;
}

.transcript-section {
    display: none;
    height: 100%;
    overflow-y: auto;
    padding: 1.5rem;
}

.transcript-section.active {
    display: block;
}

.transcript-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

.transcript-text {
    white-space: pre-line;
    line-height: 1.6;
    color: #444;
    font-size: 0.95rem;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .transcript-content {
        width: 95%;
        height: 85%;
        margin: 2.5% auto;
    }
    
    .transcript-header {
        padding: 1rem;
    }
    
    .transcript-header h2 {
        font-size: 1.3rem;
    }
    
    .transcript-tab {
        padding: 0.8rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .transcript-section {
        padding: 1rem;
    }
    
    .transcript-text {
        font-size: 0.9rem;
    }
}

/* 测试容器 */
.test-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: Arial, sans-serif;
    line-height: 1.5;
}

/* 测试说明 */
.test-intro {
    background: #fff;
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    border: 1px solid #ddd;
}

.test-instructions {
    list-style: none;
    padding-left: 1.5rem;
}

.test-instructions li {
    margin-bottom: 0.5rem;
    position: relative;
}

.test-instructions li:before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: -1.5rem;
}

/* 音频播放器样式 */
.audio-player {
    background: #fff;
    border-radius: 4px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid #ddd;
}

.player-controls {
    width: 100%;
}

.custom-player {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.player-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.play-btn {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.play-btn:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-medium);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    width: 0;
    transition: width 0.1s linear;
}

.time {
    min-width: 120px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-color);
}

.speed-control {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gray-medium);
}

.playback-speed {
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--gray-medium);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
}

.playback-speed:hover {
    border-color: var(--primary-color);
}

/* 加载状态 */
.custom-player.loading .play-btn {
    opacity: 0.5;
    cursor: wait;
}

/* 错误状态 */
.audio-error {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* 缓冲进度 */
.buffer-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(229, 57, 53, 0.2);
    border-radius: 4px;
}

/* 分段标签 */
.section-tabs {
    display: flex;
    margin: 20px 0;
    border-bottom: 2px solid #1E88E5;
}

.section-tab {
    padding: 12px 25px;
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-bottom: none;
    cursor: pointer;
    margin-right: 5px;
    border-radius: 8px 8px 0 0;
    font-weight: 500;
    color: #0d47a1;
    transition: all 0.3s ease;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
}

.section-tab:hover {
    background: #bbdefb;
    color: #0d47a1;
}

.section-tab.active {
    background: #1E88E5;
    border: 1px solid #1565C0;
    border-bottom: none;
    color: white;
    font-weight: bold;
    position: relative;
    z-index: 1;
    box-shadow: 0 -3px 7px rgba(0,0,0,0.1);
}

/* 答题区域 */
.section-content {
    display: none;
}

.section-content.active {
    display: block;
}

/* 题目区域样式 */
.questions {
    background: #fff;
    padding: 30px;
    margin: 20px 0;
    font-family: "Times New Roman", Times, serif;
    line-height: 1.6;
}

/* Section标题 */
.section-title {
    text-align: center;
    font-size: 18px;
    margin-bottom: 30px;
    font-weight: normal;
}

/* 题目范围和说明 */
.range-and-instructions {
    margin: 20px 0;
}

.question-range {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
}

.instructions {
    margin-bottom: 20px;
    white-space: pre-line;
}

/* 表单样式 */
.form-container {
    margin: 20px 0;
}

.form-title {
    text-align: center;
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 14px;
}

/* 表单内容样式 */
.form-content {
    margin-left: 0;
    line-height: 2;
}

.form-content p {
    margin: 8px 0;
    position: relative;
}

/* 答题区域样式 */
.answer-input {
    display: inline-block;
    width: 150px;
    height: 20px;
    border: none;
    border-bottom: 1px dotted #000;
    margin: 0;
    padding: 0 5px;
    font-family: inherit;
    font-size: inherit;
    background: transparent;
    vertical-align: baseline;
}

.answer-input:focus {
    outline: none;
    border-bottom: 1px solid #000;
}

/* 答题区占位符 - 修改题号位置和间距 */
.answer-placeholder {
    display: inline-flex;
    align-items: center;
    position: relative;
    margin-left: 8px; /* 左侧间距 */
    margin-right: 5px; /* 右侧间距 */
}

/* 题号样式 */
.question-number {
    font-size: 16px;
    font-weight: bold;
    margin-right: 8px; /* 与输入框的间距 */
    color: #000;
}

/* 提交按钮 */
.submit-btn {
    display: block;
    margin: 30px auto;
    padding: 10px 30px;
    background-color: var(--primary-color, #1E88E5);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: var(--primary-dark, #1565C0);
}

/* 地图区域样式 */
.map-container {
    margin: 20px 0;
    text-align: center;
}

.map-title {
    font-weight: bold;
    margin-bottom: 15px;
}

.map-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
}

.error-message {
    color: var(--error-color);
    text-align: center;
    padding: 1rem;
    background: var(--gray-light);
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

/* 笔记部分 */
.note-content {
    margin: 2rem 0;
}

.note-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.note-section {
    margin-bottom: 2rem;
}

.note-section-title {
    font-weight: bold;
    margin-bottom: 1rem;
}

.note-items {
    padding-left: 1.5rem;
}

.note-item {
    margin-bottom: 1rem;
}

.note-sub-items {
    padding-left: 2rem;
    margin-top: 0.5rem;
}

/* 粗体和斜体文本 */
.bold {
    font-weight: bold;
}

.italic {
    font-style: italic;
}

/* 结果展示 */
.result-section {
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
}

.total-score {
    text-align: center;
}

.total-score .score {
    font-size: 3rem;
    color: var(--primary-color);
    font-weight: bold;
}

.section-scores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.section-score {
    text-align: center;
    padding: 1rem;
    background: var(--gray-light);
    border-radius: var(--border-radius);
}

.section-score h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.detailed-analysis {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--gray-medium);
}

.analysis-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--gray-light);
    border-radius: var(--border-radius);
}

.analysis-item h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.correct-answer {
    color: #4CAF50;
    font-weight: 500;
    margin: 0.5rem 0;
}

.explanation {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-medium);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .player-main {
        flex-direction: column;
        align-items: stretch;
    }
    
    .play-btn {
        align-self: center;
    }
    
    .time {
        text-align: center;
        margin-top: 0.5rem;
    }
    
    .section-tabs {
        flex-wrap: wrap;
    }
    
    .section-tab {
        flex: 1 1 calc(50% - 10px);
        text-align: center;
        padding: 10px 15px;
        margin-bottom: 5px;
        font-size: 14px;
    }
    
    .score-display {
        gap: 1.5rem;
    }
    
    .section-scores {
        grid-template-columns: repeat(2, 1fr);
    }

    .questions {
        padding: 1rem;
    }

    .form-container {
        padding: 1rem;
    }

    .matching-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .answer-input {
        width: 100%;
        margin: 4px 0;
    }
}

/* 题目展示样式 */
.test-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

/* 测试标题 */
.test-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 40px;
}

/* 地图标题 */
.map-title {
    text-align: center;
    font-weight: bold;
    margin: 20px 0;
}

/* 地图容器 */
.map-container {
    border: 1px solid #000;
    padding: 20px;
    margin-bottom: 20px;
}

/* 答题区域 */
.answer-box {
    display: inline-block;
    width: 30px;
    height: 20px;
    border: 1px solid #000;
    margin-left: 10px;
    vertical-align: middle;
}

/* 项目符号样式 */
.bullet-point {
    display: block;
    padding-left: 15px;
    position: relative;
}

.bullet-point::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
}

/* 单选题样式 */
.radio-questions {
    margin: 20px 0;
}

.question-item {
    margin-bottom: 20px;
}

.question-text {
    margin-bottom: 10px;
    font-weight: normal;
}

.options-list {
    margin-left: 30px;
}

.option-item {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
}

.option-item input[type="radio"] {
    margin-right: 8px;
}

/* 选项框样式 */
.box-content {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
    font-weight: bold;
}

/* 建筑列表样式 */
.buildings-list {
    margin: 20px 0;
}

.buildings-list h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* 音频播放器容器 */
.audio-players-container {
    margin: 20px 0;
}

/* 复选框题样式 */
.checkbox-questions {
    margin: 20px 0;
}

.checkbox-questions .question-item {
    margin-bottom: 30px;
}

.checkbox-questions .question-text {
    font-weight: bold;
    margin-bottom: 15px;
}

.checkbox-questions .options-list {
    margin-left: 30px;
}

.checkbox-questions .option-item {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
}

.checkbox-questions .option-item input[type="checkbox"] {
    margin-right: 8px;
}

/* Section 4 矩形框样式 - 优化版 */
.ielts-box-container {
    margin: 20px 0 30px;
}

.ielts-box-content {
    border: 1px solid #000;
    padding: 25px;
    font-family: "Times New Roman", Times, serif;
    line-height: 1.6;
    background-color: #fff;
}

/* 框内居中标题 */
.box-title-center {
    text-align: center;
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 16px;
}

/* 主标题（如 1930s） */
.box-header {
    font-weight: bold;
    margin-top: 15px;
    margin-bottom: 8px;
}

/* 子标题（如 Polythene – two main forms:） */
.box-subheader {
    margin-bottom: 8px;
}

/* 主要项目符号（如 • LDPE –） */
.box-bullet-main {
    margin-left: 20px;
    margin-top: 8px;
    margin-bottom: 5px;
}

/* 描述文本 */
.box-description {
    margin-left: 35px;
    margin-bottom: 5px;
}

/* 示例文本 */
.box-examples {
    margin-left: 35px;
    margin-bottom: 10px;
}

/* 次要项目符号（如 • blown form...） */
.box-bullet-sub {
    margin-left: 20px;
    margin-top: 5px;
    margin-bottom: 5px;
}

/* 普通文本行（如 – popular for making...） */
.box-text {
    margin-left: 20px;
    margin-top: 5px;
    margin-bottom: 5px;
}

/* 复合文本行（如 Teflon – non-stick） */
.box-compound {
    margin-top: 10px;
    margin-bottom: 5px;
}

/* 间隔符 */
.spacer {
    display: inline-block;
    width: 20px;
}

/* 修改答题区域样式，使其适合 Section 4 */
.ielts-box-content .answer-placeholder {
    display: inline-flex;
    align-items: center;
    margin: 0 5px;
}

.ielts-box-content .answer-input {
    width: 120px;
    border: none;
    border-bottom: 1px dotted #000;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    padding: 0 5px;
    margin: 0 5px;
}

.ielts-box-content .question-number {
    font-weight: bold;
    margin-right: 5px;
}

/* 提交答案按钮 */
.submit-answers-btn {
    display: block;
    width: 200px;
    margin: 30px auto;
    padding: 12px 0;
    background-color: #1E88E5;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.submit-answers-btn:hover {
    background-color: #1565C0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.submit-answers-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0,0,0,0.2);
}

/* 结果弹窗 */
.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.result-modal.show {
    opacity: 1;
    visibility: visible;
}

.result-content {
    width: 90%;
    max-width: 600px;
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.result-modal.show .result-content {
    transform: translateY(0);
}

.close-result {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-result:hover {
    color: #1E88E5;
}

.result-header {
    text-align: center;
    margin-bottom: 25px;
}

.result-header h2 {
    font-size: 24px;
    color: #1E88E5;
    margin-bottom: 10px;
}

.result-score {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 15px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.score-circle.correct {
    background-color: #E3F2FD;
    border: 2px solid #1E88E5;
}

.score-circle.ielts {
    background-color: #E8F5E9;
    border: 2px solid #4CAF50;
}

.score-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.score-circle.correct .score-value {
    color: #1E88E5;
}

.score-circle.ielts .score-value {
    color: #4CAF50;
}

.score-label {
    font-size: 14px;
    color: #666;
}

.result-details {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.result-details h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.section-result {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 10px;
}

.section-result:nth-child(odd) {
    background-color: #f5f5f5;
}

.section-name {
    font-weight: bold;
    color: #333;
}

.section-score {
    color: #1E88E5;
    font-weight: bold;
}

.retry-btn {
    display: block;
    width: 200px;
    margin: 30px auto 10px;
    padding: 12px 0;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.retry-btn:hover {
    background-color: #388E3C;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .result-content {
        padding: 20px;
    }
    
    .result-score {
        flex-direction: column;
    }
    
    .score-circle {
        margin: 10px 0;
    }
}

/* 多选题提示样式 */
.multi-choice-hint {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.multi-choice-hint strong {
    color: #e65100;
}

/* 在多选题被选中时突出显示 */
.option-item input[type="checkbox"]:checked + span {
    font-weight: bold;
    color: #2196F3;
}

/* 多选题题号显示样式 */
.checkbox-questions .question-number {
    font-weight: bold;
    color: #e91e63;
    margin-right: 8px;
}

/* 分数详情样式 */
.section-detail {
    font-size: 13px;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dashed #ddd;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin: 3px 0;
    color: #555;
}

/* 单选题得分样式 */
.detail-item:first-child {
    color: #2196F3;
}

/* 多选题得分样式 */
.detail-item:last-child {
    color: #e91e63;
    font-weight: 500;
}

/* 进一步优化结果模态框 */
#result-modal {
    background-color: rgba(0, 0, 0, 0.7);
}

.result-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 分数详情样式 */
.score-detail-note {
    margin-top: 20px;
    padding: 10px 15px;
    background-color: #f5f9ff;
    border-radius: 6px;
    border-left: 4px solid #4285f4;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.score-detail-note p {
    margin: 5px 0;
}

/* 使分数显示更加突出 */
#correct-count, #ielts-score {
    font-weight: bold;
    font-size: 46px;
    color: #2196F3;
    display: block;
    text-align: center;
} 
/* Test Panel 样式 - 参考设计匹配 */
.take-test__board {
    width: 100%;
    margin: 0 auto;
    background: #fff;
}

.take-test__questions-wrap {
    width: 100%;
}

.test-panel {
    background: #fff;
    margin-bottom: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.test-panel__header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 2px solid #1E88E5;
    text-align: center;
}

.test-panel__title {
    font-size: 28px;
    font-weight: bold;
    color: #1E88E5;
    margin: 0 0 8px 0;
    font-family: 'Times New Roman', serif;
}

.test-panel__title-caption {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

.test-panel__item {
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
}

.test-panel__item:last-child {
    border-bottom: none;
}

.test-panel__question {
    margin-bottom: 25px;
}

.test-panel__question-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0 0 15px 0;
    font-family: 'Times New Roman', serif;
}

.test-panel__question-desc {
    margin-bottom: 20px;
    line-height: 1.6;
}

.test-panel__question-desc p {
    margin-bottom: 10px;
    color: #444;
}

.test-panel__question-desc em {
    font-style: italic;
    color: #555;
}

/* Question Groups for Radio/Checkbox Questions */
.test-panel__question-sm-group {
    margin-bottom: 25px;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.test-panel__question-sm-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.5;
    font-family: 'Times New Roman', serif;
}

/* Answer Container */
.test-panel__answer {
    margin-top: 20px;
}

.test-panel__answer-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.test-panel__answer-item:hover {
    background-color: #f0f8ff;
}

.test-panel__answer-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 2px solid #1E88E5;
    border-radius: 3px;
    background: #fff;
    color: #1E88E5;
    font-weight: bold;
    font-size: 14px;
    margin-right: 12px;
    flex-shrink: 0;
    font-family: Arial, sans-serif;
}

/* Input Answer Fields */
.test-panel__iotquestion {
    display: inline-flex;
    align-items: center;
    position: relative;
    margin: 0 5px;
}

.test-panel__question-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #1E88E5;
    color: white;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    margin-right: 8px;
    flex-shrink: 0;
}

.test-panel__input-answer {
    min-width: 120px;
    height: 32px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.test-panel__input-answer:focus {
    border-color: #1E88E5;
    outline: none;
    box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.2);
}

.test-panel__input-answer.answered {
    background-color: #f0f8ff;
    border-color: #1E88E5;
}

/* Radio Button Styling */
.iot-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    font-family: 'Times New Roman', serif;
}

.iot-radio input[type="radio"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Checkbox Styling */
.iot-checkbox2 {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    position: relative;
    font-family: 'Times New Roman', serif;
}

.iot-checkbox2 input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkmark {
    display: none; /* Hide custom checkmark for now */
}

.cb-label {
    flex: 1;
    cursor: pointer;
}

/* Checked state styling */
.iot-radio input[type="radio"]:checked + span,
.iot-checkbox2 input[type="checkbox"]:checked + .checkmark + .cb-label {
    font-weight: 600;
    color: #1E88E5;
}

/* Table Responsive Wrapper */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

.table-responsive table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Times New Roman', serif;
    font-size: 14px;
    line-height: 1.6;
}

.table-responsive table caption {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.table-responsive table caption h3 {
    margin: 0;
    color: #1E88E5;
    font-size: 18px;
}

.table-responsive td {
    padding: 12px;
    border: 1px solid #ddd;
    vertical-align: top;
}

.table-responsive td p {
    margin: 4px 0;
    line-height: 1.5;
}

/* Question Palette */
.take-test__bottom-palette {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
    z-index: 90;
    font-size: 12px; /* 小字体展示 */
}

.question-palette {
    padding: 20px;
    background: #f8f9fa;
}

.question-palette__list-item {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.question-palette__part {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
}

.question-palette__part.-active,
.question-palette__part:hover {
    border-color: #1E88E5;
    box-shadow: 0 2px 5px rgba(30, 136, 229, 0.2);
}

.question-palette__part-title {
    font-size: 13px; /* 小一号 */
    font-weight: bold;
    color: #1E88E5;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.question-palette__part-title span {
    margin-left: 5px;
}

.question-palette__part-status {
    font-size: 12px; /* 更小的文字 */
    color: #666;
    margin-bottom: 12px;
}

.question-palette__part-status .number {
    color: #1E88E5;
    font-weight: bold;
}

.question-palette__items-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.question-palette__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; /* 缩小按钮体积 */
    height: 26px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.question-palette__item:hover {
    border-color: #1E88E5;
    color: #1E88E5;
}

.question-palette__item.answered {
    background: #1E88E5;
    border-color: #1E88E5;
    color: white;
}

.question-palette__item.-group {
    width: 48px;
    font-size: 10px;
    position: relative;
}

.question-palette__item.-group em {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1px;
    height: 12px;
    background: currentColor;
    font-style: normal;
}

/* CKEditor Wrapper */
.ckeditor-wrapper {
    margin: 20px 0;
}

.ckeditor-wrapper h4 {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.ckeditor-wrapper img {
    display: block;
    margin: 0 auto 20px;
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 通用题目渲染样式 */
.generic-questions {
    margin: 20px 0;
}

.generic-questions .question-item {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #fafafa;
}

.generic-questions h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.generic-questions .question-number {
    font-weight: bold;
    color: #007bff;
    margin-right: 8px;
}

/* 题目类型指示器 */
.question-type-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: top;
}

.question-type-badge.fill-blank {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.question-type-badge.multiple-choice {
    background-color: #e8f5e8;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}

.question-type-badge.multi-select {
    background-color: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffcc02;
}

.question-type-badge.matching {
    background-color: #fce4ec;
    color: #c2185b;
    border: 1px solid #f8bbd9;
}

/* 改进的题目容器 */
.question-item {
    position: relative;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.question-item:hover {
    background-color: #f8f9fa;
    border-left-color: #007bff;
}

.question-item.answered {
    border-left-color: #28a745;
    background-color: #f8fff8;
}

/* 填空题优化 */
.fill-blank-input {
    border: 1px solid #ddd;
    padding: 4px 8px;
    border-radius: 3px;
    min-width: 120px;
    transition: border-color 0.2s ease;
}

.fill-blank-input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.fill-blank-input.answered {
    border-color: #28a745;
    background-color: #f8fff8;
}

/* 选择题选项优化 */
.option-item {
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.option-item:hover {
    background-color: #f0f0f0;
}

.option-item input[type="radio"]:checked + span,
.option-item input[type="checkbox"]:checked + span {
    font-weight: 500;
    color: #007bff;
}

/* 匹配题特殊样式 */
.matching-questions .question-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px;
}

.matching-questions .question-text {
    flex: 1;
    margin-right: 20px;
}

.matching-questions .options-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.matching-questions .option-item {
    margin: 0;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 32px;
    text-align: center;
}

.matching-questions .option-item:hover {
    border-color: #007bff;
}

.matching-questions .option-item input[type="radio"]:checked + span {
    background-color: #007bff;
    color: white;
}

/* 进度指示器 */
.section-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.progress-text {
    color: #666;
}

.progress-bar-container {
    flex: 1;
    margin: 0 15px;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: #007bff;
    transition: width 0.3s ease;
    border-radius: 3px;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .question-type-badge {
        font-size: 8px;
        padding: 1px 6px;
    }
    
    .matching-questions .question-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .matching-questions .question-text {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .section-progress {
        flex-direction: column;
        gap: 10px;
    }
    
    .progress-bar-container {
        margin: 0;
        width: 100%;
    }
    
    /* Test Panel Mobile Responsive */
    .test-panel__item {
        padding: 15px 20px;
    }
    
    .test-panel__header {
        padding: 15px;
    }
    
    .test-panel__title {
        font-size: 24px;
    }
    
    .test-panel__question-sm-group {
        padding: 15px;
    }
    
    .test-panel__answer-item {
        padding: 6px 8px;
    }
    
    .test-panel__input-answer {
        min-width: 100px;
    }
    
    .question-palette__list-item {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .question-palette {
        padding: 15px;
    }
    
    .table-responsive {
        font-size: 13px;
    }
    
    .table-responsive td {
        padding: 8px;
    }
}

