* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0f172a;
    color: #f8fafc;
    min-height: 100vh;
    padding: 40px 20px;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 25px;
    color: #38bdf8;
}

/* Category Filter Buttons */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .filter-btn:hover, .filter-btn.active {
        background: #38bdf8;
        color: #0f172a;
        border-color: #38bdf8;
        box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
    }

/* Responsive Grid Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    aspect-ratio: 4/3;
}

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.4s ease;
    }

/* Hover Effects & Transitions */
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .overlay span {
        color: #ffffff;
        font-size: 1.2rem;
        font-weight: bold;
        transform: translateY(20px);
        transition: transform 0.3s ease;
    }

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .overlay {
    opacity: 1;
}

    .gallery-item:hover .overlay span {
        transform: translateY(0);
    }

/* Lightbox View */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

    .lightbox.active {
        display: flex;
    }

#lightbox-img {
    max-width: 85%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.1);
}

.caption {
    position: absolute;
    bottom: 25px;
    color: #e2e8f0;
    font-size: 1.1rem;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    transition: color 0.2s;
}

    .close-btn:hover {
        color: #38bdf8;
    }

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    font-size: 30px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s ease;
}

    .nav-btn:hover {
        background: rgba(56, 189, 248, 0.8);
    }

.prev-btn {
    left: 30px;
}

.next-btn {
    right: 30px;
}

/* Hide animation for filtering */
.gallery-item.hide {
    display: none;
}
