    * {
        box-sizing: border-box;
    }

    html,
    body {
        min-height: 100%;
    }

    body {
        margin: 0;
        background: #f5f7fa;
        color: #1f2937;
        font-family:
            -apple-system,
            BlinkMacSystemFont,
            "Segoe UI",
            "Microsoft YaHei",
            Arial,
            sans-serif;
    }

    /* =========================
       顶部
    ========================= */

    .top-header {
        background: #ffffff;
        border-bottom: 1px solid #e5e7eb;
        padding: 90px 0 26px;
    }

    .header-inner {
        max-width: 1180px;
        margin: 0 auto;
        padding: 0 20px;
    }

    .site-title {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin-bottom: 18px;
    }

    .site-title-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: #0d6efd;
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
    }

    .site-title h1 {
        margin: 0;
        font-size: 21px;
        font-weight: 600;
        color: #1f2937;
    }

    /* =========================
       搜索
    ========================= */

    .search-box {
        max-width: 820px;
        margin: 0 auto;
    }

    .search-wrapper {
        display: flex;
        height: 46px;
        background: #ffffff;
        border: 1px solid #dbe1e8;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

    .search-engine {
        position: relative;
        flex: 0 0 125px;
        border-right: 1px solid #e5e7eb;
    }

    .engine-button {
        width: 100%;
        height: 100%;
        border: 0;
        background: transparent;
        padding: 0 13px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        cursor: pointer;
        color: #374151;
        font-size: 14px;
        border-radius: 12px 0 0 12px;
    }

    .engine-button:hover {
        background: #f8fafc;
    }

    .engine-name {
        display: flex;
        align-items: center;
        gap: 7px;
        white-space: nowrap;
    }

    .engine-name i {
        font-size: 15px;
    }

    .engine-menu {
        position: absolute;
        z-index: 1000;
        top: calc(100% + 6px);
        left: 0;
        right: 0;
        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        padding: 5px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
        display: none;
    }

    .engine-menu.show {
        display: block;
    }

    .engine-option {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        border: 0;
        background: transparent;
        padding: 9px 10px;
        border-radius: 7px;
        cursor: pointer;
        text-align: left;
        font-size: 13px;
        color: #374151;
    }

    .engine-option:hover {
        background: #f1f5f9;
    }

    .engine-option.active {
        background: #eef5ff;
        color: #0d6efd;
    }

    .search-input {
        flex: 1;
        min-width: 0;
        border: 0;
        outline: none;
        padding: 0 15px;
        font-size: 14px;
    }

    .search-input::placeholder {
        color: #9ca3af;
    }

    .search-button {
        width: 50px;
        border: 0;
        background: transparent;
        color: #6b7280;
        cursor: pointer;
        font-size: 17px;
        border-radius: 0 12px 12px 0;
    }

    .search-button:hover {
        color: #0d6efd;
        background: #f8fafc;
    }

    /* =========================
       主体
    ========================= */

    .main-container {
        max-width: 1180px;
        margin: 0 auto;
        padding: 22px 20px 30px;
        /*min-height: calc(100vh - 250px);*/
    }

    /* =========================
       分类 Tab
    ========================= */

    .category-tabs {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin-bottom: 18px;
        padding: 4px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .category-tabs::-webkit-scrollbar {
        display: none;
    }

    .category-tab {
        flex: 0 0 auto;
        border: 0;
        background: transparent;
        color: #64748b;
        padding: 8px 18px;
        border-radius: 9px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        white-space: nowrap;
        transition: all 0.18s ease;
    }

    .category-tab:hover {
        background: #e9eef5;
        color: #334155;
    }

    .category-tab.active {
        background: #0d6efd;
        color: #ffffff;
        box-shadow: 0 3px 10px rgba(13, 110, 253, 0.22);
    }

    /* =========================
       分组标题
    ========================= */

    .section-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 10px 0 10px;
    }

    .section-title-left {
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: 13px;
        font-weight: 600;
        color: #475569;
    }

    .section-title-left i {
        color: #0d6efd;
    }

    /* =========================
       导航网格
    ========================= */

    .nav-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
    }

    /* =========================
       导航卡片
    ========================= */

    .nav-card-wrapper {
        min-width: 0;
    }

    .nav-card {
        position: relative;
        min-height: 72px;
        height: 100%;
        padding: 13px;
        background: #ffffff;
        border: 1px solid #e8ebef;
        border-radius: 11px;
        display: flex;
        align-items: center;
        gap: 11px;
        text-decoration: none;
        color: inherit;
        cursor: pointer;
        transition:
            transform 0.16s ease,
            box-shadow 0.16s ease,
            border-color 0.16s ease;
    }

    .nav-card:hover {
        transform: translateY(-2px);
        border-color: #d5dce5;
        box-shadow: 0 5px 16px rgba(15, 23, 42, 0.07);
    }

    .nav-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
        border-radius: 9px;
        background: #f1f5f9;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

    .nav-icon img {
        width: 24px;
        height: 24px;
        object-fit: contain;
    }

    .nav-info {
        min-width: 0;
        flex: 1;
        text-align: center;
    }

    .nav-title {
        width: 100%;
        font-size: 14px;
        font-weight: 600;
        color: #1f2937;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 3px;
        text-align: center;
    }

    .nav-desc {
        width: 100%;
        font-size: 11px;
        color: #94a3b8;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
    }

    .nav-arrow {
        color: #cbd5e1;
        font-size: 12px;
        flex: 0 0 auto;
    }

    /* =========================
       自定义网站
    ========================= */

    .delete-custom {
        position: absolute;
        top: 5px;
        right: 5px;
        z-index: 10;
        width: 20px;
        height: 20px;
        border: 0;
        border-radius: 50%;
        background: #f1f5f9;
        color: #94a3b8;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        padding: 0;
        font-size: 11px;
    }

    .delete-custom:hover {
        background: #fee2e2;
        color: #dc2626;
    }

    .custom-badge {
        position: absolute;
        left: 7px;
        top: 6px;
        padding: 1px 5px;
        border-radius: 4px;
        font-size: 9px;
        background: #eff6ff;
        color: #3b82f6;
    }

    /* =========================
       添加卡片
    ========================= */

    .add-card {
        min-height: 72px;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
        border: 1px dashed #cbd5e1;
        background: #fafbfc;
        color: #94a3b8;
    }

    .add-card:hover {
        border-color: #93c5fd;
        color: #0d6efd;
        background: #f8fbff;
    }

    .add-icon {
        font-size: 19px;
        line-height: 1;
    }

    .add-text {
        font-size: 11px;
    }

    /* =========================
       空状态
    ========================= */

    .empty-state {
        grid-column: 1 / -1;
        padding: 55px 20px;
        text-align: center;
        color: #94a3b8;
        font-size: 13px;
    }

    .empty-state i {
        display: block;
        font-size: 30px;
        margin-bottom: 8px;
    }

    /* =========================
       底部版权
    ========================= */

    .site-footer {
        padding: 18px 20px 24px;
        text-align: center;
        color: #94a3b8;
        font-size: 12px;
    }

    .site-footer a {
        color: #94a3b8;
        text-decoration: none;
    }

    .site-footer a:hover {
        color: #0d6efd;
    }

    /* =========================
       Modal
    ========================= */

    .modal-content {
        border: 0;
        border-radius: 14px;
        overflow: hidden;
    }

    .modal-header {
        padding: 17px 20px;
        border-bottom: 1px solid #eef0f2;
    }

    .modal-title {
        font-size: 16px;
        font-weight: 600;
    }

    .modal-body {
        padding: 20px;
    }

    .form-label {
        font-size: 13px;
        font-weight: 500;
        color: #475569;
        margin-bottom: 6px;
    }

    .form-control,
    .form-select {
        font-size: 13px;
        min-height: 40px;
        border-radius: 8px;
        border-color: #dbe1e8;
    }

    .form-control:focus,
    .form-select:focus {
        border-color: #86b7fe;
        box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.1);
    }

    .favicon-preview {
        width: 42px;
        height: 42px;
        min-width: 42px;
        border-radius: 9px;
        border: 1px solid #e5e7eb;
        background: #f8fafc;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

    .favicon-preview img {
        width: 26px;
        height: 26px;
        object-fit: contain;
    }

    /* =========================
       手机端
    ========================= */

    @media (max-width: 991px) {

        .nav-grid {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

    }

    @media (max-width: 767px) {

        .top-header {
            padding: 17px 0 20px;
        }

        .header-inner {
            padding: 0 14px;
        }

        .site-title h1 {
            font-size: 18px;
        }

        .search-wrapper {
            height: 43px;
        }

        .search-engine {
            flex-basis: 105px;
        }

        .engine-button {
            padding: 0 9px;
            font-size: 12px;
        }

        .search-input {
            padding: 0 10px;
            font-size: 13px;
        }

        .search-button {
            width: 43px;
        }

        .main-container {
            padding: 15px 12px 20px;
        }

        .category-tabs {
            justify-content: flex-start;
            margin-bottom: 13px;
        }

        .category-tab {
            padding: 7px 14px;
            font-size: 13px;
        }

        .nav-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
        }

        .nav-card {
            min-height: 66px;
            padding: 10px;
            gap: 8px;
        }

        .nav-icon {
            width: 34px;
            height: 34px;
            min-width: 34px;
        }

        .nav-icon img {
            width: 22px;
            height: 22px;
        }

        .nav-title {
            font-size: 13px;
        }

        .nav-desc {
            font-size: 10px;
        }

        .site-footer {
            padding-bottom: 18px;
        }

    }

    @media (max-width: 380px) {

        .search-engine {
            flex-basis: 90px;
        }

        .engine-name span {
            display: none;
        }

    }


    /* =========================
   配置管理
========================= */

.config-tools {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 5px 0 18px;
}

.config-btn {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    border-radius: 7px;
    padding: 5px 11px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.config-btn i {
    margin-right: 4px;
}

.config-btn:hover {
    border-color: #bfdbfe;
    background: #f8fbff;
    color: #0d6efd;
}

@media (max-width: 767px) {

    .config-tools {
        margin-bottom: 14px;
    }

    .config-btn {
        padding: 5px 9px;
        font-size: 10px;
    }
}



    /* =========================
   推荐导航
========================= */

.nav-card-wrapper.recommended {
    position: relative;
}

/* 推荐卡片边框 */
.nav-card-wrapper.recommended .nav-card {
    border: 1px solid #ff6b6b;
    box-shadow: 0 4px 14px rgba(220, 53, 69, 0.12);
}

/* 鼠标悬停 */
.nav-card-wrapper.recommended .nav-card:hover {
    border-color: #dc3545;
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.22);
}

/* 推荐角标 */
.nav-badge {
    position: absolute;
    top: -8px;
    right: 12px;

    z-index: 10;

    display: inline-flex;
    align-items: center;
    gap: 3px;

    padding: 3px 8px;

    font-size: 11px;
    font-weight: 600;
    line-height: 1;

    color: #fff;
    background: #dc3545;

    border-radius: 10px;

    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.25);
}

.nav-badge i {
    font-size: 9px;
}

