.zibll-waterfall-widget {
    width: 100%;
}

.waterfall-content {
    position: relative;
    width: 100%;
    min-height: 100px;
}
.relative ul>li {
    display: inline-block;
    padding: 2px 17px;
    font-weight: 500;
    border-radius: 20px;
    margin: 0 1px;
}
.relative ul>li.active:before{
    opacity: 0;
}
.relative ul>li.active a {
    color: #fff !important;
}
.relative ul>li.active {
    color: #ffffff00 !important;
    background-color: #ffffff00 !important;
    border-radius: 6px;
    z-index: 1;
    position: relative;
    height: 39px;
    line-height: 39px;
    background: url(https://vip.123pan.cn/1847863044/youzhipark/2025/10/bg-category1-1.png) repeat;
    -webkit-background-size: 91px 39px;
    -moz-background-size: 91px 39px;
    background-size: 91px 39px;
}
/* 🔥 核心修复：卡片默认就绝对定位，永远不会出现在左上角 */
.waterfall-content .card {
    position: absolute;
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
    box-sizing: border-box;
}

/* 只在第一次未渲染前隐藏，加了 :not(.rendered) 避免重复闪烁 */
.waterfall-content:not(.rendered) .card {
    opacity: 0;
    visibility: hidden;
}

/* 最终位置 → 淡入 */
.waterfall-content.waterfall-ready .card {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease, box-shadow 0.3s ease;
}

.waterfall-content.rendered .card {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 🔥 核心修复：懒加载容器 - 初始完全脱离文档流，不占空间、不位移 */
.waterfall-new-wrap {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
/* 🔥 核心修复：布局完成后 - 回归正常文档流，无位移、无闪烁 */
.waterfall-new-wrap.ready {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
}
/* 🔥 修复：懒加载卡片取消过渡动画，杜绝位移闪烁 */
.waterfall-new-wrap .card {
    opacity: 1 !important;
    visibility: visible !important;
    transition: none !important;
}

.waterfall-content .card:hover {
   transform: translateY(-5px);
    box-shadow: 0 8px 10px rgba(16, 84, 238, .35);
    box-shadow: 0 15px 30px rgba(0, 85, 128, .12);
    z-index: 99;
}

.waterfall-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.waterfall-img {
    position: relative;
    line-height: 0;
    background-color: #f5f5f5;
    overflow: hidden;
    min-height: 120px;
}

.waterfall-img img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.4s ease;
}

.waterfall-content .card:hover .waterfall-img img {
    transform: none;
}

.waterfall-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.7));
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 16px 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    z-index: 10;
}

@media (hover: hover) and (pointer: fine) {
    .waterfall-content .card[data-show-info="hover"]:hover .waterfall-overlay,
    .waterfall-content .card[data-show-info="always"]:hover .waterfall-overlay {
        opacity: 1;
        visibility: visible;
    }

    .waterfall-content .card[data-show-info="none"] .waterfall-overlay {
        display: none !important;
    }
}

.waterfall-overlay.active {
    opacity: 1;
    visibility: visible;
}

.waterfall-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    margin: 0 0 6px 0;
    padding: 0;
    max-height: 52px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.waterfall-date {
    font-size: 11px;
    opacity: 0.9;
    text-align: center;
}

.waterfall-info {
    padding: 10px 12px;
    background-color: #fff;
    border-top: 1px solid #f0f0f0;
}

.waterfall-content .card[data-show-info="always"] .waterfall-info {
    display: block !important;
}

.waterfall-content .card[data-show-info="hover"] .waterfall-info,
.waterfall-content .card[data-show-info="none"] .waterfall-info {
    display: none;
}

.waterfall-info-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 4px 0;
    padding: 0;
    max-height: 48px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    color: #333333;
}

.waterfall-info-date {
    font-size: 10px;
    color: #999999;
}

.waterfall-null {
    text-align: center;
    padding: 40px 20px;
    color: #999999;
    font-size: 14px;
}

.placeholder {
    background: linear-gradient(118deg, rgba(121, 121, 121, 0.1) 25%, rgba(121, 121, 121, 0.2) 37%, rgba(121, 121, 121, 0.1) 63%);
    opacity: 1;
    border-radius: 4px;
    -webkit-animation: placeholder 1.5s ease infinite !important;
    animation: placeholder 1.5s ease infinite !important;
    background-size: 400% 100% !important;
}

@-webkit-keyframes placeholder {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

@keyframes placeholder {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

img.lazyloaded {
    transition: 0.3s;
}

img.lazyloaded:not(.lazyloadafter) {
    -webkit-animation: lazy_blur 0.6s;
    animation: lazy_blur 0.6s;
}

@-webkit-keyframes lazy_blur {
    0% { -webkit-filter: blur(5px); filter: blur(5px); }
    100% { -webkit-filter: blur(0); filter: blur(0); }
}

@keyframes lazy_blur {
    0% { -webkit-filter: blur(5px); filter: blur(5px); }
    100% { -webkit-filter: blur(0); filter: blur(0); }
}

body.dark-theme .waterfall-content .card,
body.theme-dark .waterfall-content .card {
    background-color: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-theme .waterfall-content.waterfall-ready .card,
body.theme-dark .waterfall-content.waterfall-ready .card {
    opacity: 1;
    visibility: visible;
}

body.dark-theme .waterfall-content.rendered .card,
body.theme-dark .waterfall-content.rendered .card {
    opacity: 1 !important;
    visibility: visible !important;
}

body.dark-theme .waterfall-content .card:hover,
body.theme-dark .waterfall-content .card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

body.dark-theme .waterfall-img,
body.theme-dark .waterfall-img {
    background-color: #1a1a1a;
}

body.dark-theme .waterfall-info,
body.theme-dark .waterfall-info {
    background-color: #2a2a2a;
    border-top-color: #3a3a3a;
}

body.dark-theme .waterfall-info-title,
body.theme-dark .waterfall-info-title {
    color: #e0e0e0;
}