/* Brutal Gallery 29d7d8ad */

.bg-29d7d8ad {
    position: relative;
    width: 100%;
    height: 600px;
    background-color: #0a0a0a;
    border: 1px solid #2a2a2a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
}

/* HUD Corners */
.hud-corner-29d7d8ad {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: #555;
    border-style: solid;
    z-index: 5;
}
.hud-tl-29d7d8ad { top: 12px; left: 12px; border-width: 1px 0 0 1px; }
.hud-tr-29d7d8ad { top: 12px; right: 12px; border-width: 1px 1px 0 0; }
.hud-bl-29d7d8ad { bottom: 12px; left: 12px; border-width: 0 0 1px 1px; }
.hud-br-29d7d8ad { bottom: 12px; right: 12px; border-width: 0 1px 1px 0; }

/* Header */
.header-29d7d8ad {
    position: absolute;
    top: 20px;
    left: 28px;
    right: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
    pointer-events: none;
}

.hud-text-29d7d8ad {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffffff;
}

.hud-icon-29d7d8ad {
    font-size: 16px;
}

/* Footer */
.footer-29d7d8ad {
    position: absolute;
    bottom: 20px;
    left: 28px;
    right: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
    pointer-events: none;
}

/* Counter */
.counter-29d7d8ad {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    letter-spacing: 3px;
    color: #ffffff;
    z-index: 5;
    pointer-events: none;
    opacity: 0.7;
}

/* Card Stack */
.stack-29d7d8ad {
    position: relative;
    width: 280px;
    height: 320px;
}

.card-29d7d8ad {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform, opacity;
    background: #1a1a1a;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.card-29d7d8ad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.card-29d7d8ad .caption-29d7d8ad {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 14px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Glitch line decoration on top card */
.card-29d7d8ad.is-top-29d7d8ad::after {
    content: '';
    position: absolute;
    top: 30%;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.15);
    pointer-events: none;
    animation: glitch-line-29d7d8ad 3s infinite;
}

.card-29d7d8ad.is-top-29d7d8ad::before {
    content: '';
    position: absolute;
    top: 60%;
    left: 10%;
    width: 40%;
    height: 2px;
    background: rgba(255,255,255,0.1);
    pointer-events: none;
    animation: glitch-line-29d7d8ad 2.5s 0.5s infinite;
}

@keyframes glitch-line-29d7d8ad {
    0%, 90%, 100% { opacity: 0; }
    92% { opacity: 1; transform: translateX(-5px); }
    94% { opacity: 0; }
    96% { opacity: 1; transform: translateX(3px); }
    98% { opacity: 0; }
}

/* Scanline overlay */
.bg-29d7d8ad::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255,255,255,0.015) 2px,
        rgba(255,255,255,0.015) 4px
    );
    pointer-events: none;
    z-index: 10;
}

/* Navigation Buttons */
.nav-btn-29d7d8ad {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 15;
    transition: background 0.3s, border-color 0.3s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nav-btn-29d7d8ad:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.4);
}

.nav-prev-29d7d8ad { left: 16px; }
.nav-next-29d7d8ad { right: 16px; }

/* Lightbox */
.lightbox-29d7d8ad {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    cursor: zoom-out;
}

.lightbox-29d7d8ad.is-active-29d7d8ad {
    opacity: 1;
}

.lightbox-bg-29d7d8ad {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}

.lightbox-img-29d7d8ad {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.6);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1;
}

.lightbox-29d7d8ad.is-active-29d7d8ad .lightbox-img-29d7d8ad {
    transform: scale(1);
}

.lightbox-close-29d7d8ad {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background 0.3s;
}

.lightbox-close-29d7d8ad:hover {
    background: rgba(255,255,255,0.25);
}

.lightbox-nav-29d7d8ad {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background 0.3s;
}

.lightbox-nav-29d7d8ad:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox-prev-29d7d8ad { left: 20px; }
.lightbox-next-29d7d8ad { right: 20px; }

.lightbox-counter-29d7d8ad {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.7);
    z-index: 2;
}

/* Swipe hint on mobile */
.swipe-hint-29d7d8ad {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Courier New', monospace;
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    z-index: 5;
    pointer-events: none;
    animation: fade-hint-29d7d8ad 3s ease-in-out infinite;
}

@keyframes fade-hint-29d7d8ad {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.7; }
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .bg-29d7d8ad {
        height: 450px !important;
    }

    .stack-29d7d8ad {
        width: 200px !important;
        height: 240px !important;
    }

    .card-29d7d8ad {
        width: 200px !important;
        height: 240px !important;
    }

    .nav-btn-29d7d8ad {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .nav-prev-29d7d8ad { left: 8px; }
    .nav-next-29d7d8ad { right: 8px; }

    .hud-text-29d7d8ad {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .counter-29d7d8ad {
        font-size: 10px;
        bottom: 42px;
    }

    .lightbox-nav-29d7d8ad {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .lightbox-prev-29d7d8ad { left: 10px; }
    .lightbox-next-29d7d8ad { right: 10px; }
}

@media (max-width: 480px) {
    .bg-29d7d8ad {
        height: 380px !important;
    }

    .stack-29d7d8ad {
        width: 170px !important;
        height: 210px !important;
    }

    .card-29d7d8ad {
        width: 170px !important;
        height: 210px !important;
    }

    .header-29d7d8ad,
    .footer-29d7d8ad {
        left: 16px;
        right: 16px;
    }
}
