/* 生活页面专用样式 */
#life {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: #fff;
    padding: 0;
}

.life-hero {
    text-align: center;
    padding: 60px 20px;
    background: rgba(0, 0, 0, 0.25);
    margin-bottom: 40px;
}

.life-hero h2 {
    font-size: 2.4rem;
    margin-bottom: 12px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.life-hero p {
    font-size: 1.15rem;
    max-width: 680px;
    margin: 0 auto;
    opacity: 0.95;
}

/* 推荐动态轮播 */
#featured-moments {
    background: rgba(255, 255, 255, 0.12);
    margin: 40px 0;
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

#featured-moments .section-title {
    font-size: 1.7rem;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.moments-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 15px;
}

.moments-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.moments-group {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.moment-item {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-left: 4px solid #4e54c8;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.moment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.moment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.moment-content { flex: 1; }
.moment-text { line-height: 1.6; margin-bottom: 8px; }
.moment-meta { color: #777; font-size: 0.9rem; }

/* 动态轮播控制 */
.moments-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.moments-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.moments-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.moments-btn.active {
    background: #4e54c8;
}

.moments-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.moments-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.moments-indicator.active {
    background: #4e54c8;
    transform: scale(1.2);
}

/* 文章流动轮播 */
#life-articles {
    background: rgba(255, 255, 255, 0.12);
    margin: 40px 0;
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

#life-articles .section-title {
    font-size: 1.7rem;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.articles-flow {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 15px;
}

.articles-flow-container {
    display: flex;
    transition: transform 0.6s ease-in-out;
    gap: 20px;
}

.article-flow-item {
    min-width: calc(33.333% - 14px);
    flex-shrink: 0;
    transition: all 0.6s ease-in-out;
    position: relative;
}

/* 文章卡片在流动模式下的样式 */
.article-flow-item .post-card {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: all 0.6s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    position: relative;
}

/* 主体文章样式（中间） */
.article-flow-item.center .post-card {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
    z-index: 3;
}

.article-flow-item.center .post-card::before {
    content: "当前阅读";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4e54c8;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    z-index: 4;
}

/* 预览文章样式（左右） */
.article-flow-item.preview .post-card {
    transform: scale(0.9);
    opacity: 0.7;
    z-index: 1;
}

.article-flow-item.preview .post-card::before {
    content: "预览";
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(78, 84, 200, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    z-index: 2;
}

/* 文章封面 */
.article-flow-item .post-cover {
    height: 200px;
    background-size: cover;
    background-position: center;
    transition: all 0.6s ease;
}

.article-flow-item.center .post-cover {
    height: 220px;
}

/* 文章信息 */
.article-flow-item .post-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.article-flow-item .post-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4e54c8;
    margin-bottom: 4px;
    transition: all 0.6s ease;
}

.article-flow-item.center .post-title {
    font-size: 1.2rem;
}

.article-flow-item .post-excerpt {
    color: #444;
    line-height: 1.5;
    flex-grow: 1;
    font-size: 0.9rem;
    transition: all 0.6s ease;
}

.article-flow-item.center .post-excerpt {
    font-size: 1rem;
}

.article-flow-item .post-meta {
    color: #777;
    font-size: 0.9rem;
    margin-top: auto;
}

/* 流动控制 */
.flow-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.flow-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.flow-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.flow-btn:active {
    transform: translateY(0);
}

/* 流动指示器 */
.flow-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.flow-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.flow-indicator.active {
    background: #4e54c8;
    transform: scale(1.3);
}

.flow-indicator:hover {
    background: rgba(255, 255, 255, 0.5);
}

.post-card {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.2); }

.post-cover { height: 180px; background-size: cover; background-position: center; }
.post-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.post-title { font-size: 1.2rem; color: #4e54c8; }
.post-excerpt { color: #444; line-height: 1.6; flex-grow: 1; }
.post-meta { color: #777; font-size: 0.9rem; margin-top: auto; }

/* 时间轴 */
#life-timeline {
    background: rgba(255, 255, 255, 0.12);
    margin: 40px 0;
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

#life-timeline .section-title {
    font-size: 1.7rem;
    color: #fff;
    text-align: center;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 20px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.6);
}

.timeline-item {
    position: relative;
    padding: 12px 16px 12px 24px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-radius: 10px;
    margin: 10px 0 10px 20px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -18px;
    top: 18px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4e54c8;
    box-shadow: 0 0 0 4px rgba(78, 84, 200, 0.25);
}

.timeline-title { font-weight: 700; color: #4e54c8; margin-bottom: 6px; }
.timeline-desc { color: #444; line-height: 1.6; margin-bottom: 6px; }
.timeline-meta { color: #777; font-size: 0.9rem; }

/* 动画 */
@keyframes fadeInUpLife {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.moment-item, .post-card, .timeline-item { animation: fadeInUpLife 0.5s ease forwards; }

/* 响应式 */
@media (max-width: 992px) {
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .life-hero { padding: 40px 20px; }
    .life-hero h2 { font-size: 2rem; }
    .articles-grid { grid-template-columns: 1fr; gap: 16px; }
}
