.timeline {
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(to bottom, #f093fb, #667eea, #4facfe);
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-item {
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
    margin-bottom: 4rem;
}

.timeline-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.timeline-content {
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: calc(50% + 2rem);
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: calc(50% + 2rem);
    text-align: left;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f093fb, #667eea);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    z-index: 2;
    box-shadow: 0 0 20px rgba(240, 147, 251, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-marker:hover {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 0 30px rgba(240, 147, 251, 0.8);
}

.timeline-card {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(240, 147, 251, 0.2);
    position: relative;
    transition: all 0.3s ease;
}

.timeline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(240, 147, 251, 0.4);
}

.timeline-card::before {
    content: "";
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border: 15px solid transparent;
}

.timeline-item:nth-child(odd) .timeline-card::before {
    right: -30px;
    border-left-color: #fff;
    transform: translateY(-50%);
}

.timeline-item:nth-child(even) .timeline-card::before {
    left: -30px;
    border-right-color: #fff;
    transform: translateY(-50%);
}

.memory-photo {
    width: 100%;
    height: 200px;
    border-radius: 15px;
    background: linear-gradient(45deg, #f093fb, #667eea);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: #fff;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.memory-photo::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Floating hearts */
#floating-hearts {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.heart {
    position: absolute;
    color: rgba(240, 147, 251, 0.6);
    font-size: 20px;
    animation: float-heart 8s infinite linear;
}

@keyframes float-heart {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .timeline::before {
        left: 2rem;
    }

    .timeline-marker {
        left: 2rem;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 5rem;
        margin-right: 1rem;
        text-align: left;
    }

    .timeline-item:nth-child(odd) .timeline-card::before,
    .timeline-item:nth-child(even) .timeline-card::before {
        left: -30px;
        right: auto;
        border-left-color: transparent;
        border-right-color: #fff;
    }
}
