/* 黄峥人生动画 · Scrolling Life Story (仿 bianrensheng.io) */
/* 让动画页全屏:移除 content-inner 的宽度与内边距 */
body.life-page .content-inner { max-width: none; padding: 0; }
body.life-page .article { margin: 0; }

.life-animation {
    margin: 0;
    background: linear-gradient(180deg, #1a0f0f 0%, #2a1515 35%, #3a2020 70%, #22223B 100%);
    color: #fff;
    overflow: hidden;
    position: relative;
    min-height: 100vh;
}
.life-animation::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 15%, rgba(252,191,73,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 75%, rgba(214,40,40,0.18) 0%, transparent 55%);
    pointer-events: none;
}
.life-animation * { position: relative; z-index: 1; }

/* ===== Intro Hero ===== */
.life-intro {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 40px;
}
.life-title {
    font-size: clamp(44px, 7vw, 84px);
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(90deg, #FCBF49 0%, #E63946 50%, #FCBF49 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s linear infinite;
    margin-bottom: 18px;
}
@keyframes shimmer { to { background-position: 200% center; } }
.life-subtitle {
    font-size: clamp(16px, 1.8vw, 20px);
    color: rgba(255,255,255,0.75);
    margin-bottom: 10px;
    letter-spacing: 1.5px;
}
.life-years-range {
    font-family: "SF Mono", "Consolas", monospace;
    font-size: clamp(22px, 3vw, 38px);
    color: #FCBF49;
    font-weight: 700;
    margin: 20px 0 30px;
    letter-spacing: 8px;
}
.life-years-range .arrow { opacity: 0.5; margin: 0 16px; }
.life-scroll-hint {
    position: absolute;
    bottom: 30px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 4px;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* ===== Timeline Chapters ===== */
.life-chapters {
    max-width: 980px;
    margin: 0 auto;
    padding: 40px 40px 80px;
    position: relative;
}
.life-chapters::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent 0%, rgba(252,191,73,0.3) 8%, rgba(252,191,73,0.3) 92%, transparent 100%);
    transform: translateX(-50%);
}
.chapter {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    align-items: center;
    min-height: 280px;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.22,1,0.36,1), transform 0.8s cubic-bezier(0.22,1,0.36,1);
}
.chapter.visible { opacity: 1; transform: translateY(0); }
.chapter:nth-child(even) .chapter-card { grid-column: 3; }
.chapter:nth-child(even) .chapter-year-col { grid-column: 2; }
.chapter:nth-child(even) .chapter-spacer { grid-column: 1; }
.chapter:nth-child(odd) .chapter-card { grid-column: 1; text-align: right; }
.chapter:nth-child(odd) .chapter-year-col { grid-column: 2; }
.chapter:nth-child(odd) .chapter-spacer { grid-column: 3; }

.chapter-year-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.chapter-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle, #FCBF49 0%, #F77F00 100%);
    box-shadow: 0 0 0 4px rgba(252,191,73,0.15), 0 0 24px rgba(252,191,73,0.6);
    margin-bottom: 14px;
    position: relative;
}
.chapter-dot::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px solid rgba(252,191,73,0.3);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.4); opacity: 0; }
}
.chapter-year {
    font-family: "SF Mono", "Consolas", monospace;
    font-size: 22px;
    font-weight: 800;
    color: #FCBF49;
    letter-spacing: 1px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
}
.chapter-age {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    margin-top: 8px;
    letter-spacing: 1px;
}

.chapter-card {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(252,191,73,0.18);
    border-radius: 14px;
    padding: 24px 26px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    transition: all 0.3s;
    position: relative;
}
.chapter-card:hover {
    border-color: rgba(252,191,73,0.45);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(252,191,73,0.25);
}
.chapter-icon {
    font-size: 38px;
    line-height: 1;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 12px rgba(252,191,73,0.35));
}
.chapter-title {
    font-size: 19px;
    font-weight: 700;
    color: #FCBF49;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}
.chapter-desc {
    font-size: 14px;
    line-height: 1.75;
    color: rgba(255,255,255,0.82);
}
.chapter-desc strong { color: #FCBF49; font-weight: 600; }
.chapter-desc em { font-style: normal; color: inherit; font-weight: 500; }
.chapter-quote {
    margin-top: 14px;
    padding: 10px 14px;
    border-left: 3px solid #FCBF49;
    background: rgba(252,191,73,0.08);
    font-size: 13px;
    color: rgba(255,255,255,0.88);
    font-style: italic;
    border-radius: 0 6px 6px 0;
    text-align: left;
}

.chapter-tags {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
}
.chapter:nth-child(odd) .chapter-tags { justify-content: flex-end; }
.chapter-tag {
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 12px;
    background: rgba(230,57,70,0.18);
    color: #FCBF49;
    border: 1px solid rgba(230,57,70,0.3);
    letter-spacing: 0.5px;
}

/* Chapter era dividers */
.era-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 40px 0 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s, transform 0.8s;
}
.era-divider.visible { opacity: 1; transform: translateY(0); }
.era-divider-line {
    flex: 1;
    max-width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(252,191,73,0.5), transparent);
}
.era-divider-label {
    font-size: 14px;
    font-weight: 600;
    color: #FCBF49;
    letter-spacing: 6px;
    padding: 8px 20px;
    border: 1px solid rgba(252,191,73,0.3);
    border-radius: 20px;
    background: rgba(252,191,73,0.05);
}

/* Finale */
.life-finale {
    padding: 80px 40px 100px;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s, transform 1s;
}
.life-finale.visible { opacity: 1; transform: translateY(0); }
.life-finale-quote {
    font-size: clamp(18px, 2.2vw, 26px);
    font-weight: 300;
    line-height: 1.85;
    color: #fff;
    max-width: 720px;
    margin: 0 auto 24px;
    font-style: italic;
    letter-spacing: 0.5px;
}
.life-finale-quote::before, .life-finale-quote::after {
    content: '"';
    color: #FCBF49;
    font-size: 1.5em;
    font-weight: 900;
    opacity: 0.7;
    margin: 0 6px;
}
.life-finale-attrib {
    font-size: 14px;
    color: rgba(255,255,255,0.55);
    letter-spacing: 2px;
    margin-bottom: 36px;
}
.life-finale-cta {
    display: inline-block;
    padding: 12px 32px;
    border: 1px solid rgba(252,191,73,0.4);
    border-radius: 30px;
    color: #FCBF49;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 2px;
    transition: all 0.3s;
}
.life-finale-cta:hover {
    background: #FCBF49;
    color: #22223B;
    box-shadow: 0 0 30px rgba(252,191,73,0.5);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .life-animation { margin: 0; }
    .life-intro { min-height: 55vh; padding: 50px 20px; }
    .life-chapters { padding: 30px 20px 60px; }
    .life-chapters::before { left: 24px; }
    .chapter {
        grid-template-columns: 48px 1fr !important;
        min-height: auto;
        margin-bottom: 24px;
        gap: 14px;
    }
    .chapter:nth-child(odd) .chapter-card,
    .chapter:nth-child(even) .chapter-card { grid-column: 2; text-align: left; }
    .chapter:nth-child(odd) .chapter-year-col,
    .chapter:nth-child(even) .chapter-year-col { grid-column: 1; }
    .chapter-spacer { display: none; }
    .chapter:nth-child(odd) .chapter-tags { justify-content: flex-start; }
    .chapter-year { font-size: 16px; }
    .chapter-dot { width: 16px; height: 16px; }
    .chapter-icon { font-size: 30px; }
    .chapter-title { font-size: 16px; }
    .chapter-desc { font-size: 13px; }
}
