:root{
        --bg: #0a0a0c;
        --card-bg: #16161a;
        --purple: #c86bfa;
        --purple-glow: rgba(200,107,250,0.35);
        --text: #f2f2f5;
        --muted: #9a9aa5;
        --overlay: rgba(10,10,12,0.72);
    }

    *{ box-sizing: border-box; }

    html, body{
    height: 100%;
}

.gallery-page-body{
    margin:0;
    background: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.gallery-content{
    flex: 1 0 auto;   /* grows to push footer down */
    padding: 112px 24px 80px;
}

footer{
    flex-shrink: 0;   /* stays at natural height, pinned to bottom */
}

    h1.title{
        text-align:center;
        font-size: 2.6rem;
        font-weight: 800;
        letter-spacing: 0.5px;
        margin: 0 0 40px;
        background: #ED8936;
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        text-shadow: 0 0 40px var(--purple-glow);
    }

    .gallery{
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
        max-width: 1400px;
        margin: 0 auto;
    }

    @media (max-width: 1000px){
        .gallery{ grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 560px){
        .gallery{ grid-template-columns: 1fr; }
    }

    .card{
        position: relative;
        aspect-ratio: 4/3;
        border-radius: 14px;
        overflow: hidden;
        cursor: pointer;
        background: var(--card-bg);
        border: 1px solid rgba(255,255,255,0.06);
        transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    }

    .card:hover{
        transform: translateY(-4px);
        box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 0 1px var(--purple-glow);
        border-color: var(--purple-glow);
    }

    .card img{
        width:100%;
        height:100%;
        object-fit: cover;
        display:block;
        transition: transform 0.4s ease, filter 0.4s ease;
    }

    .card:hover img{
        transform: scale(1.06);
        filter: brightness(0.7);
    }

    .card .label{
        position:absolute;
        left: 12px;
        bottom: 12px;
        right: 12px;
        background: rgba(20,18,24,0.78);
        backdrop-filter: blur(4px);
        padding: 8px 12px;
        border-radius: 8px;
        font-size: 0.85rem;
        font-weight: 600;
        color: #fff;
    }

    .card .expand-hint{
        position:absolute;
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: rgba(20,18,24,0.7);
        display:flex;
        align-items:center;
        justify-content:center;
        opacity: 0;
        transition: opacity 0.25s ease;
        font-size: 0.9rem;
    }

    .card:hover .expand-hint{ opacity: 1; }

    /* Modal / Carousel */
    .modal-overlay{
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.85);
        backdrop-filter: blur(6px);
        display:flex;
        align-items:center;
        justify-content:center;
        z-index: 1000;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    .modal-overlay.active{
        opacity: 1;
        pointer-events: all;
    }

    .modal{
        width: min(900px, 92vw);
        background: var(--card-bg);
        border-radius: 16px;
        overflow: hidden;
        border: 1px solid rgba(255,255,255,0.08);
        transform: scale(0.94);
        transition: transform 0.25s ease;
    }

    .modal-overlay.active .modal{
        transform: scale(1);
    }

    .modal-header{
        display:flex;
        align-items:center;
        justify-content:space-between;
        padding: 16px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    .modal-header h2{
        margin:0;
        font-size: 1.15rem;
        color: var(--purple);
    }

    .close-btn{
        background: none;
        border: none;
        color: var(--muted);
        font-size: 1.4rem;
        cursor: pointer;
        line-height: 1;
        padding: 4px 8px;
        border-radius: 6px;
        transition: background 0.2s, color 0.2s;
    }
    .close-btn:hover{ background: rgba(255,255,255,0.08); color: #fff; }

    .carousel{
        position: relative;
        aspect-ratio: 16/10;
        background: #000;
    }

    .carousel-track{
        display:flex;
        width: 100%;
        height: 100%;
        transition: transform 0.35s ease;
    }

    .carousel-slide{
        min-width: 100%;
        height: 100%;
    }

    .carousel-slide img{
        width:100%;
        height:100%;
        object-fit: contain;
        background:#000;
    }

    .carousel-btn{
        position:absolute;
        top:50%;
        transform: translateY(-50%);
        background: rgba(20,18,24,0.65);
        border: 1px solid rgba(255,255,255,0.12);
        color:#fff;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        cursor:pointer;
        font-size: 1.2rem;
        display:flex;
        align-items:center;
        justify-content:center;
        transition: background 0.2s;
    }
    .carousel-btn:hover{ background: rgba(200,107,250,0.35); }
    .carousel-btn.prev{ left: 14px; }
    .carousel-btn.next{ right: 14px; }

    .dots{
        display:flex;
        gap:8px;
        justify-content:center;
        padding: 14px;
    }

    .dot{
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(255,255,255,0.25);
        cursor: pointer;
        transition: background 0.2s, transform 0.2s;
    }

    .dot.active{
        background: var(--purple);
        transform: scale(1.3);
    }