/* =========================================================================
   GALLERY — MacOS Photos Style + Liquid Glass Modal + Slider Zoom
   ========================================================================= */

/* Basic Reset */
.gallery-wrapper {
    padding: 32px;
}

/* MacOS-like fluid grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--thumb-size, 180px), 1fr));
    gap: 14px;
    padding: 20px;
    transition: 0.25s ease;
}

/* Gallery Items */
.gallery-item {
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: rgba(255,255,255,0.4);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Thumbnail size slider */
.slider-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    margin-bottom: -10px;
}

.slider-box label {
    font-weight: 600;
    opacity: 0.75;
}

#thumbRange {
    width: 200px;
}

/* -----------------------------------
   Image Modal — Liquid Glass Viewer
----------------------------------- */
#photoModal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(12px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    animation: fadeIn .25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-photo-box {
    max-width: 95%;
    max-height: 90%;
    padding: 20px;
    border-radius: 18px;
    background: rgba(255,255,255,0.35);
    backdrop-filter: blur(18px) saturate(180%);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    animation: zoomIn .25s ease;
}

@keyframes zoomIn {
    from { transform: scale(.8); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.modal-photo-box img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    user-select: none;
}

.modal-close-btn {
    margin-top: 18px;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.modal-close-btn:hover {
    background: var(--primary);
    color: #fff;
}
