* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background: #111;
    color: #fff;
}

/* Górny pasek */
.top-bar {
    position: sticky;
    top: 0;
    background: #1c1c1c;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    border-bottom: 1px solid #333;
}

    .top-bar h1 {
        font-size: 22px;
    }

.logo {
    position: absolute;
    left: 15px;
    height: 40px;
}

#toggleSize {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

/* Galeria */
.gallery-container {
    padding: 20px;
    display: grid;
    gap: 15px;
}

    .gallery-container.small {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .gallery-container.large {
        grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    }

    .gallery-container img {
        width: 100%;
        height: 300px;
        object-fit: cover;
        cursor: pointer;
        border-radius: 6px;
        transition: transform 0.3s;
    }

    .gallery-container.large img {
        height: 500px;
    }

    .gallery-container img:hover {
        transform: scale(1.03);
    }

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-img {
    max-width: 90%;
    max-height: 85%;
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 35px;
    cursor: pointer;
}

.nav {
    position: absolute;
    top: 50%;
    font-size: 40px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    transform: translateY(-50%);
}

    .nav.left {
        left: 20px;
    }

    .nav.right {
        right: 20px;
    }
.view-buttons {
    position: absolute;
    right: 15px;
    display: flex;
    gap: 10px;
}

    .view-buttons button {
        background: #2a2a2a;
        border: 1px solid #444;
        color: #fff;
        padding: 6px 8px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 18px;
        transition: background 0.2s, transform 0.2s;
    }

        .view-buttons button:hover {
            background: #3a3a3a;
            transform: scale(1.05);
        }

        .view-buttons button.active {
            background: #555;
            border-color: #777;
        }

/* Mobile */
@media (max-width: 600px) {

    /* SMALL – lista */
    .gallery-container.small {
        grid-template-columns: 1fr;
    }

        .gallery-container.small img {
            height: 220px;
        }

    /* LARGE – kwadratowe kafelki */
    .gallery-container.large {
        grid-template-columns: repeat(2, 1fr);
    }

        .gallery-container.large img {
            aspect-ratio: 1 / 1;
            height: auto;
        }
}