:root {
  --bg-dark: #222222;
  --bg-light: #faf8f5;
  --card-bg: #2d2d2d;
  --text-dark: #1f1f1f;
  --text-muted: #666666;
  --primary-radius: 16px;
  --pill-radius: 20px;
}

/* 1. Vollbild-Container (Überdeckt Joomla vollständig) */
.wedding-gallery-app {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background-color: var(--bg-dark);
  font-family: 'Inter', sans-serif;
  color: #ffffff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.wg-content-wrapper {
  max-width: 480px;
  margin: 0 auto;
  background-color: var(--bg-light);
  min-height: 100vh;
  color: var(--text-dark);
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

.wg-header {
  background-color: var(--bg-dark);
  padding: 32px 20px 24px 20px;
  text-align: center;
}
.wg-header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.wg-hero {
  background-color: var(--bg-light);
  color: var(--text-dark);
  text-align: center;
  padding: 0 20px 24px 20px;
  position: relative;
}
.wg-avatar-wrapper {
  position: relative;
  top: -15px; /* Vorher -35px: Schiebt das Bild weiter nach unten */
  margin-bottom: 0px; /* Vorher -25px: Passt den Abstand zum Namen an */
  display: flex;
  justify-content: center;
}
.wg-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-light);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.wg-couple-names {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  margin: 10px 0 6px 0;
  font-weight: 700;
  color: #111;
}
.wg-welcome-text {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 auto;
  max-width: 320px;
  line-height: 1.4;
}

.wg-categories {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 16px 0 10px 0;
  margin-top: 10px;
  scrollbar-width: none;
}
.wg-categories::-webkit-scrollbar {
  display: none;
}
.wg-cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.wg-cat-thumb {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 6px;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}
.wg-cat-item.active .wg-cat-thumb {
  border-color: #111;
}
.wg-cat-btn {
  font-size: 12px;
  padding: 6px 16px;
  border-radius: var(--pill-radius);
  background: transparent;
  border: 1px solid #ddd;
  color: #333;
  font-weight: 500;
  white-space: nowrap;
}
.wg-cat-item.active .wg-cat-btn {
  background-color: #222;
  color: #fff;
  border-color: #222;
}

.wg-grid-container {
  padding: 0 16px 40px 16px;
}
.wg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.wg-upload-tile {
  background-color: var(--card-bg);
  border-radius: var(--primary-radius);
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffffff;
}
.wg-upload-tile i {
  font-size: 24px;
  margin-bottom: 6px;
}
.wg-upload-tile span {
  font-size: 11px;
  font-weight: 500;
}

.wg-photo-item {
  aspect-ratio: 1 / 1;
  border-radius: var(--primary-radius);
  overflow: hidden;
  position: relative;
  background-color: #e0e0e0;
  cursor: pointer;
}
.wg-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wg-loader {
  grid-column: span 3;
  text-align: center;
  padding: 20px;
  color: #666;
  font-size: 14px;
}

.wg-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  display: none;
  z-index: 100001;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Lightbox Modal (Standardmäßig ausgeblendet) */
.wg-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  z-index: 100002;
  display: none;
  align-items: center;
  justify-content: center;
}
.wg-lightbox.active {
  display: flex !important;
}
.wg-lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}
.wg-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
}
.wg-photo-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wg-video-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  pointer-events: none;
}
/* Progress Overlay */
.wg-progress-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 100005;
  display: none;
  align-items: center;
  justify-content: center;
}

.wg-progress-card {
  background: #2d2d2d;
  color: #ffffff;
  padding: 24px;
  border-radius: 16px;
  width: 85%;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.wg-progress-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  color: #eeeeee;
}

.wg-progress-bar-bg {
  width: 100%;
  height: 10px;
  background: #444444;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.wg-progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
  border-radius: 10px;
  transition: width 0.1s ease;
}

.wg-progress-percent {
  font-size: 13px;
  font-weight: 600;
  color: #00f2fe;
}
/* Spezielles 3:2 Format (1800x1200) nur für den Fotobox-Ordner */
.wg-grid-fotobox .wg-photo-item {
  aspect-ratio: 3 / 2 !important;
}

.wg-grid-fotobox .wg-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Oder 'cover', falls das Feld ohne Ränder ausgefüllt werden soll */
  border-radius: 8px;
}