:root {
  --lila: #b39dbd;
  --lila-light: #e8dff0;
  --lila-dark: #7b6690;
  --eukalyptus: #7aab8a;
  --eukalyptus-light: #d4e8da;
  --eukalyptus-dark: #4a7a5a;
  --creme: #f9f6f0;
  --text: #3a3040;
  --text-soft: #7a6e82;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  min-height: 100vh;
  background: var(--creme);
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  color: var(--text);
}

/* ── Header ─────────────────────────────────────────────────────────────── */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.5rem 1.2rem;
  position: sticky;
  top: 0;
  background: rgba(249,246,240,0.9);
  backdrop-filter: blur(10px);
  z-index: 5;
  border-bottom: 1px solid rgba(179,157,189,0.2);
}

header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  font-weight: 300;
  font-style: italic;
  color: var(--lila-dark);
}


/* ── Masonry-Grid ────────────────────────────────────────────────────────── */

.gallery {
  columns: 2;
  column-gap: 10px;
  padding: 14px 10px 80px;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .gallery { columns: 3; column-gap: 12px; padding: 20px 16px 80px; }
}
@media (min-width: 900px) {
  .gallery { columns: 4; }
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 10px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--lila-light);
  cursor: pointer;
  animation: fadeIn 0.4s ease both;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 24px rgba(122,102,144,0.2);
}

@media (min-width: 600px) {
  .gallery-item { margin-bottom: 12px; border-radius: 12px; }
}

.gallery-item img {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* ── Lade-Skelett ────────────────────────────────────────────────────────── */

.skeleton {
  height: 180px;
  background: linear-gradient(
    90deg,
    var(--lila-light) 25%,
    rgba(249,246,240,0.8) 50%,
    var(--lila-light) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

/* ── Leer / Fehler ───────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-soft);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

/* ── Photo-View ──────────────────────────────────────────────────────────── */

.photo-view {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

.photo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: rgba(249,246,240,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(179,157,189,0.2);
  flex-shrink: 0;
}

.photo-nav {
  display: flex;
  gap: 0.5rem;
}

.photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid rgba(179,157,189,0.45);
  color: var(--text-soft);
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: 99px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.photo-btn:hover {
  background: var(--lila-light);
  color: var(--lila-dark);
  border-color: var(--lila);
}
.photo-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}
.download-btn {
  background: var(--eukalyptus-light);
  border-color: var(--eukalyptus);
  color: var(--eukalyptus-dark);
}
.download-btn:hover {
  background: var(--eukalyptus);
  color: white;
  border-color: var(--eukalyptus);
}

.photo-stage {
  flex: 1;
  min-height: 0;        /* verhindert Overflow im Flex-Container */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow: hidden;
}

.photo-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  animation: fadeIn 0.3s ease both;
}


/* ── FAB ─────────────────────────────────────────────────────────────────── */

.fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lila) 0%, var(--eukalyptus) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(122,102,144,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 10;
}
.fab:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(122,102,144,0.45); }
.fab:active { transform: scale(0.95); }
.fab svg {
  width: 22px;
  height: 22px;
  stroke: white;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Animationen ─────────────────────────────────────────────────────────── */

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
