/* ===== 模式切换 ===== */
.mode-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.mode-toggle {
    background: rgba(255,255,255,0.5); padding: 0.35rem;
    border-radius: 60px; display: inline-flex; border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.mode-option {
    padding: 0.5rem 1.8rem; border-radius: 40px; border: none;
    background: transparent; font-weight: 600; font-size: 0.85rem;
    color: #64748b; cursor: pointer; 
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    z-index: 1;
}

.mode-option.active { 
    background: #4F6EF7; 
    color: white; 
    box-shadow: 0 4px 12px rgba(79,110,247,0.25);
    transform: scale(1.05);
}

.mode-option:hover:not(.active) {
    transform: scale(1.02);
    background: rgba(79,110,247,0.08);
}

.mode-option i { margin-right: 6px; }

/* ===== 下载按钮 ===== */
.download-btn {
    background: rgba(255,255,255,0.6);
    border: 1px solid #e2e8f0;
    padding: 0.55rem 1.4rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #475569;
    cursor: pointer;
    transition: 0.25s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.download-btn:hover {
    background: #4F6EF7;
    color: white;
    border-color: #4F6EF7;
    box-shadow: 0 4px 12px rgba(79,110,247,0.25);
    transform: translateY(-1px);
}

.download-btn i { font-size: 0.9rem; }

/* 未登录态渐变闪烁 */
.download-btn.guest-glow {
    animation: glowPulse 2.4s ease-in-out infinite;
    border-color: transparent;
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(79,110,247,0.4), 0 0 0 0 rgba(99,102,241,0.3);
        background: rgba(79,110,247,0.08);
    }
    25% {
        box-shadow: 0 0 12px 2px rgba(79,110,247,0.35), 0 0 24px 4px rgba(99,102,241,0.15);
        background: rgba(79,110,247,0.14);
    }
    50% {
        box-shadow: 0 0 6px 1px rgba(79,110,247,0.25), 0 0 16px 3px rgba(99,102,241,0.1);
        background: rgba(79,110,247,0.06);
    }
    75% {
        box-shadow: 0 0 16px 3px rgba(79,110,247,0.45), 0 0 32px 6px rgba(99,102,241,0.2);
        background: rgba(79,110,247,0.16);
    }
}

.download-btn.guest-glow:hover {
    animation: none;
    background: #4F6EF7;
    color: white;
    border-color: #4F6EF7;
    box-shadow: 0 4px 12px rgba(79,110,247,0.25);
    transform: translateY(-1px);
}

/* ===== 任务横幅 ===== */
.task-banner-container {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.8rem;
    align-items: stretch;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.task-banner-text {
    flex: 2;
    background: #ffffffcc;
    border-radius: 24px;
    padding: 1rem 1.8rem;
    border-left: 6px solid #4F6EF7;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.task-banner-text:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.task-banner-text h3 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    gap: 10px;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.task-banner-text p {
    color: #475569;
    font-size: 0.9rem;
    margin-top: 0.2rem;
    line-height: 1.5;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.badge {
    background: #eef2ff;
    color: #4F6EF7;
    font-size: 0.7rem;
    padding: 0.15rem 0.8rem;
    border-radius: 30px;
    font-weight: 600;
}

/* ===== 图表区域 ===== */
.task-banner-chart {
    flex: 1;
    background: #ffffffcc;
    border-radius: 24px;
    padding: 0.8rem 1.2rem;
    border: 1px solid rgba(255,255,255,0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    cursor: pointer;
    transition: background 0.2s;
}

.task-banner-chart:hover { background: #f1f5f9; }

.task-banner-chart svg {
    max-width: 100%;
    max-height: 100px;
    width: auto;
    height: auto;
    display: block;
    border-radius: 8px;
    pointer-events: none;
}

.chart-caption {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 0.2rem;
    text-align: center;
    letter-spacing: 0.3px;
}

.click-hint {
    font-size: 0.6rem;
    color: #4F6EF7;
    margin-top: 0.1rem;
    opacity: 0.6;
}

.task-banner-chart.hidden { display: none; }

/* ===== 未登录状态 ===== */
.guest-hide { display: none; }
body.logged-in .guest-hide { display: flex; }

/* ===== 登录模态框 ===== */
.login-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 32px;
    padding: 2.5rem 2rem 2rem;
    max-width: 420px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4), inset 0 1px 2px rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.3);
    position: relative;
    animation: springBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.login-header {
    text-align: center;
    margin-bottom: 1.8rem;
}

.login-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 0.75rem;
}

.login-header p {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.3rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.login-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-top: 0.6rem;
}

.login-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: 0.3s;
    background: rgba(255,255,255,0.6);
}

.login-input:focus {
    border-color: #4F6EF7;
    box-shadow: 0 0 0 4px rgba(79,110,247,0.1);
}

.login-error {
    margin-top: 0.8rem;
    padding: 0.5rem 0.8rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #DC2626;
    font-size: 0.78rem;
    text-align: center;
}

.login-submit {
    margin-top: 1.2rem;
    width: 100%;
    padding: 0.8rem;
    background: #1e293b;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
}

.login-submit:hover {
    background: #4F6EF7;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(79,110,247,0.3);
}

.login-footer {
    text-align: center;
    margin-top: 1.2rem;
    font-size: 0.8rem;
    color: #64748b;
}

.login-footer a {
    color: #4F6EF7;
    font-weight: 600;
    text-decoration: none;
}

.login-footer a:hover { text-decoration: underline; }

.login-divider {
    display: flex;
    align-items: center;
    margin: 1rem 0 0.6rem;
    color: #94a3b8;
    font-size: 0.78rem;
}
.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}
.login-divider span {
    padding: 0 0.8rem;
}

.login-qq-btn {
    width: 100%;
    padding: 0.72rem;
    background: #fff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.qq-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
}
.login-qq-btn .qq-icon {
    width: 22px;
    height: 22px;
}
.login-qq-btn:hover {
    border-color: #12B7F5;
    background: #f0faff;
    transform: translateY(-1px);
}

/* ===== 图表模态框 ===== */
.modal-content {
    background: white;
    border-radius: 32px;
    padding: 0.8rem;
    max-width: 96%;
    max-height: 96%;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.modal-content svg,
.modal-content img {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 12px;
}

.modal-caption {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #64748b;
    text-align: center;
}

/* ===== CTA 引导条 ===== */
.demo-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    border-radius: 16px;
    padding: 0.75rem 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #92400e;
    flex-wrap: wrap;
    justify-content: center;
}

.demo-cta i:first-child {
    color: #f59e0b;
    font-size: 1.1rem;
}

.demo-cta span {
    flex: 1;
    min-width: 200px;
}

.cta-btn {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 0.5rem 1.4rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.25s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.cta-btn:hover {
    background: #d97706;
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.cta-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.qq-home-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #12B7F5;
    color: #12B7F5;
    padding: 0.45rem 1.2rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.25s;
    white-space: nowrap;
}
.qq-home-btn:hover {
    background: #e8f7ff;
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(18, 183, 245, 0.25);
}
.qq-home-btn .qq-icon {
    width: 18px;
    height: 18px;
}

/* ===== 主内容区 ===== */
.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 0.5rem;
    align-items: start;
}

.left-panel {
    background: white;
    border-radius: 28px;
    padding: 1.8rem 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
    min-height: 360px;
    position: relative;
}

.text-display {
    font-size: 1rem;
    line-height: 2;
    color: #0f172a;
}

.text-display p { margin-bottom: 0.8rem; }
.text-display p:last-child { margin-bottom: 0; }

.hl {
    padding: 0.1rem 0.3rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    border-bottom: 2px solid transparent;
}

.hl:hover { opacity: 0.8; }

.hl .sup {
    font-size: 0.7rem;
    vertical-align: super;
    color: #1e293b;
    font-weight: 700;
    margin-left: 2px;
}

/* 统一使用红色高亮 */
.hl-grammar,
.hl-word,
.hl-coherence,
.hl-task,
.hl-phrase,
.hl-sentence,
.hl-error { background: #fecaca; border-bottom-color: #dc2626; }

.word-count {
    position: absolute;
    bottom: 1rem;
    right: 1.5rem;
    font-size: 0.8rem;
    color: #94a3b8;
    background: rgba(255,255,255,0.8);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    border: 1px solid #e2e8f0;
    pointer-events: none;
    user-select: none;
}

.interact-hint {
    font-size: 0.8rem;
    color: #4F6EF7;
    margin-top: 0.5rem;
    text-align: center;
    background: rgba(79,110,247,0.06);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ===== 右侧面板 ===== */
.right-panel {
    flex: 1;
    background: rgba(255,255,255,0.7);
    border-radius: 28px;
    padding: 1.5rem 1.2rem;
    border: 1px solid #f1f5f9;
    overflow-y: auto;
    backdrop-filter: blur(4px);
    min-height: 360px;
}

.right-panel::-webkit-scrollbar { width: 4px; }
.right-panel::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.score-badge {
    background: #10B981;
    color: white;
    padding: 0.2rem 1.2rem;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1.2rem;
}

/* ===== 错题本快捷入口 ===== */
.errorbook-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.55rem 0.9rem;
    margin-bottom: 0.6rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
    border: 1px solid #fcd34d;
    border-radius: 14px;
    font-size: 0.78rem;
    color: #92400e;
    animation: errorbookIn 0.4s ease-out;
}
@keyframes errorbookIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.errorbook-link-text {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}
.errorbook-link-text i { color: #f59e0b; font-size: 0.8rem; flex-shrink: 0; }
.errorbook-link-btn {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.72rem;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.errorbook-link-btn:hover {
    background: #d97706;
    transform: scale(1.04);
}

/* ===== 批注卡片 ===== */
.annotation-card {
    background: white;
    border-radius: 16px;
    margin-bottom: 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    border-left: 4px solid #4F6EF7;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    position: relative;
}

.annotation-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

@keyframes glowPulse {
    0% { box-shadow: 0 0 0 0 rgba(79, 110, 247, 0); border-left-color: #4F6EF7; }
    30% { box-shadow: 0 0 25px 12px rgba(79, 110, 247, 0.5); border-left-color: #4F6EF7; }
    70% { box-shadow: 0 0 25px 12px rgba(79, 110, 247, 0.5); border-left-color: #4F6EF7; }
    100% { box-shadow: 0 0 0 0 rgba(79, 110, 247, 0); border-left-color: #4F6EF7; }
}

.annotation-card.flash { animation: glowPulse 1.2s ease; }

.hl-flash {
    animation: hlGlow 0.8s ease;
}

@keyframes hlGlow {
    0% { background: #fef3c7; box-shadow: 0 0 12px 4px rgba(245, 158, 11, 0.4); }
    50% { background: #fde68a; box-shadow: 0 0 20px 8px rgba(245, 158, 11, 0.6); }
    100% { background: #fecaca; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.annotation-card .card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.8rem 1.2rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: #1e293b;
    background: #fafcff;
    transition: 0.2s;
}

.annotation-card .card-header:hover { background: #f1f5f9; }

.annotation-card .card-header .num {
    background: #4F6EF7;
    color: white;
    border-radius: 30px;
    padding: 0 0.6rem;
    font-size: 0.7rem;
    line-height: 1.6;
}

.card-summary {
    font-size: 0.8rem;
    color: #64748b;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-summary i { font-size: 0.7rem; transition: 0.3s; }
.annotation-card.expanded .card-summary i { transform: rotate(180deg); }

.card-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 1.2rem;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.annotation-card.expanded .card-body {
    max-height: 600px;
    opacity: 1;
    padding: 0 1.2rem 1rem 1.2rem;
}

.card-body .suggestion {
    font-size: 0.9rem;
    color: #0f172a;
    line-height: 1.6;
}

.card-body .suggestion-item {
    margin-top: 0.3rem;
    padding-left: 0.5rem;
    border-left: 2px solid #e2e8f0;
}

.card-body .suggestion-item strong { color: #4F6EF7; }

/* ===== 操作区 ===== */
.action-area {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.action-left { display: flex; gap: 0.8rem; }

.icon-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-size: 0.85rem;
    color: #475569;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-btn:hover { background: #f1f5f9; border-color: #cbd5e1; }

.submit-btn {
    background: #1e293b;
    color: white;
    border: none;
    padding: 0.6rem 2.5rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.25s;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 20px -6px rgba(30,41,59,0.2);
}

.submit-btn:hover { background: #4F6EF7; transform: translateY(-2px); }

.edit-area { display: none; margin-top: 1rem; }

.edit-area textarea {
    width: 100%;
    min-height: 160px;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 1rem;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.8;
    resize: vertical;
    outline: none;
    transition: 0.3s;
}

.edit-area textarea:focus { border-color: #4F6EF7; }

/* ===== 雅思四项评分评语板块 ===== */
.criteria-section {
    margin-top: 2rem;
    background: white;
    border-radius: 28px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
}

.overall-score {
    background: linear-gradient(135deg, #4F6EF7 0%, #6366f1 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(79,110,247,0.3);
}

.criteria-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1.5rem;
}

.criteria-card {
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
    padding: 1.5rem;
    border-left: 5px solid #4F6EF7;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.criteria-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.criteria-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(79,110,247,0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.criteria-card.task-response { border-left-color: #10B981; }
.criteria-card.coherence { border-left-color: #3B82F6; }
.criteria-card.lexical { border-left-color: #F59E0B; }
.criteria-card.grammatical { border-left-color: #EF4444; }

.criteria-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.criteria-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.criteria-title i {
    font-size: 1.2rem;
}

.criteria-score {
    background: white;
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.criteria-card.task-response .criteria-score { color: #10B981; }
.criteria-card.coherence .criteria-score { color: #3B82F6; }
.criteria-card.lexical .criteria-score { color: #F59E0B; }
.criteria-card.grammatical .criteria-score { color: #EF4444; }

.criteria-comment {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.7;
    flex: 1;
    display: flex;
    align-items: flex-start;
}

.criteria-comment strong {
    color: #1e293b;
    display: block;
    margin-bottom: 0.5rem;
}

/* ===== AI 老师追问卡片 ===== */
.tutor-prompt-card {
    margin-top: 1.5rem;
    background: linear-gradient(135deg, #eef2ff 0%, #f0f4ff 100%);
    border: 2px solid #4F6EF7;
    border-radius: 24px;
    padding: 1.2rem 1.6rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: tutorPromptIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transition: transform 0.3s, box-shadow 0.3s;
}
.tutor-prompt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79,110,247,0.15);
}
@keyframes tutorPromptIn {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.tutor-prompt-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, #4F6EF7 0%, #6366f1 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(79,110,247,0.3);
}
.tutor-prompt-body {
    flex: 1;
    min-width: 0;
}
.tutor-prompt-question {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.5;
}
.tutor-prompt-question strong {
    color: #4F6EF7;
}
.tutor-prompt-hint {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    gap: 4px;
}
.tutor-prompt-btn {
    background: #4F6EF7;
    color: white;
    border: none;
    padding: 0.65rem 1.4rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(79,110,247,0.3);
}
.tutor-prompt-btn:hover {
    background: #3b5de7;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(79,110,247,0.4);
}
.tutor-prompt-btn i {
    font-size: 0.9rem;
}
@media (max-width: 600px) {
    .tutor-prompt-card {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
        padding: 1rem 1.2rem;
    }
    .tutor-prompt-body { text-align: center; }
    .tutor-prompt-hint { justify-content: center; }
}

/* ===== 优化版本板块 ===== */
.optimized-section {
    margin-top: 2rem;
    background: white;
    border-radius: 28px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
}

.copy-btn {
    background: #4F6EF7;
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn:hover {
    background: #6366f1;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(79,110,247,0.3);
}

.copy-btn.copied {
    background: #10B981;
}

.optimized-content {
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
    padding: 1.8rem;
    font-size: 1rem;
    line-height: 2;
    color: #0f172a;
    border: 2px solid #e2e8f0;
    position: relative;
}

.optimized-content::before {
    content: '✨';
    position: absolute;
    top: -10px;
    left: 20px;
    background: white;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.optimized-content p {
    margin-bottom: 1rem;
}

.optimized-content p:last-child {
    margin-bottom: 0;
}

.optimized-highlight {
    background: linear-gradient(120deg, #fef3c7 0%, #fde68a 100%);
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    font-weight: 600;
    border-bottom: 2px solid #f59e0b;
}

/* ===== 响应式设计 ===== */
@media (max-width: 860px) {
    .task-banner-container { flex-direction: column; gap: 1rem; }
    .task-banner-chart { min-height: 80px; padding: 0.8rem; }
    .task-banner-chart svg { max-height: 70px; }
    .main-content { grid-template-columns: 1fr; }
    .right-panel { min-height: 300px; }
    .app-container { padding: 1.5rem; }
    .modal-content { padding: 0.5rem; max-width: 98%; max-height: 98%; }
    .modal-content svg, .modal-content img { max-height: 80vh; }
    .modal-close { top: 0.2rem; right: 0.5rem; font-size: 1.8rem; }
    
    /* 新增板块响应式 */
    .criteria-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .criteria-card {
        padding: 1.2rem;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .overall-score {
        align-self: flex-end;
    }
}

/* ===== AI 老师浮动按钮 ===== */
/* ===== AI 老师右侧抽屉 ===== */
.tutor-drawer-toggle {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    will-change: right;
    background: linear-gradient(135deg, #4F6EF7 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 36px 0 0 36px;
    padding: 2rem 0.7rem;
    cursor: pointer;
    z-index: 9980;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    box-shadow: -4px 0 20px rgba(79,110,247,0.25);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s, padding-right 0.3s;
    font-family: inherit;
    width: 60px;
}
/* 持续波纹动画 — 吸引用户注意 */
.tutor-drawer-toggle::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 40px 0 0 40px;
    border: 3px solid rgba(79,110,247,0.5);
    animation: togglePulse 2s ease-out infinite;
}
@keyframes togglePulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}
/* 展开状态下隐藏波纹 */
.tutor-drawer-toggle.open::before {
    display: none;
}
.tutor-drawer-toggle:hover {
    box-shadow: -6px 0 28px rgba(79,110,247,0.4);
    padding-right: 0.65rem;
}
.tutor-drawer-toggle i {
    font-size: 1.3rem;
    transition: transform 0.3s;
}
.toggle-label {
    writing-mode: vertical-rl;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.15em;
}

/* 抽屉打开时按钮移到抽屉左边 */
.tutor-drawer-toggle.open {
    right: 42vw;
}
.tutor-drawer-toggle.open i {
    transform: rotate(180deg);
}

.tutor-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 42vw;
    min-width: 420px;
    height: 100vh;
    background: white;
    box-shadow: -8px 0 40px rgba(0,0,0,0.12);
    z-index: 9979;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.tutor-drawer.open {
    transform: translateX(0);
}
.tutor-drawer.open ~ .app-container {
    /* body直子元素，不影响app-container */
}

/* app-container 在抽屉打开时收缩 */
body.tutor-drawer-open .app-container {
    margin-right: 42vw;
    transition: margin-right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tutor-drawer-header {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1rem 1.3rem;
    background: linear-gradient(135deg, #4F6EF7 0%, #6366f1 100%);
    color: white;
    flex-shrink: 0;
}
.tutor-drawer-title {
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.tutor-drawer-context {
    flex: 1;
    font-size: 0.68rem;
    opacity: 0.8;
}
.tutor-drawer-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.2s;
    padding: 0;
    line-height: 1;
}
.tutor-drawer-close:hover { opacity: 1; }

.tutor-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    background: #f8fafc;
}
.tutor-drawer-body::-webkit-scrollbar { width: 4px; }
.tutor-drawer-body::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }

.tutor-drawer-msg {
    display: flex;
    gap: 0.5rem;
    animation: tutorMsgIn 0.3s ease-out;
}
@keyframes tutorMsgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.tutor-drawer-msg-bot { align-items: flex-start; }
.tutor-drawer-msg-user { flex-direction: row-reverse; }

.tutor-drawer-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4F6EF7, #6366f1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.tutor-drawer-bubble {
    max-width: 82%;
    padding: 0.7rem 1rem;
    border-radius: 18px;
    font-size: 0.8rem;
    line-height: 1.65;
    color: #1e293b;
}
.tutor-drawer-msg-bot .tutor-drawer-bubble {
    background: white;
    border-top-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.tutor-drawer-msg-user .tutor-drawer-bubble {
    background: #4F6EF7;
    color: white;
    border-top-right-radius: 4px;
}
/* Markdown styles in drawer bubbles */
.tutor-drawer-bubble p { margin: 0 0 0.4rem 0; }
.tutor-drawer-bubble p:last-child { margin-bottom: 0; }
.tutor-drawer-bubble ul, .tutor-drawer-bubble ol { margin: 0.3rem 0 0.5rem 0; padding-left: 1.2rem; }
.tutor-drawer-bubble li { margin-bottom: 0.1rem; }
.tutor-drawer-bubble strong { font-weight: 700; color: #1e293b; }
.tutor-drawer-bubble em { font-style: italic; color: #475569; }
.tutor-drawer-bubble code { background: #e2e8f0; padding: 1px 5px; border-radius: 4px; font-size: 0.75rem; }

/* 流式输出光标 */
.streaming-cursor {
    display: inline-block;
    color: #4F6EF7;
    animation: cursorBlink 0.8s ease-in-out infinite;
}
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 思考过程（与 tutor.css 保持一致） */
.tutor-drawer .thinking-section {
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #f0f4ff 0%, #fafcff 100%);
    border: 1px solid #dde4f7;
    border-radius: 14px;
    overflow: hidden;
}
.tutor-drawer .thinking-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.45rem 0.8rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.7rem;
    color: #64748b;
}
.tutor-drawer .thinking-toggle:hover { color: #4F6EF7; }
.tutor-drawer .thinking-icon { font-size: 0.7rem; color: #818cf8; }
.tutor-drawer .thinking-label { flex: 1; text-align: left; font-weight: 600; }
.tutor-drawer .thinking-chevron { font-size: 0.6rem; color: #94a3b8; }
.tutor-drawer .thinking-content {
    padding: 0.3rem 0.8rem 0.5rem 0.8rem;
    border-top: 1px solid #eef2ff;
    max-height: 150px;
    overflow-y: auto;
}
.tutor-drawer .thinking-text {
    font-size: 0.65rem;
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
    color: #64748b;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.tutor-drawer .thinking-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: #818cf8;
    vertical-align: text-bottom;
    animation: cursorBlink 0.8s ease-in-out infinite;
}
.tutor-drawer .streaming-cursor {
    display: inline-block;
    color: #4F6EF7;
    animation: cursorBlink 0.8s ease-in-out infinite;
}
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.tutor-drawer .stream-cancel-btn,
.tutor-drawer-cancel {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.4rem;
    padding: 0.3rem 0.7rem;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.65rem;
    font-family: inherit;
    color: #94a3b8;
    cursor: pointer;
    transition: 0.2s;
}
.tutor-drawer .stream-cancel-btn:hover,
.tutor-drawer-cancel:hover { border-color: #fecaca; color: #DC2626; background: #fef2f2; }

/* 输入区 */
.tutor-drawer-input-area {
    border-top: 1px solid #f1f5f9;
    padding: 0.8rem 1rem;
    background: #fafcff;
    flex-shrink: 0;
}

.tutor-drawer-unlogged {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-size: 0.72rem;
    color: #92400e;
    background: #fffbeb;
    border-radius: 12px;
    padding: 0.6rem 0.9rem;
    flex-wrap: wrap;
}
.tutor-drawer-login-btn {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.72rem;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}
.tutor-drawer-login-btn:hover { background: #d97706; }

.tutor-drawer-input-row {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}
.tutor-drawer-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
    font-family: inherit;
    resize: none;
    outline: none;
    line-height: 1.4;
    max-height: 100px;
    transition: 0.2s;
}
.tutor-drawer-input:focus { border-color: #4F6EF7; box-shadow: 0 0 0 3px rgba(79,110,247,0.08); }

.tutor-drawer-send {
    background: #4F6EF7;
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    flex-shrink: 0;
}
.tutor-drawer-send:hover { background: #3b5de7; }

/* 流式取消按钮 */
.tutor-drawer-cancel {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.4rem;
    padding: 0.3rem 0.7rem;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.65rem;
    font-family: inherit;
    color: #94a3b8;
    cursor: pointer;
    transition: 0.2s;
}
.tutor-drawer-cancel:hover { border-color: #fecaca; color: #DC2626; background: #fef2f2; }

@media (max-width: 780px) {
    .tutor-drawer { width: 100vw; min-width: 0; }
    .tutor-drawer-toggle.open { right: 100vw; }
    body.tutor-drawer-open .app-container { margin-right: 0; }
}
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    border: 1px solid #e2e8f0;
    min-width: 160px;
    overflow: hidden;
    z-index: 100;
    animation: dropdownIn 0.2s ease-out;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    transition: background 0.15s;
}

.user-dropdown a:hover {
    background: #f1f5f9;
    color: #4F6EF7;
}

.user-dropdown a i {
    width: 18px;
    text-align: center;
    color: #94a3b8;
}

.user-dropdown a:hover i { color: #4F6EF7; }

@media (max-width: 480px) {
    .tutor-drawer {
        width: 100vw;
        min-width: 0;
    }
    .tutor-drawer-toggle.open {
        right: 100vw;
    }
    body.tutor-drawer-open .app-container {
        margin-right: 0;
    }
}

