body {
    margin: 0;
    font-family: "Microsoft YaHei", sans-serif;
    background-color: #f4f4f9;
    color: #333;
}

header {
    text-align: center;
    padding: 50px 20px;
    background-color: #2c3e50;
    color: white;
}

/* 时间轴主轴 */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background-color: #dcdde1;
    transform: translateX(-50%);
}

/* 节点容器 */
.timeline-item {
    position: relative;
    margin-bottom: 50px;
    width: 100%;
    /* 初始状态：透明且稍微向下偏移，等待 JS 触发动画 */
    opacity: 0; 
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

/* 激活状态：当 JS 给该节点加上 show 类名时触发 */
.timeline-item.show {
    opacity: 1;
    transform: translateY(0);
}

/* 时间轴上的小圆点 */
.timeline-dot {
    position: absolute;
    top: 20px;
    left: 50%;
    width: 20px;
    height: 20px;
    background-color: #e74c3c;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

/* 卡片内容区 */
.timeline-content {
    width: 42%;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
}

/* 让奇数和偶数节点的卡片交错分布 */
.timeline-item:nth-child(odd) .timeline-content {
    left: 0;
}

.timeline-item:nth-child(even) .timeline-content {
    left: 58%; /* 放到右边 */
}