/* ========== 任务大厅页面 ========== */
body:has(.tasks-list-page) {
    background: linear-gradient(180deg, #0c0c1a 0%, #0a0e1e 40%, #0a0a0a 100%);
}

body.light-mode:has(.tasks-list-page) {
    background: linear-gradient(180deg, #eef1f8 0%, #e8ecf4 40%, #f0f0f0 100%);
}

.tasks-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 40px 60px;
}

.task-flow-page {
    padding-top: 16px;
}

.tasks-breadcrumb {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.tasks-breadcrumb a {
    color: #8b9bb4;
    text-decoration: none;
    transition: color 0.3s;
}

.tasks-breadcrumb a:hover {
    color: var(--code-blue);
}

.tasks-breadcrumb .breadcrumb-sep {
    color: #444;
    margin: 0 6px;
}

.tasks-breadcrumb .breadcrumb-current {
    color: var(--code-blue, #667eea);
}

body.light-mode .tasks-breadcrumb a {
    color: #64748b;
}

body.light-mode .tasks-breadcrumb a:hover {
    color: #667eea;
}

body.light-mode .tasks-breadcrumb .breadcrumb-sep {
    color: #cbd5e1;
}

body.light-mode .tasks-breadcrumb .breadcrumb-current {
    color: #667eea;
}

.tasks-page-title {
    font-size: 1.8rem;
    font-weight: 700;
}

.tasks-page-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.tasks-page-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tasks-avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.tasks-page-desc {
    color: #888;
}

/* ========== 我的委托按钮 ========== */
.tasks-my-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.12);
    color: #b0b8d0;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s;
    white-space: nowrap;
}

.tasks-my-btn:hover {
    background: rgba(102, 126, 234, 0.25);
    color: #fff;
}

.tasks-my-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #667eea;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

body.light-mode .tasks-my-btn {
    background: rgba(102, 126, 234, 0.08);
    color: #667eea;
}

body.light-mode .tasks-my-btn:hover {
    background: rgba(102, 126, 234, 0.18);
    color: #4f46e5;
}

/* ========== 工具栏：分类 + 搜索 ========== */
.tasks-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.tasks-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.tasks-cat-btn {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #aaa;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
body.light-mode .tasks-cat-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    color: #666;
}
.tasks-cat-btn:hover,
.tasks-cat-btn.active {
    background: linear-gradient(135deg, #569cd6, #6366f1);
    color: #fff;
    border-color: transparent;
}

.tasks-search {
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    min-width: 220px;
}
body.light-mode .tasks-search {
    border-color: rgba(0, 0, 0, 0.1);
}
.tasks-search-input {
    flex: 1;
    padding: 8px 14px;
    background: transparent;
    border: none;
    color: inherit;
    font-size: 0.875rem;
    outline: none;
    min-width: 0;
}
.tasks-search-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
}

/* ========== 卡片网格 ========== */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

@media (max-width: 640px) {
    .tasks-grid {
        grid-template-columns: 1fr;
    }
    .tasks-page {
        padding: 100px 16px 40px;
    }
    .tasks-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .tasks-search {
        min-width: auto;
    }
}

/* ========== 任务卡片（左图右文） ========== */
.task-card {
    display: flex;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(86, 140, 214, 0.25);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
    height: 200px;
    color: inherit;
}
body.light-mode .task-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(102, 126, 234, 0.25);
}
.task-card:hover {
    transform: translateY(-3px);
    border-color: rgba(86, 140, 214, 0.5);
}
body.light-mode .task-card:hover {
    border-color: rgba(102, 126, 234, 0.5);
}

.task-card-image {
    flex: 0 0 200px;
    width: 200px;
    min-height: 100%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}
body.light-mode .task-card-image {
    background: rgba(0, 0, 0, 0.03);
}
.task-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.task-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
}
.task-card-placeholder i {
    width: 40px;
    height: 40px;
}

.task-card-info {
    flex: 1;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.task-card-name {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-card-category {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(86, 156, 214, 0.15);
    color: #569cd6;
    margin-bottom: 4px;
    align-self: flex-start;
}

.task-card-software {
    font-size: 0.75rem;
    color: #569cd6;
    margin-bottom: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: color 0.2s;
    align-self: flex-start;
}

.task-card-software:hover {
    color: #fff;
}

body.light-mode .task-card-software {
    color: #667eea;
}

body.light-mode .task-card-software:hover {
    color: #4a5ec7;
}

.task-card-desc {
    font-size: 0.82rem;
    color: #999;
    line-height: 1.4;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
body.light-mode .task-card-desc { color: #666; }

.task-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
}

.task-card-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: #cc0000;
}
.task-card-price.free {
    color: #4caf50;
}

.task-card-btn {
    padding: 5px 14px;
    background: linear-gradient(135deg, #569cd6, #6366f1);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

@media (max-width: 640px) {
    .task-card {
        height: auto;
        min-height: 160px;
    }
    .task-card-image {
        flex: 0 0 140px;
        width: 140px;
    }
}

/* ========== 分页 ========== */
.tasks-pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

/* ========== 任务说明弹窗 ========== */
.task-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.task-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.task-modal {
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 28px;
}
body.light-mode .task-modal {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
}
.task-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.task-modal-desc {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #ccc;
    margin-bottom: 20px;
    white-space: pre-line;
}
body.light-mode .task-modal-desc { color: #555; }
.task-modal-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
}
.task-modal-actions {
    display: flex;
    gap: 12px;
}
.task-modal-actions button {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
}
.task-modal-cancel {
    background: rgba(255, 255, 255, 0.06);
    color: #aaa;
}
body.light-mode .task-modal-cancel {
    background: rgba(0, 0, 0, 0.06);
    color: #666;
}
.task-modal-confirm {
    background: linear-gradient(135deg, #569cd6, #6366f1);
    color: #fff;
}

/* ========== 任务流程统一布局 ========== */
.task-flow-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 100px 20px 60px;
}

.task-flow-card {
    max-width: 860px;
    margin: 0 auto;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 36px 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}
body.light-mode .task-flow-card {
    background: #ffffff;
    border-color: #e0e0e0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* ========== 任务提交表单 ========== */
.task-form-group {
    margin-bottom: 20px;
}
.task-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 6px;
}
.task-form-label .required {
    color: #e74c3c;
}
.task-form-input,
.task-form-textarea,
.task-form-select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}
body.light-mode .task-form-input,
body.light-mode .task-form-textarea,
body.light-mode .task-form-select {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.12);
}
.task-form-input:focus,
.task-form-textarea:focus,
.task-form-select:focus {
    border-color: #569cd6;
}
.task-form-textarea {
    min-height: 80px;
    resize: vertical;
}
.task-form-select {
    appearance: auto;
}
.task-form-radio-group,
.task-form-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 6px 0;
}
.task-form-radio-group label,
.task-form-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}
.task-upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}
body.light-mode .task-upload-area {
    border-color: rgba(0, 0, 0, 0.15);
}
.task-upload-area:hover {
    border-color: #569cd6;
}
.task-upload-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
}
.task-upload-text {
    font-size: 0.85rem;
    color: #888;
}
.task-upload-hint {
    font-size: 0.75rem;
    color: #666;
    margin-top: 4px;
}
.task-file-list {
    margin-top: 8px;
}
.task-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 0.85rem;
}
.task-file-item .remove-btn {
    margin-left: auto;
    color: #e74c3c;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1rem;
}
.task-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #569cd6, #6366f1);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(86, 140, 214, 0.3);
    transition: all 0.3s;
}
.task-submit-btn:hover {
    box-shadow: 0 6px 24px rgba(86, 140, 214, 0.4);
    transform: translateY(-1px);
}
.task-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========== 任务支付/结果页背景装饰 ========== */
.task-card-page {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: relative;
    overflow: hidden;
}
.task-card-page::before,
.task-card-page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.task-card-page::before {
    width: 400px;
    height: 400px;
    top: -120px;
    right: -100px;
    background: radial-gradient(circle, rgba(86, 156, 214, 0.08) 0%, transparent 70%);
}
.task-card-page::after {
    width: 300px;
    height: 300px;
    bottom: -80px;
    left: -60px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
}
body.light-mode .task-card-page::before {
    background: radial-gradient(circle, rgba(86, 156, 214, 0.12) 0%, transparent 70%);
}
body.light-mode .task-card-page::after {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.10) 0%, transparent 70%);
}
.task-card-page > * {
    position: relative;
    z-index: 1;
}

/* ========== 任务支付页 ========== */
.task-order-card {
    max-width: 500px;
    margin: 0 auto;
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
body.light-mode .task-order-card {
    background: #ffffff;
    border-color: #d0d0d0;
    color: #333;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ========== 任务结果页 ========== */
.task-result-container {
    max-width: 500px;
    margin: 0 auto;
}
.task-result-card {
    text-align: center;
    width: 100%;
}
.task-result-icon {
    font-size: 3rem;
    color: #4caf50;
    margin-bottom: 12px;
}
.task-result-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
}
.task-result-info {
    text-align: left;
    margin-bottom: 20px;
}
.task-result-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
}
body.light-mode .task-result-info-row {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
.task-result-info-label { color: #888; }
.task-result-back {
    display: inline-block;
    margin-top: 24px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #569cd6, #6366f1);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(86, 140, 214, 0.3);
    transition: all 0.3s;
}
.task-result-back:hover {
    box-shadow: 0 6px 24px rgba(86, 140, 214, 0.4);
    transform: translateY(-1px);
}

/* ========== 空状态 ========== */
.task-empty {
    text-align: center;
    padding: 40px 0;
    color: #888;
}
.task-empty i { font-size: 2rem; margin-bottom: 10px; }

/* ========== 任务详情页（步骤1） ========== */
.task-detail-top {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.task-detail-image {
    flex: 0 0 240px;
    width: 240px;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
body.light-mode .task-detail-image {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}
.task-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.task-detail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
}
.task-detail-placeholder i {
    width: 56px;
    height: 56px;
}

.task-detail-info {
    flex: 1;
    min-width: 0;
}

.task-detail-name {
    margin-top: 0;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.task-detail-category {
    display: inline-block;
    font-size: 0.78rem;
    padding: 3px 10px;
    border-radius: 10px;
    background: rgba(86, 156, 214, 0.15);
    color: #569cd6;
    margin-bottom: 8px;
}

.task-detail-software {
    font-size: 0.85rem;
    color: #569cd6;
    margin-bottom: 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: color 0.2s;
}

.task-detail-software:hover {
    color: #fff;
}

body.light-mode .task-detail-software {
    color: #667eea;
}

body.light-mode .task-detail-software:hover {
    color: #4a5ec7;
}

.task-detail-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 20px;
}
.task-detail-price-label {
    font-size: 0.9rem;
    color: #888;
}
.task-detail-price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #569cd6;
}
.task-detail-price-free {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4caf50;
}

.task-detail-divider {
    margin: 32px 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
body.light-mode .task-detail-divider {
    border-top-color: rgba(0, 0, 0, 0.1);
}

.task-detail-content-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.task-detail-description {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #ccc;
}
body.light-mode .task-detail-description {
    color: #444;
}
.task-detail-description h1,
.task-detail-description h2,
.task-detail-description h3 {
    font-weight: 600;
    margin: 20px 0 10px;
    color: inherit;
}
.task-detail-description h1 { font-size: 1.3rem; }
.task-detail-description h2 { font-size: 1.15rem; }
.task-detail-description h3 { font-size: 1.05rem; }
.task-detail-description ul,
.task-detail-description ol {
    padding-left: 24px;
    margin: 10px 0;
}
.task-detail-description li {
    margin-bottom: 4px;
}
.task-detail-description a {
    color: #569cd6;
    text-decoration: underline;
}
.task-detail-description blockquote {
    border-left: 3px solid #569cd6;
    padding-left: 14px;
    margin: 12px 0;
    color: #aaa;
}
body.light-mode .task-detail-description blockquote {
    color: #777;
}
.task-detail-description code {
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
}
body.light-mode .task-detail-description code {
    background: rgba(0, 0, 0, 0.06);
}
.task-detail-description pre {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 14px;
    overflow-x: auto;
    margin: 12px 0;
}
body.light-mode .task-detail-description pre {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}
.task-detail-description p {
    margin: 8px 0;
}

.task-detail-empty {
    color: #888;
    text-align: center;
    padding: 40px 0;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .task-flow-page {
        padding: 100px 16px 40px;
    }
    .task-flow-page > .tasks-page-header {
        padding: 0 16px;
    }
    .task-flow-card {
        padding: 24px 16px;
    }
    .task-detail-top {
        flex-direction: column;
        gap: 20px;
    }
    .task-detail-image {
        flex: none;
        width: 100%;
        height: 200px;
    }
    .task-detail-name {
        font-size: 1.3rem;
    }
}

/* ========== 步骤指示器 ========== */
.task-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0 auto 16px;
    padding: 8px 0;
    max-width: 500px;
}

.task-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.task-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
    text-decoration: none;
    cursor: default;
}

.task-step-line {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 -2px;
    margin-bottom: 22px;
    transition: background 0.3s;
}

.task-step-line.done {
    background: rgba(86, 140, 214, 0.5);
}

.task-step-label {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.3s;
}

/* 当前步骤 */
.task-step.active .task-step-dot {
    border-color: #569cd6;
    background: linear-gradient(135deg, #569cd6, #6366f1);
    color: #fff;
    box-shadow: 0 0 12px rgba(86, 140, 214, 0.4);
}

.task-step.active .task-step-label {
    color: #fff;
    font-weight: 600;
}

/* 已完成步骤 */
.task-step.done .task-step-dot {
    border-color: rgba(86, 140, 214, 0.4);
    background: rgba(86, 140, 214, 0.15);
    color: #569cd6;
    cursor: pointer;
}

.task-step.done .task-step-dot:hover {
    background: rgba(86, 140, 214, 0.3);
}

.task-step.done .task-step-label {
    color: #569cd6;
}

/* 亮色模式 */
body.light-mode .task-step-dot {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.03);
    color: #999;
}

body.light-mode .task-step-line {
    background: rgba(0, 0, 0, 0.08);
}

body.light-mode .task-step-line.done {
    background: rgba(102, 126, 234, 0.4);
}

body.light-mode .task-step.active .task-step-dot {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    box-shadow: 0 0 12px rgba(102, 126, 234, 0.3);
}

body.light-mode .task-step.active .task-step-label {
    color: #333;
}

body.light-mode .task-step.done .task-step-dot {
    border-color: rgba(102, 126, 234, 0.3);
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

body.light-mode .task-step.done .task-step-label {
    color: #667eea;
}

body.light-mode .task-step-label {
    color: #999;
}

/* ========== 底部流程导航 ========== */
.task-flow-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.task-flow-prev,
.task-flow-next {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
}

.task-flow-prev {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #8b9bb4;
}

.task-flow-prev:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.task-flow-next {
    background: linear-gradient(135deg, #569cd6, #6366f1);
    border: none;
    color: #fff;
    box-shadow: 0 4px 16px rgba(86, 140, 214, 0.3);
}

.task-flow-next:hover {
    box-shadow: 0 6px 24px rgba(86, 140, 214, 0.4);
    transform: translateY(-1px);
}

body.light-mode .task-flow-nav {
    border-top-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .task-flow-prev {
    border-color: rgba(0, 0, 0, 0.15);
    color: #64748b;
}

body.light-mode .task-flow-prev:hover {
    border-color: rgba(102, 126, 234, 0.3);
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

body.light-mode .task-flow-next {
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25);
}

body.light-mode .task-flow-next:hover {
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.35);
}

@media (max-width: 480px) {
    .task-flow-card {
        padding: 20px 14px;
    }
    .task-flow-prev,
    .task-flow-next,
    .task-submit-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ============ 任务案例（关联任务） ============ */

/* 任务详情页：查看案例按钮 */
.task-detail-cases-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(86, 156, 214, 0.5);
    background: rgba(86, 156, 214, 0.1);
    color: #569cd6;
    font-size: 0.88rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.task-detail-cases-btn:hover {
    background: #569cd6;
    color: #fff;
    border-color: #569cd6;
}

/* 任务案例列表/详情页：相关任务卡片 */
.task-case-back-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    margin-bottom: 28px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
}

body.light-mode .task-case-back-card {
    border-color: rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.6);
}

.task-case-back-card-link {
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.task-case-back-card-link:hover {
    border-color: rgba(86, 156, 214, 0.5);
    box-shadow: 0 0 18px rgba(86, 156, 214, 0.15);
}

.task-case-back-image {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(86, 156, 214, 0.1);
}

.task-case-back-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.task-case-back-placeholder i {
    width: 28px;
    height: 28px;
    color: rgba(86, 156, 214, 0.6);
}

.task-case-back-info {
    flex: 1;
    min-width: 0;
}

.task-case-back-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.task-case-back-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 0.82rem;
    color: var(--text-secondary, #888);
}

.task-case-back-tip {
    font-size: 0.75rem;
    color: #569cd6;
    margin-top: 4px;
}

.task-case-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(86, 156, 214, 0.5);
    background: rgba(86, 156, 214, 0.1);
    color: #569cd6;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.task-case-back-btn:hover {
    background: #569cd6;
    color: #fff;
}

/* 案例列表头部 */
.task-cases-header {
    text-align: center;
    margin-bottom: 26px;
}

.task-cases-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.task-cases-header p {
    font-size: 0.88rem;
    color: var(--text-secondary, #888);
}

/* 案例卡片网格 */
.task-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.task-case-card {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.task-case-card:hover {
    transform: translateY(-3px);
    border-color: rgba(86, 156, 214, 0.5);
    box-shadow: 0 10px 26px rgba(0,0,0,0.25);
}

body.light-mode .task-case-card {
    border-color: rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.6);
}

.task-case-card-image {
    height: 140px;
    overflow: hidden;
    background: rgba(86, 156, 214, 0.08);
}

.task-case-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.task-case-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-case-card-placeholder span {
    font-size: 2.4rem;
    font-weight: 800;
    color: rgba(86, 156, 214, 0.35);
}

.task-case-card-body {
    padding: 14px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.task-case-card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.task-case-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.task-case-tag {
    padding: 2px 10px;
    font-size: 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(86, 156, 214, 0.35);
    color: #569cd6;
    background: rgba(86, 156, 214, 0.08);
}

.task-case-card-desc {
    font-size: 0.82rem;
    color: var(--text-secondary, #999);
    line-height: 1.6;
    flex: 1;
}

.task-case-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary, #888);
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

body.light-mode .task-case-card-footer {
    border-color: rgba(0,0,0,0.06);
}

.task-case-card-more {
    color: #569cd6;
}

/* 案例详情页 */
.task-case-detail-title {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.task-case-detail-tags {
    margin-bottom: 10px;
}

.task-case-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: 0.82rem;
    color: var(--text-secondary, #888);
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 20px;
}

body.light-mode .task-case-detail-meta {
    border-color: rgba(0,0,0,0.07);
}

.task-case-detail-cover {
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.08);
}

.task-case-detail-cover img {
    width: 100%;
    display: block;
}

.task-case-detail-desc {
    font-size: 0.95rem;
    color: var(--text-secondary, #aaa);
    line-height: 1.8;
    margin-bottom: 20px;
    padding: 14px 18px;
    border-left: 3px solid rgba(86, 156, 214, 0.5);
    background: rgba(86, 156, 214, 0.05);
}

.task-case-detail-body {
    font-size: 0.95rem;
    line-height: 1.8;
    color: inherit;
}

.task-case-detail-body h2 {
    font-size: 1.25rem;
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

body.light-mode .task-case-detail-body h2 {
    border-color: rgba(0,0,0,0.1);
}

.task-case-detail-body h3 {
    font-size: 1.05rem;
    margin: 20px 0 10px;
    color: #999;
}

body.light-mode .task-case-detail-body h3 {
    color: #666;
}

.task-case-detail-body p {
    margin-bottom: 12px;
}

.task-case-detail-body img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px auto;
}

.task-case-detail-body ul, .task-case-detail-body ol {
    padding-left: 22px;
    margin-bottom: 12px;
}

.task-case-detail-body li {
    margin-bottom: 4px;
}

.task-case-detail-body code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
}

/* 空态 */
.task-cases-empty {
    text-align: center;
    padding: 48px 0;
    color: var(--text-secondary, #888);
}

.task-cases-empty p {
    margin-top: 10px;
    font-size: 0.9rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .task-case-back-card {
        flex-wrap: wrap;
        padding: 14px;
    }

    .task-case-back-btn {
        width: 100%;
        justify-content: center;
    }

    .task-case-grid {
        grid-template-columns: 1fr;
    }

    .task-case-detail-title {
        font-size: 1.25rem;
    }
}

/* ============ 任务列表页：左右两栏（左：私信站长面板 / 右：任务卡片） ============ */
.tasks-layout {
    display: grid;
    grid-template-columns: 400px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.tasks-contact {
    position: sticky;
    top: 84px;
    background: #121417;
    border: 1px solid #1e2229;
    border-radius: 16px;
    overflow: hidden;
}

.tasks-contact .message-modal-left {
    width: 100%;
    flex-shrink: 0;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 24px 20px;
    overflow: visible;
    background: transparent;
}

.tasks-contact .message-modal-right {
    padding: 24px 20px;
}

.tasks-main {
    min-width: 0;
}

body.light-mode .tasks-contact {
    background: #ffffff;
    border-color: #e6e9ef;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

body.light-mode .tasks-contact .message-modal-left {
    border-bottom-color: #eef1f5;
    background: transparent;
}

@media (max-width: 1100px) {
    .tasks-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tasks-contact {
        position: static;
    }
}

/* ============ 任务案例页：基本信息 / 案例 选项卡 ============ */
.tasks-tab-bar {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 4px;
    margin-bottom: 28px;
}

.tasks-tab {
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: #8b949e;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.25s, border-color 0.25s;
}

.tasks-tab:hover {
    color: #e6edf3;
}

.tasks-tab.active {
    color: #569cd6;
    border-bottom-color: #569cd6;
}

.tasks-tab-panel {
    display: none;
}

.tasks-tab-panel.active {
    display: block;
}

body.light-mode .tasks-tab-bar {
    border-bottom-color: #e6e9ef;
}

body.light-mode .tasks-tab {
    color: #64748b;
}

body.light-mode .tasks-tab:hover {
    color: #1e293b;
}

body.light-mode .tasks-tab.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
}

body.light-mode .tasks-tab-panel .task-detail-cases-btn {
    border-color: rgba(102, 126, 234, 0.4) !important;
    color: #4f46e5 !important;
}

@media (max-width: 640px) {
    .tasks-tab {
        padding: 10px 14px;
        font-size: 14px;
    }
}

/* ============ 服务项目详情页：产品页布局（左面板 + 右产品卡） ============ */
.task-product-card {
    max-width: none;
    margin: 0;
}

.task-product-top {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.task-product-actions {
    margin-top: 20px;
}

.task-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: transform 0.25s, box-shadow 0.25s;
}

.task-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.task-product-divider {
    margin: 32px 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .task-product-divider {
    border-top-color: rgba(0, 0, 0, 0.1);
}

.task-product-section-head h3 {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 18px;
}

.task-product-section .task-case-grid {
    margin-bottom: 4px;
}

@media (max-width: 640px) {
    .task-product-top {
        flex-direction: column;
        gap: 16px;
    }

    .task-product-actions {
        margin-top: 12px;
    }

    .task-submit-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 详情页右列：最小高度与左侧私信站长面板一致 */
.tasks-main-product {
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

.tasks-main-product .task-product-card {
    flex: 1;
    width: 100%;
}

/* ============ 案例详情页：关联软件产品 / 服务项目卡片 ============ */

/* ============ 详情页左侧面板：手机版默认折叠 ============ */
.tasks-contact-head {
    display: none;
}

@media (max-width: 1100px) {
    .tasks-contact-head {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 14px 16px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 600;
        color: #e6edf3;
        user-select: none;
    }

    .tasks-contact-head .tasks-contact-chevron {
        margin-left: auto;
        width: 16px;
        height: 16px;
        transition: transform 0.25s;
    }

    .tasks-contact-body {
        display: none;
    }

    .tasks-contact.open .tasks-contact-body {
        display: block;
    }

    .tasks-contact.open .tasks-contact-head {
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .tasks-contact.open .tasks-contact-chevron {
        transform: rotate(180deg);
    }

    body.light-mode .tasks-contact-head {
        color: #1e293b;
    }

    body.light-mode .tasks-contact.open .tasks-contact-head {
        border-bottom-color: #eef1f5;
    }
}

/* === 列表页页头（H1 + 描述，与软件列表共用样式） === */
.list-page-head {
    width: 100%;
    margin-bottom: 14px;
}
.list-page-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0 0 8px;
    line-height: 1.3;
}
.list-page-desc {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.62);
    margin: 0;
}
body.light-mode .list-page-desc {
    color: rgba(30, 41, 59, 0.65);
}
@media (max-width: 640px) {
    .list-page-title { font-size: 26px; }
    .list-page-desc { font-size: 14px; }
}
