html,
body {
    overflow: hidden;
    height: 100%;
}

html,
body {
    overscroll-behavior-y: none;
    margin: 0;
}

body {
    min-height: 100vh;
    overflow-y: auto !important;
}

body {
    font-family: Arial, sans-serif;
    background-color: #c6c090;
    margin: 0;
    padding: 20px;    
}

footer p{margin-bottom: 0px !important;}
.masonry-wrapper {
    margin-top: 0px;
 }

.masonry-grid {
    column-gap: 0px;
    transition: all 0.3s ease;
    column-count: 4;
}

.masonry-item {
    break-inside: avoid;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.masonry-item.exiting {
    opacity: 0;
    transform: translateY(20px);
}

.image-container {
    position: relative;
    width: 100%;
}

.lazy-image {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transition: opacity 0.5s ease-in, filter 0.5s ease-in;
}

.lazy-image.loading {
    filter: blur(5px);
    opacity: 0.5;
}

.lazy-image.loaded {
    opacity: 1;
    filter: none;
}

/* Pinned Image Styling */
.masonry-item.pinned img {
    padding: 0; /* Remove padding to make gold border hug the image */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow for emphasis */
}

.masonry-item.pinned .lazy-image.loading {
    filter: none; /* Remove blur for pinned image during loading */
    opacity: 1; /* Ensure full opacity to show gold border */
}

/* Pin Button Styling */
.image-container .pin-button {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 5px 10px;
    background: #4CAF50; /* Default "Pin" color */
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    z-index: 10; /* Ensure button is above image */
    transition: background 0.2s ease;
}

.image-container .pin-button.unpin {
    background: #ff4444; /* "Unpin" color */
}

.image-container img.imgPinned {
    padding: 0 !important;
}
.masonry-item img,
.image-container img {
    width: 100%;
    border-radius: 0px;
    height: auto;
 /*   padding: 4px; */
}

.qr-code {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    padding: 4px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    border-top: 1px solid #eee;
    z-index: 2000;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-icon {
    background: none;
    border: none;
    font-size: 24px;
    padding: 10px;
    cursor: pointer;
    color: #333;
    transition: color 0.2s ease;
}

.nav-icon:hover {
    color: #000;
}

.camera-icon span,
.qr-icon span {
    display: block;
}

.nav-button {
    position: absolute;
    height: 100%;
    width: 50px;
    border-radius: 0px;
    border: none;
    top: 0;
    transform: none;
    font-size: 24px;
    cursor: pointer;
    color: #555;
    z-index: 1001;
    transition: background 0.2s ease;
}

.prev-button {
    left: 0px;
}

.next-button {
    right: 0px;
}

.prev-button:hover {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.5662640056022409) 0%, rgba(255, 255, 255, 0) 100%);
}

.next-button:hover {
    background: linear-gradient(-90deg, rgba(0, 0, 0, 0.5662640056022409) 0%, rgba(255, 255, 255, 0) 100%);
}

a {
  color: rgb(255, 255, 255) !important;
  text-decoration:none !important;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border: 5px solid white;
    border-radius: 5px;
    transition: opacity 0.5s ease-in, filter 0.5s ease-in;
    opacity: 0;
    filter: blur(5px);
}

.lightbox-content img.loaded {
    opacity: 1;
    filter: none;
}

.lightbox::after {
    content: "×";
    position: absolute;
    top: 0px;
    right: 35px;
    font-size: 40px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    z-index: 10000;
}

.camera-modal,
.qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.camera-controls {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.camera-controls button,
.qr-modal button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}

.qr-modal {
    animation: fadeIn 0.3s ease-in-out;
}

.qr-modal-content {
    animation: slideIn 0.3s ease-in-out;
}

.processing-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.processing-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}


.qr-icon-button,
.scan-qr-button {
    display: none;
}

.qr-icon-button:hover,
.scan-qr-button:hover {
    background: rgba(0, 0, 0, 0.9);
}

.error-popup {
    font-size: 14px;
    line-height: 1.5;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        display: none;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes highlight {
    0% {
        background-color: rgba(177, 251, 177, 0.5);
    }

    50% {
        background-color: rgba(177, 251, 177, 0.8);
    }

    100% {
        background-color: transparent;
    }
}

@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
    }

    .masonry-wrapper {
        margin-top: 10px;
    }

    .masonry-grid {
        column-count: 2;
    }

    .main-album-section p {
        display: none;
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        column-count: 2;
    }
}