/* 中间列：轮播 + 板块主体（与首页 plaza-feed 同列角色） */
.forum-page > .forum-mid {
    display: flex;
    flex-direction: column;
    gap: inherit;
    min-width: 0
}

.forum-page .bh-top {
    min-width: 0;
    width: 100%
}

.forum-page .bh-slider {
    position: relative;
    min-width: 0;
    width: 100%;
    min-height: 0;
    line-height: 0
}

.forum-page .bh-top:not(:has(.uc-slider)) .bh-slider,
.forum-page .bh-top.no-news:not(:has(.uc-slider)) {
    display: none
}

/* 跟全局 .uc-slider 一致，避免额外 min-height 把比例撑歪 */
.forum-page .bh-top .uc-slider {
    display: block;
    width: 100%;
    margin: 0;
    min-height: 0
}

@media (min-width: 961px) {
    .forum-page .bh-top .uc-slider {
        aspect-ratio: 5 / 2;
        max-height: min(48vh, 560px)
    }
}

/* 轮播下方：活跃 / 最新会员 */
.forum-page .bh-members {
    margin: 0;
    padding: 14px 16px 12px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden
}

.bh-members-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 12px;
    min-width: 0;
    width: 100%
}

.bh-members-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2
}

.bh-members-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    max-width: 100%;
    padding: 3px;
    border-radius: 999px;
    background: var(--chip, #ececec)
}

.bh-members-tab {
    appearance: none;
    border: 0;
    margin: 0;
    padding: 6px 12px;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, color .15s ease
}

.bh-members-tab:hover {
    color: var(--text)
}

.bh-members-tab.on {
    background: var(--surface, #fff);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06)
}

.bh-members-pane {
    display: none
}

.bh-members-pane.on {
    display: block
}

.bh-members-pane[hidden] {
    display: none !important
}

.bh-members-viewport {
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
    width: 100%
}

.bh-members-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    width: max-content;
    max-width: none;
    will-change: transform
}

.bh-members-track.is-marquee {
    animation: bh-members-marquee var(--bh-marquee-duration, 28s) linear infinite
}

@media (hover: hover) and (pointer: fine) {
    .bh-members-viewport:hover .bh-members-track.is-marquee {
        animation-play-state: paused
    }
}

@keyframes bh-members-marquee {
    from { transform: translate3d(0, 0, 0) }
    to { transform: translate3d(-50%, 0, 0) }
}

@media (prefers-reduced-motion: reduce) {
    .bh-members-track.is-marquee {
        animation: none
    }
}

.bh-members-grid {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 10px;
    flex: 0 0 auto;
    padding-right: 10px
}

.bh-member {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    box-sizing: border-box;
    width: 88px;
    min-width: 88px;
    max-width: 88px;
    padding: 4px 2px;
    border-radius: var(--radius-sm, 12px);
    color: inherit;
    text-align: center;
    transition: background .15s ease
}

.bh-member:hover {
    background: var(--accent-soft, rgba(10, 10, 10, .07))
}

.bh-member:hover .bh-member-name {
    color: var(--accent)
}

.bh-member-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto;
    line-height: 0;
    overflow: visible
}

.bh-member-avatar .uc-avatar,
.bh-member-avatar .uc-avatar-img {
    max-width: none
}

.bh-member-name {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.25
}

.bh-member-stat {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: var(--muted);
    line-height: 1.2
}

.bh-members-empty {
    padding: 18px 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted)
}

.forum-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0
}

.forum-page > .plaza-aside > .bh-news {
    margin: 0
}

/* 在线会员 / 友情链接：默认跟在中间列板块下方 */
.forum-page .forum-tail {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0
}

.bh-news {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 16px 18px 12px
}

.bh-news-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px
}

.bh-news-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-ink, #fff);
    font-size: 12px;
    font-weight: 800
}

.bh-news-lead {
    display: block;
    text-decoration: none;
    color: inherit;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--line)
}

.bh-news-title {
    display: block;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text)
}

.bh-news-title.is-hl {
    font-weight: 600
}

.bh-news-excerpt {
    display: -webkit-box;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.bh-news-list {
    list-style: none;
    margin: 6px 0 0;
    padding: 0
}

.bh-news-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 36px;
    border-bottom: 1px dashed var(--line)
}

.bh-news-list li:last-child {
    border-bottom: 0
}

.bh-news-list a {
    flex: 1;
    min-width: 0;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.bh-news-list a.is-hl {
    font-weight: 600
}

.bh-news-list a:hover:not(.is-hl),
.bh-news-lead:hover .bh-news-title:not(.is-hl) {
    color: var(--accent)
}

.bh-news-list em {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
    font-style: normal
}

.bh-group {
    padding: 16px 18px 18px
}

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

.bh-group-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800
}

.bh-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 auto;
    cursor: pointer
}

.bh-switch input {
    position: absolute;
    opacity: 0;
    inset: 0
}

.bh-switch span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: var(--stroke-strong);
    transition: background .16s ease
}

.bh-switch span:after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .18);
    transition: transform .16s ease
}

.bh-switch input:checked + span {
    background: var(--accent)
}

.bh-switch input:checked + span:after {
    transform: translateX(18px)
}

.bh-group.is-folded .bh-grid {
    display: none
}

.bh-grid {
    display: grid;
    grid-template-columns: repeat(var(--bh-cols, 3), minmax(0, 1fr));
    gap: 12px
}

.bh-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 118px;
    padding: 14px 14px 12px;
    border-radius: 16px;
    background: var(--chip);
    text-decoration: none;
    color: inherit;
    transition: background .12s ease, transform .12s ease
}

.bh-card:hover {
    background: var(--accent-soft);
    transform: translateY(-1px)
}

.bh-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0
}

.bh-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bh-bg, #eff6ff);
    color: var(--bh-ink, #2563eb);
    font-size: 20px;
    overflow: hidden
}

.bh-icon i {
    font-size: 20px;
    color: inherit
}

.bh-icon img,
.bh-icon .cat-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.bh-card-meta {
    min-width: 0
}

.bh-card-meta strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.bh-card-meta span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px
}

.bh-card-desc {
    margin: 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--card);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    overflow: hidden;
    flex: 0 0 auto
}

.bh-card-desc span {
    display: -webkit-box;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    word-break: break-word
}

.bh-friends-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px
}

.bh-friends-list a {
    color: var(--text-soft);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600
}

.bh-friends-list a:hover {
    color: var(--accent)
}

.bh-online {
    padding: 16px 18px 14px
}

.bh-online-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px
}

.bh-online-title {
    min-width: 0;
    flex: 1
}

.bh-online-title strong {
    display: inline;
    font-size: 15px;
    font-weight: 800
}

.bh-online-meta {
    display: inline;
    margin: 0 0 0 8px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6
}

.bh-online-body {
    margin-top: 12px
}

.bh-online.is-folded .bh-online-body {
    display: none
}

.bh-online-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--line);
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 600
}

.bh-online-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px
}

.bh-on-ico {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-size: 12px;
    line-height: 1
}

.bh-on-ico.admin { background: #f43f5e }
.bh-on-ico.super { background: #f59e0b }
.bh-on-ico.mod { background: #38bdf8 }
.bh-on-ico.member { background: #22c55e }

.bh-on-admin { color: #f43f5e }
.bh-on-super { color: #f59e0b }
.bh-on-mod { color: #38bdf8 }
.bh-on-member { color: #22c55e }

.bh-online-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding-top: 12px;
    min-height: 28px
}

.bh-online-list a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700
}

.bh-online-empty {
    margin: 0;
    padding-top: 2px;
    color: var(--text);
    font-size: 13px
}

@media (max-width: 960px) {
    /* 窄屏：拆开中间列，把在线会员/友情链接沉到侧栏之后 */
    .plaza-main.forum-page {
        display: flex;
        flex-direction: column;
        grid-template-columns: none
    }

    .forum-page > .forum-mid {
        display: contents
    }

    .forum-page .bh-top,
    .forum-page .bh-members,
    .forum-page .forum-main,
    .forum-page .forum-tail,
    .forum-page > .plaza-aside {
        min-width: 0;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box
    }

    .forum-page .bh-top { order: 1 }
    .forum-page .bh-members { order: 2 }
    .forum-page .forum-main { order: 3 }
    .forum-page > .plaza-aside { order: 4 }
    .forum-page .forum-tail { order: 5 }

    .forum-page .bh-top .uc-slider {
        aspect-ratio: var(--uc-slider-ar, 7 / 3);
        max-height: min(38vh, 280px);
        border-radius: var(--radius-sm, 12px)
    }

    .forum-page .bh-top .uc-slider .uc-slider-slide img {
        object-fit: cover;
        object-position: center center
    }

    .bh-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .bh-online-title strong,
    .bh-online-meta {
        display: block;
        margin-left: 0
    }
}

@media (max-width: 640px) {
    .bh-members-grid {
        gap: 8px;
        padding-right: 8px
    }

    .bh-member {
        width: 82px;
        min-width: 82px;
        max-width: 82px
    }

    .bh-member-stat {
        font-size: 10px
    }

    .bh-members-head {
        flex-wrap: nowrap;
        gap: 8px
    }

    .bh-members-head h2 {
        flex: 0 1 auto;
        min-width: 0
    }

    .bh-members-tabs {
        flex: 0 0 auto
    }

    .bh-members-tab {
        padding: 6px 10px;
        font-size: 11px
    }

    .bh-grid {
        grid-template-columns: 1fr
    }

    .bh-news-list em {
        display: none
    }
}
