/**
 * 综合评估模块样式
 */

/* 评估页面布局 */
.assessment-page {
    padding: 2rem 0;
}

/* 评估导航 */
.assessment-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.assessment-tab {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.assessment-tab.active {
    background-color: var(--primary-color);
    color: #fff;
}

/* 评估内容区域 */
.assessment-container {
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.assessment-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

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

.assessment-header {
    margin-bottom: 2rem;
    text-align: center;
}

.assessment-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.assessment-panel {
    background-color: #fff;
    border-radius: 6px;
    padding: 1.5rem;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

/* 视野测试样式 */
.field-test-instructions {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f5f9ff;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

.vision-field-test {
    position: relative;
    margin-bottom: 2rem;
}

.test-container {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: #000;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.fixation-point {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    z-index: 10;
    user-select: none;
}

.response-button-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.test-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.progress-container {
    flex-grow: 1;
    min-width: 200px;
    margin-left: 1rem;
}

.progress-text {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

/* 评估结果样式 */
.assessment-results {
    background-color: #fff;
    border-radius: 6px;
    padding: 1.5rem;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    animation: slideUp 0.5s ease;
}

.assessment-results h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.result-visualization {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.result-field-map {
    flex: 0 0 400px;
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.color-box {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    border-radius: 3px;
}

.color-box.normal {
    background-color: #34c759;
}

.color-box.reduced {
    background-color: #ffcc00;
}

.color-box.severely-reduced {
    background-color: #ff9500;
}

.color-box.blind {
    background-color: #ff3b30;
}

.result-metrics {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.metric-card {
    flex: 1 0 calc(50% - 1rem);
    min-width: 140px;
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.metric-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #555;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.metric-description {
    font-size: 0.75rem;
    color: #777;
}

.metric-card.overall {
    flex-basis: 100%;
    background-color: #f0f5ff;
}

.assessment-recommendations {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f5f9ff;
    border-radius: 6px;
    border: 1px solid #e0e9f5;
}

.assessment-recommendations h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

/* 阅读能力测试样式 */
.reading-test-instructions {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f5f9ff;
    border-left: 4px solid #5b7cfa;
    border-radius: 4px;
}

.reading-text-container {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    line-height: 1.8;
    max-height: 400px;
    overflow-y: auto;
}

.reading-test-text h4 {
    margin-bottom: 1rem;
    color: #444;
}

.reading-test-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.timer-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: #555;
    padding: 0.5rem 1rem;
    background-color: #f2f2f2;
    border-radius: 4px;
}

.reading-questions {
    background-color: #f7f9fc;
    padding: 1.5rem;
    border-radius: 6px;
    animation: fadeIn 0.5s ease;
}

.question-item {
    margin-bottom: 1.5rem;
}

.question-item:last-child {
    margin-bottom: 0;
}

.form-check {
    margin-bottom: 0.5rem;
}

/* 视觉搜索能力测试样式 */
.visual-search-instructions {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f5fff5;
    border-left: 4px solid #34c759;
    border-radius: 4px;
}

.difficulty-selector {
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.visual-search-container {
    position: relative;
}

.target-instructions {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #fffbf5;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.target-preview {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border: 2px dashed #ffa726;
    border-radius: 6px;
}

#visualSearchCanvas {
    display: block;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.visual-search-controls {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 注意力分配能力测试样式 */
.attention-test-instructions {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #fff5f5;
    border-left: 4px solid #ff9500;
    border-radius: 4px;
}

.attention-test-container {
    position: relative;
}

.test-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #f2f2f2;
    border-radius: 6px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.875rem;
    color: #555;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

.stat-item.timer .stat-value {
    color: #ff3b30;
    font-size: 1.5rem;
}

#attentionCanvas {
    display: block;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.attention-test-controls {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.attention-heatmap {
    margin: 2rem 0;
    text-align: center;
}

.heatmap-legend {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.875rem;
}

.heatmap-legend .color-box {
    width: 20px;
    height: 10px;
    border-radius: 2px;
}

.heatmap-legend .color-box.high {
    background-color: #ff3b30;
}

.heatmap-legend .color-box.medium {
    background-color: #ffcc00;
}

.heatmap-legend .color-box.low {
    background-color: #34c759;
}

.heatmap-legend .color-box.none {
    background-color: #e0e0e0;
}

/* 功能性视觉评估样式 */
.functional-test-instructions {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f5f5ff;
    border-left: 4px solid #5856d6;
    border-radius: 4px;
}

.functional-vision-form {
    animation: fadeIn 0.5s ease;
}

.functional-category {
    margin-bottom: 2rem;
}

.functional-category h4 {
    color: #5856d6;
    margin-bottom: 1rem;
}

.functional-questions {
    margin-bottom: 2rem;
}

.functional-question {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.functional-question:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.question-text {
    margin-bottom: 1rem;
    font-weight: 500;
}

.options-container {
    padding-left: 1rem;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* 评估报告样式 */
#assessmentReportContainer {
    padding: 2rem;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.report-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* 历史记录样式 */
.history-chart-container {
    margin-bottom: 2rem;
}

/* 通用动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .assessment-tab {
        flex: 0 0 calc(50% - 0.5rem);
        font-size: 0.875rem;
        padding: 0.5rem;
    }
    
    .result-visualization {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .result-field-map {
        flex: 0 0 100%;
    }
    
    .test-container {
        height: 300px;
    }
    
    .reading-text-container {
        padding: 1.5rem;
    }
    
    .test-stats {
        flex-wrap: wrap;
    }
    
    .stat-item {
        flex: 1 0 calc(50% - 0.5rem);
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .assessment-container {
        padding: 1rem;
    }
    
    .assessment-panel {
        padding: 1rem;
    }
    
    .metric-card {
        flex: 0 0 100%;
    }
}

.recommendation-section {
    margin-bottom: 1.5rem;
}

.recommendation-section h5 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    border-bottom: 1px solid #e0e9f5;
    padding-bottom: 0.5rem;
}

.recommendations-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .recommendations-container {
        grid-template-columns: 1fr;
    }
}