/* 任务大厅头部 */
.tasks-header {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    padding: 100px 0 0;
    color: #fff;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
}

.tasks-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1497366216548-37526070297c') center/cover;
    opacity: 0.1;
    z-index: 1;
}

.header-content {
    text-align: center;
    position: relative;
    z-index: 2;
    width: 100%;
}

.tasks-header h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 1px;
}

.tasks-header p {
    font-size: 18px;
    color: rgba(0, 0, 0, 0.85);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
    font-weight: 500;
    margin-bottom: 30px;
}

.search-box {
    max-width: 600px;
    margin: 0 auto 50px;
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    border-radius: 60px;
    backdrop-filter: blur(10px);
}

.search-box input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
}

.search-box button {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    background: #fff;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.wave-decoration {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
}

/* 筛选按钮 */
.list-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.filter-toggle-btn {
    display: none;
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-toggle-btn i {
    margin-right: 6px;
}

/* 筛选抽屉 */
.filter-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    height: 100%;
    background: #fff;
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.filter-drawer.active {
    right: 0;
}

.drawer-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.drawer-close {
    border: none;
    background: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 5px;
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.drawer-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 15px;
}

.drawer-footer button {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reset {
    background: #f5f5f5;
    color: #666;
}

.btn-confirm {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: #fff;
}

/* 遮罩层 */
.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.filter-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 任务列表 */
.tasks-list {
    padding: 60px 0;
    background: #fff;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.list-title h2 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.list-title p {
    color: #666;
    margin: 0;
}

.list-title span {
    color: var(--primary-color);
    font-weight: 600;
    margin: 0 5px;
}

.list-sort {
    display: flex;
    gap: 20px;
}

.list-sort a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.list-sort a:hover,
.list-sort a.active {
    color: var(--primary-color);
}

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

/* 任务卡片 */
.task-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-color: rgba(0,0,0,0);
}

.task-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.task-type {
    padding: 4px 10px;
    background: rgba(33, 150, 243, 0.1);
    color: #2196f3;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(33, 150, 243, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.task-type i {
    font-size: 12px;
    opacity: 0.8;
}

.task-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.task-status.urgent {
    background: #fff2f0;
    color: #ff4d4f;
}

.task-status.normal {
    background: #f6ffed;
    color: #52c41a;
}

.task-status.long-term {
    background: #e6f7ff;
    color: #1890ff;
}

.task-status i {
    font-size: 12px;
}

.task-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.task-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-info {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-budget {
    display: flex;
    flex-direction: column;
}

.task-budget .amount {
    font-size: 20px;
    font-weight: 700;
    color: #ff4d4f;
}

.task-budget .label {
    font-size: 12px;
    color: #999;
}

.bid-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.bid-btn:hover {
    background: linear-gradient(135deg, #1976d2 0%, #2196f3 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.2);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination .page-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pagination .page-item:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination .page-item.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.pagination .page-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .pagination {
        gap: 5px;
    }

    .pagination .page-item {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

/* 移动端加载更多 */
.pagination-mobile {
    display: none;
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    padding: 12px 30px;
    background: transparent;
    border: 2px solid #2196f3;
    border-radius: 25px;
    color: #2196f3;
    font-size: 16px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.2);
}

.load-more-btn i {
    font-size: 18px;
}

/* 响应式调整 */
@media screen and (max-width: 1200px) {
    .tasks-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .tasks-header h1 {
        font-size: 32px;
    }

    .search-box button {
        padding: 12px 20px;
        font-size: 14px;
        white-space: nowrap;
    }

    .search-box input {
        padding-right: 10px;
    }

    .tasks-grid {
        grid-template-columns: 1fr;
    }

    .list-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .tasks-header p {
        color: rgba(255, 255, 255, 0.9);
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }

    .pagination-desktop {
        display: none;
    }

    .pagination-mobile {
        display: block;
    }

    .filter-wrapper {
        padding: 20px 15px;
        box-shadow: none;
    }

    .filter-group {
        margin-bottom: 15px;
    }

    .filter-options-scroll {
        margin: 0 -15px;
        padding: 0 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }

    .filter-options-scroll::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    .filter-options {
        flex-wrap: nowrap;
        padding-bottom: 5px; /* 为了显示阴影 */
        width: max-content;
    }

    .filter-options a {
        white-space: nowrap;
        padding: 8px 16px;
    }

    /* 添加渐变遮罩效果 */
    .filter-options-scroll::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 5px;
        width: 30px;
        background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,1));
        pointer-events: none;
    }

    .filter-toggle-btn {
        display: flex;
        align-items: center;
    }

    .tasks-filter {
        display: none;
    }

    .drawer-content .filter-wrapper {
        padding: 0;
        box-shadow: none;
    }

    .drawer-content .filter-group {
        margin-bottom: 25px;
        padding-bottom: 20px;
        border-bottom: 1px solid #eee;
    }

    .drawer-content .filter-group:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .drawer-content .filter-options {
        flex-wrap: wrap;
        gap: 8px;
        display: flex;
        width: 100%;
    }

    .drawer-content .filter-options a {
        padding: 6px 12px;
        font-size: 14px;
        background: #f8f9fa;
        border: none;
        color: #333;
        flex: 0 1 auto;
        text-align: center;
        min-width: calc(33.33% - 8px);
        margin-bottom: 8px;
    }

    .drawer-content .filter-options a.active {
        background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
        color: #fff;
        font-weight: 500;
    }

    .drawer-content .filter-options-scroll {
        overflow: visible;
        margin: 0;
        padding: 0;
    }

    .drawer-content .filter-options-scroll::after {
        display: none;
    }

    .drawer-footer {
        background: #fff;
        padding: 12px 15px;
        box-shadow: 0 -1px 5px rgba(0,0,0,0.05);
    }

    .drawer-footer button {
        padding: 10px;
        font-size: 15px;
        border-radius: 6px;
    }

    .btn-reset {
        background: #f1f1f1;
    }

    .filter-overlay {
        background: rgba(0, 0, 0, 0.3);
    }

    .filter-toggle-btn {
        padding: 6px 12px;
        font-size: 13px;
        background: #f8f9fa;
        color: #333;
        border: 1px solid #eee;
    }

    .filter-toggle-btn i {
        color: #666;
    }
}

/* 任务筛选区 */
.tasks-filter {
    padding: 40px 0 20px;
    background: #f8f9fa;
}

.filter-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 20px 25px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: block;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-options a {
    padding: 6px 16px;
    border-radius: 20px;
    background: #f5f7fa;
    color: #666;
    transition: all 0.3s ease;
    text-decoration: none;
}

.filter-options a:hover {
    background: #e9ecef;
}

.filter-options a.active {
    background: var(--primary-color);
    color: #fff;
}

/* 二级分类样式补充 */
.filter-group[style*="display: none"] + .filter-group {
    margin-top: 0;
}

/* 任务标签样式 */
.task-badges {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.task-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.task-badge.verified {
    background: rgba(82, 196, 26, 0.1);
    color: #52c41a;
}

.task-badge.secured {
    background: rgba(24, 144, 255, 0.1);
    color: #1890ff;
}

.task-badge i {
    font-size: 11px;
}

.load-more-btn {
    transition: all 0.3s ease;
}

.load-more-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.load-more-btn.disabled {
    pointer-events: none;
    opacity: 0.5;
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
}

.load-more-btn i {
    margin-right: 8px;
} 

.task-status.advanced {
    background: rgba(147, 51, 234, 0.1);
    color: #9333ea;
    border: 1px solid rgba(147, 51, 234, 0.2);
}