﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    background-color: #f0f2f5;
    line-height: 1.6;
    color: #333;
    padding: 50px 20px;
}

.timeline-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.timeline {
    position: relative;
    padding: 20px 0;
}

/* 中央垂直线 */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #333;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-item {
    position: relative;
    margin: 40px 0;
    width: 100%;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
/* 在现有的动画延迟规则后添加 */
.timeline-item:nth-child(6) { animation-delay: 0.6s; }
.timeline-item:nth-child(7) { animation-delay: 0.7s; }
.timeline-item:nth-child(8) { animation-delay: 0.8s; }
.timeline-item:nth-child(9) { animation-delay: 0.9s; }
.timeline-item:nth-child(10) { animation-delay: 1.0s; }
.timeline-item:nth-child(11) { animation-delay: 1.1s; }
.timeline-item:nth-child(12) { animation-delay: 1.2s; }
.timeline-item:nth-child(13) { animation-delay: 1.3s; }
.timeline-item:nth-child(14) { animation-delay: 1.4s; }
.timeline-item:nth-child(15) { animation-delay: 1.5s; }
.timeline-item:nth-child(16) { animation-delay: 1.6s; }
.timeline-item:nth-child(17) { animation-delay: 1.7s; }
.timeline-item:nth-child(18) { animation-delay: 1.8s; }
.timeline-item:nth-child(19) { animation-delay: 1.9s; }
.timeline-item:nth-child(20) { animation-delay: 2.0s; }
.timeline-content {
    position: relative;
    align-items: center;
}

/* 左侧布局 */
.timeline-item.left .timeline-content {
    justify-content: flex-end;
    padding-right: 15px;
    display: flex;
}

.timeline-item.left .timeline-label {
    margin-right: 10px;
}
.timeline-item.left :nth-child(2) {
    justify-content: flex-end;
    padding-right: 138px;display: flex;
}

/* 右侧布局 */
.timeline-item.right .timeline-content {
    justify-content: flex-start;
    padding-left: 15px;

}

.timeline-item.right .timeline-label {
    margin-left: 10px;
}

/* 时间轴小圆点 */
.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 圆点颜色 */
.timeline-dot.red {
    background: #e74c3c;
}

.timeline-dot.orange {
    background: #f39c12;
}

.timeline-dot.teal {
    background: #1abc9c;
}

.timeline-dot.blue {
    background: #3498db;
}

.timeline-dot.purple {
    background: #9b59b6;
}

/* 椭圆标签样式 */
.timeline-label {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 30px;
    border-radius: 50px;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    color: #fff;
}

.timeline-label:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* 标签颜色 */
.timeline-label.red {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.timeline-label.orange {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.timeline-label.teal {
    background: linear-gradient(135deg, #1abc9c, #16a085);
}

.timeline-label.blue {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.timeline-label.purple {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

/* 年份样式 */
.timeline-label .year {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 标题样式 */
.timeline-label .title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 描述样式 */
.timeline-label .description {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}



/* 响应式设计 */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }
    
    .timeline-dot {
        left: 30px;
        width: 10px;
        height: 10px;
    }
    
    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        justify-content: flex-start;
        padding-left: 60px;
        padding-right: 0;
    }
    
    .timeline-item.left .timeline-label,
    .timeline-item.right .timeline-label {
        margin-left: 20px;
        margin-right: 0;
        max-width: 300px;
        padding: 15px 25px;
    }
    

    
    .timeline-label .year {
        font-size: 20px;
    }
    
    .timeline-label .title {
        font-size: 14px;
    }
    
    .timeline-label .description {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .timeline-container {
        padding: 0 15px;
    }
    
    .timeline-label {
        padding: 12px 20px;
        max-width: 250px;
    }
    
    .timeline-label .year {
        font-size: 18px;
    }
    
    .timeline-label .title {
        font-size: 13px;
    }
    
    .timeline-label .description {
        font-size: 11px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 悬停效果增强 */
.timeline-item:hover .timeline-dot {
    transform: translateX(-50%) scale(1.3);
}

.timeline-item:hover .timeline-label {
    transform: translateY(-5px) scale(1.02);
}