* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --color-primary: #0ea5e9;
  --color-primary-glow: rgba(14, 165, 233, 0.55);
  --color-secondary: #f59e0b;
  --color-tertiary: #38bdf8;
  --color-bg: #0b0f17;
  --color-surface: rgba(15, 23, 42, 0.65);
  --color-surface-hover: rgba(14, 165, 233, 0.15);
  --color-text-main: #dfe2ee;
  --color-text-muted: #bec8d2;
  --font-body: "Inter", sans-serif;
  --font-head: "Plus Jakarta Sans", sans-serif;
  --z-map-controls: 500;
  --z-header: 1000;
  --z-modal: 2000;
  --z-lightbox: 10000;
  --z-lightbox-close: 10001;
  --z-pin-hover: 1000;
  --z-toast: 1000;
  --z-dropdown: 999;
  --z-diagram-point: 10;
  --z-sun-dot: 100;
  --color-map-bg: #121212;
  --color-surface-lowest: #0a0e16;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  overflow: hidden;
}
header {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  background: rgba(25, 28, 36, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  gap: 10px;
  z-index: var(--z-header);
}
header h1 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text-main);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Button-Gruppen */
.btn-group {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}
.toggle-btn {
  font-family: var(--font-head);
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.toggle-btn:hover {
  color: #fff;
  background: var(--color-surface-hover);
}
.toggle-btn.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.4),
    0 0 16px rgba(14, 165, 233, 0.35);
}

#map {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-map-bg);
}

/* Dunkler Satelliten-Karten-Filter */
.dark-tiles .leaflet-tile-pane {
  filter: brightness(0.55) contrast(1.2) saturate(0.7) hue-rotate(200deg)
    sepia(0.2);
}

/* Foto Pins */
.foto-pin {
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  object-fit: cover;
  transition:
    transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    border-color 0.3s,
    box-shadow 0.3s;
  cursor: pointer;
  background-color: var(--color-bg);
}
.foto-pin::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.8);
  z-index: -1;
  animation: pulse-cyan-gpu 3s infinite alternate;
}
.foto-pin:hover {
  transform: scale(1.15) translateY(-5px);
  border-color: var(--color-secondary);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.7);
  z-index: var(--z-pin-hover) !important;
  animation: none;
}
.foto-pin:hover::before {
  animation: none;
}
@keyframes pulse-cyan-gpu {
  0% {
    transform: scale(0.9);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Popup Styling */
.leaflet-popup-content-wrapper {
  background: rgba(11, 15, 23, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  color: var(--color-text-main);
  border-radius: 16px;
  border: 1px solid rgba(14, 165, 233, 0.25);
  box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.6);
}
.leaflet-popup-tip {
  background: rgba(11, 15, 23, 0.9);
  /* Fix for tip border */
  border-top: 1px solid rgba(14, 165, 233, 0.25);
  border-left: 1px solid rgba(14, 165, 233, 0.25);
}
.popup-card {
  text-align: left;
  padding: 8px;
  color: var(--color-text-main);
  max-width: 240px;
}
.popup-card h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--color-primary);
  text-align: center;
  letter-spacing: -0.01em;
}
.popup-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 12px;
  background-color: var(--color-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.popup-details {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}
.popup-details div {
  margin-bottom: 4px;
}
.popup-btn {
  display: block;
  text-align: center;
  padding: 8px 16px;
  background-color: rgba(15, 23, 42, 0.65);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-family: var(--font-head);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.3s ease;
}
.popup-btn:hover {
  background-color: var(--color-surface-hover);
  border-color: rgba(14, 165, 233, 0.4);
  color: var(--color-primary);
}

/* Lightbox Modal */
/* --- New Detail-Modal Styles --- */
.modal {
  display: none;
  position: fixed;
  z-index: var(--z-modal);
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.active {
  display: flex;
}
.modal-content-wrapper {
  background: var(--color-bg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  padding: 32px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative;
}

/* Header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.modal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-header-dot {
  width: 12px;
  height: 12px;
  background-color: var(--color-secondary);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}
#modal-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.modal-badge {
  background: rgba(14, 165, 233, 0.15);
  color: var(--color-primary);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
}
.modal-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.modal-close {
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.2s;
  display: flex;
}
.modal-close:hover {
  color: #fff;
}
.modal-subtitle {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-left: 24px;
  margin-bottom: 24px;
}

/* Project Badge */
.modal-project-badge-container {
  margin-bottom: 16px;
}
.modal-project-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 16px;
  border-radius: 20px;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}
.modal-badge-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-secondary);
  border-radius: 50%;
}

/* Image */
.modal-image-container {
  position: relative;
  width: 100%;
  margin-bottom: 24px;
}
#modal-img {
  width: 40%;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: block;
}
.modal-fullscreen-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(11, 15, 23, 0.7);
  backdrop-filter: blur(8px);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.modal-fullscreen-btn:hover {
  background: rgba(11, 15, 23, 0.9);
}
#modal-img:fullscreen {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Info Grid */
.modal-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.full-width {
  grid-column: 1 / -1;
}
.modal-info-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.camera-card {
  flex-direction: row;
  align-items: center;
  gap: 16px;
}
#modal-camera-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}
.camera-info-text {
  display: flex;
  flex-direction: column;
}
.modal-info-card strong {
  font-family: var(--font-head);
  font-size: 0.85rem;
  color: #fff;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-icon {
  color: var(--color-primary);
  margin-bottom: 8px;
}
.card-value {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}
.card-subtext {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-secondary);
}
.card-subtext.blue {
  color: var(--color-primary);
}

/* Curator Note */
.modal-curator-note {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 24px;
}
.curator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.curator-label {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.05em;
}
.curator-names {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}
.curator-text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin: 0;
  font-style: italic;
}
/* New Header Styles */
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px; /* Oder 50% für rund */
  object-fit: cover;
}
.header-title-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.header-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.badge {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-text-main);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.header-subtitle {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Map Controls Floating Menu */

.map-controls-left {
  position: absolute;
  top: 100px;
  left: 20px;
  z-index: var(--z-map-controls);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.control-group {
  background: rgba(25, 28, 36, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.control-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.control-btn:last-child {
  border-bottom: none;
}

.control-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.control-btn.active {
  background: var(--color-primary);
  color: #fff;
}

/* Info Box specific styling */
.info-box {
  padding: 10px 14px;
}

.info-box-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-dot {
  width: 10px;
  height: 10px;
  background-color: var(--color-secondary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-secondary);
}

.info-text {
  display: flex;
  flex-direction: column;
}

.info-text strong {
  font-family: var(--font-head);
  font-size: 0.75rem;
  color: var(--color-secondary);
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.info-text span {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  line-height: 1.2;
}

/* Top and Bottom Bars */
.top-bar,
.bottom-bar {
  position: absolute;
  left: 0;
  width: 100vw;
  height: 60px;
  background-color: #0b0f17; /* Very dark background as in screenshot */
  z-index: var(--z-map-controls);
  display: flex;
  align-items: center;
}

.top-bar {
  top: 0;
  border-bottom: 1px solid rgba(14, 165, 233, 0.2); /* Subtle primary color border for definition */
}

.bottom-bar {
  bottom: 0;
  justify-content: space-between;
  padding: 0 40px; /* Some padding from the edges */
  border-top: 1px solid rgba(14, 165, 233, 0.2);
}

.bottom-bar-left,
.bottom-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-title {
  color: var(--color-primary); /* Cyan */
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-copy {
  color: var(--color-text-muted); /* Gray */
  font-family: var(--font-body);
  font-size: 0.8rem;
  margin-left: 8px; /* Extra space from the cyan title */
}

.footer-link {
  color: var(--color-text-main);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.3s ease;
  margin-left: 12px;
}

.footer-link:hover {
  color: var(--color-primary);
}

/* Archiv Leiste */
.archive-bar {
  position: absolute;
  bottom: 80px; /* Above the footer */
  left: 20px;
  right: 20px;
  background: rgba(25, 28, 36, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  gap: 15px;
  z-index: var(--z-header);
  transition:
    transform 0.4s ease,
    opacity 0.4s ease;
  height: 80px; /* Adjust as necessary based on content */
}

.archive-bar.hidden {
  transform: translateY(150%);
  opacity: 0;
  pointer-events: none;
}

.archive-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
  padding-right: 15px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.archive-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.archive-title-group {
  display: flex;
  flex-direction: column;
}

#archive-title-main {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-main);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

#archive-subtitle {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.archive-carousel-container {
  display: flex;
  overflow-x: auto;
  gap: 15px;
  flex: 1;
  scroll-behavior: smooth;
  padding: 5px 0;
  /* Hide scrollbar for cleaner look */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.archive-carousel-container::-webkit-scrollbar {
  display: none;
}

.archive-item {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 6px;
  gap: 10px;
  min-width: 200px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.archive-item:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-primary-glow);
}

.archive-item-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background-color: var(--color-bg);
}

.archive-item-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.archive-item-title {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.archive-item-details {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.archive-nav-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-main);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.archive-nav-btn:hover {
  background: var(--color-surface-hover);
  color: #fff;
}

.archive-nav-btn.hidden {
  display: none;
}

/* --- Mobile Bottom Sheet Styles --- */
@media (max-width: 768px) {
  header {
    top: 10px;
    left: 10px;
    right: 10px;
    padding: max(10px, env(safe-area-inset-top)) 10px 10px 10px;
  }

  .header-title-group {
    display: none;
  }

  .btn-text {
    display: none;
  }

  .archive-title-group,
  #lang-group,
  .footer-copy {
    display: none;
  }

  .archive-header {
    min-width: auto;
    padding-right: 12px; /* reduced padding */
    border-right: none; /* optional: remove the border since there is no text */
  }

  .archive-bar {
    gap: 8px; /* Reduce gap between header icon and carousel */
  }

  .btn-group {
    gap: 2px;
    padding: 2px;
  }

  .toggle-btn {
    padding: 6px;
  }

  /* Floating Map Controls Mobile Optimizations */
  #btn-zoom-in,
  #btn-zoom-out {
    display: none !important;
  }

  .map-controls-left {
    position: fixed;
    top: 80px;
    right: 10px;
    left: auto;
    z-index: var(--z-dropdown);
  }

  .map-controls-left .control-group {
    align-items: flex-end; /* Align buttons to the right */
  }

  /* Make layers toggle button visible on mobile */
  #btn-layers-toggle {
    display: flex !important;
  }

  /* Hide layer buttons by default on mobile, show when open */
  .layer-buttons-container {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
  }

  .layer-buttons-container.open {
    display: flex;
  }

  /* Adjust sizing of remaining control buttons for mobile */
  .control-btn {
    width: 36px;
    height: 36px;
    padding: 6px;
  }

  .control-btn svg {
    width: 18px;
    height: 18px;
  }

  /* Shrink info box on mobile */
  .info-box-content {
    padding: 6px 10px;
  }
  .info-text strong {
    font-size: 0.75rem;
  }
  .info-text span {
    font-size: 0.65rem;
  }

  .modal {
    align-items: flex-end;
    padding: 0;
  }

  .modal-content-wrapper {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 24px 24px 0 0;
    margin-bottom: 0;
    border-bottom: none;
    animation: slideUp 0.3s ease-out;
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  .modal-info-grid {
    grid-template-columns: 1fr;
  }
}

/* Leaflet Popup Mobile Styles */
.leaflet-popup-content {
  max-width: 280px;
}
.leaflet-popup-content img {
  width: 100%;
  height: auto;
}

/* Custom Image Lightbox */
#image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: var(--z-lightbox);
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#image-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

#lightbox-img {
  max-width: 95%;
  max-height: 90%;
  object-fit: contain;
  margin: auto;
  border-radius: 8px; /* Optional slight rounding */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  z-index: var(--z-lightbox-close);
  padding: 10px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s;
}

#lightbox-close:hover {
  transform: scale(1.1);
  color: var(--color-primary);
}

body.lightbox-open {
  overflow: hidden;
}

/* Impressum Seite */
.impressum-content {
  max-width: 800px;
  margin: 100px auto 40px auto;
  padding: 30px;
  background: var(--color-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  color: var(--color-text-main);
  line-height: 1.6;
}

.impressum-content h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--color-text-main);
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 15px;
}

.impressum-content h2 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--color-primary);
  margin-top: 30px;
  margin-bottom: 15px;
}

.impressum-content p {
  margin-bottom: 15px;
}

.impressum-content a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.impressum-content a:hover {
  color: var(--color-secondary);
}

.footer-icon {
  margin-right: 5px;
  vertical-align: middle;
  display: inline-block;
}

.footer-link {
  display: flex;
  align-items: center;
}

/* Mobile Adjustments for Impressum */
@media (max-width: 768px) {
  .impressum-content {
    margin: 80px 15px 120px 15px; /* Leave space for mobile header/footer */
    padding: 20px;
  }

  .impressum-content h1 {
    font-size: 1.8rem;
  }

  .footer-link .link-text {
    display: none;
  }

  .footer-icon {
    margin-right: 0;
  }
}

/* Override body overflow for impressum page to allow scrolling */
body.impressum-page {
  overflow: auto;
  min-height: 100vh;
}

/* Back Button for Impressum */
.btn-back {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-text-main);
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-back:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
  .btn-back {
    font-size: 0.8rem;
    padding: 6px 12px;
    white-space: nowrap;
  }

  .top-bar-right {
    margin-left: 10px;
  }
}

.impressum-header-title {
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .impressum-header-title {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
  }
}

.impressum-top-bar {
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
}

@media (max-width: 768px) {
  .impressum-top-bar {
    padding: 0 10px;
  }
}

/* Project Modal Specific Styles */
#project-modal-lightbox .modal-content-wrapper {
  max-width: 800px;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 90vh; /* Ensure modal has a max height based on viewport */
}

#project-modal-lightbox .modal-header {
  padding: 24px 32px 16px;
  margin-bottom: 0;
  background: var(--color-bg);
  z-index: var(--z-diagram-point);
  position: sticky;
  top: 0;
}

#project-modal-lightbox .modal-project-badge-container {
  padding: 0 32px;
}

.project-modal-body {
  overflow-y: auto;
  padding: 16px 32px 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-x: hidden;
  gap: 24px;
}

/* Hero Section */
.project-hero-section {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-hero-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.3;
}

.project-hero-text {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Stats Grid */
.project-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.project-stat-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-stat-card .stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.project-stat-card .stat-icon {
  font-size: 24px;
}
.primary-color {
  color: var(--color-primary);
}
.secondary-color {
  color: var(--color-secondary);
}
.tertiary-color {
  color: var(--color-tertiary);
}
.error-color {
  color: #ffb4ab;
}

.project-stat-card .stat-label {
  font-family: var(--font-head);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.project-stat-card .stat-value {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 4px;
}

.project-stat-card .stat-subtext {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Pillars Section */
.project-pillars-section {
  background: linear-gradient(
    135deg,
    rgba(38, 42, 51, 0.9),
    rgba(28, 32, 40, 0.7)
  );
  backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.pillars-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.pillars-title {
  font-family: var(--font-head);
  font-size: 0.85rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.pillars-method {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--color-primary);
  font-weight: 500;
}

.pillar-details {
  background: rgba(28, 32, 40, 0.7);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.pillar-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.pillar-summary::-webkit-details-marker {
  display: none;
}

.pillar-summary-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pillar-number {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
}

.primary-bg {
  background: rgba(14, 165, 233, 0.2);
}
.primary-text {
  color: var(--color-primary);
}
.secondary-bg {
  background: rgba(245, 158, 11, 0.2);
}
.secondary-text {
  color: var(--color-secondary);
}
.tertiary-bg {
  background: rgba(56, 189, 248, 0.2);
}
.tertiary-text {
  color: var(--color-tertiary);
}

.pillar-summary-text {
  display: flex;
  flex-direction: column;
}

.pillar-item-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: #fff;
  font-weight: 500;
  line-height: 1.3;
}

.pillar-item-sub {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.expand-icon {
  color: var(--color-text-muted);
  transition: transform 0.3s ease;
}

.pillar-details[open] .expand-icon {
  transform: rotate(180deg);
}

.pillar-content {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pillar-desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.pillar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.pillar-tag {
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
}

/* Call to Actions */
.project-cta-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.cta-btn {
  width: 100%;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.cta-btn.primary {
  background: var(--color-primary);
  color: #003751;
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.4);
}

.cta-btn.primary:hover {
  filter: brightness(1.1);
}

.cta-btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.cta-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-primary);
}

/* Toast Message */
.toast-message {
  display: none;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-secondary);
  color: #472a00;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  align-items: center;
  gap: 12px;
  z-index: var(--z-sun-dot);
  width: max-content;
  max-width: 90%;
}

.toast-message.active {
  display: flex;
  animation: slideUpFade 0.3s ease forwards;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.toast-text {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
}

@media (min-width: 768px) {
  .project-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  #project-modal-lightbox .modal-header {
    padding: 20px 24px 12px;
  }

  #project-modal-lightbox .modal-project-badge-container {
    padding: 0 24px;
  }

  .project-modal-body {
    padding: 12px 24px 24px;
  }
}

/* Astronomical Section Styles */
.project-astronomy-section {
  background: rgba(24, 28, 36, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin-top: 8px;
}

.astronomy-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.astronomy-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.astronomy-label {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-secondary);
  letter-spacing: 0.05em;
}

.divider-line {
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  flex: 1;
}

.astronomy-badge {
  font-family: var(--font-mono-data, var(--font-body));
  font-size: 0.75rem;
  background: rgba(14, 165, 233, 0.15);
  color: var(--color-primary);
  padding: 2px 10px;
  border-radius: 12px;
}

.astronomy-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.astronomy-desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 800px;
}

.astronomy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.astronomy-diagram-card {
  background: var(--color-surface-lowest); /* surface-container-lowest */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.diagram-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.diagram-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.diagram-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono-data, var(--font-body));
  font-size: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.bg-secondary {
  background: var(--color-secondary);
}
.bg-primary {
  background: var(--color-primary);
}
.bg-muted {
  background: var(--color-text-muted);
}
.muted-color {
  color: var(--color-text-muted);
}

.diagram-svg-container {
  width: 100%;
  position: relative;
  overflow: hidden;
  padding: 8px 0;
}

.diagram-svg {
  width: 100%;
  height: auto;
  max-height: 240px;
}

.diagram-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono-data, var(--font-body));
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.astronomy-stats-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.astro-stat-card {
  background: rgba(38, 42, 51, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.astro-stat-card.tertiary-border {
  border-color: rgba(56, 189, 248, 0.3);
}

.astro-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-head);
}
.astro-stat-header span:first-child {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.astro-stat-val {
  font-size: 1.25rem;
  font-weight: 700;
}

.astro-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono-data, var(--font-body));
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.astro-stat-bold {
  color: #fff;
  font-weight: 600;
}

@media (min-width: 1024px) {
  .astronomy-grid {
    grid-template-columns: 2fr 1fr;
  }
}

/* Welcome Modal */
#welcome-modal-lightbox .welcome-content {
  max-width: 450px;
  max-height: auto;
  padding: 32px;
}
#welcome-modal-lightbox .modal-header {
  margin-bottom: 16px;
}
#welcome-modal-lightbox .welcome-body {
  display: flex;
  flex-direction: column;
}
@media (max-width: 768px) {
  #welcome-modal-lightbox .welcome-content {
    margin: 20px;
    border-radius: 24px; /* Keeping it rounded even on mobile for small dialogs */
    max-height: auto;
  }
}

/* Global Scrollbar Styles for Dark Mode */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg); /* Dark background */
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background: rgba(
    255,
    255,
    255,
    0.2
  ); /* Decent dark grey/semi-transparent white */
  border-radius: 8px;
  border: 2px solid var(--color-bg); /* Padding effect */
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3); /* Slightly lighter on hover */
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) var(--color-bg); /* For Firefox */
}

.hidden {
  display: none !important;
}

/* Tags styling for Owner field */
.tags-container {
  padding: 5px !important;
}
.tag {
  background: var(--color-primary);
  color: #000;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 5px;
}
.tag-close {
  cursor: pointer;
  font-weight: bold;
}
.tag-close:hover {
  color: rgba(0, 0, 0, 0.7);
}

.owner-link {
  color: inherit;
  text-decoration: none;
  transition:
    opacity 0.2s ease,
    text-decoration 0.2s ease;
}

.owner-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 24px;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 10;
  border-radius: 5px;
  transition: background 0.3s;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

/* ==========================================================================
   Admin UI - Responsive Layout
   ========================================================================== */

.admin-wrapper {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: var(--color-bg);
}

/* Sidebar (Desktop) / Navigation Container */
.admin-sidebar {
  width: 280px;
  background: rgba(15, 23, 42, 0.85);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
}

.admin-nav-tabs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.admin-nav-tabs .btn {
  width: 100%;
  justify-content: flex-start;
}

.admin-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 30px;
  position: relative;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  padding: 0 8px;
}
.sidebar-logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}
.sidebar-logo .logo-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.2;
  color: var(--color-text-main);
  letter-spacing: 0.05em;
}
.sidebar-logo small {
  color: var(--color-primary);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 500;
  transition: all 0.2s ease;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-main);
}
.nav-item.active {
  background: rgba(14, 165, 233, 0.15);
  color: var(--color-primary);
  border: 1px solid rgba(14, 165, 233, 0.3);
}
.sidebar-footer {
  margin-top: auto;
}

/* Main Area */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Top Bar */
.admin-top-bar {
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;

  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 15, 23, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
}
.breadcrumbs {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.breadcrumbs #breadcrumb-current {
  color: var(--color-text-main);
  font-weight: 600;
}

/* Content Area */
.admin-content-area {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.admin-tab-content {
  display: none;
  height: 100%;
}
.admin-tab-content.active {
  display: block;
}

/* Dual Pane Layout */
.dual-pane-layout {
  display: flex;
  height: 100%;
}
.list-pane {
  width: 380px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.4);
}
.list-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.search-bar-wrapper {
  position: relative;
  margin-bottom: 16px;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
}
.search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 10px 10px 40px;
  color: var(--color-text-main);
  font-family: var(--font-body);
}
.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: rgba(14, 165, 233, 0.05);
}
.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
}
.filter-chips::-webkit-scrollbar {
  height: 0;
}
.filter-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-muted);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.filter-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-main);
}
.filter-chip.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #000;
}
.chip-count {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 0.7rem;
}
.filter-chip.active .chip-count {
  background: rgba(0, 0, 0, 0.2);
}
.list-controls {
  display: flex;
  gap: 8px;
}
.btn-small {
  padding: 8px 12px;
  font-size: 0.85rem;
}
.btn-primary {
  background: var(--color-primary);
  color: #000;
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-tertiary);
  color: #000;
}
.btn-icon {
  padding: 8px;
}

.list-container {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.detail-pane {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.detail-form {
  padding: 0; /* padding handled inside elements */
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* Hero Header */
.hero-header {
  position: relative;
  border-radius: 16px;
  margin: 32px 32px 24px 32px;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: brightness(0.4) saturate(0.8);
  z-index: 1;
  transition: all 0.3s ease;
}
.hero-content {
  position: relative;
  z-index: 2;
}
.hero-badges {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
}
.badge-primary {
  background: rgba(14, 165, 233, 0.2);
  color: var(--color-tertiary);
  border: 1px solid rgba(14, 165, 233, 0.3);
}
.badge-amber {
  background: rgba(245, 158, 11, 0.2);
  color: var(--color-secondary);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.hero-title {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 16px 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.hero-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
.hero-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Accordions */
.form-accordions {
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.accordion-section {
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.accordion-section[open] {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.accordion-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
}
.accordion-header::-webkit-details-marker {
  display: none;
}
.accordion-title-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}
.accordion-icon {
  width: 40px;
  height: 40px;
  background: rgba(14, 165, 233, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}
.accordion-header h3 {
  margin: 0 0 4px 0;
  font-size: 1rem;
  font-family: var(--font-head);
  font-weight: 600;
}
.accordion-subtitle {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
.chevron {
  color: var(--color-text-muted);
  transition: transform 0.3s ease;
}
.accordion-section[open] .chevron {
  transform: rotate(180deg);
}
.accordion-content {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Media Cards Grid */
.media-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.media-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.media-card-header {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.media-card-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}
.media-preview-area {
  height: 140px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.media-preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.media-upload-area {
  padding: 12px;
  display: flex;
  justify-content: center;
}
.form-control-file {
  display: none;
}
.file-upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
}
.file-upload-label:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-main);
  border-color: rgba(255, 255, 255, 0.4);
}

.mt-10 {
  margin-top: 10px;
}
.mt-15 {
  margin-top: 15px;
}
.mb-15 {
  margin-bottom: 15px;
}

/* Input Group */
.input-group {
  display: flex;
  align-items: center;
}
.input-prefix {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-right: none;
  border-radius: 8px 0 0 8px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.input-group .form-control {
  border-radius: 0 8px 8px 0;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.stat-box {
  background: rgba(0, 0, 0, 0.2);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.stat-box label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  display: block;
}
.stat-box input {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-head);
  color: var(--color-primary);
  width: 100%;
}
.stat-box input:focus {
  outline: none;
  background: transparent;
}

/* Sticky Action Bar */
.sticky-action-bar {
  position: fixed;
  bottom: 0;
  left: 280px; /* sidebar width */
  right: 0;
  margin-left: 380px; /* list pane width */
  background: rgba(11, 15, 23, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 32px;
  display: flex;
  gap: 12px;
  z-index: 100;
}

/* Mobile Nav */
.admin-bottom-nav {
  display: none;
}

.admin-bottom-nav .nav-item {
  background: none;
  border: none;
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  cursor: pointer;
  padding: 8px;
}
.admin-bottom-nav .nav-item.active {
  color: var(--color-primary);
}

.admin-bottom-nav .nav-item-new {
  position: relative;
  top: -15px;
  background: var(--color-primary);
  color: #000;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}
.admin-bottom-nav .nav-item-new svg {
  width: 28px;
  height: 28px;
}

.mobile-back-bar {
  display: none;
}

/* Media Queries */
@media (max-width: 1024px) {
  .list-pane {
    width: 320px;
  }
  .sticky-action-bar {
    left: 280px;
    margin-left: 320px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 0; /* remove old admin body padding */
  }

  .admin-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background-color: var(--color-bg);
  }

  .admin-sidebar {
    display: none !important;
  }

  .admin-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: var(--color-surface);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
  }

  .admin-main-content {
    width: 100%;
    max-width: 100vw;
    padding: 15px;
    padding-bottom: 90px; /* space for bottom nav */
    box-sizing: border-box;
  }

  .admin-section {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    padding: 15px;
  }

  .form-grid {
    width: 100%;
    box-sizing: border-box;
  }

  .admin-card {
    max-width: 100vw;
  }
}

/* List Item Styles */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.list-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.list-item.active {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.3);
}
.list-item-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
}
.list-item-content {
  flex: 1;
  overflow: hidden;
}
.list-item-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.list-item-sub {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  #solargrafie-detail-pane {
    display: none !important;
  }
  .dual-pane-layout {
    flex-direction: column;
  }
  .list-pane {
    width: 100%;
    border-right: none;
  }

  /* Mobile Form Active State */
  #tab-solargrafien.mobile-form-active .list-pane {
    display: none !important;
  }
  #tab-solargrafien.mobile-form-active #solargrafie-detail-pane {
    display: flex !important;
    flex-direction: column;
  }
}

.mobile-back-btn {
  display: none;
}
@media (max-width: 768px) {
  .mobile-back-btn {
    display: block;
  }
}
