<style>
        .gal-filter {
            display: flex;
            gap: .75rem;
            flex-wrap: wrap;
            margin-bottom: 3rem;
            justify-content: center;
        }
        
        .gf-btn {
            padding: .55rem 1.4rem;
            border-radius: 30px;
            border: 1.5px solid var(--bdr, #ddd);
            background: var(--white, #fff);
            font-size: .78rem;
            font-weight: 500;
            letter-spacing: .06em;
            text-transform: uppercase;
            cursor: pointer;
            transition: all .2s;
            color: var(--tx-m, #666);
            text-decoration: none;
            display: inline-block;
        }
        
        .gf-btn.act, .gf-btn:hover {
            background: var(--sage, #2c5f2d);
            color: #fff;
            border-color: var(--sage, #2c5f2d);
        }
        
        .gf-btn:focus-visible {
            outline: 2px solid var(--sage, #2c5f2d);
            outline-offset: 2px;
        }
        
        .gal-masonry {
            columns: 3;
            gap: 1.5rem;
        }
        
        .gal-item {
            break-inside: avoid;
            margin-bottom: 1.5rem;
            border-radius: 1rem;
            overflow: hidden;
            position: relative;
            cursor: pointer;
            transition: transform 0.3s ease;
        }
        
        .gal-item:focus-visible {
            outline: 2px solid var(--sage, #2c5f2d);
            outline-offset: 2px;
            transform: translateY(-2px);
        }
        
        .gal-item:hover {
            transform: translateY(-5px);
        }
        
        .gal-item:hover .gi-overlay {
            opacity: 1;
        }
        
        .gi-img {
            width: 100%;
            display: block;
            background: linear-gradient(135deg, var(--f2, #f5f5f5), var(--ink, #1a1a1a));
            position: relative;
        }
        
        .gi-img img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        
        .gi-inner {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: .5rem;
            color: rgba(255, 255, 255, .5);
        }
        
        .gi-inner .ic {
            font-size: 2rem;
        }
        
        .gi-inner span {
            font-size: .8rem;
        }
        
        .gi-overlay {
            position: absolute;
            inset: 0;
            background: rgba(9, 24, 16, .7);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity .3s;
        }
        
        .gi-overlay-ct {
            text-align: center;
            color: #fff;
            padding: 1.5rem;
        }
        
        .gi-overlay-ct h4 {
            font-family: 'Cormorant Garamond', serif;
            font-size: 1.1rem;
            font-weight: 700;
            margin-bottom: .4rem;
        }
        
        .gi-overlay-ct p {
            font-size: .78rem;
            color: rgba(255, 255, 255, .7);
            font-weight: 300;
        }
        
        /* Lightbox */
        .lightbox {
            position: fixed;
            inset: 0;
            background: rgba(9, 24, 16, .95);
            z-index: 600;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 2rem;
        }
        
        .lightbox.open {
            display: flex;
        }
        
        .lb-content {
            max-width: 900px;
            width: 100%;
            background: var(--f1, #2c2c2c);
            border-radius: 1.2rem;
            overflow: hidden;
            position: relative;
        }
        
        .lb-close {
            position: absolute;
            top: 1rem;
            right: 1rem;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: rgba(255, 255, 255, .1);
            border: none;
            color: #fff;
            font-size: 1.2rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1;
            transition: background 0.3s;
        }
        
        .lb-close:hover {
            background: rgba(255, 255, 255, .3);
        }
        
        .lb-img {
            width: 100%;
            aspect-ratio: 16/10;
            background: linear-gradient(135deg, var(--sage, #2c5f2d), var(--ink, #1a1a1a));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 3rem;
            color: rgba(255, 255, 255, .3);
        }
        
        .lb-img img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .lb-info {
            padding: 2rem;
        }
        
        .lb-info h3 {
            font-family: 'Cormorant Garamond', serif;
            font-size: 1.4rem;
            font-weight: 700;
            color: #fff;
            margin-bottom: .5rem;
        }
        
        .lb-info p {
            font-size: .88rem;
            color: rgba(255, 255, 255, .55);
            font-weight: 300;
            line-height: 1.75;
        }
        
        .empty-gallery {
            text-align: center;
            padding: 4rem;
            background: #f9f9f9;
            border-radius: 1rem;
            color: #666;
        }
        
        .empty-gallery .ic {
            font-size: 3rem;
            margin-bottom: 1rem;
        }
        
        .error-message {
            text-align: center;
            padding: 2rem;
            background: #fee;
            border-radius: 1rem;
            color: #c33;
            margin-bottom: 2rem;
        }
        
        /* Pagination Styles */
        .pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0.5rem;
            margin-top: 3rem;
            flex-wrap: wrap;
        }
        
        .page-link {
            padding: 0.6rem 1rem;
            border-radius: 8px;
            background: white;
            border: 1px solid #ddd;
            color: var(--tx-m, #666);
            text-decoration: none;
            transition: all 0.3s;
            font-size: 0.9rem;
            min-width: 40px;
            text-align: center;
        }
        
        .page-link:hover {
            background: var(--sage, #2c5f2d);
            color: white;
            border-color: var(--sage, #2c5f2d);
        }
        
        .page-link.active {
            background: var(--sage, #2c5f2d);
            color: white;
            border-color: var(--sage, #2c5f2d);
            cursor: default;
        }
        
        .page-link.disabled {
            opacity: 0.5;
            cursor: not-allowed;
            pointer-events: none;
        }
        
        .page-info {
            padding: 0.6rem 1rem;
            color: #666;
            font-size: 0.9rem;
        }
        
        .pagination-nav {
            display: flex;
            gap: 0.5rem;
        }
        
        /* User greeting bar */
        .user-bar {
            background: var(--sage, #2c5f2d);
            color: white;
            padding: 0.75rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
        }
        
        .user-greeting {
            font-size: 0.9rem;
        }
        
        .logout-btn {
            background: rgba(255, 255, 255, 0.2);
            color: white;
            padding: 0.4rem 1rem;
            border-radius: 20px;
            text-decoration: none;
            font-size: 0.8rem;
            transition: background 0.3s;
        }
        
        .logout-btn:hover {
            background: rgba(255, 255, 255, 0.3);
        }
        
        /* Stats bar */
        .stats-bar {
            background: #f5f5f5;
            padding: 0.75rem 2rem;
            text-align: center;
            font-size: 0.85rem;
            color: #666;
            border-bottom: 1px solid #eee;
        }
        
        @media (max-width: 900px) {
            .gal-masonry {
                columns: 2;
            }
        }
        
        @media (max-width: 580px) {
            .gal-masonry {
                columns: 1;
            }
            
            .pagination {
                gap: 0.3rem;
            }
            
            .page-link {
                padding: 0.4rem 0.8rem;
                font-size: 0.8rem;
                min-width: 35px;
            }
        }
        
        /* Admin link */
        .admin-link {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: var(--sage, #2c5f2d);
            color: white;
            padding: 10px 15px;
            border-radius: 30px;
            text-decoration: none;
            font-size: 0.8rem;
            font-weight: 500;
            z-index: 100;
            transition: transform 0.3s;
        }
        
        .admin-link:hover {
            transform: scale(1.05);
        }
        
        /* Loading spinner for pagination */
        .loading-spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255,255,255,.3);
            border-radius: 50%;
            border-top-color: #fff;
            animation: spin 1s ease-in-out infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
    </style>