#gallery-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

#gallery-modal.active { display: flex; }

#gm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
}

#gm-inner {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

#gm-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    transition: opacity 0.2s ease;
}

#gm-title {
    color: rgba(255,255,255,0.9);
    font-size: 15px;
    text-align: center;
    font-family: 'Source Sans 3', Arial, sans-serif;
}

#gm-counter {
    color: rgba(255,255,255,0.45);
    font-size: 13px;
    font-family: 'Source Sans 3', Arial, sans-serif;
}

/* Close button */
#gm-close {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 2;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#gm-close:hover { background: rgba(255,255,255,0.25); }

/* Prev / Next */
#gm-prev,
#gm-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 44px;
    line-height: 1;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#gm-prev { left: 16px; }
#gm-next { right: 16px; }

#gm-prev:hover,
#gm-next:hover { background: rgba(255,255,255,0.25); }

@media (max-width: 600px) {
    #gm-prev { left: 6px; }
    #gm-next { right: 6px; }
    #gm-prev, #gm-next { width: 42px; height: 42px; font-size: 34px; }
}
