/* ============================================================
   Zibll 美化增强 —— 前台样式
   参考 yu158.com 风格：卡片圆角、悬停动效、间距优化
   纯 CSS 覆盖，不改主题文件
   ============================================================ */

/* ---------- 1. 首屏图标卡片（icon-cover-card）---------- */
.icon-cover-card {
    border-radius: 12px !important;
    transition: transform .22s cubic-bezier(.4, 0, .2, 1),
                box-shadow .22s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}
.icon-cover-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .10);
}
.icon-cover-card .icon-cover-img img,
.icon-cover-card .icon-cover-img svg {
    transition: transform .25s ease;
}
.icon-cover-card:hover .icon-cover-img img,
.icon-cover-card:hover .icon-cover-img svg {
    transform: scale(1.08);
}
.icon-cover-card .title {
    font-weight: 600;
    letter-spacing: .2px;
}

/* ---------- 2. 分类聚合板块（term-aggregation）---------- */
.term-aggregation {
    border-radius: 12px !important;
    transition: box-shadow .22s ease;
}
.term-aggregation:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, .07);
}
.term-aggregation .term-img {
    border-radius: 10px;
    overflow: hidden;
}
.term-aggregation .term-img img {
    transition: transform .3s ease;
}
.term-aggregation:hover .term-img img {
    transform: scale(1.05);
}
/* 聚合板块里的文章行：悬停高亮 */
.term-aggregation .mt10.flex.jsb.ac {
    padding: 6px 8px;
    margin-left: -8px;
    margin-right: -8px;
    border-radius: 6px;
    transition: background .15s ease;
}
.term-aggregation .mt10.flex.jsb.ac:hover {
    background: rgba(33, 127, 249, .06);
}
.term-aggregation .term-title .em14 {
    font-weight: 600;
}

/* ---------- 3. 通用 zib-widget 容器 ---------- */
.zib-widget {
    border-radius: 12px !important;
}
.zib-widget-wrap > .zib-widget {
    margin-bottom: 16px;
}

/* ---------- 4. 文章卡片悬停 ---------- */
.posts-item,
.zib-widget .graphic,
.mian-posts .graphic {
    border-radius: 10px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.posts-item:hover,
.mian-posts .graphic:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .09);
}

/* ---------- 5. 模块标题：左侧色条 ---------- */
.zib-widget .title-theme,
.zib-widget .widget-title {
    position: relative;
    padding-left: 12px;
}
.zib-widget .title-theme::before,
.zib-widget .widget-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 1em;
    border-radius: 2px;
    background: currentColor;
    opacity: .75;
}

/* ---------- 6. 按钮圆角统一 ---------- */
.but,
.button,
.loginbtn {
    border-radius: 8px !important;
    transition: transform .15s, box-shadow .15s;
}
.but:hover {
    transform: translateY(-1px);
}

/* ---------- 7. 图片占位（无图时不显示裂图）---------- */
img[src$="thumbnail-null.svg"],
img[src$="thumbnail.svg"],
img[src$="thumbnail-lg.svg"] {
    background: linear-gradient(135deg, #f0f3f8 0%, #e4e9f2 100%);
    min-height: 80px;
}

/* ---------- 8. 移动端微调 ---------- */
@media (max-width: 768px) {
    .icon-cover-card {
        border-radius: 10px !important;
    }
    .icon-cover-card:hover {
        transform: none;  /* 手机端不做位移，避免误触 */
    }
    .zib-widget {
        border-radius: 10px !important;
    }
}

/* ---------- 9. 深色模式适配 ---------- */
.dark-theme .icon-cover-card:hover,
body.dark .icon-cover-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, .45);
}
.dark-theme .zib-widget,
.dark-theme .term-aggregation {
    border-color: rgba(255, 255, 255, .06) !important;
}

/* ---------- 10. 减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
    .icon-cover-card,
    .posts-item,
    .zib-widget,
    .term-aggregation,
    .but {
        transition: none !important;
    }
    .icon-cover-card:hover,
    .posts-item:hover {
        transform: none !important;
    }
}
