/* ============================================================
   在线模拟考试系统 v1.0 - 竞技风格样式
   C++信息学奥赛在线模拟考试系统
   作者：薛老师编程网校 xuelaoshi.cn
   ============================================================ */

/* ===== CSS变量 ===== */
:root {
    --exam-primary: #6366f1;
    --exam-primary-light: #818cf8;
    --exam-primary-dark: #4f46e5;
    --exam-success: #10b981;
    --exam-warning: #f59e0b;
    --exam-danger: #ef4444;
    --exam-info: #0ea5e9;
    --exam-bg: #f0f2ff;
    --exam-card-bg: rgba(255,255,255,0.95);
    --exam-glass: rgba(255,255,255,0.75);
    --exam-border: rgba(226,232,240,0.8);
    --exam-shadow: 0 4px 24px rgba(15,23,42,0.06);
    --exam-radius: 1.25rem;
    --exam-radius-sm: 0.75rem;
}

/* ===== 页面背景 ===== */
.exam-page-bg {
    background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 40%, #f0f9ff 100%);
    min-height: 100vh;
}

/* ===== 考试卡片网格 ===== */
.exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}

/* ===== 试卷卡片 ===== */
.exam-paper-card {
    background: var(--exam-card-bg);
    border: 1px solid var(--exam-border);
    border-radius: var(--exam-radius);
    padding: 1.5rem;
    box-shadow: var(--exam-shadow);
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.exam-paper-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(99,102,241,0.12), 0 4px 12px rgba(15,23,42,0.06);
    border-color: #c7d2fe;
}
.exam-paper-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--exam-primary), #a78bfa);
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.exam-paper-card:hover::before { transform: scaleX(1); }

.exam-paper-icon {
    width: 3.25rem; height: 3.25rem;
    border-radius: var(--exam-radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.exam-paper-card:hover .exam-paper-icon {
    transform: scale(1.08) rotate(-5deg);
}
.exam-paper-icon.csp-j { background: linear-gradient(135deg, #dbeafe, #e0f2fe); color: #2563eb; }
.exam-paper-icon.csp-s { background: linear-gradient(135deg, #ede9fe, #f3e8ff); color: #7c3aed; }
.exam-paper-icon.noip  { background: linear-gradient(135deg, #fef3c7, #fef9c3); color: #d97706; }

.exam-paper-badge {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.2rem 0.65rem; border-radius: 999px;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em;
}
.badge-cspj { background: #dbeafe; color: #1d4ed8; }
.badge-csps { background: #ede9fe; color: #6d28d9; }
.badge-noip { background: #fef3c7; color: #b45309; }
.badge-mock { background: #f0fdf4; color: #15803d; }

.exam-paper-stats {
    display: flex; flex-wrap: wrap; gap: 0.75rem;
}
.exam-stat-item {
    display: flex; align-items: center; gap: 0.35rem;
    font-size: 0.78rem; color: #64748b;
}
.exam-stat-item i { font-size: 0.75rem; }

/* ===== 考试大厅头部横幅 ===== */
.exam-hero {
    background: linear-gradient(135deg, #312e81, #4338ca, #6366f1);
    border-radius: var(--exam-radius);
    padding: 2.25rem 2rem;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.exam-hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 70%);
    border-radius: 50%;
}
.exam-hero::after {
    content: '';
    position: absolute;
    bottom: -30%; left: -10%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(167,139,250,0.2), transparent 60%);
    border-radius: 50%;
}
.exam-hero > * { position: relative; z-index: 1; }

/* ===== 统计数据面板 ===== */
.exam-stat-panel {
    background: var(--exam-card-bg);
    border: 1px solid var(--exam-border);
    border-radius: var(--exam-radius-sm);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--exam-shadow);
    transition: all 0.3s ease;
}
.exam-stat-panel:hover {
    box-shadow: 0 8px 32px rgba(15,23,42,0.08);
    transform: translateY(-2px);
}

/* ===== 考试倒计时准备页 ===== */
.exam-start-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}
.exam-start-card {
    background: var(--exam-card-bg);
    border: 1px solid var(--exam-border);
    border-radius: var(--exam-radius);
    padding: 2rem;
    box-shadow: var(--exam-shadow);
    text-align: center;
}
.exam-start-icon {
    width: 5rem; height: 5rem; border-radius: 50%;
    background: linear-gradient(135deg, var(--exam-primary), var(--exam-primary-light));
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.25rem; color: white;
    box-shadow: 0 8px 32px rgba(99,102,241,0.35);
    animation: iconBreath 3s ease-in-out infinite;
}
@keyframes iconBreath {
    0%,100% { box-shadow: 0 8px 32px rgba(99,102,241,0.35); transform: scale(1); }
    50% { box-shadow: 0 16px 48px rgba(99,102,241,0.5); transform: scale(1.05); }
}

.exam-rules-list {
    text-align: left;
    background: #f8fafc;
    border-radius: var(--exam-radius-sm);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}
.exam-rules-list li {
    padding: 0.4rem 0; font-size: 0.9rem; color: #475569;
    display: flex; align-items: flex-start; gap: 0.5rem;
}

/* ===== 考试进行中页面 ===== */
.exam-doing-container {
    display: flex;
    height: calc(100vh - 65px);
    background: #f1f5f9;
}

/* 左侧题目导航 */
.exam-sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid #e2e8f0;
    display: flex; flex-direction: column;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.exam-sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 700; font-size: 0.9rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.exam-question-nav {
    flex: 1; overflow-y: auto;
    padding: 0.75rem;
    display: flex; flex-wrap: wrap;
    align-content: flex-start; gap: 0.5rem;
}
.exam-qnav-btn {
    width: 2.5rem; height: 2.5rem; border-radius: 0.6rem;
    border: 2px solid #e2e8f0;
    background: white;
    font-size: 0.8rem; font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex; align-items: center; justify-content: center;
}
.exam-qnav-btn:hover { border-color: var(--exam-primary); color: var(--exam-primary); }
.exam-qnav-btn.active { background: var(--exam-primary); color: white; border-color: var(--exam-primary); }
.exam-qnav-btn.answered { background: #d1fae5; border-color: #6ee7b7; color: #065f46; }
.exam-qnav-btn.flagged { border-color: #fbbf24; background: #fef3c7; }

.exam-sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e2e8f0;
}

/* 右侧答题区 */
.exam-main-area {
    flex: 1;
    display: flex; flex-direction: column;
    overflow: hidden;
}

/* 顶部计时器栏 */
.exam-timer-bar {
    background: linear-gradient(135deg, #1e293b, #334155);
    padding: 0.7rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
    color: white;
    flex-shrink: 0;
}
.exam-timer {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.35rem; font-weight: 700;
    display: flex; align-items: center; gap: 0.5rem;
}
.exam-timer.warning { color: #fbbf24; }
.exam-timer.danger { color: #f87171; animation: timerBlink 1s infinite; }
@keyframes timerBlink {
    50% { opacity: 0.5; }
}
.exam-progress-info {
    display: flex; align-items: center; gap: 1rem;
    font-size: 0.85rem; color: #cbd5e1;
}

/* 答题内容区 */
.exam-content-area {
    flex: 1; overflow-y: auto;
    padding: 1.5rem 2rem;
}
.exam-question-card {
    background: white;
    border-radius: var(--exam-radius);
    padding: 1.5rem;
    box-shadow: var(--exam-shadow);
    border: 1px solid #e2e8f0;
}
.exam-question-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}
.exam-question-meta {
    display: flex; gap: 0.75rem; align-items: center;
}

/* 代码编辑器区域 */
.exam-code-display {
    background: #1a1e2e;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid #334155;
}
.exam-code-header {
    background: #1f2437;
    padding: 0.5rem 1rem;
    display: flex; align-items: center; justify-content: space-between;
    color: #94a3b8; font-size: 0.75rem;
}
.exam-code-content {
    padding: 1rem 1.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    color: #e2e8f0;
    overflow-x: auto;
    white-space: pre;
    max-height: 300px;
    overflow-y: auto;
}
.exam-code-content .keyword { color: #c084fc; }
.exam-code-content .string { color: #4ade80; }
.exam-code-content .comment { color: #64748b; font-style: italic; }
.exam-code-content .number { color: #fb923c; }

/* 输入区域 */
.exam-input-area {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}
.exam-input-header {
    background: #f8fafc;
    padding: 0.5rem 1rem;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.75rem; color: #64748b;
}
.exam-textarea {
    width: 100%;
    min-height: 280px;
    padding: 1rem 1.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    border: none;
    outline: none;
    resize: vertical;
    color: #1e293b;
    background: #fafbfc;
    tab-size: 4;
}
.exam-textarea:focus { background: #fefefe; }
.exam-textarea::placeholder { color: #94a3b8; }

/* 底部操作栏 */
.exam-actions-bar {
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 0.85rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0;
}
.exam-action-btn {
    padding: 0.55rem 1.25rem;
    border-radius: 0.65rem;
    font-size: 0.85rem; font-weight: 600;
    border: none; cursor: pointer;
    display: flex; align-items: center; gap: 0.4rem;
    transition: all 0.25s ease;
}
.exam-action-btn:active { transform: scale(0.95); }
.exam-btn-primary {
    background: linear-gradient(135deg, var(--exam-primary), var(--exam-primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.exam-btn-primary:hover { box-shadow: 0 6px 20px rgba(99,102,241,0.45); transform: translateY(-1px); }
.exam-btn-outline {
    background: white; color: #475569;
    border: 1.5px solid #e2e8f0;
}
.exam-btn-outline:hover { border-color: #cbd5e1; background: #f8fafc; }
.exam-btn-danger {
    background: white; color: var(--exam-danger);
    border: 1.5px solid #fecaca;
}
.exam-btn-danger:hover { background: #fef2f2; }

/* ===== 考试成绩页 ===== */
.exam-result-container {
    max-width: 900px; margin: 0 auto; padding: 2rem 1rem;
}
.exam-result-card {
    background: var(--exam-card-bg);
    border: 1px solid var(--exam-border);
    border-radius: var(--exam-radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--exam-shadow);
    text-align: center;
}
.exam-score-circle {
    width: 160px; height: 160px; border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    position: relative;
}
.exam-score-circle::before {
    content: '';
    position: absolute; inset: -8px; border-radius: 50%;
    background: conic-gradient(
        var(--exam-primary) var(--score-percent, 0%),
        #e2e8f0 var(--score-percent, 0%)
    );
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #fff calc(100% - 7px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #fff calc(100% - 7px));
}
.exam-score-big {
    font-size: 2.5rem; font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    color: var(--exam-primary);
    position: relative; z-index: 1;
}
.exam-score-label {
    font-size: 0.8rem; color: #64748b;
    position: relative; z-index: 1;
}

/* 成绩等级徽章 */
.exam-grade-badge {
    display: inline-block;
    padding: 0.35rem 1.25rem; border-radius: 999px;
    font-size: 1rem; font-weight: 700;
    letter-spacing: 0.03em;
    margin: 0.5rem 0 1rem;
}
.grade-S { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; border: 2px solid #fbbf24; }
.grade-A { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #065f46; border: 2px solid #34d399; }
.grade-B { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1e40af; border: 2px solid #60a5fa; }
.grade-C { background: linear-gradient(135deg, #fef9c3, #fef08a); color: #854d0e; border: 2px solid #facc15; }
.grade-D { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #991b1b; border: 2px solid #f87171; }

/* 成绩详情网格 */
.exam-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.exam-detail-item {
    background: #f8fafc;
    padding: 1rem 1.25rem;
    border-radius: var(--exam-radius-sm);
    text-align: center;
    border: 1px solid #e2e8f0;
}
.exam-detail-value {
    font-size: 1.5rem; font-weight: 800;
    color: #1e293b;
    font-family: 'JetBrains Mono', monospace;
}
.exam-detail-label {
    font-size: 0.75rem; color: #64748b;
    margin-top: 0.25rem;
}

/* ===== 分析报告页 ===== */
.report-container {
    max-width: 1000px; margin: 0 auto; padding: 2rem 1rem;
}
.report-section {
    background: var(--exam-card-bg);
    border: 1px solid var(--exam-border);
    border-radius: var(--exam-radius);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--exam-shadow);
    margin-bottom: 1.25rem;
}
.report-section-header {
    display: flex; align-items: center; gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1.5px solid #f1f5f9;
}
.report-section-icon {
    width: 2.5rem; height: 2.5rem; border-radius: 0.7rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* 知识点分析表格 */
.knowledge-table {
    width: 100%; border-collapse: collapse;
    font-size: 0.85rem;
}
.knowledge-table th {
    text-align: left; padding: 0.65rem 0.75rem;
    font-size: 0.72rem; font-weight: 700; color: #64748b;
    text-transform: uppercase; letter-spacing: 0.04em;
    background: #f8fafc;
    border-bottom: 1.5px solid #e2e8f0;
}
.knowledge-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}
.knowledge-table tr:hover td { background: #f8fafc; }

/* 薄弱等级标签 */
.weak-badge {
    display: inline-block; padding: 0.15rem 0.55rem;
    border-radius: 999px; font-size: 0.68rem; font-weight: 700;
}
.weak-critical { background: #fee2e2; color: #991b1b; }
.weak-high { background: #fed7aa; color: #9a3412; }
.weak-medium { background: #fef9c3; color: #854d0e; }
.weak-low { background: #d1fae5; color: #065f46; }

/* 获奖差距卡片 */
.prize-gap-card {
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    border: 1.5px solid #bfdbfe;
    border-radius: var(--exam-radius-sm);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}
.prize-gap-card::after {
    content: '';
    position: absolute; right: -10px; top: -10px;
    font-size: 5rem; opacity: 0.06;
}

/* 进度条 */
.exam-progress-bar {
    width: 100%; height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
}
.exam-progress-fill {
    height: 100%; border-radius: 5px;
    background: linear-gradient(90deg, var(--exam-primary), var(--exam-primary-light));
    transition: width 0.6s cubic-bezier(0.34,1.56,0.64,1);
}

/* 建议卡片 */
.suggestion-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: var(--exam-radius-sm);
    padding: 1rem 1.25rem;
    display: flex; align-items: flex-start; gap: 0.85rem;
    transition: all 0.3s ease;
}
.suggestion-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 16px rgba(99,102,241,0.08);
}
.suggestion-icon {
    width: 2.25rem; height: 2.25rem; border-radius: 0.6rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 0.9rem;
}

/* ===== 专项训练页 ===== */
.training-container {
    max-width: 900px; margin: 0 auto; padding: 2rem 1rem;
}
.training-plan-card {
    background: var(--exam-card-bg);
    border: 1px solid var(--exam-border);
    border-radius: var(--exam-radius);
    padding: 1.5rem;
    box-shadow: var(--exam-shadow);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}
.training-plan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(15,23,42,0.08);
}
.training-progress {
    display: flex; align-items: center; gap: 0.75rem;
    margin: 0.75rem 0;
}
.training-exercise-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 0.6rem;
    margin-bottom: 0.5rem;
    border: 1px solid transparent;
    transition: all 0.25s ease;
    cursor: pointer;
}
.training-exercise-item:hover {
    border-color: #c7d2fe;
    background: #f0f2ff;
}
.training-exercise-item.completed {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

/* ===== 按钮组 ===== */
.btn-exam {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.7rem 1.5rem; border-radius: 0.75rem;
    font-weight: 700; font-size: 0.9rem;
    border: none; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.btn-exam:active { transform: scale(0.95); }
.btn-exam-primary {
    background: linear-gradient(135deg, var(--exam-primary), var(--exam-primary-dark));
    color: white;
    box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}
.btn-exam-primary:hover {
    box-shadow: 0 8px 28px rgba(99,102,241,0.45);
    transform: translateY(-2px);
}
.btn-exam-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 16px rgba(16,185,129,0.3);
}
.btn-exam-success:hover {
    box-shadow: 0 8px 28px rgba(16,185,129,0.45);
    transform: translateY(-2px);
}
.btn-exam-outline {
    background: white; color: var(--exam-primary);
    border: 1.5px solid var(--exam-primary);
}
.btn-exam-outline:hover {
    background: var(--exam-primary);
    color: white;
}

/* ===== 响应式适配 ===== */
@media (max-width: 900px) {
    .exam-doing-container { flex-direction: column; }
    .exam-sidebar {
        width: 100%; max-height: 120px;
        border-right: none; border-bottom: 1px solid #e2e8f0;
    }
    .exam-question-nav {
        flex-wrap: nowrap; overflow-x: auto;
        padding: 0.5rem 0.75rem; gap: 0.4rem;
    }
    .exam-sidebar-header { padding: 0.6rem 0.75rem; font-size: 0.8rem; }
    .exam-qnav-btn { width: 2.25rem; height: 2.25rem; flex-shrink: 0; }
    .exam-content-area { padding: 1rem; }
    .exam-code-content { max-height: 200px; font-size: 0.75rem; }
    .exam-textarea { min-height: 180px; font-size: 0.78rem; }
    .exam-grid { grid-template-columns: 1fr; }
    .exam-detail-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .exam-hero { padding: 1.5rem 1.25rem; }
    .exam-result-card { padding: 1.5rem 1rem; }
    .exam-score-circle { width: 120px; height: 120px; }
    .exam-score-big { font-size: 1.8rem; }
    .exam-detail-grid { grid-template-columns: 1fr; }
    .exam-timer-bar { padding: 0.5rem 0.75rem; }
    .exam-timer { font-size: 1.1rem; }
    .report-section { padding: 1rem; }
    .knowledge-table { font-size: 0.72rem; }
    .knowledge-table th, .knowledge-table td { padding: 0.4rem 0.4rem; }
    .exam-actions-bar { padding: 0.65rem 0.75rem; }
    .exam-action-btn { padding: 0.45rem 0.85rem; font-size: 0.78rem; }
}

/* 考试确认弹窗 */
.exam-modal-overlay {
    position: fixed; inset: 0; background: rgba(15,23,42,0.5);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}
.exam-modal {
    background: white; border-radius: var(--exam-radius);
    padding: 2rem; max-width: 440px; width: 90%;
    box-shadow: 0 24px 64px rgba(15,23,42,0.2);
    animation: slideUp 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* 移动端触摸优化 */
@media (hover: none) and (pointer: coarse) {
    .exam-qnav-btn { min-width: 40px; min-height: 40px; }
    .exam-action-btn { min-height: 44px; }
}

/* ===== 代码行号显示 ===== */
.code-with-lines {
    padding: 0 !important;
    overflow: auto;
}
.code-line-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.85;
    color: #e2e8f0;
}
.code-line-table .line-num {
    width: 1%;
    min-width: 3rem;
    padding: 0 0.9rem 0 0.65rem;
    text-align: right;
    color: #4a5568;
    background: #161b25;
    border-right: 1px solid #2d3748;
    user-select: none;
    -webkit-user-select: none;
    font-size: 0.78rem;
    vertical-align: top;
    white-space: nowrap;
}
.code-line-table .line-code {
    padding: 0 1.25rem;
    white-space: pre;
    vertical-align: top;
}
.code-line-table .code-row:hover {
    background: rgba(99,102,241,0.08);
}
.code-line-table .code-row:hover .line-num {
    color: #818cf8;
    background: #1e2433;
}

/* ===== 代码解析面板 ===== */
.exam-analysis-panel {
    background: white;
    border-radius: var(--exam-radius);
    margin-top: 1rem;
    box-shadow: var(--exam-shadow);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}
.exam-analysis-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    overflow-x: auto;
}
.analysis-tab-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
}
.analysis-tab-btn:hover {
    color: var(--exam-primary);
    background: rgba(99,102,241,0.04);
}
.analysis-tab-btn.active {
    color: var(--exam-primary);
    border-bottom-color: var(--exam-primary);
    background: white;
}
.exam-analysis-content {
    padding: 1.25rem 1.5rem;
    min-height: 60px;
}
.analysis-item {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    border-left-width: 3px;
    border-left-style: solid;
    padding: 1rem 1.25rem;
    border-radius: 0 0.75rem 0.75rem 0;
}
.analysis-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.analysis-item-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}
.analysis-item-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}
.analysis-item-body {
    font-size: 0.88rem;
    line-height: 1.75;
    color: #475569;
}
.analysis-empty {
    text-align: center;
    padding: 1.5rem 0;
}
.analysis-empty-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.4;
}
.analysis-empty p {
    font-size: 0.85rem;
    color: #94a3b8;
    margin: 0;
}

/* 响应式：分析面板在小屏上适配 */
@media (max-width: 900px) {
    .analysis-tab-btn {
        padding: 0.6rem 0.9rem;
        font-size: 0.78rem;
    }
    .exam-analysis-content {
        padding: 1rem;
    }
    .analysis-item {
        padding: 0.75rem 1rem;
    }
    .analysis-item-body {
        font-size: 0.82rem;
    }
    .code-line-table { font-size: 0.75rem; }
    .code-line-table .line-num { min-width: 2.25rem; padding: 0 0.5rem; font-size: 0.7rem; }
    .code-line-table .line-code { padding: 0 0.75rem; }
}
