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

        }

        body {
            font-family: 'Arial', sans-serif;
            background: #000;
            color: white;
            overflow: hidden;
            height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .timeline-container {
            position: relative;
            width: 100%;
            height: calc(100dvh - 8rem);
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            touch-action: pan-y; /* Allow vertical scrolling but handle horizontal swipes */
            user-select: none; /* Prevent text selection during swipes */
            padding: 0 1rem 1rem 1rem;
        }

        .media-info-row {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            flex: 1 1 auto;
            flex-flow: column-reverse;
        }

        .main-image {
            flex: 1 1 50vh;
            max-height: calc(70vh - 8rem);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: black;
            position: relative;
            overflow: hidden;
            touch-action: pan-y;
            border: 1px solid rgba(255, 255, 255, 0.25);
            border-radius: 1rem;
        }

        .media-container {
            position: relative;
            width: 100%;
            height: 100%;
            border-radius: 10px;
            overflow: visible; /* Changed to visible so arrows can show outside */
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            cursor: pointer;
            touch-action: pan-y;
        }

        .media-content {
            width: 100%;
            height: 100%;
            border-radius: 10px;
            overflow: hidden;
        }

        .media-content img,
        .media-content video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .media-container:hover .media-content img,
        .media-container:hover .media-content video {
            transform: scale(1.02);
        }

        .slideshow-controls {
            position: absolute;
            bottom: 0.5rem;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            max-width: calc(100% - 7rem);
            display: flex;
            gap: 0.5rem;
            z-index: 10;
        }

        .slide-dot {
            flex: 1;
            height: 0.45rem;
            border-radius: 0;
            background: rgba(255, 255, 255, 0.35);
            opacity: 0.6;
            cursor: pointer;
            transition: opacity 0.3s ease, background 0.3s ease;
        }

        .slide-dot.active {
            background: #ffd700;
            opacity: 1;
            height: 0.5rem;
        }

        @keyframes blinkPulse {
            0% { opacity: 1; filter: drop-shadow(0 0 0 rgba(255,215,0,0)); }
            50% { opacity: 0.6; filter: drop-shadow(0 0 6px rgba(255,215,0,0.8)); }
            100% { opacity: 1; filter: drop-shadow(0 0 0 rgba(255,215,0,0)); }
        }
        .blink {
            animation: blinkPulse 1s ease-in-out infinite;
        }

        .slide-arrows {
            position: absolute;
            top: calc(100% - 0.5rem);
            transform: translateY(-100%);
            font-size: 40px;
            color: white;
            cursor: pointer;
            transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
            z-index: 20;
            user-select: none;
            background: black;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            width: 60px;
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        }

        .slide-arrows:hover {
            color: white;
            background: rgba(255, 215, 0, 0.35);
            border-color: rgba(255, 215, 0, 0.6);
            box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
        }

        .slide-prev {
            left: 0.5rem;
        }

        .slide-next {
            right: 0.5rem;
        }

        .fullscreen-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.95);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        .fullscreen-media {
            max-width: calc(100vw - 2rem);
            max-height: calc(100vh - 2rem);
            object-fit: contain;
        }

        .fullscreen-close {
            position: absolute;
            top: 1rem;
            left: 50%;
            transform: translateX(-50%);
            width: 2.5rem;
            height: 2.5rem;
            background: black;
            border: 1px solid rgba(255, 255, 255, 0.25);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: white;
            font-weight: bold;
            transition: all 0.3s ease;
            z-index: 1100;
            pointer-events: auto;
        }

        .fullscreen-close img {
            width: 2.5rem;
            height: 2.5rem;
            pointer-events: none;
        }

        .fullscreen-close:hover {
            background: rgba(255, 255, 255, 0.3);
            border-color: rgba(255, 255, 255, 0.8);
            transform: translateX(-50%) scale(1.1);
        }

        .fullscreen-content {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
        }

        .fullscreen-arrows{
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            font-size: 40px;
            color: white;
            cursor: pointer;
            transition: all 0.25s ease;
            z-index: 1099;
            user-select: none;
            background: rgba(0, 0, 0, 0.7);
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            width: 2.5rem;
            height: 2.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            pointer-events: auto;
        }
        .fullscreen-arrows:hover{
            background: rgba(0, 0, 0, 0.9);
            border-color: rgba(255, 255, 255, 0.6);
        }
        .fullscreen-arrows lottie-player { pointer-events: none; }
        .fullscreen-prev{ left: 1rem; }
        .fullscreen-next{ right: 1rem; }

        .timeline-section {
            position: relative;
            overflow: visible;
            border: 1px solid rgba(255,255,255,0.25);
            border-radius: 1rem 2rem 1rem 1rem;
            height: 8rem;
        }

        .timeline-track-wrap {
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .timeline-track {
            position: relative;
            width: 100%;
            height: 100%;
            margin: 0;
            overflow: hidden; /* mask year markers/ticks within track */
            background: rgb(30, 30, 30);
            border-radius: 1rem;
        }

        .timeline-line {
            position: absolute;
            top: 25%;
            left: 0;
            width: calc(100% - 8rem);
            height: 0.4rem;
            background: rgba(255, 255, 255, 0.1);
            justify-self: anchor-center;
        }

        .timeline-event-ticks {
            position: absolute;
            top: 25%;
            left: -50%;
            width: 200%;
            height: 1rem;
            pointer-events: none;
            transition: transform 0.3s ease;
        }

        .month-markers {
            position: absolute;
            top: 25%;
            left: -50%;
            width: 200%;
            height: 1rem;
            pointer-events: none;
            display: flex;
            align-items: center;
            transition: transform 0.3s ease;
        }
        .month-tick {
            position: absolute;
            width: 2px;
            height: 0.5rem;
            background: rgba(255,255,255,0.3);
            transform: translate(-50%, 0);
            box-shadow: 0 0 6px rgba(255,255,255,0.25);
        }

        .timeline-event-tick {
            position: absolute;
            bottom: calc(75% - 1rem);
            width: 2px;
            height: 2rem;
            background: rgba(255,255,255,0.35);
            transform: translateX(-50%);
            transition: background 0.3s ease, height 0.3s ease;
        }

        .timeline-event-tick.active {
            background: #ffd700;
            height: 44px;
        }

        .timeline-dates {
            position: absolute;
            top: calc(75% - 1.5rem);
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            display: flex;
            gap: 0.75rem;
            overflow-x: auto;
            padding-bottom: 0.5rem;
            scroll-snap-type: x proximity;
            -webkit-overflow-scrolling: touch;
            scroll-behavior: smooth;
            cursor: grab;
            touch-action: pan-x;
        }
        .timeline-dates.dragging {
            cursor: grabbing;
        }

        .timeline-dates::-webkit-scrollbar {
            height: 4px;
        }
        .timeline-dates::-webkit-scrollbar-thumb {
            background: #ffd700;
            border-radius: 999px;
        }

        .date-marker {
            position: relative;
            flex: 0 0 auto;
            min-width: 130px;
            text-align: center;
            cursor: pointer;
            scroll-snap-align: center;
            color: #fff;
            border: 1px solid rgba(255,255,255,0.6);
            border-radius: 999px;
            padding: 0.3rem 0.85rem;
            background: rgba(0,0,0,0.35);
            transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
        }

        .date-marker.active {
            color: #ffd700;
            border-color: #ffd700;
            background: rgba(0,0,0,0.55);
        }

        .date-marker .date-text {
            font-size: 0.9rem;
            color: inherit;
            white-space: nowrap;
        }

        .date-marker.active .date-text {
            color: #fff;
            font-weight: bold;
        }

        .navigation-arrows {
            position: absolute;
            top: 0.5rem;
            font-size: 24px;
            color: #aaa;
            cursor: pointer;
            transition: color 0.3s ease;
            z-index: 20;
            border-radius: 2rem;
        }

        .navigation-arrows:hover {
            color: #fff;
        }

        .auto-scroll-toggle {
            position: absolute;
            top: 1rem;
            right: 4.5rem;
            padding: 0.4rem 0.9rem;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.35);
            background: black;
            color: #fff;
            font-size: 0.85rem;
            cursor: pointer;
            transition: background 0.2s ease, border-color 0.2s ease;
            z-index: 25;
        }
        .auto-scroll-toggle:hover {
            background: rgba(255,255,255,0.15);
            border-color: rgba(255,255,255,0.6);
        }
        @media (max-width: 768px) {
            .auto-scroll-toggle {
                display: none;
            }
        }

        .nav-left {
            left: 0.5rem;
        }

        .nav-right {
            right: 0.5rem;
        }

        .event-info {
            position: relative;
            text-align: center;
            z-index: 15;
            max-width: 50ch;
            width: 100%;
            height: auto;
            margin: 0;
            padding: 1.25rem 1rem 1rem;
            overflow: hidden; /* keep decoration clipped */
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            border: 1px solid rgba(255,255,255,0.25);
            border-radius: 1rem;
            background: rgb(30, 30, 30);
        }

        .event-more-button {
            display: none;
            align-self: flex-start;
            background: blue;
            color: white;
            border: 0;
            padding: 0.4rem 0.9rem;
            border-radius: 999px;
            font-size: 0.85rem;
            font-weight: 700;
            cursor: pointer;
        }

        .event-info-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.92);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1200;
            padding: 1.25rem;
        }
        .event-info-pop {
            position: relative;
            width: min(720px, 92vw);
            max-height: 85vh;
            overflow: auto;
            background: #0c0c0c;
            border: 1px solid rgba(255,255,255,0.25);
            border-radius: 1rem;
            padding: 1.5rem 1.25rem 1.25rem;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        .event-info-close {
            position: absolute;
            top: 0.75rem;
            right: 0.75rem;
            background: transparent;
            color: #fff;
            border: 1px solid rgba(255,255,255,0.35);
            border-radius: 999px;
            padding: 0.15rem 0.55rem;
            cursor: pointer;
            font-size: 1rem;
        }
        .event-info-pop-name {
            font-size: 1.35rem;
            font-weight: 700;
        }
        .event-info-pop-description {
            font-size: 0.95rem;
            line-height: 1.5;
            color: #ddd;
            white-space: pre-wrap;
        }
        .event-info-pop-date {
            font-size: 0.9rem;
            color: #aaa;
        }

        .event-info::after {
            content: '';
            position: absolute;
            left: 50%;
            bottom: -1.8rem;
            width: 2px;
            height: 1.8rem;
            background: rgba(255,255,255,0.3);
            transform: translateX(-50%);
        }

        .event-date {
            height:auto;
            font-size: 18px;
            color: #ccc;
            margin-top: auto;
            margin-bottom: 0;
            text-align: left;
            text-align-last: justify;
        }

        .event-name {
            font-size: 24px;
            color: #fff;
            font-weight: bold;
            text-align: left;
        }

        .event-description {
            font-size: 14px;
            color: #ddd;
            line-height: 1.5;
            opacity: 0.9;
            flex: 1 1 auto;
            overflow-y: auto;
            scrollbar-width: thin;
            overscroll-behavior: contain;
            text-align: left;
        }
        .event-description::-webkit-scrollbar {
            width: 4px;
        }
        .event-description::-webkit-scrollbar-thumb {
            background: rgba(255,255,255,0.35);
            border-radius: 999px;
        }

        .year-markers {
            position: absolute;
            top: calc(25% - 2rem);
            width: 200%;
            left: -50%;
            transition: transform 0.3s ease;
            pointer-events: none;
        }

        .year-marker {
            position: absolute;
            transform: translateX(-50%);
            text-align: center;
            font-size: 2rem;
            color: #888;
            font-weight: 600;
            transition: color 0.3s ease, transform 0.3s ease, font-size 0.3s ease;
        }
        .year-marker::after {
            content: '';
            display: block;
            width: 2px;
            height: 2rem;
            margin: 0.15rem auto 0;
            background: rgba(255,255,255,0.35);
        }
        .year-marker.active {
            color: #fff;
            font-size: 20px;
        }
        .year-marker.active::after {
            background: rgba(255,255,255,0.35);
            height: 2rem;
        }

        @media (min-width: 769px) {
            .year-marker {
                font-size: 1.25rem;
            }
            .year-marker.active {
                font-size: 1.5rem;
            }
        }

        #current-media{
            height:100%;
        }

        /* Responsive design */
        @media (max-width: 768px) {
            body {
                overflow-y: auto;
                height: auto;
            }

            .timeline-container {
                height: calc(100vh - 7rem);
                min-height: calc(100vh - 7rem);
            }

            .media-container {
                width: 100%;
                height: 100%;
            }

            .slide-arrows {
                font-size: 24px;
            }

            .slide-prev {
                left: 0.5rem;
                font-size: 30px;
                width: 50px;
                height: 50px;
            }

            .slide-next {
                right: 0.5rem;
                font-size: 30px;
                width: 50px;
                height: 50px;
            }

            .event-name {
                font-size: 20px;
            }

            .slideshow-controls {
                bottom: 1rem;
            }

            .year-marker {
                font-size: 12px;
            }
            .year-marker.active {
                font-size: 16px;
            }
            .year-marker::after {
                height: 18px;
            }
            .year-marker.active::after {
                height: 26px;
            }

            .timeline-section {
                border-radius: 1rem;
            }

            .timeline-track-wrap {
                width: 100%;
            }
            .timeline-dates {
                width: 100%;
                gap: 0.5rem;
            }

            .main-image {
                height: 50vh;
            }

            .date-marker {
                min-width: 100px;
                padding: 0.25rem 0.65rem;
            }
            .date-marker .date-text {
                font-size: 0.75rem;
            }
            .event-info {
                padding: 1rem 1rem 0.8rem 1rem;
                border-radius: 1rem;
                height: 8rem;
            }
            .event-description {
                display: none;
            }
            .event-more-button {
                display: inline-flex;
            }
            .media-content img,
            .media-content video {
                object-fit: contain;
            }
        }

        @media (min-width: 1024px) {
            .media-info-row {
                flex-direction: row;
                align-items: stretch;
                max-height:calc(100dvh - 18rem);
            }
            .main-image {
                flex: 1.3 1 0;
                max-height: none;
            }
            .event-info {
                flex: 1 1 0;
                align-self: stretch;
                padding: 1.25rem;
            }
            .timeline-section {
                flex: 0 0 auto;
            }
        }
    
