/* 需求中心页面样式 */
.demands-container {
    max-width: var(--site-max-width);
    margin: 0 auto var(--site-content-bottom-gap, 35px);
}

/* 需求中心头部 */
.demands-header {
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.demands-header h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
}

.demands-header p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.btn-publish-demand {
    background: #1890ff;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-publish-demand:hover {
    background: #40a9ff;
}

/* 筛选区域 */
.filter-section {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    color: #666;
    font-size: 14px;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    min-width: 20vh;
    font-size: 14px;
    color: #333;
}

/* 需求列表 */
.demand-list {
    padding: 40px 0;
}

.demand-card {
    animation: fadeIn 0.3s ease-out;
}

.demand-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.demand-info-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 24px 20px 18px 20px;
    display: flex;
    flex-direction: column;
    min-height: 210px;
    position: relative;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.demand-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
}

.demand-info-header {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 14px;
    margin-bottom: 8px;
}

.demand-info-title-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
    min-width: 0;
}

.demand-title-marks {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex-shrink: 0;
    padding-top: 2px;
}

.demand-title-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    height: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    border-radius: 4px;
    border: 1px solid transparent;
}

.demand-title-mark-new {
    color: #237804;
    background: #f6ffed;
    border-color: #b7eb8f;
}

.demand-title-mark-urgent {
    color: #cf1322;
    background: #fff1f0;
    border-color: #ffa39e;
}

.demand-info-title-text {
    font-size: 18px;
    font-weight: bold;
    color: #222;
    flex: 1;
    min-width: 0;
    line-height: 1.45;
}

.demand-info-sub {
    color: #888;
    font-size: 15px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.demand-sub-cat {
    color: #888;
}

.demand-sub-sep {
    color: #bbb;
    margin: 0 2px;
}

.demand-status-tag {
    display: inline-block;
    padding: 1px 8px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    vertical-align: middle;
}

/* 进行中：蓝色系 */
.demand-status-tag.demand-status-ongoing {
    color: #0958d9;
    background: #e6f4ff;
    border: 1px solid #91caff;
}

/* 已截止：灰色系 */
.demand-status-tag.demand-status-closed {
    color: #595959;
    background: #f5f5f5;
    border: 1px solid #d9d9d9;
}

.demand-info-price {
    color: #e53935;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 6px;
}

/* 简介：固定占位两行高度，多出省略（与脚本内正文配合） */
.demand-info-desc {
    color: #444;
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 10px;
    min-height: calc(1.55em * 2);
    max-height: calc(1.55em * 2);
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    word-break: break-word;
}

.demand-info-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: #aaa;
    font-size: 13px;
    margin-top: auto;
}

.demand-footer-spots {
    color: #666;
    flex: 1;
    min-width: 0;
}

.demand-footer-days {
    color: #999;
    flex-shrink: 0;
    white-space: nowrap;
}

/* 响应式样式 - 需求列表 */
@media (max-width: 1024px) {
.filter-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
}

.demand-list-grid {
    grid-template-columns: repeat(2, 1fr);
}
}

@media (max-width: 768px) {
.filter-group {
    align-items: flex-start;
    flex-direction: column;
}
}
@media (max-width: 460px) {
.demand-list-grid {
    grid-template-columns: repeat(1, 1fr);
}
}
/* 发布需求弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

#publishDemandForm {
    padding: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}

.btn-submit,
.btn-cancel {
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit {
    background: #1890ff;
    color: #fff;
    border: none;
}

.btn-submit:hover {
    background: #40a9ff;
}

.btn-cancel {
    background: #fff;
    color: #666;
    border: 1px solid #d9d9d9;
}

.btn-cancel:hover {
    border-color: #1890ff;
    color: #1890ff;
}



/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


