/* 与Butterfly主题兼容的样式 */
.exam-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #4a4a4a;
    line-height: 1.7;
}

.exam-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.exam-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #6a9eff, #1e5799);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.exam-header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.exam-section {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.exam-section:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.section-title {
    color: #1e5799;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 600;
}

.question {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 10px;
    background-color: rgba(249, 249, 249, 0.7);
    position: relative;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.question:hover {
    background-color: rgba(245, 249, 255, 0.8);
    transform: translateY(-2px);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.question-number {
    font-weight: bold;
    color: #1e5799;
    font-size: 1.1rem;
    min-width: 30px;
}

.question-score {
    background-color: #1e5799;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.question-text {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.options {
    margin-left: 10px;
}

.option {
    margin: 12px 0;
    display: flex;
    align-items: flex-start;
}

.option input {
    margin-right: 12px;
    margin-top: 7px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.option label {
    cursor: pointer;
    transition: color 0.2s;
    flex: 1;
}

.option label:hover {
    color: #1e5799;
}

.true-false-options {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.true-false-option {
    display: flex;
    align-items: center;
}

.true-false-option input {
    margin-right: 8px;
}

.feedback {
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.correct {
    background-color: rgba(230, 247, 230, 0.7);
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

.incorrect {
    background-color: rgba(255, 235, 238, 0.7);
    color: #c62828;
    border-left: 4px solid #c62828;
}

.subjective-section {
    margin-top: 30px;
}

.subjective-answer {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s;
}

.subjective-answer:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(30, 87, 153, 0.2);
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 35px;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.btn-submit {
    background-color: #1e5799;
    color: white;
    box-shadow: 0 4px 6px rgba(30, 87, 153, 0.2);
}

.btn-submit:hover {
    background-color: #16457a;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(30, 87, 153, 0.3);
}

.btn-reset {
    background-color: rgba(245, 245, 245, 0.8);
    color: #333;
    border: 1px solid #ddd;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.btn-reset:hover {
    background-color: rgba(224, 224, 224, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.results {
    text-align: center;
    margin-top: 20px;
    padding: 30px;
    background: rgba(227, 242, 253, 0.8);
    border-radius: 8px;
    display: none;
    border: 1px solid rgba(30, 87, 153, 0.2);
    backdrop-filter: blur(3px);
}

.results h2 {
    color: #1e5799;
    margin-bottom: 15px;
}

.score-display {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1e5799;
    margin: 10px 0;
}

.progress-container {
    height: 12px;
    background-color: rgba(224, 224, 224, 0.7);
    border-radius: 6px;
    margin: 25px 0;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #1e5799, #207cca);
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.result-details {
    margin-top: 25px;
    font-size: 1.15rem;
    color: #555;
}

@media (max-width: 768px) {
    .exam-container {
        padding: 10px;
    }
    
    .exam-header {
        padding: 20px 15px;
    }
    
    .exam-header h1 {
        font-size: 1.8rem;
    }
    
    .exam-section {
        padding: 20px 15px;
    }
    
    .question {
        padding: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn {
        width: 100%;
        padding: 12px;
    }
    
    .true-false-options {
        flex-direction: column;
        gap: 10px;
    }
}

/* 图标样式 */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    stroke-width: 0;
    stroke: currentColor;
    fill: currentColor;
    margin-right: 8px;
    vertical-align: middle;
}

/* --- MODIFICATION START --- */
/* Butterfly主题黑夜模式下的样式 */
[data-theme="dark"] .question {
    background-color: rgb(26, 25, 25);
    /* To make text readable on a black background, you might want to change the text color as well. */
    color: #ccc; 
}

/* Optional: Also change the hover effect for a better user experience in dark mode */
[data-theme="dark"] .question:hover {
    background-color: #2e2e2e; /* A very dark grey */
}

/* --- 黑夜模式下输入框样式 --- */
[data-theme="dark"] input,
[data-theme="dark"] textarea {
    background-color: #333; /* 灰色背景 */
    color: #ccc; /* 浅色文字 */
    border: 1px solid #444; /* 边框颜色 */
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus {
    outline: none;
    border-color: #555; /* 焦点状态边框颜色 */
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.2); /* 可选：添加轻微的发光效果 */
}
/* --- MODIFICATION END --- */