:root {
  --bg: #000;
  --fg: #eee;
  --muted: #aaa;
  --accent: #fff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
}

.header { 
  padding: 16px 20px; 
  border-bottom: 1px solid #111; 
}
.header h1 { margin: 0 0 4px; font-size: 20px; font-weight: 600; }
.header p { margin: 0; color: var(--muted); font-size: 14px; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  padding: 16px;
}

.thumb {
  width: 300px; /* gewünschte Vorschaubreite */
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  margin: 0 auto;
  cursor: pointer;
  background: #111;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}
.thumb:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }

.thumb-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.thumb-wrap:focus-within .thumb,
.thumb-wrap:focus .thumb { outline: 2px solid #444; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 20px;
  z-index: 1000;
}
.lightbox.is-open { display: flex; }

.lightbox__figure { margin: 0; max-width: 95vw; max-height: 95vh; display: grid; gap: 10px; }
.lightbox__figure img { max-width: 95vw; max-height: 85vh; width: auto; height: auto; border-radius: 8px; }
.lightbox__caption { text-align: center; color: var(--muted); font-size: 14px; }

.lightbox__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 42px; height: 42px;
  border-radius: 21px;
  border: none; background: rgba(255,255,255,0.08); color: var(--accent);
  font-size: 28px; line-height: 42px;
  cursor: pointer;
}
.lightbox__close:hover { background: rgba(255,255,255,0.16); }

.lightbox__nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px;
  border-radius: 28px;
  border: none; background: rgba(255,255,255,0.08); color: var(--accent);
  font-size: 28px; line-height: 56px;
  cursor: pointer;
}
.lightbox__nav:hover { background: rgba(255,255,255,0.16); }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }

@media (max-width: 600px) {
  .header { padding: 12px 14px; }
  .gallery { padding: 12px; gap: 10px; }
}

