/* DIY 自定义首页样式（lume81；lume87 新增七种帖子显示样式 + 排行榜 podium/bars + 版块 card 网格）
 * 中立 qf-diy-* 类名，default/style2~4（main.wrap）与 style5/modern（.md-main）通用
 * 兼容 Chrome 72 及更早：只用 flex + margin/padding 间距，不用 gap/grid；列宽用 flex 比例
 * 模块卡片基于全局 .card（背景/圆角/阴影随主题），本文件只负责栅格与内部结构
 */

/* ===== 行列栅格：负 margin + padding 实现列间距（不用 gap）===== */
.qf-diy-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -8px;
}
.qf-diy-col {
    padding: 0 8px;
    min-width: 0;
    box-sizing: border-box;
}
.qf-diy-col-1 { flex: 1; }
.qf-diy-col-2 { flex: 2; }
.qf-diy-col-3 { flex: 3; }
.qf-diy-col-4 { flex: 4; }
.qf-diy-col-5 { flex: 5; }
.qf-diy-col-6 { flex: 6; }
.qf-diy-col-7 { flex: 7; }
.qf-diy-col-8 { flex: 8; }
.qf-diy-col-9 { flex: 9; }
.qf-diy-col-10 { flex: 10; }
.qf-diy-col-11 { flex: 11; }
.qf-diy-col-12 { flex: 12; }

/* ===== 模块卡片 ===== */
.qf-diy-mod.card {
    padding: 0;
    overflow: hidden;
}
.qf-diy-mod-hd {
    padding: 14px 18px 0;
}
.qf-diy-mod-hd h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.4;
}
.qf-diy-mod-bd {
    padding: 6px 18px 16px;
}

/* ===== 标签徽标 ===== */
.qf-diy-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 16px;
    margin-right: 4px;
    vertical-align: 1px;
    font-weight: 600;
    white-space: nowrap;
}
.qf-diy-tag-red { background: #fdeaea; color: #d9534f; }
.qf-diy-tag-blue { background: #e8f1fb; color: #3d7fbf; }
.qf-diy-tag-green { background: #e8f7ee; color: #2f9e5b; }
.qf-diy-tag-orange { background: #fdf3e6; color: #d98324; }
.qf-diy-tag-purple { background: #f1ebfa; color: #8a5cc2; }
.qf-diy-tag-gray { background: #f1f4f8; color: #8a97a6; }

.qf-diy-img-badge {
    display: inline-block;
    margin-left: 5px;
    padding: 0 4px;
    border-radius: 3px;
    background: #eef6ff;
    color: #3d7fbf;
    font-size: 11px;
    line-height: 16px;
    vertical-align: 1px;
}
.qf-diy-hot-badge {
    margin-left: 4px;
    font-size: 12px;
}

/* ===== 帖子列表 ===== */
.qf-diy-thread-item {
    display: flex;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px dashed #eef2f6;
}
.qf-diy-thread-item:last-child {
    border-bottom: none;
}
.qf-diy-thread-main {
    flex: 1;
    min-width: 0;
}
.qf-diy-thread-title {
    display: block;
    color: #2a506e;
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
    word-break: break-all;
}
.qf-diy-thread-title:hover {
    color: #2274a5;
}
.qf-diy-thread-meta {
    margin: 3px 0 0;
    font-size: 12px;
    color: #8a97a6;
    line-height: 1.6;
}
.qf-diy-thread-meta a {
    color: #8a97a6;
    text-decoration: none;
}
.qf-diy-thread-meta a:hover {
    color: #2274a5;
}
.qf-diy-meta-sep {
    margin: 0 2px;
}
.qf-diy-thread-metrics {
    display: flex;
    align-items: center;
    flex: none;
    margin-left: 14px;
}
.qf-diy-metric {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    color: #8a97a6;
    margin-left: 12px;
}
.qf-diy-metric svg {
    width: 14px;
    height: 14px;
    margin-right: 3px;
    fill: #b6c2ce;
}

/* ===== 版块列表 ===== */
.qf-diy-forum-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #eef2f6;
    text-decoration: none;
}
.qf-diy-forum-item:last-child {
    border-bottom: none;
}
.qf-diy-forum-info {
    min-width: 0;
}
.qf-diy-forum-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2a506e;
    line-height: 1.5;
}
.qf-diy-forum-item:hover .qf-diy-forum-name {
    color: #2274a5;
}
.qf-diy-forum-desc {
    display: block;
    font-size: 12px;
    color: #8a97a6;
    margin-top: 2px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qf-diy-forum-stats {
    flex: none;
    margin-left: 14px;
    font-size: 12px;
    color: #8a97a6;
}
.qf-diy-forum-stats span {
    margin-left: 10px;
    white-space: nowrap;
}
.qf-diy-forum-group {
    padding: 10px 0 4px;
    font-size: 12px;
    font-weight: 700;
    color: #a5b0bd;
    letter-spacing: 1px;
}
.qf-diy-forum-group:first-child {
    padding-top: 4px;
}

/* ===== 排行榜 ===== */
.qf-diy-rank-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    text-decoration: none;
}
.qf-diy-rank-num {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: #f1f4f8;
    color: #8a97a6;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex: none;
}
.qf-diy-rank-num.qf-diy-rank-top {
    background: #ffe9d6;
    color: #d97706;
}
.qf-diy-rank-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 8px;
    flex: none;
}
.qf-diy-rank-avatar img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: block;
}
.qf-diy-rank-name {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: #2a506e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qf-diy-rank-item:hover .qf-diy-rank-name {
    color: #2274a5;
}
.qf-diy-rank-val {
    flex: none;
    margin-left: 10px;
    font-size: 12px;
    color: #8a97a6;
}

/* ===== 站点统计 ===== */
.qf-diy-stats-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 8px -6px 0;
}
.qf-diy-stats-item {
    width: 25%;
    padding: 0 6px;
    box-sizing: border-box;
    text-align: center;
    margin: 6px 0;
}
.qf-diy-stats-num {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #2a506e;
    line-height: 1.3;
}
.qf-diy-stats-label {
    display: block;
    font-size: 12px;
    color: #8a97a6;
    margin-top: 2px;
}
.qf-diy-stats-note {
    font-size: 12px;
    color: #8a97a6;
    padding: 6px 0 0;
    border-top: 1px dashed #eef2f6;
    margin-top: 10px;
    line-height: 1.6;
}
.qf-diy-stats-note a {
    color: #2a506e;
    text-decoration: none;
}
.qf-diy-stats-note a:hover {
    color: #2274a5;
}
.qf-diy-stats-note strong {
    color: #2a506e;
}

/* ===== 每日签到 ===== */
.qf-diy-signin-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #2a506e;
    padding: 4px 0 12px;
}
.qf-diy-signin-info strong {
    color: #d97706;
}
.qf-diy-signin-btn {
    display: block;
    width: 100%;
    padding: 9px 0;
    border: none;
    border-radius: 8px;
    background: #2274a5;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}
.qf-diy-signin-btn:hover {
    background: #1d6390;
    color: #fff;
}
.qf-diy-signin-btn.qf-diy-signin-done {
    background: #16a34a;
    cursor: default;
}
.qf-diy-signin-guest {
    font-size: 13px;
    color: #8a97a6;
    line-height: 1.7;
    padding: 2px 0 12px;
}
.qf-diy-signin-result {
    display: none;
    font-size: 12px;
    margin-top: 8px;
    line-height: 1.6;
}
.qf-diy-signin-result.qf-diy-signin-ok {
    display: block;
    color: #16a34a;
}
.qf-diy-signin-result.qf-diy-signin-err {
    display: block;
    color: #dc2626;
}

/* ===== 今日话题横幅 ===== */
.qf-diy-topic-banner {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}
.qf-diy-topic-banner a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #667eea, #764ba2);
}
.qf-diy-topic-icon {
    font-size: 18px;
    margin-right: 10px;
    flex: none;
}
.qf-diy-topic-title {
    font-size: 15px;
    font-weight: 700;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qf-diy-topic-hint {
    font-size: 12px;
    opacity: .85;
    flex: none;
    margin-left: 12px;
}

/* ===== 友情链接 ===== */
.qf-diy-links-wrap {
    display: flex;
    flex-wrap: wrap;
    margin: -5px;
}
.qf-diy-link-item {
    display: inline-block;
    margin: 5px;
    padding: 4px 12px;
    border-radius: 14px;
    background: #f1f4f8;
    color: #2a506e;
    font-size: 12px;
    text-decoration: none;
}
.qf-diy-link-item:hover {
    background: #e3ecf4;
    color: #2274a5;
}

/* ===== 空状态 ===== */
.qf-diy-empty {
    padding: 24px 0;
    text-align: center;
    color: #a5b0bd;
    font-size: 13px;
}

/* ===== 窄屏适配：所有列堆叠为单列（保持与首页原生响应式断点一致的风格）===== */
@media (max-width: 900px) {
    .qf-diy-row {
        display: block;
        margin: 0;
    }
    .qf-diy-col {
        padding: 0;
        width: 100%;
        margin-bottom: 16px;
    }
    .qf-diy-stats-item {
        width: 50%;
    }
    .qf-diy-thread-metrics {
        display: none;
    }
}

/* ===== 现代风（style5）适配：DIY 卡片贴近 md-widget 观感（无边框、轻阴影）===== */
.md-body .qf-diy-mod.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.md-body .qf-diy-mod-hd h3 {
    color: #1f2937;
}
.md-body .qf-diy-topic-banner {
    border-radius: 12px;
}

/* ===== lume87 帖子列表七种显示样式（模仿 DZ 内置模板） ===== */

/* --- 样式：仅标题（simple）--- */
.qf-diy-tl-simple {
    padding: 9px 0;
    border-bottom: 1px dashed #eef2f6;
}
.qf-diy-tl-simple:last-child {
    border-bottom: none;
}
.qf-diy-tl-simple a {
    display: block;
    color: #2a506e;
    font-size: 14px;
    line-height: 1.6;
    text-decoration: none;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qf-diy-tl-simple a:hover {
    color: #2274a5;
}

/* --- 样式：标题+摘要（summary）--- */
.qf-diy-tl-summary {
    padding: 11px 0;
    border-bottom: 1px dashed #eef2f6;
}
.qf-diy-tl-summary:last-child {
    border-bottom: none;
}
.qf-diy-tl-title {
    display: block;
    color: #2a506e;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    word-break: break-all;
}
.qf-diy-tl-title:hover {
    color: #2274a5;
}
.qf-diy-tl-excerpt {
    margin: 4px 0 0;
    font-size: 12px;
    color: #8a97a6;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- 样式：头条模式（headline）：首条大块 + 其余紧凑小条 --- */
.qf-diy-tl-headline {
    display: block;
}
.qf-diy-tl-lead {
    padding-bottom: 12px;
    border-bottom: 1px dashed #eef2f6;
}
.qf-diy-tl-lead-title {
    display: block;
    color: #2a506e;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
    word-break: break-all;
}
.qf-diy-tl-lead-title:hover {
    color: #2274a5;
}
.qf-diy-tl-lead-excerpt {
    margin: 6px 0 0;
    font-size: 13px;
    color: #8a97a6;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.qf-diy-tl-rest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #eef2f6;
    text-decoration: none;
}
.qf-diy-tl-rest-item:last-child {
    border-bottom: none;
}
.qf-diy-tl-rest-title {
    flex: 1;
    min-width: 0;
    color: #2a506e;
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qf-diy-tl-rest-item:hover .qf-diy-tl-rest-title {
    color: #2274a5;
}
.qf-diy-tl-rest-time {
    flex: none;
    margin-left: 12px;
    font-size: 12px;
    color: #a5b0bd;
}

/* --- 样式：头像列表（avatar）--- */
.qf-diy-tl-avatar {
    display: flex;
    padding: 11px 0;
    border-bottom: 1px dashed #eef2f6;
}
.qf-diy-tl-avatar:last-child {
    border-bottom: none;
}
.qf-diy-tl-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex: none;
    margin-right: 10px;
}
.qf-diy-tl-avatar-img img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: block;
}
.qf-diy-tl-avatar-bd {
    flex: 1;
    min-width: 0;
}

/* --- 样式：图文卡片（cards）：图片封面网格（负 margin + padding 间距，不用 gap）--- */
.qf-diy-tl-cards {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -6px;
}
.qf-diy-tl-card {
    display: block;
    width: 25%;
    padding: 0 6px 14px;
    box-sizing: border-box;
    text-decoration: none;
}
.qf-diy-tl-card-img {
    display: block;
    width: 100%;
    height: 104px;
    border-radius: 8px;
    background: #f1f4f8;
    overflow: hidden;
}
.qf-diy-tl-card-img img {
    width: 100%;
    height: 104px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}
.qf-diy-tl-card-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #c9d3de;
}
.qf-diy-tl-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: 6px;
    font-size: 13px;
    color: #2a506e;
    line-height: 1.5;
    word-break: break-all;
    overflow: hidden;
    min-height: 39px;
}
.qf-diy-tl-card:hover .qf-diy-tl-card-title {
    color: #2274a5;
}
.qf-diy-tl-card-meta {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: #a5b0bd;
}
.qf-diy-tl-card-meta span {
    margin-right: 8px;
}

/* --- 样式：两列标题（two-col）：DZ 经典双列 + 红字回帖数 --- */
.qf-diy-tl-twocol {
    display: flex;
    flex-wrap: wrap;
}
.qf-diy-tl-twocol-item {
    display: flex;
    align-items: center;
    width: 50%;
    box-sizing: border-box;
    padding: 7px 14px 7px 0;
    border-bottom: 1px dashed #eef2f6;
    text-decoration: none;
}
.qf-diy-tl-twocol-item:nth-child(even) {
    padding-right: 0;
}
.qf-diy-tl-twocol-item:nth-last-child(-n + 2) {
    border-bottom: none;
}
.qf-diy-tl-twocol-title {
    flex: 1;
    min-width: 0;
    color: #2a506e;
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qf-diy-tl-twocol-item:hover .qf-diy-tl-twocol-title {
    color: #2274a5;
}
.qf-diy-tl-replies {
    flex: none;
    margin-left: 8px;
    color: #e05252;
    font-size: 12px;
    font-weight: 700;
}

/* ===== lume87 排行榜显示样式：podium 领奖台 / bars 条形图 ===== */

/* --- podium：前三名 2-1-3 领奖台（冠军居中最高），其余名次紧凑列表 --- */
.qf-diy-rank-podium {
    display: flex;
    align-items: flex-end;
    padding: 6px 0 12px;
    border-bottom: 1px dashed #eef2f6;
    margin-bottom: 4px;
}
.qf-diy-rank-podium-item {
    flex: 1;
    min-width: 0;
    display: block;
    text-align: center;
    text-decoration: none;
    padding: 10px 4px 8px;
    border-radius: 10px;
    background: #f8fafc;
    margin: 0 3px;
}
.qf-diy-rank-podium-p1 {
    background: #fff7e6;
    padding-top: 18px;
}
.qf-diy-rank-podium-p2 {
    background: #f1f4f8;
    padding-top: 14px;
}
.qf-diy-rank-podium-p3 {
    background: #fdf1ea;
    padding-top: 12px;
}
.qf-diy-rank-podium-avatar {
    display: block;
    width: 44px;
    height: 44px;
    margin: 0 auto 6px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff;
}
.qf-diy-rank-podium-p1 .qf-diy-rank-podium-avatar {
    width: 54px;
    height: 54px;
    border-color: #f5c664;
}
.qf-diy-rank-podium-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
}
.qf-diy-rank-podium-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #2a506e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qf-diy-rank-podium-item:hover .qf-diy-rank-podium-name {
    color: #2274a5;
}
.qf-diy-rank-podium-val {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #8a97a6;
}
.qf-diy-rank-podium-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-top: 6px;
    border-radius: 50%;
    background: #c9d3de;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}
.qf-diy-rank-podium-p1 .qf-diy-rank-podium-no {
    background: #f5a623;
}
.qf-diy-rank-podium-p2 .qf-diy-rank-podium-no {
    background: #9aa7b5;
}
.qf-diy-rank-podium-p3 .qf-diy-rank-podium-no {
    background: #cd8f62;
}
.qf-diy-rank-item-compact {
    padding: 6px 0;
}

/* --- bars：条形图（数值按榜首归一化为百分比宽度）--- */
.qf-diy-rank-bars {
    padding-top: 4px;
}
.qf-diy-rank-bar {
    display: flex;
    align-items: center;
    padding: 7px 0;
    text-decoration: none;
}
.qf-diy-rank-bar-bd {
    flex: 1;
    min-width: 0;
    margin-left: 2px;
}
.qf-diy-rank-bar-name {
    display: block;
    font-size: 13px;
    color: #2a506e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.5;
}
.qf-diy-rank-bar:hover .qf-diy-rank-bar-name {
    color: #2274a5;
}
.qf-diy-rank-bar-track {
    display: block;
    height: 8px;
    margin-top: 4px;
    border-radius: 4px;
    background: #f1f4f8;
    overflow: hidden;
}
.qf-diy-rank-bar-fill {
    display: block;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #7fb3d8, #2274a5);
}

/* ===== lume87 版块列表显示样式：card 卡片网格 ===== */
.qf-diy-forum-cards {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -6px;
}
.qf-diy-forum-card {
    display: flex;
    width: 33.3333%;
    box-sizing: border-box;
    padding: 0 6px 12px;
    text-decoration: none;
}
.qf-diy-forum-card-icon {
    flex: none;
    width: 42px;
    height: 42px;
    margin-right: 10px;
    border-radius: 10px;
    background: #f1f4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    overflow: hidden;
}
.qf-diy-forum-card-icon img {
    max-width: 26px;
    max-height: 26px;
}
.qf-diy-forum-card-info {
    flex: 1;
    min-width: 0;
}
.qf-diy-forum-card-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2a506e;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qf-diy-forum-card:hover .qf-diy-forum-card-name {
    color: #2274a5;
}
.qf-diy-forum-card-desc {
    display: block;
    font-size: 12px;
    color: #8a97a6;
    margin-top: 1px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qf-diy-forum-card-stats {
    display: block;
    font-size: 11px;
    color: #a5b0bd;
    margin-top: 2px;
}
.qf-diy-forum-card-stats span {
    margin-right: 8px;
}

/* ===== lume87 新样式窄屏适配（与上方 900px 断点一致：卡片类降为两列）===== */
@media (max-width: 900px) {
    .qf-diy-tl-card {
        width: 50%;
    }
    .qf-diy-forum-card {
        width: 50%;
    }
    .qf-diy-rank-podium-name {
        font-size: 12px;
    }
}

/* ===== lume88 广告模块（文字网格 / 图片横幅 / 自定义代码） ===== */

/* --- 样式：文字广告（多行文字链，一排最多 4 条；负 margin + padding 间距，不用 gap）--- */
.qf-diy-ad-text {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -5px;
}
.qf-diy-ad-item {
    display: block;
    width: 25%;
    box-sizing: border-box;
    padding: 6px 5px;
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
    color: #2a506e;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px dashed #eef2f6;
}
a.qf-diy-ad-item:hover {
    color: #2274a5;
    text-decoration: underline;
}
span.qf-diy-ad-item {
    color: #8a97a6;
    cursor: default;
}

/* --- 样式：图片广告（banner 横幅，宽度撑满模块卡片）--- */
.qf-diy-ad-image {
    display: block;
    font-size: 0;
}
.qf-diy-ad-image a {
    display: block;
}
.qf-diy-ad-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* --- 样式：广告代码（原样输出容器，最小干预）--- */
.qf-diy-ad-code {
    font-size: 13px;
    line-height: 1.6;
}

/* 广告窄屏适配：文字链一排降为 2 条 */
@media (max-width: 900px) {
    .qf-diy-ad-item {
        width: 50%;
    }
}

/* ===== lume90 文章样式和博客样式 ===== */

/* --- 文章样式（现代文章阅读体验）：类似 Medium、知乎文章 --- */
.qf-diy-tl-article {
    display: block;
    margin-bottom: 30px;
    padding: 0;
    border: none;
    background: #fff;
}

.qf-diy-tl-article:last-child {
    margin-bottom: 0;
}

.qf-diy-tl-article-cover {
    width: 100%;
    height: 200px;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 12px;
}

.qf-diy-tl-article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.qf-diy-tl-article:hover .qf-diy-tl-article-cover img {
    transform: scale(1.05);
}

.qf-diy-tl-article-content {
    padding: 0;
}

.qf-diy-tl-article-title {
    margin: 0 0 12px 0;
}

.qf-diy-tl-article-title a {
    display: block;
    color: #1a1a1a;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    transition: color 0.2s ease;
}

.qf-diy-tl-article:hover .qf-diy-tl-article-title a {
    color: #2274a5;
}

.qf-diy-tl-article-excerpt {
    margin: 0 0 16px 0;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

.qf-diy-tl-article-meta {
    margin: 0;
    color: #999;
    font-size: 14px;
    line-height: 1.5;
}

.qf-diy-tl-article-meta a {
    color: #2274a5;
    text-decoration: none;
}

.qf-diy-tl-article-meta a:hover {
    text-decoration: underline;
}

/* --- 博客样式（博客平台风格）：类似 WordPress、CSDN 博客 --- */
.qf-diy-tl-blog {
    display: block;
    margin-bottom: 30px;
    padding: 0;
    border: none;
    background: #fff;
}

.qf-diy-tl-blog:last-child {
    margin-bottom: 0;
}

.qf-diy-tl-blog-header {
    margin-bottom: 16px;
}

.qf-diy-tl-blog-title {
    margin: 0 0 8px 0;
}

.qf-diy-tl-blog-title a {
    display: block;
    color: #1a1a1a;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.2s ease;
}

.qf-diy-tl-blog:hover .qf-diy-tl-blog-title a {
    color: #2274a5;
}

.qf-diy-tl-blog-meta {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.qf-diy-tl-blog-meta a {
    color: #2274a5;
    text-decoration: none;
}

.qf-diy-tl-blog-meta a:hover {
    text-decoration: underline;
}

.qf-diy-tl-blog-content {
    margin-bottom: 16px;
}

.qf-diy-tl-blog-featured {
    width: 100%;
    height: 180px;
    margin-bottom: 16px;
    overflow: hidden;
    border-radius: 8px;
}

.qf-diy-tl-blog-featured img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.qf-diy-tl-blog:hover .qf-diy-tl-blog-featured img {
    transform: scale(1.05);
}

.qf-diy-tl-blog-excerpt {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 0;
}

.qf-diy-tl-blog-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.qf-diy-tl-blog-metrics {
    color: #999;
    font-size: 13px;
}

.qf-diy-tl-blog-metrics span {
    margin-right: 12px;
}

.qf-diy-tl-blog-metrics span:last-child {
    margin-right: 0;
}

/* 文章和博客样式窄屏适配 */
@media (max-width: 900px) {
    .qf-diy-tl-article-cover {
        height: 160px;
    }
    
    .qf-diy-tl-article-title a {
        font-size: 20px;
    }
    
    .qf-diy-tl-article-excerpt {
        font-size: 15px;
    }
    
    .qf-diy-tl-blog-featured {
        height: 140px;
    }
    
    .qf-diy-tl-blog-title a {
        font-size: 18px;
    }
    
    .qf-diy-tl-blog-excerpt {
        font-size: 14px;
    }
}

/* --- 信息流样式（社交媒体风格）：类似朋友圈、微博、Instagram --- */
.qf-diy-tl-feed {
    display: block;
}

.qf-diy-tl-feed-item {
    padding: 16px 0;
    border-bottom: 1px solid #f0f2f5;
}

.qf-diy-tl-feed-item:last-child {
    border-bottom: none;
}

.qf-diy-tl-feed-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.qf-diy-tl-feed-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex: none;
    margin-right: 12px;
}

.qf-diy-tl-feed-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: block;
}

.qf-diy-tl-feed-user {
    flex: 1;
    min-width: 0;
}

.qf-diy-tl-feed-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    line-height: 1.3;
}

.qf-diy-tl-feed-name:hover {
    color: #2274a5;
}

.qf-diy-tl-feed-time {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.qf-diy-tl-feed-content {
    margin-bottom: 12px;
}

.qf-diy-tl-feed-title {
    display: block;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    margin-bottom: 6px;
}

.qf-diy-tl-feed-title:hover {
    color: #2274a5;
}

.qf-diy-tl-feed-excerpt {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.qf-diy-tl-feed-images {
    margin-bottom: 12px;
}

.qf-diy-tl-feed-images a {
    display: block;
}

.qf-diy-tl-feed-images img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.qf-diy-tl-feed-footer {
    display: flex;
    align-items: center;
    padding-top: 8px;
}

.qf-diy-tl-feed-stat {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    color: #999;
    margin-right: 16px;
}

.qf-diy-tl-feed-stat:last-child {
    margin-right: 0;
}

/* 信息流样式窄屏适配 */
@media (max-width: 900px) {
    .qf-diy-tl-feed-avatar {
        width: 38px;
        height: 38px;
    }
    
    .qf-diy-tl-feed-avatar img {
        width: 38px;
        height: 38px;
    }
    
    .qf-diy-tl-feed-name {
        font-size: 14px;
    }
    
    .qf-diy-tl-feed-title {
        font-size: 14px;
    }
    
    .qf-diy-tl-feed-excerpt {
        font-size: 13px;
    }
    
    .qf-diy-tl-feed-images img {
        max-height: 300px;
    }
}

/* --- 瀑布流样式（Pinterest 风格）：多列不等高卡片布局 --- */
.qf-diy-tl-waterfall {
    column-count: 3;
    column-gap: 16px;
}

.qf-diy-tl-waterfall-item {
    break-inside: avoid;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qf-diy-tl-waterfall-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.qf-diy-tl-waterfall-img {
    display: block;
    overflow: hidden;
}

.qf-diy-tl-waterfall-img img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.qf-diy-tl-waterfall-item:hover .qf-diy-tl-waterfall-img img {
    transform: scale(1.05);
}

.qf-diy-tl-waterfall-content {
    padding: 14px;
}

.qf-diy-tl-waterfall-title {
    display: block;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.qf-diy-tl-waterfall-title:hover {
    color: #2274a5;
}

.qf-diy-tl-waterfall-excerpt {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.qf-diy-tl-waterfall-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.qf-diy-tl-waterfall-author {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.qf-diy-tl-waterfall-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    margin-right: 6px;
    object-fit: cover;
}

.qf-diy-tl-waterfall-stats {
    font-size: 11px;
    color: #999;
}

/* 瀑布流样式窄屏适配 */
@media (max-width: 900px) {
    .qf-diy-tl-waterfall {
        column-count: 2;
        column-gap: 12px;
    }
    
    .qf-diy-tl-waterfall-item {
        margin-bottom: 12px;
    }
    
    .qf-diy-tl-waterfall-content {
        padding: 10px;
    }
    
    .qf-diy-tl-waterfall-title {
        font-size: 13px;
    }
}

@media (max-width: 600px) {
    .qf-diy-tl-waterfall {
        column-count: 2;
        column-gap: 10px;
    }
    
    .qf-diy-tl-waterfall-item {
        margin-bottom: 10px;
        border-radius: 8px;
    }
    
    .qf-diy-tl-waterfall-content {
        padding: 8px;
    }
    
    .qf-diy-tl-waterfall-title {
        font-size: 12px;
    }
    
    .qf-diy-tl-waterfall-excerpt {
        font-size: 11px;
    }
}

/* --- 横向滑动卡片样式（Netflix/Apple News 风格）--- */
.qf-diy-tl-scroll {
    margin: 0 -18px;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.qf-diy-tl-scroll::-webkit-scrollbar {
    height: 6px;
}

.qf-diy-tl-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.qf-diy-tl-scroll::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.qf-diy-tl-scroll-track {
    display: flex;
    padding: 8px 18px 16px;
    gap: 16px;
}

.qf-diy-tl-scroll-card {
    flex: none;
    width: 220px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qf-diy-tl-scroll-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.qf-diy-tl-scroll-img {
    display: block;
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: #f5f5f5;
}

.qf-diy-tl-scroll-img img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.qf-diy-tl-scroll-card:hover .qf-diy-tl-scroll-img img {
    transform: scale(1.08);
}

.qf-diy-tl-scroll-ph {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #ccc;
    background: #f8f8f8;
}

.qf-diy-tl-scroll-content {
    padding: 12px;
}

.qf-diy-tl-scroll-title {
    display: block;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.qf-diy-tl-scroll-title:hover {
    color: #2274a5;
}

.qf-diy-tl-scroll-meta {
    font-size: 11px;
    color: #999;
}

/* 横向滑动窄屏适配 */
@media (max-width: 900px) {
    .qf-diy-tl-scroll-card {
        width: 180px;
    }
    
    .qf-diy-tl-scroll-img,
    .qf-diy-tl-scroll-img img,
    .qf-diy-tl-scroll-ph {
        height: 120px;
    }
    
    .qf-diy-tl-scroll-title {
        font-size: 13px;
    }
}

/* --- 杂志错落版式样式（时尚杂志风格）--- */
.qf-diy-tl-magazine {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -6px;
}

.qf-diy-tl-magazine-item {
    padding: 0 6px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.qf-diy-tl-magazine-large {
    width: 66.666%;
}

.qf-diy-tl-magazine-small {
    width: 33.333%;
}

.qf-diy-tl-magazine-img {
    display: block;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
}

.qf-diy-tl-magazine-large .qf-diy-tl-magazine-img {
    height: 280px;
}

.qf-diy-tl-magazine-small .qf-diy-tl-magazine-img {
    height: 180px;
}

.qf-diy-tl-magazine-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.qf-diy-tl-magazine-item:hover .qf-diy-tl-magazine-img img {
    transform: scale(1.05);
}

.qf-diy-tl-magazine-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #ccc;
    background: linear-gradient(135deg, #f8f8f8, #eee);
}

.qf-diy-tl-magazine-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 16px 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    display: flex;
    flex-direction: column;
}

.qf-diy-tl-magazine-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.qf-diy-tl-magazine-large .qf-diy-tl-magazine-title {
    font-size: 20px;
}

.qf-diy-tl-magazine-excerpt {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 杂志版式窄屏适配 */
@media (max-width: 900px) {
    .qf-diy-tl-magazine-large {
        width: 100%;
    }
    
    .qf-diy-tl-magazine-small {
        width: 50%;
    }
    
    .qf-diy-tl-magazine-large .qf-diy-tl-magazine-img {
        height: 240px;
    }
    
    .qf-diy-tl-magazine-small .qf-diy-tl-magazine-img {
        height: 150px;
    }
    
    .qf-diy-tl-magazine-title {
        font-size: 14px;
    }
    
    .qf-diy-tl-magazine-large .qf-diy-tl-magazine-title {
        font-size: 18px;
    }
}

@media (max-width: 600px) {
    .qf-diy-tl-magazine-large {
        width: 100%;
    }
    
    .qf-diy-tl-magazine-small {
        width: 50%;
    }
    
    .qf-diy-tl-magazine-large .qf-diy-tl-magazine-img {
        height: 200px;
    }
    
    .qf-diy-tl-magazine-small .qf-diy-tl-magazine-img {
        height: 120px;
    }
    
    .qf-diy-tl-magazine-overlay {
        padding: 30px 12px 12px;
    }
    
    .qf-diy-tl-magazine-title {
        font-size: 13px;
    }
    
    .qf-diy-tl-magazine-large .qf-diy-tl-magazine-title {
        font-size: 16px;
    }
    
    .qf-diy-tl-magazine-excerpt {
        font-size: 12px;
    }
}

/* ========== 全部帖子列表样式 · 移动端统一适配 (≤600px) ========== */
@media (max-width: 600px) {
    /* 信息流 */
    .qf-diy-tl-feed-item { margin-bottom: 16px; padding-bottom: 16px; }
    .qf-diy-tl-feed-title { font-size: 15px; }
    .qf-diy-tl-feed-excerpt { font-size: 13px; -webkit-line-clamp: 3; }

    /* 瀑布流 → 单列 */
    .qf-diy-tl-waterfall { column-count: 1 !important; }

    /* 横向滑动 → 缩小卡片 */
    .qf-diy-tl-scroll-card { width: 150px; }
    .qf-diy-tl-scroll-img,
    .qf-diy-tl-scroll-img img,
    .qf-diy-tl-scroll-ph { height: 100px; }
    .qf-diy-tl-scroll-title { font-size: 12px; }
    .qf-diy-tl-scroll-meta { font-size: 11px; }

    /* 卡片 → 单列 */
    .qf-diy-tl-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
    .qf-diy-tl-card-title { font-size: 12px; }

    /* 文章 → 封面图缩小 */
    .qf-diy-tl-article { flex-direction: column; }
    .qf-diy-tl-article-cover { width: 100%; height: 160px; flex: none; }
    .qf-diy-tl-article-title { font-size: 16px; }

    /* 博客 → 封面图全宽 */
    .qf-diy-tl-blog-featured { height: 160px; }
    .qf-diy-tl-blog-title { font-size: 16px; }

    /* 分屏 → 单列 */
    .qf-diy-tl-split { flex-direction: column; }
    .qf-diy-tl-split-item { width: 100%; min-height: 100px; }

    /* 极简 → 更紧凑 */
    .qf-diy-tl-minimal-item { padding: 10px 0; }

    /* 序号排行 → 缩小序号 */
    .qf-diy-tl-numbered-num { font-size: 18px; min-width: 28px; }
    .qf-diy-tl-numbered-title { font-size: 14px; }
}

/* ========== 模块动画效果（lume102） ========== */
/* 入场动画 */
@keyframes qfFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes qfSlideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes qfSlideLeft { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes qfSlideRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes qfZoomIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

.qf-anim-fade-in { animation: qfFadeIn 0.5s ease both; }
.qf-anim-slide-up { animation: qfSlideUp 0.5s ease both; }
.qf-anim-slide-left { animation: qfSlideLeft 0.5s ease both; }
.qf-anim-slide-right { animation: qfSlideRight 0.5s ease both; }
.qf-anim-zoom-in { animation: qfZoomIn 0.5s ease both; }

/* 悬停效果 */
@keyframes qfGlow { 0%, 100% { box-shadow: 0 2px 8px rgba(0,0,0,0.08); } 50% { box-shadow: 0 4px 20px rgba(34,116,165,0.25); } }

.qf-hover-lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.qf-hover-lift:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }

.qf-hover-glow { animation: qfGlow 2s ease infinite; }
.qf-hover-glow:hover { animation: none; box-shadow: 0 4px 20px rgba(34,116,165,0.3); }

.qf-hover-scale { transition: transform 0.2s ease; }
.qf-hover-scale:hover { transform: scale(1.02); }
