/* Image Grid - Improved Masonry Layout */
.image-grid {
    display: grid;
    gap: 1.5rem;
}

.image-grid.masonry-layout {
    display: block;
    column-count: 1;
    column-gap: 1.5rem;
    column-fill: balance;
}

.image-grid.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.image-card {
    position: relative;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    cursor: pointer;
    width: 100%;
    display: inline-block;
    vertical-align: top;
}

/* Masonry specific styles */
.masonry-layout .image-card {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 1.5rem;
}

/* Skeleton Grid - Improved Masonry Layout */
.skeleton-grid {
    display: grid;
    gap: 1.5rem;
}

.skeleton-grid.masonry-layout {
    display: block;
    column-count: 1;
    column-gap: 1.5rem;
    column-fill: balance;
}

.skeleton-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    width: 100%;
    display: inline-block;
    vertical-align: top;
}

/* Masonry specific styles for skeleton */
.masonry-layout .skeleton-card {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 1.5rem;
}

/* Responsive Design - Updated */
@media (min-width: 640px) {
    .nav-links {
        display: flex;
    }
    
    .liked-btn {
        display: flex;
    }
    
    .upload-btn span {
        display: inline;
    }
    
    .hero-title {
        font-size: 3.75rem;
    }
    
    .skeleton-grid.masonry-layout {
        column-count: 2;
    }
    
    .image-grid.masonry-layout {
        column-count: 2;
    }
}

@media (min-width: 768px) {
    .skeleton-grid.masonry-layout {
        column-count: 2;
    }
    
    .image-grid.masonry-layout {
        column-count: 2;
    }
}

@media (min-width: 1024px) {
    .skeleton-grid.masonry-layout {
        column-count: 3;
    }
    
    .image-grid.masonry-layout {
        column-count: 3;
    }
}

@media (min-width: 1280px) {
    .skeleton-grid.masonry-layout {
        column-count: 4;
    }
    
    .image-grid.masonry-layout {
        column-count: 4;
    }
}

@media (min-width: 1536px) {
    .skeleton-grid.masonry-layout {
        column-count: 5;
    }
    
    .image-grid.masonry-layout {
        column-count: 5;
    }
}
