/* ========================================
   Screenshots Gallery Stylesheet
   ======================================== */

.gallery-page {
    padding-top: 120px;
    padding-bottom: 80px;
    min-height: 100vh;
}

/* Header */
.gallery-header {
    text-align: center;
    margin-bottom: 50px;
}

.gallery-header h1 {
    font-size: 3.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 14px;
}

.gallery-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 18px;
}

.gallery-count {
    display: inline-block;
    background: rgba(108, 92, 231, 0.12);
    border: 1px solid rgba(108, 92, 231, 0.25);
    border-radius: 20px;
    padding: 6px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

/* Filter Tabs */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-muted);
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.filter-btn:hover {
    background: rgba(108, 92, 231, 0.1);
    border-color: rgba(108, 92, 231, 0.3);
    color: var(--text-secondary);
}

.filter-btn.active {
    background: rgba(108, 92, 231, 0.15);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.15);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Gallery Item */
.gallery-item {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-item.hidden {
    display: none;
}

.gallery-item.fade-out {
    opacity: 0;
    transform: scale(0.95);
}

/* Gallery Card */
.gallery-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.35s ease;
}

.gallery-card:hover {
    border-color: rgba(101, 88, 211, 0.4);
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12), 0 0 30px rgba(101, 88, 211, 0.08);
}

.gallery-card img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top left;
    transition: transform 0.5s ease;
}

.gallery-card:hover img {
    transform: scale(1.03);
}

/* Overlay on hover */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(28, 31, 46, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-zoom {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(108, 92, 231, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    backdrop-filter: blur(8px);
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-zoom {
    transform: scale(1);
}

/* Replace material icon with SVG-style zoom icon */
.gallery-zoom::after {
    content: '';
    display: block;
    width: 22px;
    height: 22px;
    border: 3px solid #fff;
    border-radius: 50%;
    position: relative;
}

.gallery-zoom::before {
    content: '';
    display: block;
    width: 3px;
    height: 10px;
    background: #fff;
    position: absolute;
    bottom: 14px;
    right: 17px;
    transform: rotate(-45deg);
    border-radius: 2px;
}

/* Caption */
.gallery-caption {
    padding: 16px 18px;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.gallery-caption h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.gallery-caption p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.caption-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.caption-tag.server {
    background: rgba(0, 184, 148, 0.15);
    color: #00b894;
    border: 1px solid rgba(0, 184, 148, 0.3);
}

.caption-tag.builder {
    background: rgba(253, 203, 110, 0.15);
    color: #fdcb6e;
    border: 1px solid rgba(253, 203, 110, 0.3);
}

.caption-tag.network {
    background: rgba(116, 185, 255, 0.15);
    color: #74b9ff;
    border: 1px solid rgba(116, 185, 255, 0.3);
}

.caption-tag.modules {
    background: rgba(162, 155, 254, 0.15);
    color: #a29bfe;
    border: 1px solid rgba(162, 155, 254, 0.3);
}

.caption-tag.auth {
    background: rgba(255, 118, 117, 0.15);
    color: #ff7675;
    border: 1px solid rgba(255, 118, 117, 0.3);
}

/* ========================================
   Lightbox
   ======================================== */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    animation: lbFadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    z-index: 2;
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: lbSlideIn 0.35s ease;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 10px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    object-fit: contain;
}

.lightbox-caption {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 16px;
    max-width: 700px;
}

.lightbox-counter {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    margin-top: 8px;
}

/* Lightbox Controls */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    z-index: 3;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(108, 92, 231, 0.3);
    border-color: var(--accent);
}

.lightbox-close {
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Animations */
@keyframes lbFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lbSlideIn {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .gallery-page {
        padding-top: 100px;
        padding-bottom: 60px;
    }

    .gallery-header h1 {
        font-size: 2.2rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .gallery-filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.82rem;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
    }
}

@media (max-width: 480px) {
    .gallery-header h1 {
        font-size: 1.7rem;
    }

    .gallery-subtitle {
        font-size: 0.92rem;
    }

    .gallery-caption h4 {
        font-size: 0.88rem;
    }

    .gallery-caption p {
        font-size: 0.75rem;
    }
}
