/* Lightbox Container */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    visibility: visible;
    opacity: 1;
}

/* Overlay */
.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

/* Container */
.lightbox-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background-color: #000000;
    border-radius: 20px;
    overflow: hidden;
    z-index: 1;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.lightbox.active .lightbox-container {
    transform: scale(1);
    opacity: 1;
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background-color: #141C29;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.lightbox-close:hover {
    background-color: #1f2937;
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Content Area */
.lightbox-content {
    max-height: 90vh;
    overflow-y: auto;
    padding: 10px;
    color: #ffffff;
}

/* Custom Scrollbar */
.lightbox-content::-webkit-scrollbar {
    width: 10px;
}

.lightbox-content::-webkit-scrollbar-track {
    background: #0a0e14;
}

.lightbox-content::-webkit-scrollbar-thumb {
    background: #141c29;
    border-radius: 5px;
}

.lightbox-content::-webkit-scrollbar-thumb:hover {
    background: #1f2937;
}

/* Loader */
.lightbox-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error State */
.lightbox-error {
    text-align: center;
    padding: 40px 20px;
    color: #ff6b6b;
}

/* Typography */
.lightbox-content h1,
.lightbox-content h2,
.lightbox-content h3,
.lightbox-content h4 {
    font-family: Open Sans,Arial,sans-serif;
    color: #ffffff;
    margin-bottom: 10px;
}

.lightbox-content h4 {
    font-size: 32px;
    font-weight: 600;
}

.lightbox-content p {
    font-family: Open Sans,Arial,sans-serif;;
    font-size: 17px;
    line-height: 1;
    color: #ffffff;
    margin-bottom: 1rem;
}

.lightbox-content a {
    color: #ffffff;
    text-decoration: underline;
}

/* Video Wrapper */
.lightbox-content .video-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto 20px;
    border-radius: 15px;
    overflow: hidden;
}

.lightbox-content .video-wrapper iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: none;
}

/* Portrait video support */
.lightbox-content .video-wrapper.portrait {
    max-width: 380px;
    margin: 0 auto 20px;
}

.lightbox-content .video-wrapper.portrait iframe {
    aspect-ratio: 9 / 16;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .lightbox-container {
        width: 95%;
        max-height: 95vh;
        border-radius: 15px;
    }
    
    .lightbox-content {
        padding: 15px;
    }
    
    .lightbox-close {
        width: 35px;
        height: 35px;
        font-size: 24px;
        top: 10px;
        right: 10px;
    }
    
    .lightbox-content h4 {
        font-size: 19px;
    }
    
    .lightbox-content p {
        font-size: 16px;
    }
    
    .lightbox-content .video-wrapper.portrait {
        max-width: 90%;
    }
}
