* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #111;
    color: #eee;
    font-family: Arial, sans-serif;
}

header {
    text-align: center;
    padding: 35px 20px 25px;
}

h1 {
    margin: 0 0 25px;
    font-size: 28px;
    font-weight: 500;
}

.search-box {
    max-width: 500px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 13px 18px;
    border: 1px solid #444;
    border-radius: 25px;
    background: #222;
    color: #fff;
    font-size: 16px;
    outline: none;
}

.search-box input:focus {
    border-color: #777;
}

.search-box input::placeholder {
    color: #888;
}

.gallery-info {
    margin-top: 15px;
    color: #888;
    font-size: 14px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    padding: 0 20px 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    cursor: pointer;
    background: #222;
    border-radius: 4px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.no-results {
    display: none;
    text-align: center;
    color: #888;
    padding: 80px 20px;
}

/* Lightbox */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.94);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

.close-button,
.nav-button {
    position: absolute;
    border: none;
    background: transparent;
    color: white;
    cursor: pointer;
    z-index: 1001;
}

.close-button {
    top: 20px;
    right: 30px;
    font-size: 40px;
}

.nav-button {
    top: 50%;
    transform: translateY(-50%);
    font-size: 45px;
    padding: 20px;
}

.prev-button {
    left: 15px;
}

.next-button {
    right: 15px;
}

@media (max-width: 600px) {

    header {
        padding: 25px 15px 20px;
    }

    h1 {
        font-size: 24px;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 8px 20px;
    }

    .close-button {
        top: 10px;
        right: 15px;
    }

    .nav-button {
        font-size: 32px;
        padding: 10px;
    }

}
