/* ===== 原有动画与基础样式（保留） ===== */
@keyframes animate-up {
    0% {
        transform: translateY(900px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes animate-upAndDwon {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(20px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes animate-opacity {
    0% {
        background-color: #ffffff00;
    }
    100% {
        background-color: #ffffff8a;
    }
}

.animate-up {
    animation: animate-up 1s;
}

.animate-opacity {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    animation: animate-opacity 2s;
}

.svg-midlle {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#page {
    display: none;
}

#page-main {
    margin-left: 10%;
    margin-right: 10%;
}

#page-welcome {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.saying {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.saying-next {
    animation: animate-upAndDwon 3s infinite;
    position: absolute;
    top: 80%;
    left: 50%;
}

#saying {
    font-size: 35px;
}

#subsaying {
    font-size: 14px;
}

#saying-author {
    position: absolute;
    top: 70%;
    left: 70%;
    transform: translate(100%, 100%);
}

#index-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ===== 文章卡片核心布局（优化后） ===== */
#articleList {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;                          /* 使用 gap 替代固定 margin，响应更佳 */
}

#articleList .article-li {
    flex: 1 1 calc(50% - 16px);         /* 灵活宽度，配合 gap */
    min-width: 280px;                   /* 保证卡片不会过窄 */
    background-color: #ffffff8a;
    backdrop-filter: blur(6px);
    border-radius: 8px;
    box-shadow: 1px 1px 8px #999;
    border: 1px solid #999;
    display: flex;
    overflow: hidden;
    margin: 0;                          /* 外边距由 gap 统一控制 */
    position: relative;                 /* 为绝对定位的背景图提供参照 */
}

#articleList .article-li img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 10%;
    object-fit: cover;
    pointer-events: none;
}

#article-li-left {
    flex: 1;
    padding: 12px 8px 8px 12px;
    min-width: 0;                       /* 防止 flex 子项溢出 */
}

#article-li-right {
    flex-shrink: 0;
    width: 70px;
    background-color: #ffffff8a;
    border-radius: 5px;
    margin: 10px 10px 10px 0;
    transition: all 0.2s ease;
}

#article-li-right:hover {
    width: 66px;
    margin-right: 12px;
    background-color: #ffffff;
}

/* 标题样式，增加文字截断 */
#articleList .article-title {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0;
    margin-bottom: 8px;
    color: #555;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

#articleList .article-title:hover {
    color: #e06c75;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* 元信息区域（日期、字数） */
#articleList .about {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 5px 0 10px;
    line-height: 1.5;
    font-size: 14px;
    color: #555;
}

#articleList .about p {
    margin: 0;
}

#articleList .about .article-date,
#articleList .about .article-words {
    margin: 0;
    text-decoration: none;
    background: #e06c75;
    stroke: red;
    padding: 6px 8px;
    cursor: auto;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}


/* 摘要 */
#articleList .article-digest {
    margin: 8px 0;
    word-break: break-word;
}

#articleList .article-digest .article-digest-a {
    text-decoration: none;
    font-size: 14px;
    color: #555;
}

/* 标签区域 */
.post-tags {
    margin: 8px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag a {
    display: inline-block;
    text-decoration: none;
    color: #ffffff;
    background: #e06c75;
    font-size: 14px;
    border-radius: 5px;
    padding: 4px 10px;
    transition: all 0.2s ease;
}

.tag a:hover {
    background: #c66169;
    color: #cccccc;
}

/* ===== 辅助样式（保留原有未使用部分，无影响） ===== */
#articleList img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-resent-left {
    display: flex;
}

.canvas .circle {
    border-radius: 50px;
    height: 21px;
    width: 21px;
    border: 5px solid #ffffff;
}

.canvas .line {
    margin-left: 8px;
    width: 5px;
    border-right: 5px solid #ffffff;
    height: 25px;
}

.article-li-box {
    margin: 10px;
}

.article-li {
    display: flex;
}

.article-li #article-title a {
    text-decoration: none;
    color: #555;
}

#NickAndSlogan {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
}

#nick {
    font-size: 15px;
}

.slogan {
    font-size: 12px;
    color: #999;
    text-decoration: none;
}

/* ===== 响应式设计（新增融合部分） ===== */
@media screen and (max-width: 768px) {
    #page-main {
        margin-left: 5%;
        margin-right: 5%;
    }

    #articleList .article-li {
        flex: 1 1 100%;                /* 强制单列 */
        flex-direction: column;        /* 内部垂直排列，便于阅读 */
        min-width: auto;
    }

    #article-li-left {
        padding: 12px;
    }

    #article-li-right {
        width: 100%;
        margin: 0;
        border-radius: 0 0 8px 8px;
        height: 48px;
    }

    #article-li-right:hover {
        width: 100%;
        margin: 0;
    }

    .svg-midlle {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    #articleList .article-title {
        font-size: 20px;
    }

    #articleList .about {
        line-height: 1.4;
    }
}

@media screen and (max-width: 480px) {
    .saying #saying {
        font-size: 24px;
    }

    #saying-author {
        left: 50%;
        transform: translateX(-50%);
        white-space: nowrap;
        top: auto;
        bottom: 15%;
    }

    #articleList .article-title {
        font-size: 18px;
    }

    #articleList .about .article-date,
    #articleList .about .article-words {
        padding: 4px 6px;
        font-size: 12px;
    }

    .tag a {
        font-size: 13px;
        padding: 3px 8px;
    }

    .saying-next {
        top: 85%;
    }
}