:root {
  --bg: #ffffff;
  --bg-subtle: #f9f9fb;
  --bg-hover: #f3f3f6;
  --border: #e8e8ed;
  --border-light: #f0f0f3;
  --text-main: #111113;
  --text-muted: #6e6e73;
  --text-faint: #98989f;
  --accent: #111113;
  --accent-hover: #2e2e33;
  --heart-active: #e53935;
  --header-height: 64px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* -------------------------------------------------------------
   Sticky Header Container & Social Collab Banner
------------------------------------------------------------- */
.sticky-header-container {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.sticky-social-banner {
  background: #111113;
  color: #ffffff;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.social-banner-content {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto;
}

.social-banner-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: currentColor;
  opacity: 0.9;
}

.social-banner-text {
  color: #f1f2f4;
  line-height: 1.4;
}

.social-banner-link {
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.social-banner-link:hover {
  opacity: 0.8;
}

.gallery-header {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  transition: var(--transition);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}

.brand-img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.brand-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  padding-left: 10px;
  margin-left: 4px;
}

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

.badge-info {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-light);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition);
  user-select: none;
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg-hover);
  border-color: #d0d0d8;
}

.btn-primary {
  background: var(--text-main);
  color: #ffffff;
  border-color: var(--text-main);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
}

/* -------------------------------------------------------------
   Main Hero / Title Banner
------------------------------------------------------------- */
.hero-banner {
  padding: 44px 20px 24px;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.hero-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
}

.hero-title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-main);
  line-height: 1.15;
  margin-bottom: 12px;
  text-transform: uppercase;
}

/* -------------------------------------------------------------
   Creator Title (Galerie erstellt von VIDARO)
------------------------------------------------------------- */
.creator-title-wrapper {
  margin: 4px auto 18px;
  display: flex;
  justify-content: center;
}

.creator-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 8px 22px 8px 20px;
  border-radius: 40px;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.creator-title:hover {
  background: #ffffff;
  border-color: #111113;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.creator-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-main);
}

.creator-logo {
  height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.creator-title:hover .creator-logo {
  transform: scale(1.02);
}

.creator-arrow {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.creator-title:hover .creator-arrow {
  transform: translate(2px, -2px);
  color: #111113;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-photographer {
  font-weight: 600;
  color: var(--text-main);
}

/* -------------------------------------------------------------
   Filter & Layout Toolbar
------------------------------------------------------------- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 24px;
  max-width: 1680px;
  margin: 0 auto 16px;
  border-bottom: 1px solid var(--border-light);
}

.filter-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  transition: var(--transition);
}

.pill:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.pill.active {
  color: var(--text-main);
  background: var(--bg-subtle);
  border-color: var(--border);
  font-weight: 600;
}

.pill-count {
  font-size: 11px;
  opacity: 0.7;
  margin-left: 2px;
}

.layout-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
}

.layout-btn {
  background: transparent;
  border: none;
  padding: 6px;
  border-radius: 4px;
  color: var(--text-faint);
  cursor: pointer;
  transition: var(--transition);
}

.layout-btn:hover {
  color: var(--text-main);
}

.layout-btn.active {
  color: var(--text-main);
  background: var(--bg-hover);
}

/* -------------------------------------------------------------
   Masonry Photo Grid
------------------------------------------------------------- */
.gallery-container {
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.photo-grid {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.grid-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.photo-card {
  position: relative;
  background: #f2f2f5;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.photo-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.photo-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.photo-card:hover img {
  transform: scale(1.02);
}

/* Card overlay */
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 35%, transparent 65%, rgba(0, 0, 0, 0.45) 100%);
  opacity: 0;
  transition: opacity 0.22s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  pointer-events: none;
}

.photo-card:hover .card-overlay {
  opacity: 1;
}

.overlay-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: auto;
}

.card-num {
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 7px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.overlay-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: auto;
}

.card-author {
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  letter-spacing: 0.02em;
}

.card-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  transition: var(--transition);
}

.card-btn:hover {
  background: #ffffff;
  transform: scale(1.1);
}

.card-btn.favorited {
  color: var(--heart-active);
  background: #ffffff;
}

/* -------------------------------------------------------------
   Pic-Time Lightbox / Carousel (Refined & Mobile-Optimized)
------------------------------------------------------------- */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #ffffff;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  transition: opacity 0.25s ease;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.lightbox-modal.active {
  display: flex;
  opacity: 1;
}

/* Top Bar */
.lightbox-topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 10;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.lightbox-author {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lightbox-counter {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 50vw;
}

.lightbox-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--text-main);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.lightbox-close:hover {
  background: var(--bg-hover);
}

/* Carousel Stage - Rigid Centering & Containment */
.lightbox-stage {
  flex: 1;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.carousel-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 3 Image slots: Prev, Current, Next */
.slide-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  will-change: transform, opacity;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.32s ease;
}

.slide-item img {
  max-width: 82vw;
  max-height: calc(100vh - 150px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.10);
  border-radius: 2px;
  pointer-events: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* Desktop Slot classes */
.slide-item.current {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
  z-index: 5;
}

.slide-item.prev {
  transform: translate3d(-78%, 0, 0) scale(0.85);
  opacity: 0.22;
  z-index: 2;
  cursor: pointer;
  pointer-events: auto;
}

.slide-item.prev:hover {
  opacity: 0.45;
}

.slide-item.next {
  transform: translate3d(78%, 0, 0) scale(0.85);
  opacity: 0.22;
  z-index: 2;
  cursor: pointer;
  pointer-events: auto;
}

.slide-item.next:hover {
  opacity: 0.45;
}

/* Nav Arrows */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 80px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  transition: var(--transition);
  color: var(--text-main);
  opacity: 0.85;
}

.nav-arrow:hover {
  background: #ffffff;
  opacity: 1;
  box-shadow: var(--shadow-sm);
}

.nav-arrow.left {
  left: 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.nav-arrow.right {
  right: 20px;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.nav-arrow svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.5;
}

/* Tap zones for quick touch/click on sides */
.tap-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 25%;
  z-index: 8;
  cursor: pointer;
}
.tap-zone.left { left: 0; }
.tap-zone.right { right: 0; }

/* Lightbox Bottom Toolbar */
.lightbox-bottombar {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 10;
  flex-shrink: 0;
}

.bottom-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 4px;
  transition: var(--transition);
  text-decoration: none;
}

.bottom-btn:hover {
  background: var(--bg-hover);
}

.bottom-btn.download-cta {
  background: var(--text-main);
  color: #ffffff;
  border-radius: 24px;
  padding: 8px 18px;
}

.bottom-btn.download-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.bottom-btn.favorited {
  color: var(--heart-active);
}

/* Toast Notification */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  background: rgba(17, 17, 19, 0.94);
  color: #ffffff;
  backdrop-filter: blur(12px);
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2000;
  text-align: center;
  white-space: nowrap;
}

.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* -------------------------------------------------------------
   Responsive & Mobile Specific Overrides
------------------------------------------------------------- */
@media (max-width: 860px) {
  .gallery-header {
    padding: 0 16px;
  }
  .header-center {
    display: none;
  }
  .brand-sub {
    display: none;
  }
  .btn span.btn-label {
    display: none;
  }
  .hero-banner {
    padding: 28px 16px 18px;
  }
  .hero-title {
    font-size: 26px;
  }
  .sticky-social-banner {
    padding: 6px 12px;
    font-size: 11px;
    line-height: 1.35;
  }
  .social-banner-icon {
    width: 12px;
    height: 12px;
  }
  .creator-title-wrapper {
    margin: 4px auto 14px;
  }
  .creator-title {
    padding: 6px 14px;
    gap: 8px;
  }
  .creator-label {
    font-size: 11px;
  }
  .creator-logo {
    height: 20px;
  }
  .creator-arrow {
    font-size: 13px;
  }
  .gallery-container {
    padding: 0 12px 60px;
  }
  .photo-grid {
    gap: 10px;
  }
  .grid-col {
    gap: 10px;
  }

  /* Mobile Lightbox: STRICT CONTAINMENT & FIXATION */
  .slide-item.prev, .slide-item.next {
    display: none !important;
  }

  .slide-item.current {
    transform: translate3d(0, 0, 0) !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .slide-item img {
    max-width: 94vw !important;
    max-height: calc(100dvh - 130px) !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important;
    border-radius: 4px !important;
  }

  /* Floating Circular Arrows on Mobile */
  .nav-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.88) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
    opacity: 0.95 !important;
  }
  .nav-arrow.left { left: 10px !important; }
  .nav-arrow.right { right: 10px !important; }
  .nav-arrow svg {
    width: 22px;
    height: 22px;
  }

  .lightbox-topbar {
    padding: 0 14px;
    height: 50px;
  }
  .lightbox-counter {
    font-size: 12px;
    max-width: 45vw;
  }
  .lightbox-bottombar {
    height: 56px;
    gap: 8px;
    padding: 0 8px;
  }
  .bottom-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
  .bottom-btn.download-cta {
    padding: 6px 14px;
  }
  .bottom-btn span {
    font-size: 11px;
  }
}
