/* ====================================================================
 * diagnosis-report.css - 诊断报告渲染样式（从原始 test.html 提取）
 * AI剪导师 Phase1 - 2026-07-03
 *
 * 本文件仅包含报告渲染相关的样式，补充 diagnosis.css 的不足
 * 不覆盖已有样式，只追加缺失的报告卡片/评分/表格样式
 * 保留原始2个月调试的紫色渐变内核风格
 * ==================================================================== */

/* ==================== 报告卡片容器 ==================== */
.report-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.3s;
}
.report-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
.report-card h3 {
    color: #2c3e50;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 2px solid #667eea;
}

/* ==================== 评分可视化组件 ==================== */
.score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 16px 0;
}
.score-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s;
}
.score-card:hover {
    transform: scale(1.05);
}
.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    position: relative;
}
.score-circle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
}
.score-high-bg { background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%); }
.score-mid-bg  { background: linear-gradient(135deg, #faad14 0%, #ffc53d 100%); }
.score-low-bg  { background: linear-gradient(135deg, #ff7875 0%, #ff9c6e 100%); }

.score-label {
    color: #2c3e50;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}
.score-reason {
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    margin-top: 8px;
}

/* ==================== 总分卡片 ==================== */
.total-score-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin: 20px 0;
}
.total-score-value {
    font-size: 48px;
    font-weight: bold;
    margin: 12px 0;
}
.total-score-label {
    font-size: 16px;
    opacity: 0.9;
}

/* ==================== 报告段落卡片（教学报告文本）==================== */
.report-text-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 14px;
    padding: 22px 26px;
    margin: 18px 0;
    box-shadow: 0 3px 15px rgba(102, 126, 234, 0.08);
    border-left: 5px solid #667eea;
    transition: all 0.3s ease;
}
.report-text-card:hover {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.2);
    border-left-color: #7c3aed;
}
.report-text-card p {
    line-height: 1.8;
    color: #2c3e50;
    margin: 0;
    font-size: 15px;
}

/* ==================== 4列报告表格（markdown-body）==================== */
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    table-layout: fixed;
    font-size: 14px;
    background: #fff;
}
.markdown-body table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 10px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid #5a67d8;
}
.markdown-body table tbody td {
    padding: 10px 8px;
    border: 1px solid #e2e8f0;
    text-align: center;
    vertical-align: middle;
    line-height: 1.5;
}
.markdown-body table thead th:nth-child(1),
.markdown-body table tbody td:nth-child(1) {
    width: 22%; font-weight: 600; color: #2d3748; text-align: left;
}
.markdown-body table thead th:nth-child(2),
.markdown-body table tbody td:nth-child(2) {
    width: 28%; word-break: break-all; color: #4a5568;
}
.markdown-body table thead th:nth-child(3),
.markdown-body table tbody td:nth-child(3) {
    width: 14%; white-space: nowrap; font-weight: 700; color: #2d3748;
}
.markdown-body table thead th:nth-child(4),
.markdown-body table tbody td:nth-child(4) {
    width: 36%; text-align: left; color: #718096; font-size: 13px;
}
.markdown-body table tbody tr:nth-child(even) { background: #f7fafc; }
.markdown-body table sub { font-size: 11px; color: #a0aec0; }

/* markdown-body 其他元素 */
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    color: #2c3e50;
    margin: 16px 0 10px;
    font-weight: 600;
}
.markdown-body h1 { font-size: 22px; }
.markdown-body h2 { font-size: 18px; }
.markdown-body h3 { font-size: 16px; }
.markdown-body p {
    line-height: 1.8;
    color: #2c3e50;
    margin: 10px 0;
}
.markdown-body ul,
.markdown-body ol {
    margin: 10px 0;
    padding-left: 24px;
    color: #2c3e50;
    line-height: 1.8;
}
.markdown-body li { margin: 6px 0; }
.markdown-body strong { color: #1a1a2e; font-weight: 600; }
.markdown-body code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: #d6336c;
}
.markdown-body blockquote {
    border-left: 4px solid #667eea;
    margin: 12px 0;
    padding: 8px 16px;
    background: #f8f9fa;
    color: #666;
}

/* ==================== 发展方向卡片 ==================== */
.dev-path-card {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-radius: 10px;
    padding: 16px;
    margin: 12px 0;
}
.dev-path-card h4 {
    color: #4338ca;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}
.dev-path-card p {
    color: #374151;
    line-height: 1.8;
    font-size: 14px;
}

/* ==================== 问题/建议列表 ==================== */
.problem-list { list-style: none; padding: 0; }
.problem-list li {
    padding: 14px 16px;
    margin: 10px 0;
    background: #fff7e6;
    border-left: 4px solid #ffa940;
    border-radius: 8px;
    line-height: 1.6;
}
.suggestion-list { list-style: none; padding: 0; }
.suggestion-list li {
    padding: 14px 16px;
    margin: 10px 0;
    background: #f6ffed;
    border-left: 4px solid #52c41a;
    border-radius: 8px;
    line-height: 1.6;
}

/* ==================== 视觉分析项 ==================== */
.visual-item {
    margin: 12px 0;
    padding: 16px;
    background: #f0f5ff;
    border-radius: 8px;
    border-left: 4px solid #2f54eb;
}
.visual-item h4 {
    color: #2f54eb;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 600;
}
.issues { color: #cf1322; line-height: 1.8; font-size: 14px; }
.tips { color: #389e0d; margin-top: 8px; line-height: 1.8; font-size: 14px; }

/* ==================== 教学报告文本（纯文本模式）==================== */
.teaching-text {
    white-space: pre-wrap;
    line-height: 2.5;
    font-size: 15px;
    color: #2c3e50;
    padding: 24px;
    background: #fafafa;
    border-radius: 8px;
}

/* ==================== 移动端适配（报告区域）==================== */
@media (max-width: 768px) {
    .score-grid { grid-template-columns: 1fr 1fr; }
    .total-score-value { font-size: 36px; }
    .report-card { padding: 16px; }
    .report-text-card { padding: 16px 18px; }
}

@media (max-width: 480px) {
    .score-grid { grid-template-columns: 1fr; }
    .score-circle { width: 64px; height: 64px; font-size: 20px; }
    .total-score-value { font-size: 32px; }
    .report-card { padding: 14px; }
    .markdown-body table { font-size: 12px; }
    .markdown-body table thead th,
    .markdown-body table tbody td { padding: 6px 4px; }
}
