/* timeline.css - Fixed z-index and floating effect */
.timeline-section {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 15;
    overflow: visible !important;
    background: transparent !important;
}

.timeline-section.show {
    display: block;
}

#timelineCanvas {
    position: fixed !important;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: auto !important;
    image-rendering: optimizeQuality;
}

.timeline-section * {
    pointer-events: auto !important;
}

.timeline-content {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9;
    display: block;
    overflow: visible !important;
    padding: 0;
    background: transparent !important;
    opacity: 0;
    clip-path: circle(0% at 50% 50%);
    transition: opacity 0.5s ease;
}

.timeline-content.active {
    opacity: 1;
    animation: fadeIn 1s ease-out;
}

.close-button {
    position: fixed;
    top: 20px; right: 20px;
    width: 40px; height: 40px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(20, 20, 40, 0.8);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(78, 84, 200, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.close-button.visible {
    opacity: 1;
}

.instruction {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    color: #fff;
    font-size: 1.5rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: pulse 2s infinite;
}
.instruction.visible {
    opacity: 1;
}

.energy-counter {
    position: fixed;
    bottom: 20px; left: 20px;
    z-index: 20;
    color: rgba(160, 160, 255, 1);
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 20px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.energy-counter.visible {
    opacity: 1;
}

.blackhole-center {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10; /* Reduced from 10 to 5 to be behind timeline content */
    width: 0; height: 0;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.5s ease-out;
    background: radial-gradient(circle, #000 40%, #222 70%, #444 90%);
    box-shadow: 0 0 60px 30px rgba(30, 144, 255, 0.7),
                0 0 100px 60px rgba(255, 140, 0, 0.5);
    animation: blackhole-pulse 2s infinite;
}
.blackhole-center.visible {
    opacity: 1;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes blackhole-pulse {
    0% {
        box-shadow: 0 0 60px 30px rgba(30, 144, 255, 0.7),
                    0 0 100px 60px rgba(255, 140, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 80px 40px rgba(30, 144, 255, 0.8),
                    0 0 120px 70px rgba(255, 140, 0, 0.6);
    }
    100% {
        box-shadow: 0 0 60px 30px rgba(30, 144, 255, 0.7),
                    0 0 100px 60px rgba(255, 140, 0, 0.5);
    }
}

@keyframes pulse {
    0%   { transform: translate(-50%, -50%) scale(1); }
    50%  { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); }
}