/* =========================================================
   帖子列表
   极简现代风 · 柔和微渐变 · 紧凑丝带版
   ========================================================= */

.neo-post-list,
.neo-post-list * {
    box-sizing: border-box;
}

.neo-post-list {
    width: 100%;
    display: flex;
    flex-direction: column;

    margin: 0;
    padding: 4px;
    gap: 6px; /* 适度呼吸感微距 */

    background: #f4f7f9; /* 通透清爽底色 */
}

/* =========================================================
   帖子卡片基础
   ========================================================= */

.neo-post-card {
    --ribbon-start: #5daeff;
    --ribbon-end: #1e82e6;

    position: relative;
    width: 100%;
    min-height: 82px;
    display: block;
    margin: 0;
    padding: 0;
    overflow: hidden;

    /* 细腻的微渐变背景与高级边缘线 */
    border: 1px solid rgba(214, 224, 232, 0.65);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #fcfdfe 100%);
    
    color: #1a2f44;
    text-decoration: none !important;

    /* 柔和分层环境阴影 */
    box-shadow: 
        0 1px 2px rgba(20, 43, 64, 0.03),
        0 4px 12px rgba(20, 43, 64, 0.02);

    -webkit-tap-highlight-color: transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* 长列表性能优化 */
    content-visibility: auto;
    contain-intrinsic-size: 82px;
    contain: layout paint style;
}

/* 出售帖子特殊底色 */
.neo-post-card.is-sell-post {
    border-color: rgba(232, 220, 222, 0.8);
    background: linear-gradient(180deg, #ffffff 0%, #fffcfc 100%);
}

/* 桌面端悬停：微浮起 */
@media (hover: hover) {
    .neo-post-card:hover {
        border-color: #a9c2d6;
        background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
        transform: translateY(-1px);
        box-shadow: 
            0 2px 4px rgba(20, 43, 64, 0.05),
            0 6px 16px rgba(20, 43, 64, 0.04);
    }
}

/* 点击反馈 */
.neo-post-card:active {
    background: #f1f5f9;
    transform: translateY(0);
}

/* =========================================================
   【PC 端】左上角斜丝带（已整体往右上提缩）
   ========================================================= */

.neo-post-corner {
    position: absolute;
    z-index: 10;
    top: 0;
    left: 0;
    width: 78px;
    height: 78px;
    display: block;
    overflow: hidden;
    pointer-events: none;
}

/* 丝带主体 - PC端同步上提 */
.neo-post-corner::before {
    content: "";
    position: absolute;
    top: 4px;           /* PC端由12px上提到4px，更贴合边缘 */
    left: -27px;
    width: 106px;
    height: 22px;
    transform: rotate(-45deg);
    transform-origin: center;

    /* 斜向现代渐变 */
    background: linear-gradient(135deg, var(--ribbon-start) 0%, var(--ribbon-end) 100%);

    /* 半透明高光与微弱阴影 */
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 2px 5px rgba(25, 89, 145, 0.12);
}

.neo-post-corner::after {
    display: none !important;
    content: none !important;
}

/* 丝带文字 - PC端同步精密对齐 */
.neo-post-corner-text {
    position: absolute;
    z-index: 2;
    top: 9px;           /* 文字对应上提，与主体绝对对齐中心 */
    left: -33px;
    width: 106px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    overflow: hidden;
    transform: rotate(-45deg);
    transform-origin: center;
    
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
    font-size: 12px;
    line-height: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* =========================================================
   高级感专属渐变色系
   ========================================================= */

/* 等级 6：蔷薇暮红 */
.neo-post-card.neo-level-6 {
    --ribbon-start: #ff6b8b;
    --ribbon-end: #ea354f;
}

/* 等级 5：琥珀暖橙 */
.neo-post-card.neo-level-5 {
    --ribbon-start: #ffad3c;
    --ribbon-end: #f27507;
}

/* 等级 4：鸢尾迷紫 */
.neo-post-card.neo-level-4 {
    --ribbon-start: #a373f1;
    --ribbon-end: #6e46cb;
}

/* 等级 3：静谧晴蓝 */
.neo-post-card.neo-level-3 {
    --ribbon-start: #52a5f5;
    --ribbon-end: #1b7bd3;
}

/* 等级 2：薄荷落绿 */
.neo-post-card.neo-level-2 {
    --ribbon-start: #44c785;
    --ribbon-end: #10a362;
}

/* 等级 1：冰晶浅青 */
.neo-post-card.neo-level-1 {
    --ribbon-start: #40c3d2;
    --ribbon-end: #0f98a9;
}

/* 等级 0：冷流石灰 */
.neo-post-card.neo-level-0 {
    --ribbon-start: #91a5b8;
    --ribbon-end: #677f94;
}

/* 出售帖特制：珊瑚绯红（必须在等级后） */
.neo-post-card.is-sell-post {
    --ribbon-start: #ff5662;
    --ribbon-end: #db092f;
}

/* =========================================================
   卡片内容与排版
   ========================================================= */

.neo-post-content {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 12px 10px 8px;
}

/* 标题区 */
.neo-post-title {
    width: 100%;
    min-width: 0;
    min-height: 28px;
    display: -webkit-box;
    overflow: hidden;
    padding-left: 33px; /* 留出优雅的左侧安全距离 */
    padding-right: 2px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    
    color: #11263c;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
    font-size: 16.5px;
    line-height: 1.45;
    font-weight: 700;
    letter-spacing: 0.2px;
    word-break: break-all;
}

.neo-post-title.is-bold {
    font-weight: 800;
}

.neo-post-title.is-underline {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

/* 底部区域 */
.neo-post-footer {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    padding-left: 3px; /* 与标题完美垂直对齐 */
}

/* =========================================================
   免费与金币标签（轻盈胶囊渐变）
   ========================================================= */

.neo-post-price {
    flex: 0 0 auto;
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 1px 10px;
    border-radius: 20px;
    
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
}

/* 免费 */
.neo-post-price.is-free {
    border: 1px solid rgba(140, 220, 180, 0.5);
    background: linear-gradient(180deg, #f2fbf7 0%, #e3f7ed 100%);
    color: #0b8453;
}

/* 出售 */
.neo-post-price.is-sell {
    border: 1px solid rgba(255, 185, 180, 0.5);
    background: linear-gradient(180deg, #fff5f4 0%, #ffe6e3 100%);
    color: #e22d45;
}

.neo-post-price-text {
    display: inline-block;
    font-weight: inherit;
}

.neo-post-coin-icon,
.neo-post-free-icon {
    display: none !important;
}

/* =========================================================
   数据元信息
   ========================================================= */

.neo-post-meta {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 2px 8px;
    
    color: #6a7f93;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12.5px;
    line-height: 18px;
    font-weight: 500;
}

.neo-post-meta-item {
    min-height: 18px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.neo-post-meta-item + .neo-post-meta-item::before {
    content: "";
    flex: 0 0 auto;
    width: 3px;
    height: 3px;
    margin-right: 8px;
    border-radius: 50%;
    background: #cbd6e0;
}

.neo-post-meta-item.is-time {
    color: #476885;
    font-weight: 600;
}

.neo-post-meta-item.is-view {
    color: #768ba1;
}

.neo-post-meta-item.is-buy {
    color: #e53e54;
    font-weight: 600;
}

/* =========================================================
   广告与空状态
   ========================================================= */

.neo-inline-ad {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(213, 223, 231, 0.6);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(20, 43, 64, 0.02);
}

.neo-inline-ad img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.neo-post-empty {
    width: 100%;
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #cbd6e0;
    border-radius: 12px;
    background: #ffffff;
    color: #8397a7;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 600;
}

/* =========================================================
   【手机端】媒体查询响应
   ========================================================= */

@media (max-width: 600px) {
    .neo-post-list {
        padding: 4px;
        gap: 4px;
    }

    .neo-post-card {
        min-height: 80px;
        border-radius: 10px;
        contain-intrinsic-size: 80px;
    }

    .neo-post-content {
        min-height: 78px;
        padding: 9px 10px 9px 6px;
    }

    /* 手机端丝带：完美适配 top: -5px 高度 */
    .neo-post-corner {
        width: 74px;
        height: 74px;
    }

    .neo-post-corner::before {
        top: -5px;         /* 匹配您调试的理想高度 */
        left: -24px;
        width: 102px;
        height: 21px;
    }

    .neo-post-corner-text {
        top: 5px;         /* 文字同步对齐，保持绝对居中不偏心 */
        left: -33px;
        width: 102px;
        height: 21px;
        padding: 0 13px;
        font-size: 11px;
        line-height: 21px;
    }

    .neo-post-title {
        min-height: 32px;
        padding-left: 29px;
        font-size: 15.5px;
    }

    .neo-post-footer {
        margin-top: 6px;
        padding-left: 2px;
    }

    .neo-post-price {
        min-height: 20px;
        padding: 1px 8px;
        font-size: 12px;
    }

    .neo-post-meta {
        font-size: 12px;
    }
}

/* =========================================================
   【超窄屏手机】媒体查询响应
   ========================================================= */

@media (max-width: 350px) {
    .neo-post-content {
        padding-left: 4px;
        padding-right: 6px;
    }

    /* 极限屏下等比例再往上收缩，防止露白 */
    .neo-post-corner {
        width: 66px;
        height: 66px;
    }

    .neo-post-corner::before {
        top: -7px;
        left: -22px;
        width: 92px;
        height: 19px;
    }

    .neo-post-corner-text {
        top: 5px;
        left: -32px;
        width: 92px;
        height: 19px;
        padding: 0 10px;
        font-size: 10px;
        line-height: 19px;
    }

    .neo-post-title {
        padding-left: 25px;
        font-size: 14px;
    }

    .neo-post-footer {
        padding-left: 1px;
    }

    .neo-post-price {
        padding: 0 6px;
        font-size: 11px;
    }

    .neo-post-meta {
        gap: 1px 4px;
        font-size: 10px;
    }
}

/* 减弱动态效果 */
@media (prefers-reduced-motion: reduce) {
    .neo-post-card {
        transition: none !important;
    }
}