.ai-dataset-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.08), transparent 28%),
        radial-gradient(circle at 90% 18%, rgba(20, 184, 166, 0.10), transparent 30%),
        linear-gradient(180deg, #f7fbff 0%, #eef6ff 44%, #f8fafc 100%);
    color: #102033;
}

.ai-dataset-body .ai-dataset-page {
    flex: 0 0 auto;
}

.ai-dataset-body #footer {
    flex: 0 0 auto;
}

.ai-dataset-page {
    min-height: auto;
    padding: 18px 0 30px;
    background: transparent;
}

.container.dataset-market-container.ai-dataset-container {
    width: min(100% - 20px, 1480px);
    max-width: none;
    padding-right: 0;
    padding-left: 0;
}

.ai-dataset-layout {
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    min-width: 0;
}

.ai-filter-card {
    position: sticky;
    top: 88px;
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.ai-filter-group + .ai-filter-group {
    margin-top: 28px;
    padding-top: 0;
    border-top: 0;
}

.ai-filter-title {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 22px;
    margin-bottom: 10px;
    padding: 0 2px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.25;
    color: #1e3a8a;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.ai-filter-title::before {
    display: inline-block;
    flex: 0 0 auto;
    width: 4px;
    height: 14px;
    content: "";
    background: linear-gradient(180deg, #3b82f6 0%, #168f88 100%);
    border-radius: 999px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.ai-filter-tags {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.ai-filter-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 25px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.2;
    color: #475569;
    cursor: pointer;
    background: #f8fbff;
    border: 1px solid #dbe7f3;
    border-radius: 6px;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-filter-tag:hover {
    color: #1d4ed8;
    background: #f2f7ff;
    border-color: #bfdbfe;
}

.ai-filter-tag.active {
    color: #fff;
    background: linear-gradient(135deg, #3b82f6 0%, #168f88 100%);
    border-color: transparent;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.16);
}

.ai-dataset-results {
    min-width: 0;
}

.ai-dataset-toolbar {
    display: grid;
    grid-template-columns: auto minmax(300px, 420px);
    gap: 16px;
    align-items: center;
    padding: 14px;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
    backdrop-filter: blur(10px);
}

.ai-dataset-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding-left: 2px;
    color: #315274;
}

.ai-dataset-summary-label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    color: #64748b;
}

.ai-dataset-summary strong {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;
    color: #102033;
}

.ai-dataset-search {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 48px;
    padding: 0 8px 0 16px;
    background: #f8fbff;
    border: 1px solid #d9e7f7;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.ai-dataset-search:hover,
.ai-dataset-search:focus-within {
    background: #fff;
    border-color: #d9e7f7;
}

.ai-dataset-search .bi-search {
    font-size: 18px;
    color: #64748b;
}

.ai-dataset-search .form-control {
    height: 46px;
    padding: 0;
    font-size: 15px;
    color: #102033;
    background: transparent;
    border: 0;
    box-shadow: none;
    outline: none;
}

.ai-dataset-search .form-control:hover,
.ai-dataset-search .form-control:focus {
    background: transparent;
    border: 0;
    box-shadow: none;
    outline: none;
}

.ai-dataset-search .form-control::placeholder {
    color: #94a3b8;
}

.ai-dataset-search .btn {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 500;
    background: #4f8df7;
    border-color: #4f8df7;
    border-radius: 6px;
    box-shadow: 0 7px 12px rgba(79, 141, 247, 0.13);
}

.ai-dataset-search .btn:hover,
.ai-dataset-search .btn:focus {
    background: #3b82f6;
    border-color: #3b82f6;
    box-shadow: 0 8px 14px rgba(59, 130, 246, 0.16);
}

.ai-dataset-list {
    --bs-gutter-x: 18px;
    --bs-gutter-y: 12px;
    align-content: flex-start;
    padding: 0;
    min-height: 0;
}

.ai-dataset-list.row {
    align-content: flex-start !important;
    align-items: flex-start !important;
}

.ai-dataset-list [class*="col-"] {
    margin-bottom: 0;
}

.ai-dataset-list .api-box {
    display: flex;
    flex-direction: column;
    height: auto !important;
    min-height: 178px !important;
    padding: 16px;
    margin-bottom: 0;
    overflow: hidden;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.30);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-dataset-list .api-box:hover {
    border-color: rgba(37, 99, 235, 0.46);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
    transform: translateY(-3px);
}

.ai-dataset-list .api-box-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    margin-bottom: 10px;
}

.ai-dataset-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 22px;
    margin-bottom: 10px;
    min-width: 0;
}

.ai-dataset-list .api-box-title {
    display: -webkit-box;
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    min-height: calc(1.35em * 1);
    max-height: calc(1.35em * 1);
    overflow: hidden;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
    color: #1f3348;
    letter-spacing: 0;
    white-space: nowrap;
    text-overflow: ellipsis;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.ai-dataset-list .api-box-desc {
    display: -webkit-box;
    width: 100%;
    height: calc(1.55em * 2);
    max-height: calc(1.55em * 2);
    margin: 0;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.55;
    color: #64748b;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ai-dataset-list .api-box-footer {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: auto !important;
    min-height: 37px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

.ai-dataset-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 24px;
    max-height: 24px;
    overflow: hidden;
}

.ai-dataset-tags span {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    border-radius: 5px;
}

.ai-dataset-tags .tag-industry {
    color: #b45309;
    background: #fff4df;
}

.ai-dataset-tags .tag-modality {
    color: #1d4ed8;
    background: #eaf2ff;
}

.ai-dataset-tags .tag-label {
    color: #7c3aed;
    background: #f2eaff;
}

.ai-dataset-tags .tag-use {
    color: #047857;
    background: #dff7ec;
}

.ai-dataset-list .api-box-meta {
    flex: 0 0 auto;
}

.ai-dataset-list .meta-item {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}

.ai-dataset-list .meta-item i {
    font-size: 14px;
    color: #64748b;
}

.badge-ai-featured {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 4px;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    color: #047857;
    background: #dff7ec;
    border-radius: 5px;
}

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

#aiDatasetList > .col-12.text-center.py-5 {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 40px 28px !important;
    color: #64748b;
    text-align: center;
    background:
        radial-gradient(circle at 50% 12%, rgba(59, 130, 246, 0.10), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(243, 248, 255, 0.96) 100%);
    border: 1px dashed rgba(148, 163, 184, 0.42);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 40px rgba(15, 23, 42, 0.05);
}

@media (max-width: 1199.98px) {
    .ai-dataset-layout {
        grid-template-columns: 228px minmax(0, 1fr);
    }
}

@media (max-width: 991.98px) {
    .ai-dataset-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .ai-filter-card {
        position: static;
    }

    .ai-dataset-toolbar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .ai-filter-card {
        padding: 12px;
    }

    .ai-filter-title {
        margin-bottom: 9px;
        font-size: 13px;
    }

    .ai-filter-tags {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .ai-filter-tag {
        min-height: 24px;
        padding: 0 6px;
        font-size: 11px;
    }

    .ai-dataset-list .api-box-title {
        font-size: 15px;
    }
}

@media (max-width: 575.98px) {
    .ai-dataset-page {
        padding-top: 12px;
    }

    .container.dataset-market-container.ai-dataset-container {
        width: calc(100% - 20px);
    }

    .ai-dataset-toolbar,
    .ai-filter-card {
        padding: 12px;
    }

    .ai-dataset-summary strong {
        font-size: 18px;
    }

    .ai-dataset-search {
        grid-template-columns: 20px minmax(0, 1fr) 40px;
        padding-right: 5px;
        padding-left: 12px;
    }

    .ai-dataset-search .btn {
        width: 34px;
        padding: 0;
    }

    .ai-dataset-search .btn span {
        display: none;
    }

    .ai-dataset-list .api-box {
        min-height: 172px !important;
        padding: 16px;
    }

    .ai-dataset-list .api-box-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        min-height: 0;
    }

    .ai-dataset-tags {
        max-height: 24px;
    }
}
