/* web整改0623 start */
/* 搜索页 - Figma ID5：搜索-51爆料-h5 / web */
/* search-page-web-nav-offset-v5 */
/* H5：--sf = 100vw，尺寸用 calc(标注px * var(--sf) / 750) 按视口等比还原 */

#body > .container {
    background-color: #2c2a2a;
    min-height: calc(100vh - 6.3125rem);
    padding-top: 0;
}

@media (min-width: 768px) {
    #body > .container {
        margin-top: 0 !important;
        padding-top: 0;
    }

    body.search-page-web-mode #body > .container {
        padding-top: calc(var(--search-page-nav-offset, 6.75rem) + 1.75rem);
    }
}

@media (max-width: 767px) {
    #body > .container {
        margin-top: 0;
        background-color: #222;
    }
}

/* 覆盖 search.css 中 header 下拉搜索的隐藏规则 */
#body .nav-search-container {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    position: static !important;
}

#body .nav-search-container .nav-search-list {
    display: block !important;
    position: static !important;
    height: auto !important;
    width: 100% !important;
    z-index: auto !important;
}

#body .nav-search-container .container-hot-search,
#body .nav-search-container .container-hot-search.show {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    position: static !important;
    z-index: auto !important;
    background: transparent !important;
    width: 100% !important;
}

#body .nav-search-container .container-hot-search .container-search-context {
    max-height: none !important;
    overflow: visible !important;
    padding-top: 0;
    margin-top: 0;
}

#body .nav-search-container .container-hot-search .rank-list .rank-card {
    display: flex !important;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    line-height: normal;
    color: inherit;
    text-decoration: none;
}

#body .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 搜索框 */
#body .search-input-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.25rem;
}

#body .search-back-btn {
    display: none;
    flex-shrink: 0;
    width: 1.875rem;
    height: 1.875rem;
    padding: 0;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

#body .search-back-btn .search-back-icon {
    display: block;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
}

#body .search-input-wrap .xqbj-icon-search-pc {
    background-image: url(./search@3x.png);
}

#body .search-input-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    min-height: 3.875rem;
    padding: 0.375rem 0.375rem 0.375rem 0.75rem;
    border-radius: 1.9375rem;
    border: none;
    background-color: #222;
}

#body .search-input-wrap .xqbj-icon-search-pc {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
}

#body .search-input-wrap .search-input {
    margin-left: 0.25rem;
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    font-size: 1.125rem;
    color: #fff;
}

#body .search-input-wrap .search-input::placeholder {
    color: #888;
}

#body .search-input-wrap .search-butn {
    flex-shrink: 0;
    width: 6.125rem;
    height: 3.125rem;
    line-height: 3.125rem;
    text-align: center;
    border-radius: 2.5rem;
    background-color: #414141;
    background-image: none;
    font-size: 1.125rem;
    color: #fff;
    cursor: pointer;
}

/* 区块标题 */
#body .search-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#body .search-title.search-border {
    margin-top: 1.5rem;
    border: none;
    padding-bottom: 0;
}

#body .search-title span,
#body .search-title h2 {
    font-size: 1.125rem;
    font-weight: 500;
    color: #888;
}

#body .search-title .r-text {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.9375rem;
    line-height: 1.33;
    color: #fff;
    opacity: 0.5;
    cursor: pointer;
}

#body .search-title .r-text .icon {
    width: 1.375rem;
    height: 1.375rem;
    display: inline-block;
    vertical-align: middle;
}

/* 历史记录 */
#body .container-search-tags {
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#body .container-search-tags .history-record {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

#body .container-search-tags .history-record button,
#body .container-search-tags .history-record .search-history-item {
    font-size: 1.0625rem;
    color: #aaa;
    border: solid 1px #a7a7a7;
    padding: 0 0.875rem;
    height: 2.75rem;
    line-height: 2.75rem;
    margin: 0;
    border-radius: 0.5rem;
    background-color: transparent;
    cursor: pointer;
}

#body .container-search-tags .list .no-data {
    font-size: 1.0625rem;
    color: #888;
}

/* 热门排行 */
#body .icon-position {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

#body .rank-card .view {
    font-size: 1.125rem;
    line-height: 1.33;
    color: #ff3159;
    white-space: nowrap;
}

#body .xqbj-hot-badge {
    display: none;
}

#body .nav-search-container .container-hot-search .rank-list .rank-card {
    margin-top: 1.875rem;
}

#body .nav-search-container .container-hot-search .rank-list .rank-card:first-child {
    margin-top: 1.25rem;
}

#body .nav-search-container .container-hot-search .rank-list .rank-card .rank-card-title {
    flex: 1;
    min-width: 0;
    margin-left: 0.25rem;
    font-size: 1.125rem;
    line-height: 1.33;
    color: #c5c5c5;
}

#body .nav-search-container .container-hot-search .rank-list .rank-card .rank-card-icon,
#body .nav-search-container .container-hot-search .rank-list .rank-card .xqbj-icon-rank-1,
#body .nav-search-container .container-hot-search .rank-list .rank-card .xqbj-icon-rank-2,
#body .nav-search-container .container-hot-search .rank-list .rank-card .xqbj-icon-rank-3 {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
}

#body .nav-search-container .container-hot-search .rank-list .rank-card .rank-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 500;
    color: #888;
}

#body #body-bottom {
    margin-top: 0;
}

#body .post-buttons,
#body #qr-box {
    display: none;
}

/* PC */
@media (min-width: 768px) {
    body.theme-dark #body > .container {
        background-color: #2c2a2a !important;
    }

    @media screen and (max-width: 1301px) {
        body.card #body > .container {
            max-width: 720px;
        }
    }
    @media screen and (min-width: 1302px) and (max-width: 1599px) {
        body.card #body > .container {
            max-width: 864px;
        }
    }
    @media screen and (min-width: 1600px) and (max-width: 1799px) {
        body.card #body > .container {
            max-width: 896px;
        }
    }
    @media screen and (min-width: 1800px) and (max-width: 1999px) {
        body.card #body > .container {
            max-width: 960px;
        }
    }
    @media screen and (min-width: 2000px) and (max-width: 2399px) {
        body.card #body > .container {
            max-width: 992px;
        }
    }
    @media screen and (min-width: 2400px) {
        body.card #body > .container {
            max-width: 1024px;
        }
    }

    #body .nav-search-container .container-hot-search .container-search-context .search-container {
        width: 67rem;
        max-width: calc(100% - 2rem);
        margin: 2.5rem auto 0;
        padding: 0 1rem;
    }

    #body .nav-search-container .nav-search-list {
        margin: 0 auto;
    }

    #body .nav-search-container {
        padding: 0;
    }

    #body .search-input-row {
        margin-bottom: 3.75rem;
    }

    #body .search-input-wrap {
        min-height: 3.5rem;
        padding: 0.375rem 0.375rem 0.375rem 1rem;
        border-radius: 1.75rem;
        border: solid 1px rgba(255, 255, 255, 0.1);
        background-color: rgba(255, 255, 255, 0.05);
    }

    #body .search-input-wrap .xqbj-icon-search-pc {
        width: 1.875rem;
        height: 1.875rem;
    }

    #body .search-input-wrap .search-input {
        margin-left: 0.625rem;
        font-size: 0.9375rem;
    }

    #body .search-input-wrap .search-input::placeholder {
        color: rgba(255, 255, 255, 0.3);
    }

    #body .search-input-wrap .search-butn {
        width: 6.25rem;
        height: 2.75rem;
        line-height: 2.75rem;
        border-radius: 1.4375rem;
        background-color: transparent;
        background-image: linear-gradient(to bottom, #ff5d91, #cb1d3f);
        font-size: 0.9375rem;
    }

    #body .search-title span,
    #body .search-title h2 {
        font-size: 1.25rem;
    }

    #body .search-title .r-text {
        font-size: 1.125rem;
    }

    #body .search-title .r-text .icon {
        width: 1rem;
        height: 1rem;
    }

    #body .container-search-tags .history-record button,
    #body .container-search-tags .history-record .search-history-item {
        font-size: 1.125rem;
        height: 2.25rem;
        line-height: 2.25rem;
        border-radius: 0.5rem;
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
    }

    #body .container-search-tags .list .no-data {
        font-size: 1.125rem;
    }

    #body .nav-search-container .container-hot-search .rank-list .rank-card {
        margin-top: 2.5rem;
    }

    #body .nav-search-container .container-hot-search .rank-list .rank-card:first-child {
        margin-top: 1.25rem;
    }

    #body .nav-search-container .container-hot-search .rank-list .rank-card .rank-card-title {
        flex: 0 0 50%;
        font-size: 1.125rem;
    }

    #body .nav-search-container .container-hot-search .rank-list .rank-card .rank-card-icon,
    #body .nav-search-container .container-hot-search .rank-list .rank-card .xqbj-icon-rank-1,
    #body .nav-search-container .container-hot-search .rank-list .rank-card .xqbj-icon-rank-2,
    #body .nav-search-container .container-hot-search .rank-list .rank-card .xqbj-icon-rank-3 {
        width: 2rem;
        height: 2rem;
    }

    #body .rank-card .view {
        font-size: 1.125rem;
    }

    #body .xqbj-hot-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.5rem;
        height: 1.5rem;
        border-radius: 0.3125rem;
        background-image: linear-gradient(to bottom, #ff5d91, #cb1d3f);
        font-size: 1.25rem;
        line-height: 1;
        color: #fff;
        flex-shrink: 0;
    }

}
/* H5：对照 Figma 59:764，--sf = 100vw/750 */
@media (max-width: 767px) {
    body.search-page-h5-mode {
        --sf: 100vw;
    }

    body.search-page-h5-mode #body > .container {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        z-index: 1;
        width: 100%;
        max-width: none !important;
        min-height: auto;
        margin-top: 0 !important;
        padding-top: max(env(safe-area-inset-top, 0px), calc(10 * var(--sf) / 750));
        padding-bottom: calc(48 * var(--sf) / 750);
        padding-left: 0;
        padding-right: 0;
        overflow: visible;
        background-color: #222;
    }

    body.search-page-h5-mode #body > .container > .row {
        margin: 0;
    }

    #body .nav-search-container .container-hot-search .container-search-context .search-container {
        position: relative;
        z-index: 1;
        padding: 0 calc(32 * var(--sf) / 750);
    }

    #body .nav-search-container .container-hot-search .container-search-context .search-container::before {
        content: '';
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 100vw;
        top: calc(-1 * max(env(safe-area-inset-top, 0px), calc(120 * var(--sf) / 750)));
        height: calc(190 * var(--sf) / 750);
        background-color: #303030;
        z-index: -1;
        pointer-events: none;
    }

    #body .search-input-row,
    #body .search-title:not(.search-border),
    #body .container-search-tags {
        position: relative;
        z-index: 1;
    }

    #body .search-back-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: calc(30 * var(--sf) / 750);
        height: calc(30 * var(--sf) / 750);
        flex-shrink: 0;
    }

    #body .search-input-row {
        gap: calc(16 * var(--sf) / 750);
        margin-bottom: calc(36 * var(--sf) / 750);
    }

    #body .search-input-wrap {
        min-height: calc(62 * var(--sf) / 750);
        padding: calc(6 * var(--sf) / 750);
        padding-left: calc(12 * var(--sf) / 750);
        border-radius: calc(31 * var(--sf) / 750);
        background-color: #222;
    }

    #body .search-back-btn .search-back-icon {
        width: 100%;
        height: 100%;
        background-image: url(./icon-fanhui@3x.png);
        background-repeat: no-repeat;
        background-size: 100% 100%;
    }

    #body .search-input-wrap .xqbj-icon-search-pc {
        width: calc(36 * var(--sf) / 750);
        height: calc(36 * var(--sf) / 750);
        background-image: url(./search@3x.png);
        background-repeat: no-repeat;
        background-size: 100% 100%;
    }

    #body .search-input-wrap .search-input {
        margin-left: calc(4 * var(--sf) / 750);
        font-size: calc(24 * var(--sf) / 750);
    }

    #body .search-input-wrap .search-input::placeholder {
        color: #888;
        font-size: calc(24 * var(--sf) / 750);
    }

    #body .search-input-wrap .search-butn {
        width: calc(98 * var(--sf) / 750);
        height: calc(50 * var(--sf) / 750);
        line-height: calc(50 * var(--sf) / 750);
        border-radius: calc(40 * var(--sf) / 750);
        font-size: calc(24 * var(--sf) / 750);
        background-color: #414141;
        background-image: none;
    }

    #body .search-title {
        padding-bottom: calc(25 * var(--sf) / 750);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    #body .search-title span,
    #body .search-title h2 {
        font-size: calc(26 * var(--sf) / 750);
        font-weight: 500;
        line-height: calc(36 * var(--sf) / 750);
        color: #888;
    }

    #body .search-title .r-text {
        gap: calc(8 * var(--sf) / 750);
        font-size: calc(22 * var(--sf) / 750);
        font-weight: 300;
        line-height: calc(31 * var(--sf) / 750);
        color: #888;
        opacity: 1;
    }

    #body .search-title .r-text .icon {
        width: calc(22 * var(--sf) / 750);
        height: calc(22 * var(--sf) / 750);
    }

    #body .container-search-tags {
        margin-top: calc(25 * var(--sf) / 750);
        margin-bottom: 0;
        padding-bottom: calc(48 * var(--sf) / 750);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    #body .container-search-tags .history-record {
        gap: calc(16 * var(--sf) / 750);
    }

    #body .container-search-tags .history-record button,
    #body .container-search-tags .history-record .search-history-item {
        font-size: calc(24 * var(--sf) / 750);
        color: #fff;
        border: 1px solid #a7a7a7;
        background-color: #22262e;
        height: calc(44 * var(--sf) / 750);
        line-height: calc(44 * var(--sf) / 750);
        border-radius: calc(8 * var(--sf) / 750);
        padding: 0 calc(16 * var(--sf) / 750);
    }

    #body .container-search-tags .list .no-data {
        font-size: calc(24 * var(--sf) / 750);
        color: #888;
        width: 100%;
        text-align: center;
        padding: calc(16 * var(--sf) / 750) 0;
    }

    #body .search-title.search-border {
        margin-top: 0;
        padding-bottom: 0;
        border: none;
    }

    #body .nav-search-container .container-hot-search .rank-list .rank-card {
        gap: calc(4 * var(--sf) / 750);
        margin-top: calc(40 * var(--sf) / 750);
        min-height: calc(36 * var(--sf) / 750);
    }

    body.search-page-h5-mode #body .nav-search-container .container-hot-search .rank-list .rank-card {
        flex-wrap: wrap;
        align-items: flex-start;
        column-gap: calc(8 * var(--sf) / 750);
        row-gap: 0;
    }

    #body .nav-search-container .container-hot-search .rank-list .rank-card:first-child {
        margin-top: calc(29 * var(--sf) / 750);
    }

    #body .nav-search-container .container-hot-search .rank-list .rank-card .rank-card-title {
        margin-left: calc(4 * var(--sf) / 750);
        font-size: calc(26 * var(--sf) / 750);
        line-height: calc(36 * var(--sf) / 750);
        color: #c5c5c5;
    }

    body.search-page-h5-mode #body .nav-search-container .container-hot-search .rank-list .rank-card .rank-card-title {
        order: 2;
        flex: 1 1 0;
        margin-left: 0;
    }

    #body .nav-search-container .container-hot-search .rank-list .rank-card .rank-card-icon,
    #body .nav-search-container .container-hot-search .rank-list .rank-card .xqbj-icon-rank-1,
    #body .nav-search-container .container-hot-search .rank-list .rank-card .xqbj-icon-rank-2,
    #body .nav-search-container .container-hot-search .rank-list .rank-card .xqbj-icon-rank-3 {
        width: calc(44 * var(--sf) / 750);
        height: calc(44 * var(--sf) / 750);
    }

    body.search-page-h5-mode #body .nav-search-container .container-hot-search .rank-list .rank-card .rank-card-icon,
    body.search-page-h5-mode #body .nav-search-container .container-hot-search .rank-list .rank-card .xqbj-icon-rank-1,
    body.search-page-h5-mode #body .nav-search-container .container-hot-search .rank-list .rank-card .xqbj-icon-rank-2,
    body.search-page-h5-mode #body .nav-search-container .container-hot-search .rank-list .rank-card .xqbj-icon-rank-3 {
        order: 1;
        flex: 0 0 calc(44 * var(--sf) / 750);
    }

    #body .nav-search-container .container-hot-search .rank-list .rank-card .rank-card-icon {
        font-size: calc(26 * var(--sf) / 750);
        line-height: calc(36 * var(--sf) / 750);
        color: #888;
    }

    body.search-page-h5-mode #body .icon-position {
        display: contents;
    }

    #body .rank-card .view {
        font-size: calc(22 * var(--sf) / 750);
        line-height: calc(36 * var(--sf) / 750);
        color: #ffb900;
    }

    body.search-page-h5-mode #body .rank-card .view {
        order: 4;
        flex: 0 0 100%;
        box-sizing: border-box;
        margin-left: calc(52 * var(--sf) / 750);
        padding-left: calc(4 * var(--sf) / 750);
        line-height: calc(32 * var(--sf) / 750);
        color: #777;
    }

    body.search-page-h5-mode #body .rank-card .view-label {
        display: inline;
    }

    body.search-page-h5-mode #body .xqbj-hot-badge {
        order: 3;
        display: block;
        flex: 0 0 calc(28 * var(--sf) / 750);
        width: calc(28 * var(--sf) / 750);
        height: calc(28 * var(--sf) / 750);
        margin-top: calc(4 * var(--sf) / 750);
        object-fit: contain;
    }
}

/* H5 侧边栏关闭按钮 - Figma 48:805 */
#nav .sidebar-close-btn {
    display: none;
}
#wrap.display-nav #site-navigation {
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
}
@media (max-width: 767px) {
    body.display-nav {
        overflow: hidden;
    }
    #nav .menu {
        margin-top: 0 !important;
    }
    #site-navigation {
        overscroll-behavior: none;
    }

    #nav {
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    #nav .sidebar-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 0;
        right: 0.625rem;
        width: 1.875rem;
        height: 1.875rem;
        padding: 0;
        border: none;
        background: transparent;
        cursor: pointer;
        z-index: 2;
    }

    #nav .sidebar-close-btn .xqbj-icon-guanbi {
        display: block;
        width: 100%;
        height: 100%;
        background-image: url(./icon-guanbi@3x.png);
        background-repeat: no-repeat;
        background-size: 100% 100%;
    }
}

.xqbj-icon-fanhui {
    width: 1.625rem;
    height: 1.625rem;
    background-image: url(./icon-fanhui@3x.png);
}

.xqbj-icon-guanbi {
    width: 1.875rem;
    height: 1.875rem;
    background-image: url(./icon-guanbi@3x.png);
}
/* web整改0623 end */
