/* AI 实验室 · 项目目录
   列表页专用样式。加新项目只改 experiments.json，不需要动这里。 */

.hub-hero {
    padding-bottom: 64px;
}

.hub-hero .hub-eyebrow {
    display: inline-block;
    font-size: .8rem;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .78);
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 999px;
    padding: 5px 14px;
    margin-bottom: 18px;
}

.hub-hero h1 {
    margin-bottom: 14px;
}

.hub-hero .hub-lead {
    font-size: 1.15rem;
    font-weight: 300;
    line-height: 1.8;
    max-width: 720px;
    margin: 0 auto;
    color: rgba(255, 255, 255, .92);
    text-wrap: balance;
}

.hub-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 28px;
    margin-top: 26px;
    font-size: .95rem;
    color: rgba(255, 255, 255, .92);
}

.hub-stats span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.hub-stats svg {
    width: 15px;
    height: 15px;
    opacity: .85;
    flex: 0 0 auto;
}

.hub-stats b {
    font-size: 1.25rem;
    font-weight: 700;
}

/* ---------- 工具条 ---------- */

.hub-section {
    padding: 0 0 90px;
    background: #f6f8fb;
}

.hub-toolbar {
    position: sticky;
    top: 64px;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 0;
    margin-bottom: 26px;
    background: rgba(246, 248, 251, .94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e4eaf2;
}

.hub-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hub-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #dfe6ef;
    background: #fff;
    color: #43536b;
    border-radius: 999px;
    padding: 7px 15px;
    font-size: .92rem;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s ease;
}

.hub-filter:hover {
    border-color: #9dc2ee;
    color: #2c6fbf;
}

.hub-filter.active {
    background: #2c6fbf;
    border-color: #2c6fbf;
    color: #fff;
    box-shadow: 0 4px 14px rgba(44, 111, 191, .28);
}

.hub-filter .count {
    font-size: .78rem;
    opacity: .7;
}

.hub-search {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 220px;
}

.hub-search i {
    position: absolute;
    left: 13px;
    color: #93a4bb;
    font-size: .9rem;
    pointer-events: none;
}

.hub-search input {
    width: 100%;
    padding: 9px 14px 9px 34px;
    border: 1px solid #dfe6ef;
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: .92rem;
    color: #1e2a3c;
    outline: none;
    transition: all .2s ease;
}

.hub-search input:focus {
    border-color: #2c6fbf;
    box-shadow: 0 0 0 3px rgba(44, 111, 191, .12);
}

/* ---------- 卡片网格 ---------- */

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(286px, 1fr));
    gap: 20px;
}

.hub-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e6ecf4;
    border-radius: 16px;
    padding: 22px 22px 18px;
    color: inherit;
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.hub-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--hub-accent, #4a90e2);
    opacity: 0;
    transition: opacity .22s ease;
}

.hub-card:hover {
    transform: translateY(-4px);
    border-color: rgba(44, 111, 191, .3);
    box-shadow: 0 16px 34px rgba(24, 52, 92, .12);
}

.hub-card:hover::before {
    opacity: 1;
}

.hub-card:focus-visible {
    outline: 3px solid rgba(44, 111, 191, .35);
    outline-offset: 2px;
}

.hub-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.hub-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    line-height: 1;
    background: var(--hub-tint, #eaf3fd);
    color: var(--hub-accent, #2c6fbf);
    flex: 0 0 auto;
}

/* 图标为内联 SVG（不使用 emoji / 图标字体），颜色继承卡片主色 */
.hub-card-icon svg {
    width: 26px;
    height: 26px;
    display: block;
    overflow: visible;
}

.hub-card-icon i {
    font-size: 22px;
}

.hub-card-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.hub-badge {
    font-size: .72rem;
    line-height: 1;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f1f5fa;
    color: #5b6b83;
    white-space: nowrap;
}

.hub-badge.new {
    background: #fff4e0;
    color: #9a6410;
}

.hub-badge.accent {
    background: rgba(44, 111, 191, .1);
    color: #2c6fbf;
}

.hub-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .74rem;
    color: #5b6b83;
    white-space: nowrap;
}

.hub-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #28a745;
}

.hub-status.soon::before {
    background: #c8d1de;
}

.hub-card h3 {
    font-size: 1.18rem;
    font-weight: 700;
    color: #16233a;
    margin-bottom: 8px;
    letter-spacing: .2px;
}

.hub-card p {
    font-size: .93rem;
    line-height: 1.72;
    color: #5b6b83;
    margin-bottom: 16px;
    flex: 1 1 auto;
}

.hub-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.hub-tag {
    font-size: .76rem;
    color: #4b5c75;
    background: #f5f8fc;
    border: 1px solid #eaeff6;
    border-radius: 6px;
    padding: 3px 8px;
}

.hub-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px dashed #e9eef5;
}

.hub-card-meta {
    font-size: .8rem;
    color: #8695aa;
}

.hub-card-go {
    font-size: .88rem;
    font-weight: 600;
    color: #2c6fbf;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hub-card-go svg {
    width: 14px;
    height: 14px;
    transition: transform .2s ease;
}

.hub-card:hover .hub-card-go svg {
    transform: translateX(3px);
}

/* 已下线 / 即将上线的卡片弱化 */
.hub-card.soon {
    background: #fbfcfe;
    border-style: dashed;
}

.hub-card.soon .hub-card-go {
    color: #93a4bb;
}

/* ---------- 空状态与说明条 ---------- */

.hub-empty {
    text-align: center;
    color: #7b8ba3;
    padding: 70px 0 40px;
    font-size: .98rem;
}

.hub-empty svg {
    display: block;
    width: 34px;
    height: 34px;
    margin: 0 auto 14px;
    color: #c3cedd;
}

.hub-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 34px;
    padding: 18px 22px;
    background: #fff;
    border: 1px solid #e6ecf4;
    border-radius: 14px;
    font-size: .92rem;
    color: #5b6b83;
}

.hub-note a {
    color: #2c6fbf;
    font-weight: 600;
    white-space: nowrap;
}

/* ---------- 响应式 ---------- */

@media (max-width: 768px) {
    .hub-hero {
        padding-bottom: 44px;
    }

    .hub-hero .hub-lead {
        font-size: 1rem;
    }

    .hub-stats {
        gap: 8px 18px;
        font-size: .86rem;
    }

    .hub-stats b {
        font-size: 1.05rem;
    }

    .hub-toolbar {
        top: 58px;
        padding: 12px 0;
        gap: 10px;
    }

    .hub-filters {
        gap: 6px;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        width: 100%;
        -webkit-overflow-scrolling: touch;
        -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent 100%);
        mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent 100%);
    }

    .hub-filter {
        padding: 6px 12px;
        font-size: .85rem;
        white-space: nowrap;
    }

    .hub-search {
        width: 100%;
        min-width: 0;
    }

    .hub-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .hub-card {
        padding: 18px 18px 14px;
    }
}

/* ---------- Banner 粒子层 ----------
   canvas 由 js/hub-particles.js 绘制：漂浮光点 + 邻近连线 + 指针轻推。 */
.hub-particles {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* 手机上粒子稍微收一点，别抢文字的对比度 */
@media (max-width: 640px) {
    .hub-particles {
        opacity: .85;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hub-particles {
        opacity: .6;
    }
}

/* 本页 hero 自带一层 10px 点阵；压淡一档，给 canvas 粒子让位 */
.hub-hero::before {
    opacity: .32;
}
