/* 容器样式 */
.myNews {
    background: none;
    width: 100%;
    margin: 40px auto;


    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 标题样式 */
.myNews-title {
    font-size: 18px;
    font-weight: bold;
    color: #444;

    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* 🌟 列表容器：回归最纯粹的逻辑 🌟 */
.myNews-list {
    display: grid;

    /* 默认单排 */
    grid-template-columns: 1fr;

    gap: 10px;
    /* 单排时只有行间距 */
    list-style: none;
    padding: 0;
    margin: 0;
}

/* A标签样式 */
.myNews-item a {

    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    text-decoration: none;
    color: #333;
    font-size: 15px;
    transition: color 0.2s ease;
    /* 防止超长英文撑爆容器 */
    word-break: break-all;
}

/* 悬停效果 */
.myNews-item a:hover {
    color: #0066cc;
}

/* 右侧标识标签样式 */
.tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    margin-left: 10px;
    flex-shrink: 0;
    white-space: nowrap;
}

.tag-red {
    background-color: #ff4d4f;
}

.tag-green {
    background-color: #9de184;
}

.tag-orange {
    background-color: #faad14;
}

/* 🌟 横屏/宽屏时切换为双排 🌟 */
@media (min-width: 768px) {
    .myNews-list {
        /* 默认单列 */
        grid-template-columns: 1fr;
        gap: 10px;

        /* 使用真正的 gap，多余的空白自动全部分配给中间的 gap */
        justify-content: space-between;
        gap: 10px 5%;
        /* 行间距10px，列间距用百分比，自动伸缩 */

    }

    .myNews-item a {
        justify-content: flex-start;

    }


    .myNews-list:has(:nth-child(4)) {
        grid-template-columns: auto auto;
        justify-content: space-between;
        gap: 10px 5%;
    }

    .myNews-list:has(:nth-child(4))> :nth-child(odd) {
        grid-column: 1;
    }

    .myNews-list:has(:nth-child(4))> :nth-child(even) {
        grid-column: 2;
    }

    .myNews-list:has(:nth-child(4)) .myNews-item a {
        justify-content: space-between;
    }

}