/* 任务中心与积分展示专属样式 (即插即用) */
.user-points-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #fef3c7 0%, #fef08a 100%);
    color: #b45309;
    border: 1px solid #fcd34d;
    padding: 3px 10px;
    border-radius: 16px;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(245, 158, 11, 0.15);
    margin-right: 6px;
}
.user-points-num {
    font-size: 0.95rem;
    color: #92400e;
    font-weight: 800;
}
.task-section {
    margin: 16px 0 24px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}
.task-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.task-title {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}
.task-tabs-container {
    display: flex;
    gap: 6px;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 10px;
    margin-bottom: 14px;
}
.task-tab-btn {
    flex: 1;
    padding: 7px 4px;
    font-size: 0.85rem;
    font-weight: 700;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}
.task-tab-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}
.task-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.task-item-card {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    gap: 12px;
    transition: all 0.2s ease;
}
.task-item-card.completed {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.task-item-icon {
    font-size: 22px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}
.task-item-main {
    flex: 1;
    min-width: 0;
}
.task-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3px;
}
.task-item-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.task-reward-tag {
    font-size: 0.76rem;
    font-weight: 700;
    color: #d97706;
    background: #fef3c7;
    padding: 2px 6px;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}
.task-item-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.task-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.task-progress-track {
    flex: 1;
    height: 7px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.task-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5 0%, #818cf8 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}
.task-item-card.completed .task-progress-fill {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}
.task-progress-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 48px;
    text-align: right;
}
.task-action-btn {
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    background: #ffffff;
    color: var(--primary);
    border: 1px solid var(--border-color);
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.task-action-btn:hover {
    background: #eef2ff;
}
.task-item-card.completed .task-action-btn {
    background: #dcfce7;
    color: #15803d;
    border-color: #86efac;
    pointer-events: none;
}
/* 必修任务专属高亮边框、徽章与按钮 */
.task-mandatory-tag {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    margin-right: 5px;
    vertical-align: 1px;
    box-shadow: 0 1px 4px rgba(239, 68, 68, 0.35);
}
.task-item-card.mandatory-card {
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
    border: 1.8px solid #f59e0b;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.12);
}
.mandatory-icon {
    background: #fef3c7 !important;
    border: 1px solid #fde68a;
}
.task-reward-tag.mandatory-reward {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}
.task-progress-track.mandatory-track {
    background: #fde68a;
}
.mandatory-card .task-progress-fill {
    background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
}
.task-action-btn.mandatory-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}
.task-action-btn.mandatory-done {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}
/* 首页模块选项卡与掌握横幅 */
.main-module-tabs {
    display: flex;
    gap: 8px;
    background: #e2e8f0;
    padding: 4px;
    border-radius: 12px;
    margin: 14px 0 16px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}
.main-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
}
.main-tab-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.main-tab-btn:active { transform: scale(0.98); }
.main-tab-icon { font-size: 1.1rem; }
.module-panel { display: none; animation: fadeIn 0.22s ease-out; }
.module-panel.active { display: block; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
.quiz-grade-hint-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.quiz-grade-hint-badge {
    font-weight: 700;
    color: var(--primary);
    background: #e0e7ff;
    padding: 2px 8px;
    border-radius: 6px;
}
.task-mastery-banner {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    line-height: 1.45;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
