.marketplace-page {
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Source Han Sans SC", Arial, sans-serif;
    background: #f5f7fa;
    color: #20242a;
    font-size: 15px;
    line-height: 1.72;
}

.marketplace-shell {
    width: 1200px;
    max-width: calc(100% - 40px);
    margin: 0 auto;
}

.marketplace-primary-btn,
.marketplace-results-cta,
.marketplace-search-box button,
.marketplace-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 22px;
    border: 0;
    border-radius: 4px;
    background: #c2000e;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.marketplace-primary-btn:hover,
.marketplace-results-cta:hover,
.marketplace-search-box button:hover,
.marketplace-submit-btn:hover {
    background: #a5000c;
    color: #fff;
}

.marketplace-primary-btn:disabled,
.marketplace-results-cta:disabled,
.marketplace-search-box button:disabled,
.marketplace-submit-btn:disabled {
    cursor: not-allowed;
    opacity: .7;
}

.marketplace-hero {
    margin-top: 80px;
    min-height: 360px;
    background:
        linear-gradient(90deg, rgba(6, 24, 48, .64), rgba(12, 46, 80, .38), rgba(12, 46, 80, .16)),
        url("/assets/site-visuals/generated/algorithm-marketplace-banner.jpg") center center no-repeat;
    background-size: cover;
}

.marketplace-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 42px;
    min-height: 360px;
    padding: 42px 0;
}

.marketplace-hero-copy {
    max-width: 720px;
    color: #fff;
}

.marketplace-eyebrow {
    display: inline-block;
    margin-bottom: 18px;
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.45);
    font-size: 12px;
    font-weight: 700;
}

.marketplace-hero h1 {
    margin: 0 0 18px;
    color: #fff;
    font-size: 48px;
    line-height: 1.18;
    font-weight: 700;
}

.marketplace-hero p {
    margin: 0 0 26px;
    color: rgba(255,255,255,.9);
    font-size: 16px;
    line-height: 1.85;
}

.marketplace-hero-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 280px;
}

.marketplace-hero-stats div {
    padding: 18px 20px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
}

.marketplace-hero-stats strong {
    display: block;
    margin-bottom: 6px;
    font-size: 30px;
}

.marketplace-hero-stats span {
    color: rgba(255,255,255,.82);
    font-size: 13px;
}

.marketplace-content {
    padding: 24px 0 54px;
}

.marketplace-breadcrumb {
    margin-bottom: 18px;
    color: #7c8793;
    font-size: 13px;
}

.marketplace-breadcrumb a {
    color: #7c8793;
    text-decoration: none;
}

.marketplace-breadcrumb span {
    margin: 0 5px;
}

.marketplace-search-panel,
.marketplace-filter-panel,
.marketplace-demand-box,
.marketplace-empty,
.marketplace-load-error {
    background: #fff;
    border: 1px solid #e4e8ee;
}

.marketplace-search-panel {
    margin-bottom: 16px;
    padding: 22px;
}

.marketplace-search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.marketplace-search-box input {
    flex: 1;
    height: 46px;
    padding: 0 16px;
    border: 1px solid #d8dee6;
    border-radius: 4px;
    font-size: 15px;
}

.marketplace-hotwords,
.marketplace-filter-options,
.marketplace-tags,
.marketplace-results-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.marketplace-hotwords > span {
    margin-right: 4px;
    color: #20242a;
    font-weight: 700;
}

.marketplace-chip {
    min-height: 32px;
    padding: 0 13px;
    border: 1px solid #d9dde3;
    border-radius: 3px;
    background: #fff;
    color: #52606d;
    font-size: 13px;
    line-height: 30px;
    cursor: pointer;
}

.marketplace-chip:hover,
.marketplace-chip.is-active {
    border-color: #c2000e;
    background: #fff4f5;
    color: #c2000e;
}

.marketplace-filter-panel {
    padding: 8px 22px;
}

.marketplace-filter-row {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 13px 0;
    border-top: 1px solid #edf0f4;
}

.marketplace-filter-row:first-child {
    border-top: 0;
}

.marketplace-filter-label {
    flex: 0 0 64px;
    color: #20242a;
    font-size: 15px;
    font-weight: 700;
    line-height: 32px;
}

.marketplace-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 20px 0 14px;
}

.marketplace-results-copy {
    color: #626f7d;
    font-size: 14px;
}

.marketplace-results-copy span {
    color: #c2000e;
    font-weight: 700;
}

.marketplace-link-btn {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #d8dee6;
    border-radius: 4px;
    background: #fff;
    color: #52606d;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
}

.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.marketplace-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e1e6ed;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.marketplace-card:hover {
    transform: translateY(-2px);
    border-color: #d8b9bd;
    box-shadow: 0 12px 24px rgba(18, 32, 49, .08);
}

.marketplace-card-image {
    position: relative;
    aspect-ratio: 242 / 168;
    background: #eef2f6;
}

.marketplace-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.marketplace-hot-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 2px;
    background: #c2000e;
    color: #fff;
    font-size: 12px;
}

.marketplace-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 15px 16px 16px;
}

.marketplace-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.marketplace-card-meta span,
.marketplace-card-meta em {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 9px;
    font-size: 12px;
    font-style: normal;
    white-space: nowrap;
}

.marketplace-card-meta span {
    background: #fff1f2;
    color: #c2000e;
}

.marketplace-card-meta em {
    background: #eef2f6;
    color: #64748b;
}

.marketplace-card h3 {
    margin: 0 0 8px;
    color: #20242a;
    font-size: 17px;
    line-height: 1.45;
    font-weight: 700;
}

.marketplace-card p {
    flex: 1;
    margin: 0 0 13px;
    color: #5f6b78;
    font-size: 14px;
    line-height: 1.75;
}

.marketplace-tags {
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 14px;
}

.marketplace-tags span {
    padding: 5px 8px;
    background: #f3f5f8;
    color: #64748b;
    font-size: 12px;
}

.marketplace-card-action {
    align-self: flex-start;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid #c2000e;
    border-radius: 3px;
    background: #fff;
    color: #c2000e;
    cursor: pointer;
}

.marketplace-empty {
    margin-top: 16px;
    padding: 22px;
    color: #394554;
}

.marketplace-empty p {
    margin: 0 0 14px;
    line-height: 1.8;
}

.marketplace-load-error {
    grid-column: 1 / -1;
    padding: 22px;
    color: #b11825;
}

.marketplace-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
}

.marketplace-pagination button {
    min-width: 38px;
    height: 36px;
    border: 1px solid #d8dee6;
    background: #fff;
    color: #52606d;
    cursor: pointer;
}

.marketplace-pagination button.is-active,
.marketplace-pagination button:hover:not(:disabled) {
    border-color: #c2000e;
    background: #c2000e;
    color: #fff;
}

.marketplace-pagination button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.marketplace-demand-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 24px;
    padding: 26px;
}

.marketplace-demand-box h2 {
    margin: 0 0 10px;
    color: #20242a;
    font-size: 24px;
    line-height: 1.4;
}

.marketplace-demand-box p {
    margin: 0;
    color: #5f6b78;
    line-height: 1.8;
}

.marketplace-demand-modal[hidden] {
    display: none;
}

.marketplace-demand-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.marketplace-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(12, 20, 31, .58);
}

.marketplace-modal-panel {
    position: relative;
    width: 720px;
    max-width: calc(100% - 28px);
    max-height: calc(100vh - 40px);
    overflow: auto;
    margin: 20px auto;
    padding: 28px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(0,0,0,.22);
}

.marketplace-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #52606d;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.marketplace-modal-panel h2 {
    margin: 0 0 20px;
    font-size: 24px;
    line-height: 1.4;
}

.marketplace-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.marketplace-form-grid label,
.marketplace-form-wide,
.marketplace-privacy {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #2f3a46;
    font-size: 14px;
    font-weight: 700;
}

.marketplace-form-grid input,
.marketplace-form-grid select,
.marketplace-form-wide textarea {
    width: 100%;
    border: 1px solid #d8dee6;
    border-radius: 4px;
    color: #20242a;
    font-size: 14px;
}

.marketplace-form-grid input,
.marketplace-form-grid select {
    height: 40px;
    padding: 0 10px;
}

.marketplace-form-wide {
    margin-top: 14px;
}

.marketplace-form-wide textarea {
    min-height: 118px;
    padding: 10px;
    resize: vertical;
}

.marketplace-privacy {
    flex-direction: row;
    align-items: flex-start;
    margin: 14px 0;
    font-weight: 400;
}

.marketplace-privacy input {
    margin-top: 3px;
}

.marketplace-form-message {
    min-height: 22px;
    margin-bottom: 12px;
    color: #64748b;
    font-size: 13px;
}

.marketplace-form-message.is-error {
    color: #b11825;
}

.marketplace-form-message.is-success {
    color: #167a3f;
}

.marketplace-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.marketplace-modal-open {
    overflow: hidden;
}

@media screen and (max-width: 1199px) {
    .marketplace-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media screen and (max-width: 991px) {
    .marketplace-hero-inner,
    .marketplace-results-bar,
    .marketplace-demand-box,
    .marketplace-filter-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .marketplace-hero-stats {
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .marketplace-filter-label {
        flex: none;
        line-height: 1.4;
    }

    .marketplace-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 767px) {
    .marketplace-shell {
        max-width: calc(100% - 24px);
    }

    .marketplace-hero,
    .marketplace-hero-inner {
        min-height: 0;
    }

    .marketplace-hero-inner {
        padding: 34px 0;
    }

    .marketplace-hero h1 {
        font-size: 34px;
    }

    .marketplace-hero-stats,
    .marketplace-form-grid {
        grid-template-columns: 1fr;
    }

    .marketplace-search-box {
        flex-direction: column;
    }

    .marketplace-search-box button,
    .marketplace-primary-btn,
    .marketplace-results-cta {
        width: 100%;
    }

    .marketplace-search-panel,
    .marketplace-filter-panel,
    .marketplace-demand-box,
    .marketplace-modal-panel {
        padding: 18px 16px;
    }

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