/* The Overlay Backdrop */
.tls-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 8, 15, 0.95); /* Deep Sovereign Black */
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.tls-lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

/* The Image Container */
.tls-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    border: 1px solid #30363d;
    border-radius: 4px;
}

.tls-lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    user-select: none;
}

/* Navigation Buttons */
.tls-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: 1px solid #30363d;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    z-index: 10001;
}

.tls-btn:hover {
    background: var(--accent-tech, #58a6ff);
    color: #000;
    border-color: var(--accent-tech, #58a6ff);
}

.tls-prev { left: 20px; }
.tls-next { right: 20px; }

/* Close Button */
.tls-close {
    position: absolute;
    top: 20px;
    right: 20px;
    transform: none;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #8b949e;
}
.tls-close:hover { color: #fff; background: transparent; border: none; }

/* Caption */
.tls-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    padding: 10px;
}

/* Loading Spinner */
.tls-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #30363d;
    border-top: 4px solid var(--accent-tech, #58a6ff);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 9999;
    display: none;
}

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