.lightboxjs-link:not(a) {
    cursor: pointer;
}

.lightboxjs,
.lightboxjs .ljs-overlay {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.lightboxjs {
    position: fixed;
    z-index: 999;
    display: none;
    opacity: 0;
    -webkit-transition: opacity .2s linear, backdrop-filter .2s linear;
    transition: opacity .2s linear, backdrop-filter .2s linear;
    backdrop-filter: blur(10px) brightness(0.35);
}

.lightboxjs .ljs-overlay,
.lightboxjs .ljs-content {
    position: absolute;
}

.lightboxjs .ljs-overlay {
    z-index: 1;
    background: #000;
    opacity: 0.1;
}

.lightboxjs .ljs-overlay.ljs-clickable {
    cursor: pointer;
}

.lightboxjs .ljs-content {
    display: none;
}

.lightboxjs .ljs-content.ljs-loaded {
    display: block;
    animation: scale-in 0.2s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}

/* --- UPDATED FOR RESPONSIVENESS --- */
.lightboxjs .ljs-content {
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 1024px;
    height: 580px;
    /* Responsive overrides: ensures the modal scales down on small screens */
    max-width: 92vw !important;
    max-height: 85vh !important;
    box-sizing: border-box;
    z-index: 2;
    margin: auto;
    -webkit-box-shadow: 3px 3px 8px #000000a0, 0 0 20px #00000060;
    box-shadow: 3px 3px 8px #000000a0, 0 0 20px #00000060;
    border-radius: 10px;
    overflow: hidden;
}

.lightboxjs .ljs-body,
.lightboxjs iframe {
    width: 100%;
    height: 100%;
}

.lightboxjs iframe {
    border: 0;
    display: block;
}

.lightboxjs.ljs-show {
    display: block;
}

.lightboxjs.ljs-open {
    opacity: 1;
}

/** SPINNER **/

.lightboxjs .ljs-spinner {
    width: 80px;
    height: 80px;
    position: absolute;
    left: calc(50% - 40px);
    top: calc(50% - 40px);
    z-index: 1;
    display: none;
}

.lightboxjs .ljs-spinner.ljs-show {
    display: inline-block;
    animation: scale-in 0.15s cubic-bezier(0.390, 0.575, 0.565, 1.000) 0.2s both;
}

.lightboxjs .ljs-spinner:after {
    content: " ";
    display: block;
    width: 64px;
    height: 64px;
    margin: 8px;
    border-radius: 50%;
    border: 6px solid #fff;
    border-color: #fff transparent #fff transparent;
    animation: lightboxjs-spinner 1.2s linear infinite;
}

@keyframes lightboxjs-spinner {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/** CLOSE BUTTON **/

.lightboxjs .ljs-close {
    position: absolute;
    right: 32px;
    top: 32px;
    opacity: 1;
    z-index: 5;
    cursor: pointer;
    display: none;
    font-size: 70px;
    font-weight: bold;
    color: #fff;
    line-height: 46px;
    margin-top: -7px;
    text-shadow: -1px -1px 0 #000, 0 -1px 0 #000, 1px -1px 0 #000, 1px 0 0 #000, 1px 1px 0 #000, 0 1px 0 #000, -1px 1px 0 #000, -1px 0 0 #000;
}

.lightboxjs .ljs-close.ljs-show {
    animation: scale-in-btn 0.15s cubic-bezier(0.390, 0.575, 0.565, 1.000) 0.2s both;
}

.lightboxjs .ljs-close.ljs-open {
    display: block;
}

.lightboxjs .ljs-close:hover {
    animation: scale-btn-over 0.2s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}

/** ANIMATIONS **/

@keyframes scale-btn-over {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1.1);
    }
}

@keyframes scale-in {
    0% {
        transform: scale(0);
    }
    80% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes scale-in-btn {
    0% {
        transform: scale(0);
    }
    80% {
        transform: scale(1.5);
    }
    100% {
        transform: scale(1);
    }
}


@media (max-width: 768px) {
    .lightboxjs .ljs-content {
        max-width: 95vw !important;
        
        height: auto !important;
        aspect-ratio: 16 / 9;
    }

    .lightboxjs .ljs-close {
        right: 15px;
        top: 15px;
        font-size: 50px;
        line-height: 35px;
    }

    .lightboxjs .ljs-spinner {
        width: 50px;
        height: 50px;
        left: calc(50% - 25px);
        top: calc(50% - 25px);
    }

    .lightboxjs .ljs-spinner:after {
        width: 40px;
        height: 40px;
        margin: 5px;
        border-width: 4px;
    }
}