/* ===== 分页按钮样式 ===== */
.fy {
    text-align: center;
    margin: 24px 0 16px 0;
    font-size: 0;
}
.fy a, .fy span {
    display: inline-block;
    min-width: 36px;
    height: 36px;
    line-height: 36px;
    margin: 0 4px;
    padding: 0 10px;
    font-size: 15px;
    color: #4cad46;
    background: #fff;
    border: 1px solid #e5e6e5;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
}
.fy a:hover, .fy a:focus {
    color: #fff;
    background: #4cad46;
    border-color: #4cad46;
}
.fy .active, .fy a.active {
    color: #fff;
    background: #4cad46;
    border-color: #4cad46;
    cursor: default;
}
.fy .disabled, .fy a.disabled {
    color: #ccc;
    background: #f8f8f8;
    border-color: #e5e6e5;
    cursor: not-allowed;
}
.fy a.loading {
    color: #999;
    background: #f5f5f5;
    border-color: #ddd;
    cursor: wait;
    pointer-events: none;
}
.fy a.loading:after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid #ccc;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}
/* 无数据提示 */
.no-data {
    text-align: center;
    padding: 40px 0;
    color: #999;
    font-size: 16px;
    background: #fafafa;
    border-radius: 8px;
    margin: 20px 12px;
}
/* 基本样式 */
.essay {
    border: none;
    margin: 0 auto;
    padding: 0!important;
    position: relative;
}

/* 加载动画 */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #4cad46;
    animation: spin 1s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.essay_list_left {
    position: relative;
}

.lazyloading + .loading-spinner {
    opacity: 1;
    transition: opacity 0.2s ease;
}

.lazyloaded + .loading-spinner {
    opacity: 0;
    transition: opacity 0.2s ease;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.essay_title {
    height: 35px;
    overflow: hidden;
    background: #eff8da;
    line-height: 35px;
}

.essay_title li {
    float: left;
    font-size: 14px;
    color: #454545;
    margin-left: 15px;
}

.essay_box {
    margin: 1px;
}

.essay_list {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}
.essay_list:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}

.essay_list_left {
    float: right;
}

/* 文章列表图片样式 - 修复图片显示问题 */
.essay_list_left {
    width: 120px;
    height: 160px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    /* 移除渐变背景，让图片正常显示 */
    background: transparent;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 图片样式 - 确保图片正常显示 */
.essay_list_left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    /* 关键优化：预定义尺寸避免重排 */
    aspect-ratio: 3/4;
    /* 确保图片直接显示 */
    opacity: 1;
    transition: none;
    visibility: visible;
    /* 硬件加速优化 */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    /* 确保图片在容器中正确显示 */
    border-radius: 8px;
}

/* 图片容器链接样式 */
.essay_list_left a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

/* 加载动画 - 简化版 */
.essay_list_left .loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #4cad46;
    animation: spin 1s ease-in-out infinite;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
}

/* 图片加载时的占位符 - 使用透明背景 */
.essay_list_left img:not([src]),
.essay_list_left img[src=""],
.essay_list_left img:not([src*=".jpg"]):not([src*=".png"]):not([src*=".jpeg"]):not([src*=".gif"]):not([src*=".webp"]) {
    opacity: 0;
    /* 加载时的占位符背景 */
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
}

/* 图片加载完成后的优化 */
.essay_list_left img.loaded {
    opacity: 1;
    background: transparent;
}

/* 确保图片加载错误时显示占位符 */
.essay_list_left img.img-error {
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    opacity: 1;
}

/* 移除懒加载相关的样式 */
.essay_list_left img.lazyloaded {
    background-color: transparent;
}

.essay_list_left img.lazyload-error {
    background-color: #f8f8f8;
    opacity: 1;
}

.essay_list_right {
    width: 66%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    position: relative;
    height: 133px;
}

.essay_list_right h2.essay_name {
    font-size: 18px;
    margin: 0;
    padding: 0;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    font-weight: 500;
    color: #333;
    min-height: 81px; /* 18px * 1.5 * 3 */
}

.essay_name a:hover {
    text-decoration: none;
    color: #4cad46;
}

.essay_fb {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0 0 0;
    padding: 0;
}

.author-info {
    margin-bottom: 4px;
}

.action-items {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 12px;
}

.essay_fb li {
    display: flex;
    align-items: center;
    margin: 0 8px 0 0 !important;
}

.essay_fb li {
    margin-right: 8px;
}

.essay_fb_name {
    color: #4cad46 !important;
    margin-left: 2px;
    font-size: 13px;
    position: relative;
    top: 1px;
    font-weight: 500;
}

.essay_fb_pl, .essay_fb_dz {
    height: 20px;
    line-height: 20px;
    display: flex;
    align-items: center;
}
.essay_fb_pl {
    color: #4285f4;
}
.essay_fb_dz {
    color: #ff4d4f;
}

.essay_fb_name {
    position: relative;
    padding-right: 0;
}

.essay_fb_pl em, .essay_fb_dz em {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 6px;
    cursor: pointer;
    position: relative;
    top: 2px;
}

.essay_fb_pl em {
    background: none;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.essay_fb_pl em svg {
    width: 100%;
    height: 100%;
    fill: #4285f4;
}

.essay_fb_dz em {
    background: none;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.essay_fb_dz em svg {
    width: 100%;
    height: 100%;
    fill: #ff4d4f;
}

/* 分页 */
.fy {
    padding: 15px 0;
    text-align: center;
    position: relative;
    min-height: 40px;
}

.loading-more {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    color: #4cad46;
    padding: 10px 0;
    cursor: pointer;
}

.loading-more:hover {
    text-decoration: underline;
}

/* 媒体查询 */
@media (min-width: 375px) {
.essay_list_right {
    display: flex;
    flex-direction: column;
}
}

@media (min-width: 768px) {
    .essay_title {
        height: 40px;
        line-height: 40px;
    }
    .essay_list_right {
        width: 82%;
        padding-left: 16px;
    }
}

@media (min-width: 992px) {
    .essay_txt {
        width: 96%;
        height: 58px;
        font-size: 14px;
        text-overflow: ellipsis;
        line-height: 30px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .essay_box .essay_list {
        display: inline-flex;
        width: calc(50% - 2px);
    }
    .essay_list_left {
        margin-right: 10px;
        width: 140px;
        height: 187px; /* 更新高度以匹配图片尺寸 */
        /* 确保大屏幕下背景透明 */
        background: transparent;
    }
    .essay_list_right {
        width: calc(100% - 150px); /* 使用calc来动态计算宽度 */
        height: 187px;
    }
    /* 大屏幕下的图片样式 */
    .essay_list_left img {
        /* 确保大屏幕下图片正常显示 */
        aspect-ratio: 140/187; /* 140px/187px ≈ 0.748 */
    }
    .essay_title {
        height: 45px;
        line-height: 45px;
    }
    .essay_list_right {
        padding-left: 10px; /* 注意这里和上面的.essay_list_right选择器合并了，但由于属性不同，所以保留了两个规则 */
    }
}
