/* Deep Time Whispers - Vertical Timeline CSS */

/* Container */
.vertical-timeline {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.vertical-timeline.loaded {
    opacity: 1;
}

/* Header */
.timeline-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(123, 31, 162, 0.1), rgba(77, 182, 172, 0.1));
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.timeline-header h1 {
    font-family: 'Crimson Text', serif;
    font-size: 48px;
    color: #fff;
    margin: 0 0 10px 0;
}

.timeline-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    margin-bottom: 30px;
}

/* Controls */
.timeline-controls {
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(167, 139, 250, 0.5);
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.3);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.filter-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: rgba(167, 139, 250, 0.2);
    border-color: rgba(167, 139, 250, 0.5);
    color: #a78bfa;
}

/* Timeline Track */
.timeline-track-vertical {
    position: relative;
    height: calc(100vh - 400px);
    min-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px 0;
}

.timeline-track-vertical::-webkit-scrollbar {
    width: 8px;
}

.timeline-track-vertical::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.timeline-track-vertical::-webkit-scrollbar-thumb {
    background: rgba(167, 139, 250, 0.3);
    border-radius: 4px;
}

.timeline-track-vertical::-webkit-scrollbar-thumb:hover {
    background: rgba(167, 139, 250, 0.5);
}

/* Central Timeline Line - now using ::before pseudo-element */

/* Events Container */
.timeline-events {
    position: relative;
    padding: 20px 0;
    min-height: 100%;
}

/* Timeline line positioned within events container */
.timeline-events::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        180deg,
        rgba(167, 139, 250, 0.8) 0%,
        rgba(77, 182, 172, 0.8) 100%
    );
    transform: translateX(-50%);
    z-index: 1;
}

/* Eon Dividers */
.eon-divider {
    position: relative;
    height: 60px;
    margin: 40px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
}

.eon-name {
    background: rgba(10, 14, 39, 0.9);
    padding: 10px 30px;
    border-radius: 30px;
    font-family: 'Crimson Text', serif;
    font-size: 24px;
    color: #fff;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Event Elements */
.timeline-event {
    position: relative;
    margin: 30px 0;
    display: flex;
    align-items: center;
    opacity: 0;
    animation: fadeIn 0.6s forwards;
}

.timeline-event.left {
    justify-content: flex-end;
    padding-right: calc(50% + 30px);
}

.timeline-event.right {
    justify-content: flex-start;
    padding-left: calc(50% + 30px);
}

/* Event Connector */
.event-connector {
    position: absolute;
    width: 40px;
    height: 2px;
    top: 50%;
    transform: translateY(-50%);
}

.timeline-event.left .event-connector {
    right: calc(50% - 20px);
}

.timeline-event.right .event-connector {
    left: calc(50% - 20px);
}

.event-connector::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: inherit;
    top: 50%;
    transform: translateY(-50%);
}

.timeline-event.left .event-connector::after {
    right: -6px;
}

.timeline-event.right .event-connector::after {
    left: -6px;
}

/* Event Cards */
.event-card-vertical {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    max-width: 400px;
    width: 100%;
}

.event-card-vertical:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(167, 139, 250, 0.3);
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Time Marker */
.time-marker {
    margin-bottom: 15px;
}

.time-value {
    color: #a78bfa;
    font-size: 14px;
    font-weight: 600;
}

.time-period {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin-left: 10px;
}

/* Event Content */
.event-content h3 {
    font-family: 'Crimson Text', serif;
    font-size: 22px;
    color: #fff;
    margin: 0 0 10px 0;
}

.event-content p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0 0 15px 0;
}

/* Event Meta */
.event-meta {
    display: flex;
    gap: 15px;
    align-items: center;
}

.event-type {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.event-type.catastrophe { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.event-type.evolution { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.event-type.extinction { background: rgba(220, 38, 38, 0.2); color: #dc2626; }
.event-type.origin { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.event-type.climate { background: rgba(139, 92, 246, 0.2); color: #8b5cf6; }
.event-type.geological { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }

.podcast-indicator {
    color: #a78bfa;
    font-size: 14px;
}

/* Time Indicator */
.time-indicator {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(10, 14, 39, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 15px 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.time-indicator .time-value {
    display: block;
    margin-bottom: 8px;
}

.time-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.time-progress::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #a78bfa, #4db6ac);
    transition: width 0.3s ease;
}

/* Event Detail Panel */
.event-detail-panel {
    position: fixed;
    top: 0;
    right: -500px;
    width: 500px;
    height: 100vh;
    background: linear-gradient(135deg, #0a0e27, #1a237e);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    padding: 40px;
}

.event-detail-panel.active {
    right: 0;
}

.close-detail {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.close-detail:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.detail-header {
    padding-left: 20px;
    margin-bottom: 30px;
}

.detail-type {
    display: inline-block;
    margin-bottom: 15px;
}

.detail-header h2 {
    font-family: 'Crimson Text', serif;
    font-size: 32px;
    color: #fff;
    margin: 0 0 15px 0;
}

.detail-meta {
    display: flex;
    gap: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    flex-wrap: wrap;
}

.detail-description {
    margin-bottom: 30px;
}

.detail-description p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    font-size: 16px;
}

.detail-context {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.detail-context h3 {
    color: #a78bfa;
    margin: 0 0 10px 0;
}

.detail-context p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.6;
}

/* Environmental Conditions */
.environmental-conditions {
    background: rgba(77, 182, 172, 0.1);
    border: 1px solid rgba(77, 182, 172, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.environmental-conditions h3 {
    color: #4db6ac;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.conditions-grid {
    display: grid;
    gap: 12px;
}

.condition-item {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.5;
}

.condition-item strong {
    color: #4db6ac;
}

/* What Lived Here */
.what-lived-here {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.what-lived-here h3 {
    color: #10b981;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.what-lived-here p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
}

/* Time Comparison */
.time-comparison {
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.time-comparison h3 {
    color: #a78bfa;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.time-comparison p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

.detail-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: rgba(167, 139, 250, 0.2);
    border: 1px solid rgba(167, 139, 250, 0.5);
    color: #a78bfa;
}

.btn-primary:hover {
    background: rgba(167, 139, 250, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .timeline-header h1 {
        font-size: 32px;
    }
    
    .timeline-event.left,
    .timeline-event.right {
        padding: 0 20px;
        justify-content: center;
    }
    
    .event-connector {
        display: none;
    }
    
    .timeline-line {
        display: none;
    }
    
    .timeline-events::before {
        display: none;
    }
    
    .event-card-vertical {
        max-width: 100%;
    }
    
    .event-detail-panel {
        width: 100%;
        right: -100%;
    }
    
    .time-indicator {
        bottom: 20px;
        right: 20px;
        padding: 10px 20px;
    }
}

/* Loading State */
.timeline-loading {
    text-align: center;
    padding: 100px 20px;
    color: rgba(255, 255, 255, 0.5);
}

/* Error State */
.timeline-error {
    text-align: center;
    padding: 100px 20px;
}

.timeline-error h2 {
    color: #ef4444;
    margin-bottom: 20px;
}

.timeline-error p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
}

.timeline-error button {
    padding: 12px 30px;
    background: rgba(167, 139, 250, 0.2);
    border: 1px solid rgba(167, 139, 250, 0.5);
    color: #a78bfa;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s;
}

.timeline-error button:hover {
    background: rgba(167, 139, 250, 0.3);
    transform: translateY(-2px);
}

/* Spacing fix - add top padding to prevent content sitting under navigation */
.vertical-timeline {
    padding-top: 160px; /* Increased for wrapped navigation on mobile */
}

/* Mobile spacing adjustment */
@media (max-width: 768px) {
    .vertical-timeline {
        padding-top: 160px; /* Increased for wrapped navigation on mobile */
    }
}