/* Timeline Styles - Purple Neomorphism Theme */

:root {
    --primary-color: #8b5cf6;
    --primary-color-dark: #7c3aed;
    --secondary-color: #64748b;
    --background-color: #f8fafc;
    --text-color: #1e293b;
    --neomorphism-light: #ffffff;
    --neomorphism-shadow: rgba(163, 177, 198, 0.4);
}

body {
    background: var(--background-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.timeline-container {
    background: #f0f2f5;
    border-radius: 25px;
    padding: 2rem;
    box-shadow: 
        8px 8px 16px var(--neomorphism-shadow),
        -8px -8px 16px var(--neomorphism-light);
    margin: 2rem 0;
}

.timeline-container h2 {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}

.timeline-wrapper {
    position: relative;
    padding: 3rem 2rem;
    min-height: 200px;
}

.timeline-track {
    position: absolute;
    top: 50%;
    left: 2rem;
    right: 2rem;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-color-dark));
    border-radius: 2px;
    transform: translateY(-50%);
    z-index: 1;
}

.timeline-item {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-point {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: #f0f2f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--neomorphism-light);
    box-shadow: 
        6px 6px 12px var(--neomorphism-shadow),
        -6px -6px 12px var(--neomorphism-light);
    position: relative;
    z-index: 3;
}

.timeline-point i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.timeline-content {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 15px;
    padding: 1rem;
    min-width: 180px;
    max-width: 220px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 
        4px 4px 8px var(--neomorphism-shadow),
        -4px -4px 8px var(--neomorphism-light);
}

.timeline-item:hover .timeline-content {
    opacity: 1;
    visibility: visible;
}

.timeline-content:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.2);
}

.timeline-content h5 {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: var(--text-color);
}

.badge {
    background: #f0f2f5;
    border: none;
    border-radius: 12px;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-color);
    box-shadow: 
        3px 3px 6px var(--neomorphism-shadow),
        -3px -3px 6px var(--neomorphism-light);
    margin-right: 0.5rem;
}

.vote-info {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.vote-info i {
    color: var(--primary-color);
}

/* Status-specific styling */
.timeline-item[data-status="completed"] .timeline-point {
    background: rgba(139, 92, 246, 0.1);
}

.timeline-item[data-status="completed"] .timeline-point i {
    color: var(--primary-color);
}

.timeline-item[data-status="in_progress"] .timeline-point {
    background: rgba(139, 92, 246, 0.1);
    animation: pulse 2s infinite;
}

.timeline-item[data-status="planned"] .timeline-point {
    background: rgba(139, 92, 246, 0.05);
}

.timeline-item[data-status="idea"] .timeline-point {
    background: rgba(139, 92, 246, 0.03);
}

@keyframes pulse {
    0% {
        box-shadow: 
            6px 6px 12px var(--neomorphism-shadow),
            -6px -6px 12px var(--neomorphism-light),
            0 0 0 0 rgba(139, 92, 246, 0.4);
    }
    70% {
        box-shadow: 
            6px 6px 12px var(--neomorphism-shadow),
            -6px -6px 12px var(--neomorphism-light),
            0 0 0 10px rgba(139, 92, 246, 0);
    }
    100% {
        box-shadow: 
            6px 6px 12px var(--neomorphism-shadow),
            -6px -6px 12px var(--neomorphism-light),
            0 0 0 0 rgba(139, 92, 246, 0);
    }
}

/* Clustered Timeline Styles */
.timeline-cluster {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-cluster-point {
    position: relative;
    width: 80px;
    height: 80px;
    background: #f0f2f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        8px 8px 16px var(--neomorphism-shadow),
        -8px -8px 16px var(--neomorphism-light);
}

.timeline-cluster-point i {
    font-size: 1.8rem;
    color: var(--primary-color);
    z-index: 1;
}

.cluster-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #f0f2f5;
    box-shadow: 
        4px 4px 8px var(--neomorphism-shadow),
        -2px -2px 4px var(--neomorphism-light);
}

.timeline-cluster-content {
    background: #f0f2f5;
    border: none;
    border-radius: 20px;
    padding: 1.5rem;
    min-width: 320px;
    max-width: 380px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    position: absolute;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 
        8px 8px 16px var(--neomorphism-shadow),
        -8px -8px 16px var(--neomorphism-light);
}

.timeline-cluster:hover .timeline-cluster-content {
    opacity: 1;
    visibility: visible;
}

.timeline-cluster:hover .timeline-cluster-point {
    transform: translateY(-3px);
    box-shadow: 
        10px 10px 20px var(--neomorphism-shadow),
        -10px -10px 20px var(--neomorphism-light);
}

.cluster-stats {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 0.75rem 0;
    flex-wrap: wrap;
}

.cluster-features {
    margin-top: 1rem;
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
}

.cluster-feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.cluster-feature-item:last-child {
    border-bottom: none;
}

.cluster-feature-item i {
    color: var(--primary-color);
    font-size: 1rem;
}

.cluster-feature-item .vote-count-with-heart {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
}

.cluster-feature-item .vote-count-with-heart i {
    font-size: 0.7rem;
    color: var(--primary-color);
}

.cluster-feature-item .vote-number {
    font-weight: 600;
    color: var(--primary-color);
}

.cluster-feature-item.timeline-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.cluster-feature-item.timeline-clickable:hover {
    background: rgba(139, 92, 246, 0.15);
    transform: translateX(3px);
    border-radius: 8px;
    margin: 0 -0.5rem;
    padding: 0.25rem 0.5rem;
}

.cluster-feature-item .feature-title-span {
    flex: 1;
    color: var(--text-color);
    font-weight: 500;
    margin-right: 0.5rem;
}

.timeline-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.timeline-controls .btn {
    background: #f0f2f5;
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--primary-color);
    font-size: 0.8rem;
    border-radius: 8px;
    box-shadow: 
        2px 2px 4px var(--neomorphism-shadow),
        -2px -2px 4px var(--neomorphism-light);
    transition: all 0.3s ease;
}

.timeline-controls .btn:hover {
    background: rgba(139, 92, 246, 0.1);
    transform: translateY(-1px);
    box-shadow: 
        3px 3px 6px var(--neomorphism-shadow),
        -3px -3px 6px var(--neomorphism-light);
}

/* Responsive Design - Hide timeline on mobile */
@media (max-width: 768px) {
    .timeline-container {
        display: none;
    }
}