/* Timeline Glass Design Styles */

/* Timeline Section */
.timeline-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 4rem 0;
    min-height: 60vh;
}

.timeline-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Loading State */
.timeline-loading {
    text-align: center;
    color: white;
    padding: 4rem 2rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #42a5f5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.glass-vertical-design .timeline-event {
    margin-left: 4rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    opacity: 0;
    transform: translateY(50px) translateX(-20px);
    animation: slideInGlass 0.8s ease-out forwards;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

/* Ensure first and last events have adequate spacing for glow effects */
.glass-vertical-design .timeline-event:first-child {
    margin-top: 2rem; /* Extra top margin for first event glow */
}

.glass-vertical-design .timeline-event:last-child {
    margin-bottom: 4rem; /* Extra bottom margin for last event glow */
}

.glass-vertical-design .timeline-event:hover {
    transform: translateY(-8px) translateX(5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(66, 165, 245, 0.3);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(66, 165, 245, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Milestone cards always highlighted with sentiment color */
.glass-vertical-design .timeline-event.positive.milestone {
    border-color: rgba(76, 175, 80, 0.4);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 8px rgba(76, 175, 80, 0.6),
        0 0 16px rgba(76, 175, 80, 0.4),
        0 0 24px rgba(76, 175, 80, 0.2),
        0 0 32px rgba(76, 175, 80, 0.1),
        0 0 40px rgba(76, 175, 80, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Positive Event Glow Effects */
.glass-vertical-design .timeline-event.positive:hover {
    border-color: rgba(76, 175, 80, 0.4);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 8px rgba(76, 175, 80, 0.6),
        0 0 16px rgba(76, 175, 80, 0.4),
        0 0 24px rgba(76, 175, 80, 0.2),
        0 0 32px rgba(76, 175, 80, 0.1),
        0 0 40px rgba(76, 175, 80, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.glass-vertical-design .timeline-event.positive.selected {
    border-color: rgba(76, 175, 80, 0.6);
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.6),
        0 0 12px rgba(76, 175, 80, 0.7),
        0 0 24px rgba(76, 175, 80, 0.5),
        0 0 36px rgba(76, 175, 80, 0.3),
        0 0 48px rgba(76, 175, 80, 0.15),
        0 0 60px rgba(76, 175, 80, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Milestone cards always highlighted with sentiment color */
.glass-vertical-design .timeline-event.negative.milestone {
    border-color: rgba(244, 67, 54, 0.4);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 8px rgba(244, 67, 54, 0.6),
        0 0 16px rgba(244, 67, 54, 0.4),
        0 0 24px rgba(244, 67, 54, 0.2),
        0 0 32px rgba(244, 67, 54, 0.1),
        0 0 40px rgba(244, 67, 54, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Negative Event Glow Effects */
.glass-vertical-design .timeline-event.negative:hover {
    border-color: rgba(244, 67, 54, 0.4);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 8px rgba(244, 67, 54, 0.6),
        0 0 16px rgba(244, 67, 54, 0.4),
        0 0 24px rgba(244, 67, 54, 0.2),
        0 0 32px rgba(244, 67, 54, 0.1),
        0 0 40px rgba(244, 67, 54, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.glass-vertical-design .timeline-event.negative.selected {
    border-color: rgba(244, 67, 54, 0.6);
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.6),
        0 0 12px rgba(244, 67, 54, 0.7),
        0 0 24px rgba(244, 67, 54, 0.5),
        0 0 36px rgba(244, 67, 54, 0.3),
        0 0 48px rgba(244, 67, 54, 0.15),
        0 0 60px rgba(244, 67, 54, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Milestone cards always highlighted with sentiment color */
.glass-vertical-design .timeline-event.neutral.milestone {
    border-color: rgba(33, 150, 243, 0.4);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 8px rgba(33, 150, 243, 0.6),
        0 0 16px rgba(33, 150, 243, 0.4),
        0 0 24px rgba(33, 150, 243, 0.2),
        0 0 32px rgba(33, 150, 243, 0.1),
        0 0 40px rgba(33, 150, 243, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Neutral Event Glow Effects */
.glass-vertical-design .timeline-event.neutral:hover {
    border-color: rgba(33, 150, 243, 0.4);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 8px rgba(33, 150, 243, 0.6),
        0 0 16px rgba(33, 150, 243, 0.4),
        0 0 24px rgba(33, 150, 243, 0.2),
        0 0 32px rgba(33, 150, 243, 0.1),
        0 0 40px rgba(33, 150, 243, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.glass-vertical-design .timeline-event.neutral.selected {
    border-color: rgba(33, 150, 243, 0.6);
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.6),
        0 0 12px rgba(33, 150, 243, 0.7),
        0 0 24px rgba(33, 150, 243, 0.5),
        0 0 36px rgba(33, 150, 243, 0.3),
        0 0 48px rgba(33, 150, 243, 0.15),
        0 0 60px rgba(33, 150, 243, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.glass-vertical-design .timeline-event::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(66, 165, 245, 0.5) 50%, 
        transparent
    );
}

/* Glass Horizontal Design */
.glass-horizontal-design {
    max-width: 100%;
    position: relative;
    overflow: hidden;
}

.glass-horizontal-design .timeline-scroll {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2rem 5rem; /* Increase horizontal padding to prevent glow cutoff */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Better iOS scroll */
}
/* Milestone cards always highlighted with sentiment color */
.glass-horizontal-design .timeline-event.positive.milestone {
    border-color: rgba(76, 175, 80, 0.4);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(76, 175, 80, 0.4),
        0 0 6px rgba(76, 175, 80, 0.7),
        0 0 12px rgba(76, 175, 80, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    filter: drop-shadow(0 0 10px rgba(76, 175, 80, 0.4));
}

/* Horizontal Positive Event Glow Effects */
.glass-horizontal-design .timeline-event.positive:hover {
    border-color: rgba(76, 175, 80, 0.4);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(76, 175, 80, 0.4),
        0 0 6px rgba(76, 175, 80, 0.7),
        0 0 12px rgba(76, 175, 80, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    filter: drop-shadow(0 0 10px rgba(76, 175, 80, 0.4));
}

.glass-horizontal-design .timeline-event.positive.selected {
    border-color: rgba(76, 175, 80, 0.6);
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(76, 175, 80, 0.5),
        0 0 8px rgba(76, 175, 80, 0.8),
        0 0 16px rgba(76, 175, 80, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    filter: drop-shadow(0 0 14px rgba(76, 175, 80, 0.5));
}

/* Milestone cards always highlighted with sentiment color */
.glass-horizontal-design .timeline-event.negative.milestone {
    border-color: rgba(244, 67, 54, 0.4);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(244, 67, 54, 0.4),
        0 0 6px rgba(244, 67, 54, 0.7),
        0 0 12px rgba(244, 67, 54, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    filter: drop-shadow(0 0 10px rgba(244, 67, 54, 0.4));
}

/* Horizontal Negative Event Glow Effects */
.glass-horizontal-design .timeline-event.negative:hover {
    border-color: rgba(244, 67, 54, 0.4);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(244, 67, 54, 0.4),
        0 0 6px rgba(244, 67, 54, 0.7),
        0 0 12px rgba(244, 67, 54, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    filter: drop-shadow(0 0 10px rgba(244, 67, 54, 0.4));
}

.glass-horizontal-design .timeline-event.negative.selected {
    border-color: rgba(244, 67, 54, 0.6);
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(244, 67, 54, 0.5),
        0 0 8px rgba(244, 67, 54, 0.8),
        0 0 16px rgba(244, 67, 54, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    filter: drop-shadow(0 0 14px rgba(244, 67, 54, 0.5));
}

/* Milestone cards always highlighted with sentiment color */
.glass-horizontal-design .timeline-event.neutral.milestone {
    border-color: rgba(33, 150, 243, 0.4);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(33, 150, 243, 0.4),
        0 0 6px rgba(33, 150, 243, 0.7),
        0 0 12px rgba(33, 150, 243, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    filter: drop-shadow(0 0 10px rgba(33, 150, 243, 0.4));
}

/* Horizontal Neutral Event Glow Effects */
.glass-horizontal-design .timeline-event.neutral:hover {
    border-color: rgba(33, 150, 243, 0.4);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(33, 150, 243, 0.4),
        0 0 6px rgba(33, 150, 243, 0.7),
        0 0 12px rgba(33, 150, 243, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    filter: drop-shadow(0 0 10px rgba(33, 150, 243, 0.4));
}

.glass-horizontal-design .timeline-event.neutral.selected {
    border-color: rgba(33, 150, 243, 0.6);
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(33, 150, 243, 0.5),
        0 0 8px rgba(33, 150, 243, 0.8),
        0 0 16px rgba(33, 150, 243, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    filter: drop-shadow(0 0 14px rgba(33, 150, 243, 0.5));
}

.glass-horizontal-design .timeline-event::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(66, 165, 245, 0.5) 50%, 
        transparent
    );
}

/* Horizontal Navigation Controls */
.horizontal-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 1.2rem;
}

.nav-btn:hover {
    background: rgba(66, 165, 245, 0.2);
    border-color: rgba(66, 165, 245, 0.4);
    transform: scale(1.1);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.progress-indicator {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.progress-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.progress-dot.active {
    background: #42a5f5;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(66, 165, 245, 0.6);
}

/* Sentiment-specific progress dot colors */
.progress-dot.positive.active {
    background: rgba(76, 175, 80, 1);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.6);
}

.progress-dot.negative.active {
    background: rgba(244, 67, 54, 1);
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.6);
}

.progress-dot.neutral.active {
    background: rgba(33, 150, 243, 1);
    box-shadow: 0 0 10px rgba(33, 150, 243, 0.6);
}

/* Common Event Styles */
.timeline-event {
    color: white;
}

.event-date {
    font-size: 0.9rem;
    color: rgba(66, 165, 245, 0.8);
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.event-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    padding-bottom: 3rem; /* Add space for absolutely positioned link button */
}

.event-link {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #42a5f5;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(66, 165, 245, 0.1);
    border: 1px solid rgba(66, 165, 245, 0.2);
    /* Remove tap highlight on mobile */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.event-link:hover {
    color: white;
    background: rgba(66, 165, 245, 0.2);
    border-color: rgba(66, 165, 245, 0.4);
    transform: translateY(-1px);
}

.event-link:active {
    transform: translateY(0);
}

/* Animations */
@keyframes slideInGlass {
    0% {
        opacity: 0;
        transform: translateY(50px) translateX(-20px);
    }
    60% {
        opacity: 0.8;
        transform: translateY(-5px) translateX(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

@keyframes snapInGlass {
    0% {
        opacity: 0;
        transform: scale(0.8) rotateY(15deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05) rotateY(-2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 
            0 0 15px rgba(66, 165, 245, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 
            0 0 25px rgba(66, 165, 245, 0.8),
            0 0 35px rgba(66, 165, 245, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
}

@keyframes glowPulseGreen {
    0%, 100% {
        box-shadow: 
            0 0 15px rgba(76, 175, 80, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 
            0 0 25px rgba(76, 175, 80, 0.8),
            0 0 35px rgba(76, 175, 80, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
}

@keyframes glowPulseRed {
    0%, 100% {
        box-shadow: 
            0 0 15px rgba(244, 67, 54, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 
            0 0 25px rgba(244, 67, 54, 0.8),
            0 0 35px rgba(244, 67, 54, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
}

/* Error State */
.timeline-error {
    text-align: center;
    color: white;
    padding: 4rem 2rem;
}

.timeline-error h3 {
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.timeline-error button {
    background: #42a5f5;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.timeline-error button:hover {
    background: #2196f3;
    transform: translateY(-1px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .design-buttons {
        gap: 0.5rem;
    }
    
    .design-btn {
        min-width: 100px;
        padding: 0.8rem 1rem;
    }
    
    .btn-text {
        font-size: 0.8rem;
    }
    
    .glass-vertical-design::before {
        left: 1rem;
    }
    
    .glass-vertical-design .timeline-event {
        margin-left: 1rem;
        margin-right: 1rem;
        padding: 1.5rem;
    }
    
    .glass-vertical-design .timeline-event::before {
        left: -2rem;
    }
    
    .glass-horizontal-design .timeline-event {
        min-width: 300px;
        padding: 1.5rem;
    }
    
    .event-link {
        bottom: 1.5rem;
        right: 1.5rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .timeline-section {
        padding: 2rem 0;
    }
}

@media (max-width: 480px) {
    .timeline-container {
        padding: 0 0.5rem;
    }
    
    .glass-horizontal-design .timeline-event {
        min-width: 280px;
        padding: 1.25rem;
    }
    
    .event-title {
        font-size: 1.2rem;
    }
    
    .event-description {
        font-size: 0.9rem;
    }
    
    .event-link {
        bottom: 1.25rem;
        right: 1.25rem;
        padding: 0.4rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .selector-title {
        font-size: 1.3rem;
    }
}

/* Mobile Portrait Optimization - Wider cards with 1rem padding */
@media (max-width: 768px) and (orientation: portrait) {
    .glass-vertical-design .timeline-event {
        margin-left: 1rem;
        margin-right: 1rem;
        margin-bottom: 1rem;
    }
    
    .glass-vertical-design .timeline-event:first-child {
        margin-top: 1rem;
    }
    
    .glass-vertical-design .timeline-event:last-child {
        margin-bottom: 1rem;
    }
}

/* Mobile Landscape Optimization - Full screen cards with snap scrolling */
@media (max-height: 500px) and (orientation: landscape) {
    .glass-horizontal-design {
        padding: 0;
        height: 100vh;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        position: relative;
        z-index: 10;
    }
    
    .glass-horizontal-design .timeline-scroll {
        padding: 1.5rem 4rem;
        gap: 2.5rem;
        flex: 1;
        align-items: center;
        scroll-snap-type: x mandatory;
        height: 100vh;
        min-height: 100vh;
    }
    
    .glass-horizontal-design .timeline-event {
        width: calc(100vw - 8rem);
        max-width: calc(100vw - 8rem);
        min-width: calc(100vw - 8rem);
        padding: 1.5rem 2rem 4.5rem 2rem;
        border-radius: 16px;
        height: calc(80vh - 3rem);
        max-height: calc(80vh - 3rem);
        min-height: calc(80vh - 3rem);
        scroll-snap-align: center;
        scroll-snap-stop: always;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        overflow: hidden;
        margin: 0;
        position: relative;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    
    .glass-horizontal-design .timeline-event > * {
        flex-shrink: 0;
    }
    
    .glass-horizontal-design .event-description {
        flex-shrink: 1;
        overflow-y: auto;
        overflow-x: hidden;
        margin-bottom: 0;
        padding-bottom: 1rem;
    }
    
    .event-date {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    .event-title {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .event-description {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 1rem;
        padding-right: 0.5rem;
    }
    
    .event-link {
        position: absolute;
        bottom: 1.5rem;
        right: 2rem;
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
        flex-shrink: 0;
    }
    
    /* Hide horizontal nav bar in landscape */
    .horizontal-nav {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Also hide progress indicator in landscape */
    .progress-indicator {
        display: none !important;
    }
    
    .progress-dot {
        display: none !important;
    }
    
    .timeline-section {
        padding: 0;
        min-height: 100vh;
        height: 100vh;
        overflow: hidden;
        position: relative;
        z-index: 10;
    }
    
    /* Show player navigation in landscape - move to bottom left of card */
    .timeline-player-nav {
        display: flex !important;
        flex-direction: row !important;
        position: fixed !important;
        left: 2rem !important;
        bottom: 1.5rem !important;
        top: auto !important;
        right: auto !important;
        transform: none !important;
        z-index: 1000;
        gap: 0.5rem;
    }
    
    .timeline-player-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
}



/* Music Player Style Navigation Controls */
.timeline-player-nav {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(30, 40, 60, 0.25);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 2rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2), 0 2px 12px 0 rgba(0,0,0,0.1);
}

.timeline-player-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    outline: none;
    position: relative;
    overflow: hidden;
}

.timeline-player-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.timeline-player-btn span {
    position: relative;
    z-index: 1;
    pointer-events: none;
    line-height: 1;
}

.timeline-player-btn:hover,
.timeline-player-btn:focus {
    background: rgba(66, 165, 245, 0.2);
    border-color: rgba(66, 165, 245, 0.4);
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(66, 165, 245, 0.3);
}

.timeline-player-btn:hover::before,
.timeline-player-btn:focus::before {
    opacity: 1;
}

.timeline-player-btn:active {
    transform: scale(0.95);
}

.timeline-player-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255,255,255,0.08);
}

.timeline-player-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Responsive adjustments for player navigation controls */
@media (max-width: 768px) {
    .timeline-player-nav {
        bottom: 1.5rem;
        right: 1rem;
        gap: 0.4rem;
        padding: 0.4rem;
    }
    
    .timeline-player-btn {
        width: 2.8rem;
        height: 2.8rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .timeline-player-nav {
        bottom: 1rem;
        right: 0.5rem;
        gap: 0.3rem;
        padding: 0.3rem;
    }
    
    .timeline-player-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
}

/* Accessibility - hide all focus outlines by default */
.design-btn:focus,
.timeline-event:focus,
.nav-btn:focus,
.event-link:focus {
    outline: none !important;
}

/* Show focus outline only when using keyboard navigation */
.design-btn:focus-visible,
.timeline-event:focus-visible,
.nav-btn:focus-visible,
.event-link:focus-visible {
    outline: 2px solid rgba(66, 165, 245, 0.8) !important;
    outline-offset: 2px;
}

/* Extra measure: remove outline on active state */
.event-link:active,
.event-link:focus:active {
    outline: none !important;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .timeline-event {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .loading-spinner {
        animation: none;
    }
    
    .glass-horizontal-design .timeline-scroll {
        scroll-behavior: auto;
    }
    
    * {
        transition: none !important;
        animation: none !important;
    }
}
