:root {
    --ocebox-ink: #0f2551;
    --ocebox-muted: #7e8db1;
    --ocebox-line: rgba(84, 110, 165, .18);
    --ocebox-pink: #ff4f8b;
    --ocebox-blue: #5d95ff;
}

.ocebox-stats-bar,
.ocebox-stats-bar * {
    box-sizing: border-box;
}

.ocebox-stats-bar {
    position: relative;
    width: 100%;
    margin: 12px 0;
    clear: both;
    min-height: 148px;
    padding: 20px 24px;
    display: grid;
    grid-template-columns: minmax(300px, 29%) 1px minmax(0, 1fr);
    align-items: stretch;
    gap: 24px;
    overflow: hidden;
    border: 1px solid rgba(132, 155, 216, .32);
    border-radius: 18px;
    color: var(--ocebox-ink);
    background:
        linear-gradient(135deg, rgba(255, 225, 238, .46), transparent 24%),
        linear-gradient(315deg, rgba(222, 235, 255, .62), transparent 28%),
        rgba(255, 255, 255, .88);
    box-shadow: 0 12px 34px rgba(72, 100, 164, .11), inset 0 1px 0 rgba(255,255,255,.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.ocebox-stats-bar::before,
.ocebox-stats-bar::after {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    filter: blur(26px);
    opacity: .18;
    pointer-events: none;
}

.ocebox-stats-bar::before {
    left: -80px;
    top: -110px;
    background: #ffb7d3;
}

.ocebox-stats-bar::after {
    right: -80px;
    bottom: -115px;
    background: #a9ccff;
}

.ocebox-stats-bar__overview,
.ocebox-stats-bar__popular {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.ocebox-stats-bar__overview {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.ocebox-stats-bar__brand-name {
    font-size: clamp(24px, 2vw, 34px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: .06em;
    color: #102858;
}

.ocebox-stats-bar__brand-subtitle {
    margin-top: 7px;
    font-size: 10px;
    line-height: 1;
    letter-spacing: .17em;
    color: #8b9abe;
    font-weight: 700;
    white-space: nowrap;
}

.ocebox-stats-bar__numbers {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.4vw, 20px);
}

.ocebox-stats-bar__metric {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ocebox-stats-bar__metric-icon {
    flex: 0 0 auto;
    width: clamp(26px, 2.15vw, 34px);
    height: clamp(26px, 2.15vw, 34px);
    display: grid;
    place-items: center;
}

.ocebox-stats-bar__metric-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.ocebox-stats-bar__metric-icon--posts { color: var(--ocebox-pink); }
.ocebox-stats-bar__metric-icon--users { color: var(--ocebox-blue); }

.ocebox-stats-bar__metric-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ocebox-stats-bar__metric-copy strong {
    font-size: clamp(20px, 1.75vw, 29px);
    line-height: 1;
    font-weight: 850;
    letter-spacing: -.02em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.ocebox-stats-bar__metric-copy small {
    font-size: clamp(10px, .8vw, 13px);
    color: #7181a7;
    white-space: nowrap;
}

.ocebox-stats-bar__metric-divider {
    width: 1px;
    height: 29px;
    flex: 0 0 1px;
    background: var(--ocebox-line);
}

.ocebox-stats-bar__separator {
    width: 1px;
    height: 100%;
    position: relative;
    z-index: 1;
    background: linear-gradient(to bottom, transparent, rgba(88, 113, 166, .26) 20%, rgba(88, 113, 166, .26) 80%, transparent);
}

.ocebox-stats-bar__popular {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
}

.ocebox-stats-bar__popular-head {
    height: 32px;
    margin-bottom: 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ocebox-stats-bar__popular-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.ocebox-stats-bar__popular-title strong {
    font-size: clamp(15px, 1.2vw, 20px);
    line-height: 1;
    font-weight: 850;
}

.ocebox-stats-bar__popular-title > span:last-child {
    color: #9aa7c4;
    font-size: clamp(8px, .65vw, 11px);
    letter-spacing: .06em;
}

.ocebox-stats-bar__flame {
    font-size: clamp(17px, 1.4vw, 23px);
    line-height: 1;
}

.ocebox-stats-bar__controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.ocebox-stats-bar__nav {
    width: 31px;
    height: 31px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(107, 130, 179, .19);
    border-radius: 50%;
    background: rgba(255, 255, 255, .8);
    color: #16315f;
    box-shadow: 0 4px 14px rgba(85, 109, 162, .09);
    font: 700 22px/1 system-ui, sans-serif;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, opacity .18s ease;
}

.ocebox-stats-bar__nav:hover {
    transform: translateY(-1px);
    background: #fff;
}

.ocebox-stats-bar__nav:disabled {
    opacity: .35;
    cursor: default;
    transform: none;
}

.ocebox-stats-bar__viewport {
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    scrollbar-width: none;
    outline: none;
}

.ocebox-stats-bar__viewport::-webkit-scrollbar { display: none; }

.ocebox-stats-bar__track {
    display: flex;
    align-items: stretch;
    gap: clamp(14px, 1.55vw, 24px);
    width: max-content;
    min-width: 100%;
}

.ocebox-stats-bar__post {
    width: clamp(220px, 18vw, 275px);
    min-width: clamp(220px, 18vw, 275px);
    display: grid;
    grid-template-columns: clamp(82px, 7vw, 104px) minmax(0, 1fr);
    gap: 11px;
    align-items: center;
}

.ocebox-stats-bar__thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 9px;
    background: #eef3ff;
    box-shadow: inset 0 0 0 1px rgba(65, 88, 139, .08);
}

.ocebox-stats-bar__thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .28s ease;
}

.ocebox-stats-bar__thumb:hover img { transform: scale(1.035); }

.ocebox-stats-bar__thumb-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 30px;
    color: rgba(31, 67, 127, .22);
    background: linear-gradient(135deg, #ffeaf2, #e8f2ff);
}

.ocebox-stats-bar__post-body {
    min-width: 0;
    display: flex;
    min-height: 68px;
    flex-direction: column;
    justify-content: space-between;
    gap: 7px;
}

.ocebox-stats-bar__post-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #102858 !important;
    text-decoration: none !important;
    font-size: clamp(12px, .9vw, 15px);
    line-height: 1.45;
    font-weight: 760;
}

.ocebox-stats-bar__post-title:hover { color: #527dce !important; }

.ocebox-stats-bar__meta {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #7f8eae;
    font-size: clamp(9px, .68vw, 11px);
    line-height: 1;
    white-space: nowrap;
}

.ocebox-stats-bar__avatar {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(79, 104, 155, .12);
}

.ocebox-stats-bar__author {
    max-width: 82px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #334b78;
}

.ocebox-stats-bar__date::before {
    content: "·";
    margin-right: 5px;
    color: #b1b9cc;
}

.ocebox-stats-bar__empty {
    min-width: 100%;
    padding: 23px 12px;
    color: #8b98b5;
    font-size: 13px;
}

@media (max-width: 1080px) {
    .ocebox-stats-bar {
        min-height: 132px;
        padding: 16px 18px;
        grid-template-columns: minmax(255px, 34%) 1px minmax(0, 1fr);
        gap: 16px;
    }

    .ocebox-stats-bar__overview { gap: 14px; }
    .ocebox-stats-bar__post { width: 250px; min-width: 250px; grid-template-columns: 92px minmax(0, 1fr); }
    .ocebox-stats-bar__popular-title > span:last-child { display: none; }
}

@media (max-width: 760px) {
    .ocebox-stats-bar {
        min-height: 116px;
        padding: 13px 12px;
        grid-template-columns: minmax(205px, 47%) 1px minmax(0, 1fr);
        gap: 10px;
        border-radius: 14px;
    }

    .ocebox-stats-bar__brand-subtitle { display: none; }
    .ocebox-stats-bar__brand-name { font-size: clamp(20px, 5.5vw, 27px); }
    .ocebox-stats-bar__overview { gap: 12px; }
    .ocebox-stats-bar__numbers { gap: 8px; }
    .ocebox-stats-bar__metric { gap: 6px; }
    .ocebox-stats-bar__metric-divider { height: 24px; }
    .ocebox-stats-bar__metric-copy strong { font-size: clamp(15px, 4.1vw, 21px); }
    .ocebox-stats-bar__metric-copy small { font-size: clamp(8px, 2.1vw, 10px); }
    .ocebox-stats-bar__metric-icon { width: 22px; height: 22px; }

    .ocebox-stats-bar__popular-head { height: 24px; margin-bottom: 6px; }
    .ocebox-stats-bar__popular-title { gap: 4px; }
    .ocebox-stats-bar__popular-title strong { font-size: clamp(11px, 2.7vw, 14px); }
    .ocebox-stats-bar__flame { font-size: 14px; }
    .ocebox-stats-bar__controls { gap: 4px; }
    .ocebox-stats-bar__nav { width: 24px; height: 24px; font-size: 17px; }

    .ocebox-stats-bar__track { gap: 10px; }
    .ocebox-stats-bar__post {
        width: clamp(210px, 57vw, 250px);
        min-width: clamp(210px, 57vw, 250px);
        grid-template-columns: clamp(70px, 19vw, 86px) minmax(0, 1fr);
        gap: 8px;
    }
    .ocebox-stats-bar__post-body { min-height: 54px; gap: 4px; }
    .ocebox-stats-bar__post-title { font-size: clamp(10px, 2.55vw, 12px); line-height: 1.35; }
    .ocebox-stats-bar__meta { font-size: clamp(8px, 2vw, 10px); gap: 4px; }
    .ocebox-stats-bar__avatar { width: 17px; height: 17px; flex-basis: 17px; }
    .ocebox-stats-bar__author { max-width: 54px; }
}

/* 极窄屏仍保持横向结构，只进一步压缩，不改成上下布局。 */
@media (max-width: 500px) {
    .ocebox-stats-bar {
        min-width: 0;
        min-height: 108px;
        padding: 11px 9px;
        grid-template-columns: minmax(158px, 46%) 1px minmax(0, 1fr);
        gap: 7px;
    }

    .ocebox-stats-bar__brand-name { font-size: 18px; }
    .ocebox-stats-bar__overview { gap: 9px; }
    .ocebox-stats-bar__metric-icon { width: 18px; height: 18px; }
    .ocebox-stats-bar__metric-copy strong { font-size: 14px; }
    .ocebox-stats-bar__metric-copy small { font-size: 7.5px; }
    .ocebox-stats-bar__metric-divider { height: 20px; }

    .ocebox-stats-bar__popular-title strong { font-size: 10px; }
    .ocebox-stats-bar__flame { font-size: 11px; }
    .ocebox-stats-bar__nav { width: 21px; height: 21px; font-size: 15px; }

    .ocebox-stats-bar__post {
        width: 190px;
        min-width: 190px;
        grid-template-columns: 65px minmax(0, 1fr);
        gap: 6px;
    }
    .ocebox-stats-bar__thumb { border-radius: 6px; }
    .ocebox-stats-bar__post-title { font-size: 9px; }
    .ocebox-stats-bar__meta { font-size: 7.5px; }
    .ocebox-stats-bar__avatar { width: 15px; height: 15px; flex-basis: 15px; }
    .ocebox-stats-bar__date { display: none; }
}

/* v1.1 公告模式 */
.ocebox-stats-bar__notice-icon {
    width: clamp(18px, 1.45vw, 23px);
    height: clamp(18px, 1.45vw, 23px);
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--ocebox-pink);
}

.ocebox-stats-bar__notice-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

@media (max-width: 760px) {
    .ocebox-stats-bar__notice-icon { width: 14px; height: 14px; }
}

@media (max-width: 500px) {
    .ocebox-stats-bar__notice-icon { width: 11px; height: 11px; }
}

/* v1.2 纯 HTML 占位符挂载：加载时保持与最终组件相同的体积，避免页面跳动。 */
.ocebox-stats-bar-mount {
    position: relative;
    display: block;
    width: 100%;
    margin: 12px 0;
    clear: both;
    min-height: 148px;
    overflow: hidden;
    border: 1px solid rgba(132, 155, 216, .28);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 225, 238, .38), transparent 24%),
        linear-gradient(315deg, rgba(222, 235, 255, .52), transparent 28%),
        rgba(255, 255, 255, .82);
    box-shadow: 0 12px 34px rgba(72, 100, 164, .08);
}

.ocebox-stats-bar-mount::before {
    content: "";
    position: absolute;
    inset: 20px 24px;
    border-radius: 10px;
    background:
        linear-gradient(90deg, rgba(112, 137, 190, .08) 24%, rgba(255, 255, 255, .64) 38%, rgba(112, 137, 190, .08) 52%) 0 0 / 220% 100%,
        linear-gradient(rgba(91, 118, 173, .08), rgba(91, 118, 173, .08));
    animation: ocebox-stats-bar-shimmer 1.25s ease-in-out infinite;
}

.ocebox-stats-bar-mount[data-ocebox-state="error"]::before {
    animation: none;
    background: transparent;
}

.ocebox-stats-bar-mount__error {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    color: #7e8db1;
    font-size: 13px;
    text-align: center;
}

@keyframes ocebox-stats-bar-shimmer {
    0% { background-position: 120% 0, 0 0; }
    100% { background-position: -120% 0, 0 0; }
}

@media (max-width: 1080px) {
    .ocebox-stats-bar-mount { min-height: 132px; }
    .ocebox-stats-bar-mount::before { inset: 16px 18px; }
}

@media (max-width: 760px) {
    .ocebox-stats-bar-mount { min-height: 116px; border-radius: 14px; }
    .ocebox-stats-bar-mount::before { inset: 13px 12px; }
}

@media (max-width: 500px) {
    .ocebox-stats-bar-mount { min-height: 108px; }
    .ocebox-stats-bar-mount::before { inset: 11px 9px; }
}
