/* =========================
   SCREENSHOT VIEWER - LIGHTBOX
========================== */

.screenshot-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease, background 0.4s ease;
    backdrop-filter: blur(0px);
}

.screenshot-lightbox.active {
    display: flex;
    animation: lightboxFadeIn 0.4s ease forwards;
}

@keyframes lightboxFadeIn {
    0% {
        opacity: 0;
        background: rgba(0, 0, 0, 0);
        backdrop-filter: blur(0px);
    }
    100% {
        opacity: 1;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
    }
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
}

.screenshot-lightbox.active .lightbox-content {
    animation: contentSlideIn 0.5s ease 0.2s forwards;
}

@keyframes contentSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.lightbox-image.loaded {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.lightbox-info {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    color: #fff;
    font-size: 14px;
    text-align: center;
    flex-wrap: wrap;
    justify-content: center;
}

.lightbox-author,
.lightbox-date,
.lightbox-counter {
    opacity: 0.9;
}

.lightbox-counter {
    font-weight: 600;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    opacity: 0;
    transform: scale(0.8) rotate(-90deg);
}

.screenshot-lightbox.active .lightbox-close {
    animation: buttonFadeIn 0.4s ease 0.4s forwards;
}

@keyframes buttonFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8) rotate(-90deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) rotate(0deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    opacity: 0;
}

.screenshot-lightbox.active .lightbox-nav {
    animation: navFadeIn 0.4s ease 0.5s forwards;
}

@keyframes navFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lightbox-nav:disabled:hover {
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.lightbox-loader.active {
    display: block;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================
   MINIATURAS CLICKEABLES
========================== */

.screenshot-item {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.screenshot-item:hover {
    transform: scale(1.05);
}

.screenshot-item img {
    transition: opacity 0.2s ease;
}

.screenshot-item:hover img {
    opacity: 0.9;
}

/* =========================
   RESPONSIVE
========================== */

@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }

    .lightbox-image {
        max-height: 85vh;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-info {
        font-size: 12px;
        gap: 10px;
        padding: 0 10px;
    }
}