.thumbnails-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, max-content));
    justify-content: center;
    gap: 15px;
    padding: 20px 0;
    margin-top: 15px;
}

/* Existing styles below remain unchanged */
.gallery-container {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.main-video-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background: #000;
    aspect-ratio: 16/9;
}

.main-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.5s ease;
}

.video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 20px;
    z-index: 10;
}

.video-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.video-description {
    font-size: 0.95rem;
    opacity: 0.9;
    max-width: 80%;
}

.thumbnail {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border: 3px solid transparent;
    opacity: 0.8;
    aspect-ratio: 16/9;
}

.thumbnail:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    opacity: 1;
}

.thumbnail.active {
    border-color: #4285F4;
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(66, 133, 244, 0.5);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.thumbnail:hover img {
    transform: scale(1.05);
}

.thumbnail .thumbnail-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    font-size: 0.85rem;
    text-align: center;
    transition: background 0.3s ease;
}

.thumbnail:hover .thumbnail-title {
    background: rgba(66, 133, 244, 0.8);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .thumbnails-container {
        grid-template-columns: repeat(auto-fit, minmax(160px, max-content));
    }
}

@media (max-width: 768px) {
    .thumbnail {
        min-width: auto;
        height: auto;
    }
    
    .video-title {
        font-size: 1.2rem;
    }
    
    .video-description {
        font-size: 0.85rem;
    }
    
    .thumbnails-container {
        grid-template-columns: repeat(auto-fit, minmax(140px, max-content));
    }
}

@media (max-width: 480px) {
    .gallery-container {
        padding: 15px;
    }
    
    .video-info {
        padding: 12px;
    }
    
    .video-title {
        font-size: 1.1rem;
    }
    
    .video-description {
        font-size: 0.8rem;
    }
    
    .thumbnails-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, max-content));
        gap: 12px;
    }
    
    .thumbnail .thumbnail-title {
        font-size: 0.75rem;
        padding: 8px;
    }
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 16/9) {
    .main-video-container {
        padding-bottom: 56.25%;
        height: 0;
    }
    
    .thumbnail {
        padding-bottom: 56.25%;
        height: 0;
    }
    
    .main-video-container video,
    .thumbnail img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}