body.gallery_body {
    background-image: url('https://www.transparenttextures.com/patterns/rice-paper-3.png');
    margin: 0;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* GALLERY GRID */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

.gallery-item {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 ratio */
    overflow: hidden;
    border-radius: 6px;
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease, outline 0.3s ease;
}

/* Selected image */
.gallery-item.selected img {
    outline: 4px solid #ff4081;
    opacity: 0.8;
    transform: scale(0.95);
}

/* MULTIPLE DOWNLOAD BUTTON */
#download-multiple {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #fff;
    border: 2px solid #000;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    color: #000;
    cursor: pointer;
    display: none;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    z-index: 10000;
}

#download-multiple:hover {
    background: #000;
    color: #fff;
    transform: scale(1.1);
    border-color: #fff;
}

/* LIGHTBOX */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lightbox.hidden { display: none; }

.lightbox img {
    max-width: 95%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 36px;
    color: white;
    cursor: pointer;
}

#download-btn {
    position: absolute;
    bottom: 25px;
    right: 25px;
    background: white;
    padding: 12px 14px;
    border-radius: 50%;
    font-size: 18px;
    color: black;
    cursor: pointer;
}

/* LOADING */
#loading-indicator {
    display: none;
    text-align: center;
    padding: 20px;
    font-size: 16px;
}