/* ===============================================
   ALOO SMP RESPONSIVE GALLERY - Mobile First Design
   =============================================== */

/* Gallery Container */
.gallery-container {
    padding: 20px 0;
    background-image: url("https://assets.badlion.net/blog/minecraft-backgrounds/ancient-city.webp");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow: hidden;
    
    min-height: 100vh;

     
}

/* Gallery Grid - Compact Cards Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
    padding: 0 15px;
    
   
}

/* Tablet Layout */
@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
        padding: 0 20px;
    }
}

/* Desktop Layout */
@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 20px;
        padding: 0;
    }
}

/* Large Desktop */
@media (min-width: 1400px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
}

/* Build Cards - Optimized for Mobile */
.build-card {
    /* background: linear-gradient(135deg, #318096 0%, #4fad3f 100%); */
    background-color: black;
    border: 2px solid #27c1e4;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(94, 179, 236, 0.2);
    position: relative;
    cursor: pointer;
    
    
}

.build-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
    border-color: #5dade2;
}

.build-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2980b9, #8e44ad);
}

/* Image Container */
.build-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .build-image-container {
        height: 220px;
    }
}

@media (min-width: 1024px) {
    .build-image-container {
        height: 240px;
    }
}

/* Main Build Image */
.build-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.build-card:hover .build-image {
    transform: scale(1.05);
}

/* Image Counter Badge */
.image-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Build Info */
.build-info {
    padding: 15px;
    color: #ecf0f1;
}

@media (min-width: 768px) {
    .build-info {
        padding: 18px;
    }
}

.build-title {
    font-family: 'Jost', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .build-title {
        font-size: 20px;
        margin-bottom: 10px;
    }
}

.build-description {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 12px;
    color: #bdc3c7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .build-description {
        font-size: 15px;
        -webkit-line-clamp: 3;
        margin-bottom: 15px;
    }
}   

/* Builder Info */
.builder-info {
    display: flex;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(52, 152, 219, 0.3);
    margin-bottom: 12px;
}

.builder-avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 2px solid #3498db;
    margin-right: 10px;
    background: #34495e;
}

@media (min-width: 768px) {
    .builder-avatar {
        width: 36px;
        height: 36px;
        margin-right: 12px;
    }
}

.builder-name {
    font-weight: 600;
    color: #ecf0f1;
    font-size: 15px;
}

@media (min-width: 768px) {
    .builder-name {
        font-size: 16px;
    }
}

/* Build Statistics - Mobile Optimized */
.build-stats {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.stat-item {
    text-align: center;
    color: #95a5a6;
    font-size: 11px;
    flex: 1;
}

@media (min-width: 768px) {
    .stat-item {
        font-size: 12px;
    }
}

.stat-number {
    display: block;
    color: #3498db;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 2px;
}

@media (min-width: 768px) {
    .stat-number {
        font-size: 16px;
    }
}

/* Filter Tabs - Mobile First */
.filter-tabs {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin: 20px 0;
    padding: 0 15px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .filter-tabs {
        justify-content: center;
        flex-wrap: wrap;
        padding: 0 20px;
        gap: 15px;
    }
}

@media (min-width: 1024px) {
    .filter-tabs {
        padding: 0;
        gap: 20px;
    }
}

.filter-btn {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    border: 2px solid #3498db;
    color: #ecf0f1;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .filter-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (min-width: 1024px) {
    .filter-btn {
        padding: 12px 25px;
        font-size: 15px;
    }
}

.filter-btn:hover, 
.filter-btn.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

/* Gallery Header */
.gallery-header {
    text-align: center;
    margin-bottom: 15px;
    padding: 0 15px;
}

@media (min-width: 768px) {
    .gallery-header {
        margin-bottom: 20px;
        padding: 0;
    }
}

.gallery-title {
    font-family: 'Fredoka One', cursive;
    font-size: 2.2rem;
    color: #ecf0f1;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    margin-bottom: 15px;
}

@media (min-width: 768px) {
    .gallery-title {
        font-size: 2.8rem;
    }
}

@media (min-width: 1024px) {
    .gallery-title {
        font-size: 3.5rem;
        margin-bottom: 20px;
    }
}

.gallery-subtitle {
    font-size: 1rem;
    color: #bdc3c7;
    font-family: 'Jost', sans-serif;
}

@media (min-width: 768px) {
    .gallery-subtitle {
        font-size: 1.1rem;
    }
}

@media (min-width: 1024px) {
    .gallery-subtitle {
        font-size: 1.2rem;
    }
}

/* Upload Section */
.upload-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border: 2px solid #3498db;
    border-radius: 12px;
    padding: 20px;
    margin: 25px 15px;
    text-align: center;
}

@media (min-width: 768px) {
    .upload-section {
        padding: 25px;
        margin: 30px 20px;
    }
}

@media (min-width: 1024px) {
    .upload-section {
        padding: 30px;
        margin: 40px 0;
    }
}

.upload-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Jost', sans-serif;
}

@media (min-width: 768px) {
    .upload-btn {
        padding: 14px 28px;
        font-size: 17px;
    }
}

@media (min-width: 1024px) {
    .upload-btn {
        padding: 15px 30px;
        font-size: 18px;
    }
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(46, 204, 113, 0.3);
}

/* ===============================================
   FLIPKART-STYLE IMAGE GALLERY MODAL
   =============================================== */

/* Modal Container */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: hidden;
}

/* Modal Content */
.modal-content-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

@media (min-width: 768px) {
    .modal-title {
        font-size: 20px;
    }
}

.close-modal {
    background: none;
    border: none;
    color: #f1f1f1;
    font-size: 28px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #3498db;
}

/* Main Image Area */
.modal-image-area {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-main-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

@media (min-width: 768px) {
    .modal-main-image {
        max-width: 80%;
        max-height: 80%;
    }
}

/* Navigation Arrows */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    font-size: 24px;
    padding: 15px 12px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10001;
}

.modal-nav:hover {
    background: rgba(52, 152, 219, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.modal-nav.prev {
    left: 20px;
}

.modal-nav.next {
    right: 20px;
}

@media (max-width: 480px) {
    .modal-nav {
        font-size: 20px;
        padding: 12px 10px;
    }
    
    .modal-nav.prev {
        left: 10px;
    }
    
    .modal-nav.next {
        right: 10px;
    }
}

/* Image Counter */
.modal-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Thumbnail Strip */
.modal-thumbnails {
    background: rgba(0, 0, 0, 0.9);
    padding: 15px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.modal-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.modal-thumbnails::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.modal-thumbnails::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 2px;
}

.thumbnail-item {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .thumbnail-item {
        width: 80px;
        height: 80px;
    }
}

.thumbnail-item:hover,
.thumbnail-item.active {
    border-color: #3498db;
    transform: scale(1.05);
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Touch/Swipe Gestures */
.swipe-indicator {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    animation: fade-in-out 3s ease-in-out infinite;
}

@keyframes fade-in-out {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Loading State */
.image-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #3498db;
    font-size: 18px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(52, 152, 219, 0.3);
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Message */
.copy-success-popup {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .copy-success-popup {
        top: 80px;
        font-size: 14px;
        padding: 12px 24px;
    }
}

.copy-success-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(10px);
}

/* Performance Optimizations */
.build-card,
.modal-main-image,
.thumbnail-item {
    will-change: transform;
}

.gallery-grid {
    contain: layout;
}

.modal-image-area {
    contain: strict;
}
.container
{
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    
}