:root {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --text-secondary: #aaaaaa;
  --accent-color: #feca57;
  --surface-color: #1e1e1e;
  --border-color: #333;
  --font-primary: "Roboto", sans-serif;
}

/* Splash Screen */
#splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: black;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  animation: autoFade 1s forwards;
  animation-delay: 2.5s;
}
@keyframes autoFade {
  to {
    opacity: 0;
    visibility: hidden;
  }
}
#splash img {
  width: 80vw;
  height: auto;
}
/* Grundlayout */
body {
  background-color: var(--bg-color);
  margin: 0;
  padding: 0;
  color: var(--text-color);
  font-family: var(--font-primary);
  line-height: 1.6;
  letter-spacing: 0.02em;
  transition: background-color 0.3s, color 0.3s;
}
header, main, footer {
  padding: 10px;
  max-width: 1200px;
  margin: 0 auto;
}
header {
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* Galerie-Überschrift */
#gallery-heading {
  font-size: 36px;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(45deg, #ff6b6b, #feca57);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 20px 0;
  text-align: center;
}
/* Erklärung (unpersönlich formuliert) */
#explanation {
  text-align: center;
  font-size: 14px;
  color: lightgray;
  margin-bottom: 10px;
  max-width: 90%;
}
/* Suchfeld */
#search-container {
  width: 90%;
  text-align: center;
  margin: 10px 0;
}
#search-input {
  padding: 12px 20px;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 25px;
  background: var(--surface-color);
  color: var(--text-color);
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
#search-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(254, 202, 87, 0.2);
}
/* Galerie-Info: Anzahl & Zeitraum in einer Zeile, direkt unter der Suchbox */
#gallery-info {
  text-align: center;
  font-size: 14px;
  margin-bottom: 10px;
  color: lightgray;
  max-width: 90%;
}
/* Sortieroptionen: direkt unter der Info-Zeile, gleiche Schriftgröße, mit Leerzeile davor */
#sort-options {
  text-align: center;
  margin-bottom: 10px;
  font-size: 14px;
  color: lightgray;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
#sort-options button {
  background: var(--surface-color);
  font-family: inherit;
  font-size: inherit;
  padding: 8px 16px;
  cursor: pointer;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  transition: all 0.3s ease;
  color: var(--text-secondary);
}
#sort-options button:hover,
#sort-options button:focus {
  border-color: var(--accent-color);
  color: var(--text-color);
  transform: translateY(-2px);
  outline: none;
}
#sort-options button:focus-visible {
  outline: 2px solid #feca57;
  outline-offset: 2px;
}
/* Aktive Sortieroption */
#sort-options button.active,
#sort-options button[aria-pressed="true"] {
  background: var(--accent-color);
  color: var(--bg-color);
  border-color: var(--accent-color);
  font-weight: bold;
}
/* Thumbnails */
#thumbnail-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  padding: 15px;
  max-width: 1200px;
  margin: 0 auto;
}
.thumbnail {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  position: relative;
  border: 2px solid white;
  box-sizing: border-box;
  cursor: pointer;
  transition: transform 0.3s;
  overflow: hidden;
}
.thumbnail:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
  z-index: 2;
}
.thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}
/* Lightbox Overlay mit Animation */
#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 1000;
  animation: lightboxFadeIn 0.5s ease-out;
}
@keyframes lightboxFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
#lightbox img {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
  border: 2px solid white;
}
#lightbox-caption {
  margin-top: 10px;
  font-size: 16px;
  color: lightgray;
  text-align: center;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(50, 50, 50, 0.7);
  border: none;
  color: white;
  padding: 10px;
  cursor: pointer;
  font-size: 20px;
}
#lightbox-prev {
  left: 20px;
}
#lightbox-next {
  right: 20px;
}
#lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(50, 50, 50, 0.7);
  border: none;
  color: white;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 18px;
}
/* Top Navigation Bar */
#top-nav {
  background-color: var(--surface-color);
  padding: 15px 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
#top-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid transparent;
}
#top-nav a:hover {
  background: var(--accent-color);
  color: var(--bg-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(254, 202, 87, 0.3);
}
/* Footer Impressum: Stylisch und modern */
#impressum {
  background: linear-gradient(135deg, #333, #555);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  text-align: center;
  margin: 40px auto;
  padding: 20px;
  max-width: 800px;
  font-size: 13px;
  color: #fff;
}
#impressum h2 {
  margin-bottom: 10px;
  font-size: 20px;
  color: #ffcc00;
}
