/* CET 作文评卷页样式 */

.cet-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.cet-main, .cet-aside { min-width: 0; }

@media (max-width: 1000px) {
    .cet-layout { grid-template-columns: 1fr; }
}

.glass-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 14px;
    padding: 22px 26px;
    margin-bottom: 16px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}
.glass-card h2 {
    color: #2a3441;
    margin-bottom: 14px;
    font-size: 18px;
    border-left: 4px solid #f7a8b8;
    padding-left: 10px;
}
.glass-card h3 {
    color: #3a4854;
    font-size: 15px;
    margin: 18px 0 10px;
}

/* 表单 */
.form-row {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.form-row label, .full-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    font-size: 13px;
    color: #455;
    min-width: 200px;
}
.full-row { display: block; margin-bottom: 14px; }
.full-row > input, .full-row > textarea {
    margin-top: 6px;
}

select, input[type=text], textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d6dde4;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    color: #1a1a1a;
    transition: border-color .15s;
}
select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: #69b3f0;
    box-shadow: 0 0 0 3px rgba(105,179,240,.15);
}
textarea {
    resize: vertical;
    min-height: 200px;
    font-family: ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
    line-height: 1.6;
}
.hint { color: #888; font-size: 12px; margin-top: 4px; display: block; }

.action-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 6px;
}
.primary-btn, .secondary-btn {
    padding: 9px 22px;
    border-radius: 22px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: opacity .15s;
}
.primary-btn { background: #69b3f0; color: white; }
.secondary-btn { background: #e1e7ed; color: #455; }
.primary-btn:hover, .secondary-btn:hover { opacity: 0.85; }
.primary-btn:disabled { opacity: .5; cursor: not-allowed; }
.muted { color: #888; font-size: 13px; }

/* 评分横幅 */
.score-banner {
    display: flex;
    align-items: center;
    gap: 28px;
    background: linear-gradient(135deg, rgba(247, 209, 215, 0.45), rgba(191, 227, 241, 0.45));
    border-radius: 12px;
    padding: 22px 28px;
    margin-bottom: 18px;
}
.score-big {
    font-family: 'Fraunces', 'Times New Roman', serif;
    font-size: 64px;
    font-weight: 600;
    color: #2a3441;
    line-height: 1;
    flex-shrink: 0;
}
.score-big small { font-size: 22px; color: #888; margin-left: 4px; }
.score-band { flex: 1; }
.band-label { font-size: 18px; font-weight: 600; color: #2a3441; margin-bottom: 6px; }
.band-comment { color: #455; line-height: 1.7; }

/* 七维度卡片网格 */
.dim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.dim-card {
    background: white;
    border: 1px solid #e7ecf1;
    border-radius: 10px;
    padding: 12px 14px;
}
.dim-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}
.dim-label { font-size: 13px; color: #455; font-weight: 600; }
.dim-score {
    font-family: 'Fraunces', serif;
    font-size: 22px;
    color: #2a3441;
    font-weight: 600;
}
.dim-score small { font-size: 12px; color: #888; }
.dim-bar {
    height: 5px;
    background: #f0f2f5;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}
.dim-bar-fill {
    height: 100%;
    background: linear-gradient(to right, #f7a8b8, #69b3f0);
    transition: width .4s;
}
.dim-comment {
    font-size: 12.5px;
    color: #666;
    line-height: 1.6;
}

/* 两列布局：亮点 / 不足 */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 720px) {
    .two-col { grid-template-columns: 1fr; }
}
.col {
    background: white;
    border-radius: 10px;
    padding: 14px 16px;
}
.col-title { font-weight: 600; margin-bottom: 10px; font-size: 14px; }
.col-title.strengths { color: #1d6e3a; }
.col-title.weaknesses { color: #a72323; }
.bullet-list { margin-left: 18px; line-height: 1.8; color: #455; font-size: 13.5px; }

/* 错误标记卡片 */
.err-card {
    background: #fff8f4;
    border-left: 3px solid #e08a4a;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 13.5px;
    line-height: 1.6;
}
.err-orig { font-family: 'JetBrains Mono', monospace; color: #2a3441; margin-bottom: 4px; }
.err-issue { color: #a72323; font-size: 12.5px; }
.err-fix { color: #1d6e3a; font-size: 12.5px; }

/* 参考大纲 */
.model-outline {
    background: rgba(105, 179, 240, 0.08);
    border-left: 4px solid #69b3f0;
    border-radius: 6px;
    padding: 14px 18px;
    color: #455;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* 历史侧边栏 */
.cet-aside .glass-card { position: sticky; top: 16px; }
.hist-item {
    background: white;
    border: 1px solid #e7ecf1;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.hist-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.hist-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.hist-score {
    font-family: 'Fraunces', serif;
    font-size: 22px;
    font-weight: 600;
    color: #2a3441;
    line-height: 1;
}
.hist-score small { font-size: 12px; color: #888; }
.hist-band {
    flex: 1;
    font-size: 11.5px;
    color: #888;
    background: #f0f2f5;
    padding: 2px 8px;
    border-radius: 999px;
    text-align: center;
}
.hist-del {
    background: transparent;
    border: none;
    color: #c44;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0 4px;
}
.hist-del:hover { color: #a22; }
.hist-topic {
    font-size: 13px;
    color: #2a3441;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}
.hist-meta { font-size: 11px; color: #888; }

/* 原始解析失败 */
#raw-text {
    background: #fbeaea;
    border-radius: 8px;
    padding: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #455;
    white-space: pre-wrap;
    max-height: 400px;
    overflow: auto;
}

/* ----------- AI 修改作文 ----------- */
.rewrite-btn {
    background: linear-gradient(135deg, #ff8fa3, #69b3f0) !important;
    color: white !important;
}
.rewrite-btn:hover { filter: brightness(1.05); }

.rewrite-summary {
    background: rgba(255, 200, 230, 0.18);
    border-left: 4px solid #ff8fa3;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #455;
    line-height: 1.7;
    font-size: 13.5px;
}

/* diff 视图：高亮新增 / 删除 */
.diff-view {
    background: white;
    border: 1px solid #e7ecf1;
    border-radius: 10px;
    padding: 16px 18px;
    line-height: 1.9;
    font-size: 14.5px;
    font-family: 'Cambria', 'Georgia', 'JetBrains Mono', serif;
    color: #2a3441;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 18px;
    max-height: 600px;
    overflow: auto;
}
.diff-view ins {
    background: rgba(76, 175, 80, 0.18);
    color: #0d6e2f;
    text-decoration: none;
    border-bottom: 2px solid #4caf50;
    padding: 0 1px;
    border-radius: 2px;
}
.diff-view del {
    background: rgba(244, 67, 54, 0.14);
    color: #a72323;
    text-decoration: line-through;
    text-decoration-color: rgba(167, 35, 35, 0.7);
    padding: 0 1px;
    border-radius: 2px;
}

/* 小图例（绿色 / 划掉）在标题里复用同样的样式 */
.ins-demo {
    background: rgba(76, 175, 80, 0.18);
    color: #0d6e2f;
    border-bottom: 2px solid #4caf50;
    padding: 0 4px;
    border-radius: 2px;
}
.del-demo {
    background: rgba(244, 67, 54, 0.14);
    color: #a72323;
    text-decoration: line-through;
    padding: 0 4px;
    border-radius: 2px;
}

/* 改动列表里的 ins/del 用同一套配色 */
.err-card ins {
    background: rgba(76, 175, 80, 0.18);
    color: #0d6e2f;
    text-decoration: none;
    padding: 0 2px;
    border-radius: 2px;
}
.err-card del {
    background: rgba(244, 67, 54, 0.14);
    color: #a72323;
    padding: 0 2px;
    border-radius: 2px;
}
