body {
    font-family: 'Arial', sans-serif; /* A more modern sans-serif */
    background-color: #1a1a1a; /* Dark background */
    margin: 0; /* Remove default body margin */
    padding: 20px;
    color: #e0e0e0; /* Light text for contrast */
}

.gallery-title {
    text-align: center;
    color: #00bcd4; /* A vibrant teal for the title */
    margin-bottom: 40px;
    font-size: 2.5em;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 188, 212, 0.5); /* Subtle glow */
}

/* Image Gallery Grid */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Slightly larger blocks */
    gap: 15px; /* More spacing between images */
    max-width: 1200px; /* Max width for the gallery */
    margin: 0 auto; /* Center the gallery */
}

.gallery-container img {
    width: 100%;
    height: 200px; /* Fixed height for consistent blocks */
    object-fit: cover; /* Ensures images fill the box without distortion */
    border-radius: 10px; /* Slightly more rounded corners */
    cursor: pointer;
    border: 1px solid #333; /* Subtle border */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); /* Deeper shadow */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, border-color 0.3s;
}

.gallery-container img:hover {
    transform: translateY(-5px) scale(1.02); /* Lift and slightly scale on hover */
    box-shadow: 0 10px 25px rgba(0, 188, 212, 0.3); /* Teal glow on hover */
    border-color: #00bcd4; /* Teal border on hover */
}


/* The Modal (popup background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.95); /* Even darker, less transparent background */
    backdrop-filter: blur(5px); /* Subtle blur effect for background */
}

/* Modal Content (the image) */
.modal-content {
    margin: 80px auto; /* More margin from top */
    display: block;
    width: 90%;
    max-width: 900px;
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(0, 188, 212, 0.7); /* Stronger teal glow for popup image */
    animation: fadeIn 0.5s forwards; /* Add fade-in animation */
}

/* Close Button */
.close {
    position: absolute;
    top: 25px; /* Slightly lower */
    right: 45px; /* Slightly inward */
    color: #00bcd4; /* Teal close button */
    font-size: 50px; /* Larger close button */
    font-weight: bold;
    transition: 0.3s;
    text-shadow: 0 0 8px rgba(0, 188, 212, 0.5);
}

.close:hover,
.close:focus {
    color: #e0e0e0; /* White on hover */
    text-decoration: none;
    cursor: pointer;
    transform: scale(1.1);
}

/* Keyframe for fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    .gallery-container img {
        height: 120px;
    }
    .modal-content {
        width: 95%;
        margin: 50px auto;
    }
    .gallery-title {
        font-size: 1.8em;
    }
}
@media (max-width: 480px) {
    .gallery-container {
        grid-template-columns: 1fr; /* Single column on very small screens */
        gap: 10px;
    }
    .gallery-container img {
        height: 250px; /* Taller images in single column */
    }
    .close {
        font-size: 40px;
        right: 20px;
        top: 15px;
    }
    body {
        padding: 10px;
    }
}