body {
    color: #eee;
    margin: 0;
    padding-top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Galerie */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    max-width: 900px;
    width: 100%;
}

.gallery img {
    width: 100%;
    aspect-ratio: 7 / 5;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(255 255 255 / 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    filter: brightness(0.85);
}

.gallery img:hover {
    filter: brightness(1);
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(255 255 255 / 0.25);
}

/* Viewer */
.viewer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1e1e1e;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.8);
    max-width: 90vw;
    max-height: 80vh;
    width: 700px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.viewer.active {
    opacity: 1;
    pointer-events: auto;
}

.viewer img {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.7);
    user-select: none;
}

.caption {
    margin-top: 15px;
    font-size: 1.1rem;
    color: #ccc;
    font-style: italic;
    text-align: center;
    user-select: none;
}

/* Close icon */
.close-icon {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.close-icon:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.close-icon svg {
    fill: #4f4949;
    width: 20px;
    height: 20px;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .viewer {
        width: 90vw;
        max-height: 70vh;
        padding: 15px;
    }
}