.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(2, 8, 20, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--nasa-blue) rgba(255, 255, 255, 0.1);
    padding: 70px 0 150px;
    -webkit-overflow-scrolling: touch;
}

.lightbox.active {
    display: block;
    opacity: 1;
}

.lightbox-slider {
    position: relative;
    width: 100%;
    transition: transform 0.3s ease-out;
}

.lightbox-slide {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.lightbox-slide.current-slide {
    position: relative;
    opacity: 1;
    visibility: visible;
}

.lightbox-slide.next-slide,
.lightbox-slide.prev-slide {
    opacity: 0;
    visibility: hidden;
}

.lightbox-content {
    max-width: 90%;
    position: relative;
    border-radius: 4px;
    overflow: visible;
    margin: 0 auto 24px;
}

.lightbox-media {
    max-width: 100%;
    max-height: 70vh;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.lightbox-description {
    width: 90%;
    max-width: 800px;
    margin: 0 auto 100px;
    padding: 16px 24px;
    color: var(--nasa-light);
    font-size: 0.95rem;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    backdrop-filter: blur(10px);
}

.lightbox::-webkit-scrollbar {
    width: 8px;
}

.lightbox::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.lightbox::-webkit-scrollbar-thumb {
    background-color: var(--nasa-blue);
    border-radius: 4px;
}

.lightbox-description a {
    color: var(--nasa-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.lightbox-description a:hover {
    color: var(--nasa-light);
    text-decoration: underline;
}

.metadata-item {
    margin-top: 12px;
    display: flex;
    align-items: center;
}

.metadata-label {
    font-weight: 600;
    margin-right: 8px;
    color: var(--nasa-gray);
}

.close-lightbox {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    color: var(--nasa-light);
    transition: background-color 0.2s ease;
    z-index: 1010;
}

.close-lightbox:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-indicators {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 1005;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
}

.nav-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    color: var(--nasa-light);
    opacity: 0.7;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.nav-button:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* Slide animations */
.slide-animation {
    animation-duration: 0.3s;
    animation-timing-function: ease;
    animation-fill-mode: both;
}

.slide-in-left {
    animation-name: slideInLeft;
}

.slide-in-right {
    animation-name: slideInRight;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile adaptations */
@media (max-width: 600px) {
    .lightbox-slider {
        display: flex;
        width: 100%;
        transform: translateX(0);
    }
    
    .lightbox-slide {
        min-width: 100%;
        position: relative;
        opacity: 1;
        visibility: visible;
        transition: none;
    }
    
    .lightbox-content {
        max-width: 95%;
    }

    .lightbox {
        padding-bottom: 180px;
        height: 100%;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        touch-action: pan-y;
    }

    .close-lightbox {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 24px;
        background: rgba(0, 0, 0, 0.8);
        z-index: 2000;
    }
    
    .lightbox-description {
        width: 95%;
        padding: 12px 16px;
        margin-bottom: 120px;
    }

    .nav-button {
        width: 36px;
        height: 36px;
    }
    
    .nav-indicators {
        display: none;
    }
    
    .lightbox-slider {
        touch-action: pan-y;
        height: auto;
        overflow-y: visible;
    }
    
    .lightbox-slide {
        touch-action: pan-y;
        height: auto;
        overflow-y: visible;
    }
}