/* exam.html 专用样式 */

.exam-container {
    max-width: 900px;
}

.exam-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.exam-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.exam-header p {
    font-size: 16px;
    opacity: 0.9;
}

.exam-main {
    padding: 30px;
}

.student-info {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.form-control {
    width: 100%;
    max-width: 300px;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.required {
    color: #e74c3c;
}

.questions-section {
    margin-top: 30px;
}

.question-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.question-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.question-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f3f4;
}

.question-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.5;
}

.result-mark {
    font-size: 20px;
    font-weight: bold;
    margin-left: 10px;
}

.correct { color: #27ae60; }
.incorrect { color: #e74c3c; }

.options-grid {
    display: grid;
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.option-item:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.option-item.selected {
    background: #e3f2fd;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.option-label {
    flex: 1;
    font-size: 16px;
    color: #495057;
    line-height: 1.5;
    pointer-events: none;
}

.option-letter {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0;
}

.correct-answer-text {
    color: #27ae60;
    font-weight: 600;
    margin-left: 8px;
}

.your-answer-text {
    color: #e74c3c;
    font-weight: 600;
    margin-left: 8px;
}

.option-item.correct-answer {
    background: #d4edda;
    border-color: #27ae60;
}

.option-item.wrong-answer {
    background: #f8d7da;
    border-color: #e74c3c;
}

.explanation {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 10px;
    border-left: 4px solid #667eea;
    display: none;
}

.explanation strong {
    color: #2c3e50;
}

.submit-section {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 40px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.submit-btn:disabled {
    background: #bdc3c7;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.results-section {
    text-align: center;
    margin-bottom: 30px;
}

.score-display {
    font-size: 32px;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.time-info {
    font-size: 18px;
    color: #7f8c8d;
    font-weight: 500;
}

.progress-indicator {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    color: #495057;
}

.eye-friendly {
    letter-spacing: 0.5px;
    line-height: 1.7;
}

.text-large {
    font-size: 17px;
}

.option-label {
    font-size: 16px;
}

.type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
    vertical-align: middle;
}

.type-1 {
    background: #e3f2fd;
    color: #1565c0;
}

.type-2 {
    background: #fff3e0;
    color: #e65100;
}

.type-3 {
    background: #f3e5f5;
    color: #7b1fa2;
}

.type-hint {
    color: #e65100;
    font-size: 14px;
    margin-top: 8px;
    margin-bottom: 0;
}

/* 判断题样式 */
.tf-options {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.tf-option-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.tf-option-item:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.tf-option-item.selected {
    background: #e3f2fd;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.tf-option-item.correct-answer {
    background: #d4edda;
    border-color: #27ae60;
}

.tf-option-item.wrong-answer {
    background: #f8d7da;
    border-color: #e74c3c;
}

.tf-option-letter {
    font-size: 24px;
    font-weight: bold;
    margin-right: 10px;
    color: #667eea;
}

.tf-option-label {
    font-size: 18px;
    color: #495057;
    font-weight: 500;
}

/* 多选题checkbox样式 */
.option-item.checkbox-style {
    position: relative;
}

.option-item.checkbox-style .checkbox-indicator {
    width: 22px;
    height: 22px;
    border: 2px solid #667eea;
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
}

.option-item.checkbox-style.selected .checkbox-indicator {
    background: #667eea;
}

.option-item.checkbox-style.selected .checkbox-indicator::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

@media (max-width: 768px) {
    .exam-header {
        padding: 20px;
    }

    .exam-header h1 {
        font-size: 24px;
    }

    .exam-main {
        padding: 20px;
    }

    .form-control {
        max-width: 100%;
    }

    .question-card {
        padding: 20px;
    }

    .submit-btn {
        width: 100%;
        padding: 14px 20px;
    }

    .tf-options {
        flex-direction: column;
        gap: 12px;
    }

    .tf-option-item {
        width: 100%;
    }
}