/* AI 导航页 - 样式
 * 前缀 .anb- ，避免与主题 Bootstrap 冲突
 * 设计参考：OneNav 卡片式导航 + 本站科技蓝色调
 */

.anb-wrap {
    --anb-primary: #3b6fe0;
    --anb-primary-2: #6d5ef0;
    --anb-accent: #00b8a9;
    --anb-bg: #f5f7fb;
    --anb-card: #ffffff;
    --anb-text: #1d2530;
    --anb-muted: #6b7885;
    --anb-border: #e8edf5;
    --anb-radius: 14px;
    --anb-shadow: 0 1px 2px rgba(20, 35, 60, .05), 0 6px 20px rgba(20, 35, 60, .06);
    --anb-shadow-hover: 0 4px 10px rgba(20, 35, 60, .08), 0 16px 38px rgba(20, 35, 60, .12);

    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--anb-text);
    background: var(--anb-bg);
    padding: 0 0 48px;
    margin: 0;
    line-height: 1.6;
}

.anb-wrap * {
    box-sizing: border-box;
}

.anb-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ============ Hero ============ */
.anb-hero {
    position: relative;
    background: linear-gradient(135deg, #1b3a8f 0%, #3b6fe0 45%, #6d5ef0 100%);
    color: #fff;
    padding: 44px 0 56px;
    overflow: hidden;
}

.anb-hero::before,
.anb-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    pointer-events: none;
}

.anb-hero::before {
    width: 420px;
    height: 420px;
    right: -120px;
    top: -180px;
}

.anb-hero::after {
    width: 300px;
    height: 300px;
    left: -100px;
    bottom: -160px;
    background: rgba(0, 184, 169, .18);
}

.anb-hero .anb-inner {
    position: relative;
    z-index: 2;
}

.anb-hero-title {
    font-size: 30px;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: .5px;
}

.anb-hero-sub {
    font-size: 15px;
    opacity: .88;
    margin: 0 0 22px;
}

.anb-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    margin-bottom: 24px;
    font-size: 14px;
}

.anb-stat b {
    font-size: 22px;
    font-weight: 700;
    margin-right: 4px;
    letter-spacing: .5px;
}

.anb-stat span {
    opacity: .85;
}

/* ============ 搜索框 ============ */
.anb-search {
    display: flex;
    background: #fff;
    border-radius: 999px;
    padding: 5px;
    box-shadow: 0 8px 30px rgba(10, 25, 60, .22);
    max-width: 720px;
    align-items: center;
}

.anb-engine {
    position: relative;
    flex: 0 0 auto;
}

.anb-engine-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 0;
    padding: 9px 14px;
    font-size: 14px;
    color: #46536b;
    cursor: pointer;
    border-radius: 999px;
    white-space: nowrap;
    font-weight: 500;
}

.anb-engine-btn::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #98a4b8;
    margin-left: 2px;
}

.anb-engine-menu {
    position: absolute;
    top: 110%;
    left: 0;
    background: #fff;
    border: 1px solid var(--anb-border);
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(20, 35, 60, .16);
    min-width: 150px;
    padding: 6px;
    display: none;
    z-index: 40;
}

.anb-engine.open .anb-engine-menu {
    display: block;
}

.anb-engine-menu button {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #33415c;
    cursor: pointer;
}

.anb-engine-menu button:hover {
    background: #f0f4fb;
}

.anb-engine-menu button.active {
    color: var(--anb-primary);
    font-weight: 600;
    background: #eef3fe;
}

.anb-search input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    font-size: 15px;
    padding: 10px 6px;
    background: transparent;
    color: #1d2530;
}

.anb-search input::placeholder {
    color: #a3aebb;
}

.anb-search-btn {
    flex: 0 0 auto;
    border: 0;
    background: linear-gradient(135deg, var(--anb-primary), var(--anb-primary-2));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 10px 26px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
}

.anb-search-btn:hover {
    filter: brightness(1.06);
}

/* ============ 分类 Tab ============ */
.anb-tabs-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(245, 247, 251, .94);
    backdrop-filter: saturate(1.6) blur(8px);
    border-bottom: 1px solid var(--anb-border);
}

.anb-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
    scrollbar-width: none;
}

.anb-tabs::-webkit-scrollbar {
    display: none;
}

.anb-tab {
    flex: 0 0 auto;
    border: 1px solid var(--anb-border);
    background: #fff;
    color: #4a5768;
    font-size: 14px;
    padding: 7px 16px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .16s ease;
}

.anb-tab:hover {
    border-color: #c3d3f7;
    color: var(--anb-primary);
}

.anb-tab.active {
    background: linear-gradient(135deg, var(--anb-primary), var(--anb-primary-2));
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(59, 111, 224, .3);
}

.anb-tab-count {
    opacity: .65;
    font-size: 12px;
    margin-left: 4px;
}

/* ============ 区块 ============ */
.anb-section {
    margin-top: 30px;
}

.anb-section-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.anb-section-title {
    font-size: 19px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.anb-section-title::before {
    content: "";
    width: 4px;
    height: 18px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--anb-primary), var(--anb-primary-2));
}

.anb-section-desc {
    font-size: 13px;
    color: var(--anb-muted);
    margin: 0;
}

/* ============ 卡片网格 ============ */
.anb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
    gap: 12px;
}

.anb-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    background: var(--anb-card);
    border: 1px solid var(--anb-border);
    border-radius: var(--anb-radius);
    padding: 13px;
    text-decoration: none;
    color: inherit;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    box-shadow: var(--anb-shadow);
    overflow: hidden;
}

.anb-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--anb-shadow-hover);
    border-color: #c9d9fb;
    color: inherit;
}

.anb-icon {
    position: relative;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    letter-spacing: 0;
}

.anb-icon img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    padding: 4px;
}

.anb-card-body {
    min-width: 0;
    flex: 1 1 auto;
}

.anb-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}

.anb-card-desc {
    font-size: 12.5px;
    color: var(--anb-muted);
    margin: 0 0 7px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 34px;
    line-height: 1.42;
}

.anb-card-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.anb-tag {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 5px;
    background: #f0f3f9;
    color: #6b7885;
    line-height: 1.7;
    white-space: nowrap;
}

.anb-tag.free {
    background: #e8f6ee;
    color: #1f9d55;
}

.anb-tag.part {
    background: #fff5e6;
    color: #b9770e;
}

.anb-tag.paid {
    background: #fdecec;
    color: #d14343;
}

.anb-tag.cn {
    background: #fdecec;
    color: #c0392b;
}

.anb-tag.hot {
    background: linear-gradient(135deg, #ff7a45, #ff4d6d);
    color: #fff;
}

.anb-badge-hot {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 10px;
    line-height: 1;
    padding: 5px 8px 5px 12px;
    background: linear-gradient(135deg, #ff7a45, #ff4d6d);
    color: #fff;
    border-bottom-left-radius: 12px;
    font-weight: 600;
    letter-spacing: .5px;
}

.anb-badge-new {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 10px;
    line-height: 1;
    padding: 5px 8px 5px 12px;
    background: linear-gradient(135deg, #00b8a9, #3b6fe0);
    color: #fff;
    border-bottom-left-radius: 12px;
    font-weight: 600;
}

/* ============ 空结果 ============ */
.anb-empty {
    text-align: center;
    padding: 56px 16px;
    color: var(--anb-muted);
    background: #fff;
    border: 1px dashed var(--anb-border);
    border-radius: var(--anb-radius);
    margin-top: 16px;
}

.anb-empty b {
    display: block;
    font-size: 16px;
    color: #46536b;
    margin-bottom: 6px;
}

/* ============ 提交收录 ============ */
.anb-submit {
    margin-top: 34px;
    background: linear-gradient(120deg, #eef3fe, #f6f0ff);
    border: 1px solid #dde6fb;
    border-radius: var(--anb-radius);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.anb-submit-text b {
    font-size: 16px;
    display: block;
    margin-bottom: 3px;
}

.anb-submit-text span {
    font-size: 13px;
    color: var(--anb-muted);
}

.anb-submit-btn {
    background: linear-gradient(135deg, var(--anb-primary), var(--anb-primary-2));
    color: #fff;
    border: 0;
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.anb-submit-btn:hover {
    filter: brightness(1.06);
    color: #fff;
}

/* ============ 工具详情页 ============ */
.anb-detail {
    background: #fff;
    border: 1px solid var(--anb-border);
    border-radius: var(--anb-radius);
    padding: 22px;
    margin-bottom: 22px;
    box-shadow: var(--anb-shadow);
    display: flex;
    gap: 18px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.anb-detail-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    flex: 0 0 auto;
}

.anb-detail-icon img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    padding: 8px;
}

.anb-detail-main {
    flex: 1 1 260px;
    min-width: 0;
}

.anb-detail-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.3;
}

.anb-detail-desc {
    color: #4a5768;
    margin: 0 0 12px;
    font-size: 15px;
}

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

.anb-detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.anb-btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--anb-primary), var(--anb-primary-2));
    color: #fff;
    padding: 10px 26px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(59, 111, 224, .28);
}

.anb-btn-primary:hover {
    color: #fff;
    filter: brightness(1.06);
}

.anb-btn-ghost {
    display: inline-block;
    background: #fff;
    color: #46536b;
    border: 1px solid var(--anb-border);
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    text-decoration: none;
}

.anb-btn-ghost:hover {
    border-color: #c3d3f7;
    color: var(--anb-primary);
}

.anb-notice {
    background: #fffbe9;
    border: 1px solid #ffe9a8;
    color: #8a6d1f;
    font-size: 13px;
    padding: 9px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
}

/* ============ 响应式 ============ */
@media (max-width: 991px) {
    .anb-hero {
        padding: 32px 0 42px;
    }

    .anb-hero-title {
        font-size: 24px;
    }

    .anb-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 640px) {
    .anb-hero-title {
        font-size: 21px;
    }

    .anb-hero-sub {
        font-size: 13px;
    }

    .anb-stats {
        gap: 16px;
        font-size: 13px;
    }

    .anb-stat b {
        font-size: 18px;
    }

    .anb-search {
        border-radius: 14px;
        flex-wrap: wrap;
        padding: 7px;
    }

    .anb-engine {
        order: 1;
    }

    .anb-search input {
        order: 0;
        flex: 1 1 60%;
    }

    .anb-search-btn {
        order: 2;
        flex: 1 1 auto;
        text-align: center;
        padding: 10px 14px;
    }

    .anb-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 9px;
    }

    .anb-card {
        padding: 10px;
        gap: 8px;
        flex-direction: column;
        align-items: stretch;
    }

    .anb-icon {
        width: 36px;
        height: 36px;
        border-radius: 9px;
        font-size: 15px;
    }

    .anb-card-title {
        font-size: 14px;
    }

    .anb-card-desc {
        font-size: 12px;
        min-height: 32px;
    }

    .anb-detail {
        padding: 16px;
    }

    .anb-detail-title {
        font-size: 19px;
    }
}
