/* ============================================
   博客园全局样式（首页列表、分页等）
   ============================================ */

/* ---------- 首页列表 ---------- */
#content,
#mainContent {
    max-width: 860px !important;
    margin: 40px auto !important;
    padding: 0 20px !important;
    float: none !important;
}

/* ============================================
   首页文章卡片 - 立体感（与文章页一致）
   ============================================ */
.day {
    background: var(--bg-card, rgba(255, 255, 255, 0.92));
    border-radius: 28px;
    padding: 32px 40px;
    margin-bottom: 32px;
    
    /* 5 层立体阴影 */
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.02),
        0 4px 8px rgba(0, 0, 0, 0.03),
        0 12px 32px rgba(0, 0, 0, 0.05),
        0 24px 64px rgba(0, 0, 0, 0.07),
        0 48px 120px rgba(0, 0, 0, 0.06);
    
    border: 0.5px solid rgba(255, 255, 255, 0.4);
    
    /* 顶部高光线 */
    position: relative;
    
    /* 微悬浮过渡 */
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                margin-top 0.6s ease-out,
                opacity 0.6s ease-out;
    
    /* ✅ D：淡入动画（只改 opacity 和 margin-top，不影响 transform） */
    opacity: 0;
    margin-top: 24px;
    animation: fadeUpFix 0.6s ease-out forwards;
}

/* 每个卡片依次延迟出现 */
.day:nth-child(1) { animation-delay: 0.05s; }
.day:nth-child(2) { animation-delay: 0.12s; }
.day:nth-child(3) { animation-delay: 0.19s; }
.day:nth-child(4) { animation-delay: 0.26s; }
.day:nth-child(5) { animation-delay: 0.33s; }
.day:nth-child(6) { animation-delay: 0.40s; }
.day:nth-child(7) { animation-delay: 0.47s; }
.day:nth-child(8) { animation-delay: 0.54s; }
.day:nth-child(9) { animation-delay: 0.61s; }
.day:nth-child(10) { animation-delay: 0.68s; }
.day:nth-child(11) { animation-delay: 0.75s; }
.day:nth-child(12) { animation-delay: 0.82s; }
.day:nth-child(13) { animation-delay: 0.89s; }
.day:nth-child(14) { animation-delay: 0.96s; }
.day:nth-child(15) { animation-delay: 1.03s; }

/* 顶部高光线 */
.day::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.5) 20%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0.5) 80%,
        transparent
    );
    border-radius: 28px 28px 0 0;
    pointer-events: none;
}

/* ✅ 微悬浮：用 translateY，和 animation 不冲突 */
.day:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.02),
        0 4px 8px rgba(0, 0, 0, 0.03),
        0 16px 40px rgba(0, 0, 0, 0.06),
        0 32px 80px rgba(0, 0, 0, 0.09),
        0 64px 160px rgba(0, 0, 0, 0.08);
}

/* ---------- 暗色模式首页卡片 ---------- */
[data-theme="night"] .day {
    background: rgba(40, 40, 40, 0.92) !important;
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 12px 32px rgba(0, 0, 0, 0.3),
        0 24px 64px rgba(0, 0, 0, 0.4),
        0 48px 120px rgba(0, 0, 0, 0.3);
}

[data-theme="night"] .day::before {
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.08) 20%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.08) 80%,
        transparent
    );
}

[data-theme="night"] .day:hover {
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.25),
        0 4px 8px rgba(0, 0, 0, 0.25),
        0 16px 40px rgba(0, 0, 0, 0.4),
        0 32px 80px rgba(0, 0, 0, 0.5),
        0 64px 160px rgba(0, 0, 0, 0.4);
}

/* ---------- 首页文章标题 ---------- */
.day .postTitle {
    text-align: left !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    font-size: 22px !important;
    border-bottom: none !important;
}
.day .postTitle::after {
    display: none !important;
}
.day .postTitle a {
    color: var(--accent-dark, #008B8B) !important;
    text-decoration: none !important;
    transition: color 0.2s;
}
.day .postTitle a:hover {
    color: var(--accent, #20B2AA) !important;
}

/* ---------- 首页文章摘要 ---------- */
.day .postCon,
.day .c_b_p_desc {
    color: var(--text-main, #2c3e50) !important;
    font-size: 15px;
    line-height: 1.8 !important;
    margin-bottom: 10px;
}

/* ---------- 首页文章元信息 ---------- */
.day .postDesc {
    color: #888 !important;
    font-size: 13px;
    text-align: right;
}
.day .postDesc a {
    color: #888 !important;
}

/* ---------- 分页 ---------- */
.topicListFooter {
    text-align: center !important;
    margin: 30px 0 60px;
}
.topicListFooter a {
    color: var(--accent-dark, #008080) !important;
    margin: 0 6px;
}

/* ---------- 暗色模式首页文字适配 ---------- */
[data-theme="night"] .day .postCon,
[data-theme="night"] .day .c_b_p_desc {
    color: #e4e6eb !important;
}
[data-theme="night"] .day .postDesc {
    color: #aaa !important;
}
[data-theme="night"] .day .postDesc a {
    color: #aaa !important;
}


/* ================================================================
   ✅ D：淡入动画（只控制 opacity 和 margin-top，不影响 transform）
   ================================================================ */

@keyframes fadeUpFix {
    from {
        opacity: 0;
        margin-top: 24px;
    }
    to {
        opacity: 1;
        margin-top: 0;
    }
}


/* ================================================================
   移动端适配
   ================================================================ */
@media (max-width: 768px) {
    .day {
        padding: 24px 20px;
        border-radius: 20px;
        margin-bottom: 24px;
        /* 移动端禁用悬浮和动画，减少性能开销 */
        transform: none !important;
        animation: none !important;
        opacity: 1 !important;
        margin-top: 0 !important;
    }
    .day:hover {
        transform: none !important;
    }
    .day .postTitle {
        font-size: 19px !important;
    }
    .day .postCon,
    .day .c_b_p_desc {
        font-size: 14px !important;
    }
}