       * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: Arial, sans-serif;
            background-color: #f5f5f5;
            padding: 10px;
        }

        .gallery-container {
            max-width: 600px;
            margin: 0 auto;
            text-align: center;
        }

        h1 {
            color: #333;
            margin-bottom: 30px;
        }

        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 10px;
            justify-items: center;
            margin-bottom: 20px;
        }

        .gallery-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }

        .thumbnail {
            width: 100px;
            object-fit: cover;
            border-radius: 8px;
            cursor: pointer;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            border: 3px solid #fff;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            margin-bottom: 8px;
        }

        .thumbnail:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        }

        .thumbnail-caption {
            font-size: 14px;
            color: #555;
            font-weight: 500;
            max-width: 100px;
            word-wrap: break-word;
            line-height: 1.2;
        }

        /* Modal/Popup Styles */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.8);
            backdrop-filter: blur(5px);
        }

        .modal.active {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-content {
            position: relative;
            max-width: 90%;
            max-height: 90%;
            animation: modalFadeIn 0.3s ease;
        }

        .modal-image {
            width: 500px;
            height: auto;
            max-width: 100%;
            max-height: 80vh;
            object-fit: contain;
            border-radius: 10px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        }

        .close-btn {
            position: absolute;
            top: -40px;
            right: 0;
            color: white;
            font-size: 30px;
            font-weight: bold;
            cursor: pointer;
            background: rgba(0,0,0,0.5);
            border: none;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color 0.3s ease;
        }

        .close-btn:hover {
            background: rgba(255,255,255,0.2);
        }

        @keyframes modalFadeIn {
            from {
                opacity: 0;
                transform: scale(0.8);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        /* Responsive Design */
        @media (max-width: 400px) {
            .gallery-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 15px;
            }
            
            .thumbnail {
                width: 80px;
            }
            
            .thumbnail-caption {
                font-size: 12px;
                max-width: 80px;
            }
            
            .modal-image {
                width: 90%;
                max-width: 400px;
            }
            
            .close-btn {
                top: -35px;
                width: 35px;
                height: 35px;
                font-size: 24px;
            }
        }

        @media (max-width: 400px) {
            .gallery-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .thumbnail {
                width: 70px;
            }
