#timeline-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem 0;
}

.timeline-center-line {
    left: 50%;
}

.timeline-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

#timeline-nav {
    width: 160px;
    max-height: 80vh;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#timeline-nav::-webkit-scrollbar {
    display: none;
}

#timeline-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

#timeline-nav a {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    color: #6b7280;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
    padding-left: 20px;
}

#timeline-nav a:hover {
    color: #1f2937;
}

#timeline-nav a.active {
    color: #3b82f6;
}

.nav-chapter .chapter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 8px 16px;
    font-weight: bold;
    color: #374151;
}

.nav-chapter .chapter-header:hover {
    background-color: #f3f4f6;
}

.nav-chapter .nav-items-list {
    list-style: none;
    padding-left: 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.nav-chapter.open > .nav-items-list {
    max-height: 1000px;
}

.nav-items-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-icon {
    font-size: 10px;
    color: #3b82f6;
}

@media (max-width: 768px) {
    #timeline-nav {
        width: 90px;
        right: 2px;
        left: auto;
    }

    #timeline-nav a {
        font-size: 10px;
        padding: 4px 6px;
        padding-left: 16px;
    }

    #timeline-nav a::before {
        width: 10px;
        height: 10px;
    }

    .nav-chapter .chapter-header {
        font-size: 11px;
        padding: 6px 8px;
    }
}