* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #fff;
    color: #222;
    font-family: Arial, Helvetica, sans-serif;
}

.header {
    padding: 20px 15px;
    text-align: center;
}

.header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 500;
    letter-spacing: 2px;
    font-family: Papyrus, fantasy;
}

.header p {
    color: #888;
    font-size: 13px;
    margin: 6px 0 0;
}

.gallery {
    column-count: 4;
    column-gap: 3px;
    padding: 3px;
}

.gallery-item {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    display: block;
    break-inside: avoid;
    margin-bottom: 3px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.gallery-item:hover {
    opacity: 0.88;
}

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

.lightbox.active {
    display: flex;
}

#lightbox-image {
    max-width: 94vw;
    max-height: 90vh;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    background: none;
    border: none;
    color: white;
    font-size: 42px;
    cursor: pointer;
}

.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    font-size: 28px;
    padding: 15px;
    cursor: pointer;
}

.nav:hover {
    background: rgba(255,255,255,0.3);
}

.previous {
    left: 15px;
}

.next {
    right: 15px;
}

.photo-counter {
    position: absolute;
    bottom: 15px;
    color: #aaa;
    font-size: 14px;
}

@media (max-width: 600px) {
    .header {
        padding: 15px 10px;
    }

    .gallery {
        column-count: 2;
        column-gap: 2px;
        padding: 2px;
    }

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

@media (min-width: 601px) and (max-width: 1000px) {
    .gallery {
        column-count: 3;
    }
}
