/* 历史时间线特有样式 */
.history-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 自定义滚动条样式 */
.timeline::-webkit-scrollbar {
    height: 8px;
    margin-top: 15px;
}

.timeline::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.timeline::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.timeline::-webkit-scrollbar-thumb:hover {
    background: #888;
    transform: scaleY(1.2);
}

.timeline::-webkit-scrollbar-button {
    width: 20px;
}

.history-title {
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.5rem;
    color: #333;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    animation: titleFadeIn 1s ease-out forwards;
}

@keyframes titleFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.history-title::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #2c3e50;
    animation: lineGrow 0.8s ease-out forwards;
    transform-origin: left center;
    scalex: 0;
}

@keyframes lineGrow {
    to {
        scalex: 1;
    }
}

/* 时间线容器 */
.timeline {
    position: relative;
    overflow: hidden;
    scroll-behavior: smooth;
}

/* 桌面端横向时间线 */
@media (min-width: 992px) {
    .timeline {
        padding: 40px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .timeline::after {
        display: none;
    }

    .timeline ul {
        display: flex;
        position: relative;
        margin: 0;
        padding: 0;
        list-style: none;
        transition: transform 0.5s ease;
    }
}

/* 移动端纵向时间线 */
@media (max-width: 991px) {
    .timeline::after {
        content: "";
        position: absolute;
        top: 0;
        left: 50px;
        height: 100%;
        width: 4px;
        background-color: #e0e0e0;
        transform: translateX(-50%);
    }

    .timeline ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }
}

/* 时间线条目 */
.timeline-item {
    position: relative;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 992px) {
    .timeline-item {
        min-width: 280px;
        margin-right: 60px;
        text-align: center;
    }

    .timeline-item:last-child {
        margin-right: 0;
    }
}

@media (max-width: 991px) {
    .timeline-item {
        margin-bottom: 40px;
        padding-left: 80px;
    }

    .timeline-item:last-child {
        margin-bottom: 0;
    }
}

/* 时间点样式 */
.timeline-date {
    display: inline-block;
    padding: 8px 16px;
    background-color: #2c3e50;
    color: white;
    font-weight: bold;
    border-radius: 20px;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-date {
    background-color: #3498db;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 连接线样式 */
@media (min-width: 992px) {
    .timeline-item::before {
        content: "";
        position: absolute;
        top: 20px;
        left: 50%;
        width: 20px;
        height: 20px;
        background-color: white;
        border: 4px solid #2c3e50;
        border-radius: 50%;
        transform: translateX(-50%);
        z-index: 1;
    }
}

@media (max-width: 991px) {
    .timeline-item::before {
        content: "";
        position: absolute;
        top: 20px;
        left: 50px;
        width: 20px;
        height: 20px;
        background-color: white;
        border: 4px solid #2c3e50;
        border-radius: 50%;
        transform: translateX(-50%);
        z-index: 1;
    }
}

/* 内容卡片样式 */
.timeline-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
}

.timeline-content h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.timeline-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0;
}

/* 滚动提示 */
@media (min-width: 992px) {
    .scroll-hint {
        width: auto;
        text-align: center;
        margin-top: 80px;
        color: #999;
        font-size: 0.9rem;
        animation: bounce 2s infinite;
    }

    @keyframes bounce {
        0%,
        20%,
        50%,
        80%,
        100% {
            transform: translateY(0);
        }
        40% {
            transform: translateY(-8px);
        }
        60% {
            transform: translateY(-5px);
        }
    }
}
