/* ============================================================
   TotalPDF 首页样式 v2
   仅被 App/Home/View/Index/index.html 引用
   ============================================================ */

/* ---------- 基础 ---------- */
.hp-hero,
.hp-main,
.hp-features {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[hidden] {
    display: none !important;
}

.hp-card.hp-hidden {
    display: none !important;
}

/* ---------- Hero ---------- */
.hp-hero {
    position: relative;
    overflow: hidden;
    padding: 68px 0 60px;
    background:
        radial-gradient(760px 380px at 12% -8%, rgba(219, 39, 119, .13), rgba(255, 255, 255, 0) 68%),
        radial-gradient(720px 360px at 88% -6%, rgba(124, 58, 237, .11), rgba(255, 255, 255, 0) 66%),
        linear-gradient(180deg, #fdfcfe 0%, #ffffff 100%);
}

.hp-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #eef1f6 18%, #eef1f6 82%, transparent);
}

.hp-hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 15px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .01em;
    color: #b3164f;
    border: 1px solid transparent;
    border-radius: 999px;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(100deg, #fbcfe8, #e9d5ff) border-box;
    box-shadow: 0 6px 18px -10px rgba(190, 24, 93, .55);
}

.hp-eyebrow .fa {
    font-size: 11px;
    color: #db2777;
}

.hp-title {
    margin: 22px 0 0;
    font-size: 46px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #0b1220;
}

.hp-title .hp-grad {
    background: linear-gradient(94deg, #e11d74 0%, #c026d3 54%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #c026d3;
}

.hp-sub {
    max-width: 660px;
    margin: 18px auto 0;
    font-size: 15.5px;
    line-height: 1.8;
    color: #5b6b82;
}

/* 搜索框 */
.hp-search {
    position: relative;
    max-width: 600px;
    margin: 30px auto 0;
}

.hp-search-input {
    width: 100%;
    height: 56px;
    padding: 0 56px 0 52px;
    font-size: 15px;
    color: #0b1220;
    background: #ffffff;
    border: 1px solid #e6e9ef;
    border-radius: 16px;
    outline: none;
    box-shadow: 0 14px 34px -18px rgba(15, 23, 42, .38);
    transition: border-color .18s ease, box-shadow .18s ease;
    -webkit-appearance: none;
}

.hp-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.hp-search-input::placeholder {
    color: #9aa7b8;
}

.hp-search-input:focus {
    border-color: #f2a9c6;
    box-shadow: 0 0 0 4px rgba(219, 39, 119, .10), 0 14px 34px -18px rgba(15, 23, 42, .38);
}

.hp-search-ico {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #9aa7b8;
    pointer-events: none;
}

.hp-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 13px;
    color: #64748b;
    background: #f2f5f9;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.hp-search-clear:hover {
    background: #e8edf4;
    color: #0b1220;
}

/* 常用工具 */
.hp-hot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    font-size: 13px;
}

.hp-hot-label {
    color: #93a1b3;
}

.hp-hot a {
    display: inline-block;
    padding: 6px 13px;
    color: #41516a;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #eceff4;
    border-radius: 999px;
    transition: color .15s ease, border-color .15s ease, background .15s ease, transform .15s ease;
}

.hp-hot a:hover,
.hp-hot a:focus {
    color: #c2185b;
    text-decoration: none;
    background: #fff7fa;
    border-color: #f7c6da;
    transform: translateY(-1px);
}

/* 信任点 */
.hp-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 24px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: #7b8a9d;
}

.hp-trust .fa {
    margin-right: 6px;
    color: #16a34a;
}

/* ---------- 工具区 ---------- */
.hp-main {
    padding-bottom: 8px;
    background: #f6f8fb;
}

.hp-topbar {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid #e9edf3;
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
}

.hp-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 0;
}

.hp-filter::-webkit-scrollbar {
    display: none;
}

.hp-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 16px;
    font-size: 13.5px;
    font-weight: 500;
    color: #4a5a70;
    white-space: nowrap;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: color .16s ease, background .16s ease, box-shadow .16s ease;
    -webkit-appearance: none;
}

.hp-pill .fa {
    font-size: 12px;
    opacity: .75;
}

.hp-pill:hover {
    color: #0b1220;
    background: #eef2f8;
}

.hp-pill.active {
    color: #ffffff;
    background: linear-gradient(135deg, #e11d74 0%, #c026d3 100%);
    box-shadow: 0 10px 20px -12px rgba(192, 38, 211, .95);
}

.hp-pill.active .fa,
.hp-pill.active .hp-pill-dot {
    opacity: 1;
}

.hp-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
    transition: background .16s ease;
}

.hp-pill.active .hp-pill-dot {
    background: #ffffff;
}

/* 分类小圆点配色（与下方分区竖条一致） */
.hp-filter .hp-pill:nth-child(2) .hp-pill-dot { background: #7c3aed; }
.hp-filter .hp-pill:nth-child(3) .hp-pill-dot { background: #2563eb; }
.hp-filter .hp-pill:nth-child(4) .hp-pill-dot { background: #0d9488; }
.hp-filter .hp-pill:nth-child(5) .hp-pill-dot { background: #ea580c; }
.hp-filter .hp-pill:nth-child(6) .hp-pill-dot { background: #db2777; }
.hp-filter .hp-pill:nth-child(7) .hp-pill-dot { background: #16a34a; }
.hp-filter .hp-pill:nth-child(8) .hp-pill-dot { background: #475569; }

/* 分区 */
.hp-sections {
    padding-top: 6px;
    padding-bottom: 26px;
}

.hp-sec {
    padding: 26px 0 4px;
}

.hp-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.hp-sec-head h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: #0b1220;
}

.hp-sec-dot {
    display: inline-block;
    width: 6px;
    height: 20px;
    border-radius: 3px;
    background: #94a3b8;
}

.hp-sec-count {
    flex: 0 0 auto;
    padding: 3px 11px;
    font-size: 12.5px;
    color: #8b98ab;
    background: #ffffff;
    border: 1px solid #e9edf3;
    border-radius: 999px;
}

.hp-sec:nth-of-type(1) .hp-sec-dot { background: linear-gradient(180deg, #a855f7, #7c3aed); }
.hp-sec:nth-of-type(2) .hp-sec-dot { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.hp-sec:nth-of-type(3) .hp-sec-dot { background: linear-gradient(180deg, #2dd4bf, #0d9488); }
.hp-sec:nth-of-type(4) .hp-sec-dot { background: linear-gradient(180deg, #fb923c, #ea580c); }
.hp-sec:nth-of-type(5) .hp-sec-dot { background: linear-gradient(180deg, #f472b6, #db2777); }
.hp-sec:nth-of-type(6) .hp-sec-dot { background: linear-gradient(180deg, #4ade80, #16a34a); }
.hp-sec:nth-of-type(7) .hp-sec-dot { background: linear-gradient(180deg, #94a3b8, #475569); }

/* 卡片网格 */
.hp-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.hp-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-height: 112px;
    padding: 18px;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    border: 1px solid #e9edf3;
    border-radius: 14px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.hp-card:hover,
.hp-card:focus {
    text-decoration: none;
    color: inherit;
    border-color: #f6c9dc;
    box-shadow: 0 18px 32px -20px rgba(190, 24, 93, .5);
    transform: translateY(-2px);
}

.hp-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(219, 39, 119, .22), 0 18px 32px -20px rgba(190, 24, 93, .5);
}

.hp-ico {
    flex: 0 0 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    overflow: hidden;
    background: linear-gradient(180deg, #fff6f9, #ffedf3);
    border: 1px solid #ffe1ea;
    border-radius: 14px;
    transition: background .18s ease, border-color .18s ease;
}

.hp-ico img {
    display: block;
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.hp-card:hover .hp-ico {
    background: linear-gradient(180deg, #ffeef5, #ffe2ec);
    border-color: #ffd0e0;
}

.hp-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.hp-name {
    display: -webkit-box;
    overflow: hidden;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #0b1220;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 热门标记：固定在卡片右上角，避免标题换行时被挤到下一行 */
.hp-name sup {
    position: absolute;
    top: 14px;
    right: 14px;
    margin: 0;
    padding: 1px 6px;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #d6154f !important;
    background: #ffe8ef;
    border: 1px solid #ffd0e0;
    border-radius: 6px;
}

.hp-name:has(sup) {
    padding-right: 38px;
}

.hp-desc {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12.5px;
    line-height: 1.6;
    color: #77869a;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 搜索无结果 */
.hp-empty {
    padding: 72px 20px 96px;
    text-align: center;
    color: #8b98ab;
}

.hp-empty .fa {
    display: block;
    margin-bottom: 14px;
    font-size: 34px;
    color: #c8d2e0;
}

.hp-empty h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #334155;
}

.hp-empty p {
    margin: 0;
    font-size: 13px;
}

/* ---------- 特性条 ---------- */
.hp-features {
    padding: 52px 0 46px;
    background: #ffffff;
    border-top: 1px solid #eef1f6;
}

.hp-feat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.hp-feat-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
    font-size: 20px;
    color: #db2777;
    background: #fff0f6;
    border: 1px solid #ffdcea;
    border-radius: 12px;
}

.hp-feat h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: #0b1220;
}

.hp-feat p {
    margin: 0;
    font-size: 13px;
    line-height: 1.75;
    color: #77869a;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1199px) {
    .hp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .hp-hero {
        padding: 52px 0 46px;
    }

    .hp-title {
        font-size: 38px;
    }
}

@media (max-width: 767px) {
    .hp-hero {
        padding: 40px 0 36px;
    }

    .hp-title {
        margin-top: 18px;
        font-size: 28px;
        line-height: 1.3;
    }

    .hp-sub {
        margin-top: 14px;
        font-size: 14px;
    }

    .hp-eyebrow {
        font-size: 11.5px;
        padding: 6px 12px;
    }

    .hp-search {
        margin-top: 24px;
    }

    .hp-search-input {
        height: 50px;
        font-size: 14px;
        border-radius: 14px;
        padding-left: 46px;
    }

    .hp-search-ico {
        left: 17px;
    }

    .hp-hot {
        justify-content: flex-start;
        margin-top: 14px;
        font-size: 12.5px;
    }

    .hp-trust {
        justify-content: flex-start;
        gap: 8px 16px;
        margin-top: 20px;
        font-size: 12.5px;
    }

    /* 手机上筛选条改为可换行并取消吸顶，避免挤占屏幕且右侧被截断 */
    .hp-topbar {
        position: static;
    }

    .hp-filter {
        gap: 5px;
        padding: 9px 0;
    }

    .hp-pill {
        height: 32px;
        padding: 0 12px;
        font-size: 12.5px;
        gap: 6px;
    }

    .hp-pill .fa {
        font-size: 11px;
    }

    .hp-sec {
        padding-top: 22px;
    }

    .hp-sec-head h2 {
        font-size: 17px;
    }

    .hp-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .hp-card {
        min-height: 0;
        padding: 14px;
        gap: 12px;
        border-radius: 12px;
    }

    .hp-name {
        font-size: 14.5px;
    }

    .hp-name sup {
        top: 12px;
        right: 12px;
    }

    .hp-name:has(sup) {
        padding-right: 34px;
    }

    .hp-ico {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }

    .hp-ico img {
        width: 30px;
        height: 30px;
    }

    .hp-features {
        padding: 36px 0 32px;
    }

    .hp-feat-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }
}
