/* WebGL 3D Gallery CSS - Custom styles for the comparison container */

.dummycontainer-new {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  height: 140vh;
  width: 94% !important;
  border-radius: 2vw;
  margin: 2vh auto;
  border: 5px solid rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  background-color: transparent;
  transition: background-color 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#webgl-gallery-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 1;
  pointer-events: auto;
}

/* Glassmorphic developer label inside the WebGL container */
.new-gallery-title-banner {
  position: absolute;
  top: 20px;
  left: 30px;
  z-index: 5;
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.new-gallery-title-banner h3 {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--weiß);
  font-weight: bold;
}

.new-gallery-title-banner p {
  display: none; /* Hide unnecessary subtitle */
}

#textcontainer-new {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  background-color: transparent;
  color: var(--weiß);
  z-index: 100;
  text-align: center;
  font-size: 2.5vh;
  transition: 0.3s;
  pointer-events: auto;
}

#textcontainer-new p {
  margin: 0;
}

#textcontainer-new .active-element {
  color: var(--grün);
  transition: color 0.5s ease;
  cursor: wait;
  display: inline-block;
  padding: 3px 14px;
  background-color: rgba(0, 0, 0, 0.3);
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
  border-radius: 50px;
  text-align: center;
  z-index: 100;
}

/* Premium Custom Dot Cursor */
#new-gallery-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  background-color: var(--grün);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 0.2s, height 0.2s, background-color 0.3s;
  opacity: 0;
}

#new-gallery-cursor.hovering {
  width: 30px;
  height: 30px;
  background-color: rgba(144, 194, 38, 0.3);
  border: 1.5px solid var(--grün);
  mix-blend-mode: normal;
}

/* Image Grid Reveal Overlay */
.new-gallery-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 20, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 15;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  clip-path: circle(0% at 50% 50%);
  transition: opacity 0.5s ease;
  opacity: 0;
  pointer-events: none;
  padding: 40px;
  box-sizing: border-box;
}

.new-gallery-grid-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Image Grid Styling */
.grid-container-new {
  width: 100%;
  max-width: 1200px;
  max-height: 80%;
  overflow-y: auto;
  padding-right: 10px;
}

/* Beautiful custom scrollbar for grid */
.grid-container-new::-webkit-scrollbar {
  width: 6px;
}
.grid-container-new::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
.grid-container-new::-webkit-scrollbar-thumb {
  background: var(--grün);
  border-radius: 10px;
}

.grid-new {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 10px;
}

.grid-item-new {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  background: #111;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
}

.grid-item-new:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(144, 194, 38, 0.15);
}

.grid-item-new img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.grid-item-new:hover img {
  transform: scale(1.05);
}

.grid-caption-new {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
  padding: 20px 15px 15px 15px;
  box-sizing: border-box;
  color: var(--weiß);
  font-size: 0.9rem;
  line-height: 1.3;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.grid-item-new:hover .grid-caption-new {
  opacity: 1;
  transform: translateY(0);
}

/* Close button for grid overlay */
.close-grid-btn {
  margin-top: 25px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--weiß);
  padding: 12px 35px;
  border-radius: 30px;
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.close-grid-btn:hover {
  background: var(--grün);
  border-color: var(--grün);
  color: #000;
  box-shadow: 0 8px 25px rgba(144, 194, 38, 0.4);
  transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .dummycontainer-new {
    height: 2100px !important;
  }
  .static-logo-background-new {
    top: 1050px !important;
    transform: translate(-50%, -50%) !important;
    width: 130px !important;
  }
  .new-gallery-title-banner {
    top: 15px;
    padding: 8px 20px;
  }
  .new-gallery-title-banner h3 {
    font-size: 0.9rem;
  }
  #textcontainer-new {
    top: 55px;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    padding: 0;
  }
  #textcontainer-new p {
    font-size: 0.95rem;
  }
  .grid-new {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* WebGL Shape Overlays (labels, progress, captions) */
.shape-overlay {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 170px;
  height: 170px;
  transform: translate(-50%, -50%);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.shape-label {
  color: var(--grün);
  font-size: clamp(0.75rem, 1.3vw, 1.15rem);
  font-weight: bold;
  text-align: center;
  padding: 6px 14px;
  background-color: rgba(0, 0, 0, 0.65);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  border-radius: 50px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  transition: color 0.5s ease, transform 0.3s ease;
}

.shape-overlay.hovered .shape-label {
  transform: scale(1.1);
  color: var(--orange);
}

.shape-progress-container {
  width: 75%;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  margin-top: 12px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.shape-overlay.hovered .shape-progress-container {
  opacity: 1;
}

.shape-progress-fill {
  width: 0%;
  height: 100%;
  background-color: var(--orange);
  transition: width 0.03s linear;
}

.shape-caption {
  position: absolute;
  bottom: -48px;
  width: 230px;
  font-size: 0.82rem;
  color: var(--weiß);
  background-color: rgba(0, 0, 0, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: 8px;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.5);
  word-wrap: break-word;
  line-height: 1.35;
}

.shape-overlay.hovered .shape-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Adjust size on mobile */
@media (max-width: 768px) {
  .shape-overlay {
    width: 130px;
    height: 130px;
  }
  .shape-caption {
    width: 170px;
    bottom: -40px;
    font-size: 0.75rem;
  }
}

.text-shape-container-new {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50vw;
  height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  pointer-events: none;
}

@media (max-width: 821px),
(max-width: 1025px) and (orientation: portrait) {
  .text-shape-container-new {
    width: 95vw;
    height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

.text-shape-container-new .bokeh-shape {
  pointer-events: auto;
  position: absolute;
  border-radius: 10px;
  cursor: default;
  overflow: visible;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  filter: none !important;
  box-shadow: none !important;
}

.text-shape-container-new .bokeh-shape:hover {
  filter: none !important;
  opacity: 1 !important;
  box-shadow: none !important;
}

.shape-inner-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  transform-style: preserve-3d;
}

/* Glass Cut-Edge Highlight (static diagonal light reflection) */
.glass-edge-highlight {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 45%);
  pointer-events: none;
  z-index: 4;
}

/* Organic cinematic noise texture overlay - now dynamic and flickering */
.organic-noise {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.045'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
  animation: grainFlicker 0.12s steps(1) infinite;
}

@keyframes grainFlicker {
  0%, 100% { background-position: 0% 0%; }
  20% { background-position: -5% 10%; }
  40% { background-position: 15% -5%; }
  60% { background-position: -10% 15%; }
  80% { background-position: 5% 5%; }
}

/* Monospaced Tech Label floating in 3D */
/* Glowing Shifting Border (matching original effect-frame, rendered as sibling) */
.fancy-border {
  position: absolute;
  z-index: 1;
  opacity: 0.6;
  filter: blur(2px);
  background-size: 400% 400%;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

@keyframes fancyBorderPulse {
  0% {
    transform: translate3d(0, 0, -10px) scale(1.02);
  }
  100% {
    transform: translate3d(0, 0, -10px) scale(1.08);
  }
}

/* Label styling with letter-spacing transition (no background, safe wrapping width) */
.shape-label-new {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--grün);
  font-size: clamp(14px, 1.5vw, 17px);
  font-weight: bold;
  text-align: center;
  width: 75%;
  white-space: normal;
  word-wrap: break-word;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
  letter-spacing: 1px;
  transition: color 0.5s ease, letter-spacing 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.5s ease, opacity 0.4s ease;
  z-index: 10;
  pointer-events: none;
}
.text-shape-container-new .bokeh-shape:hover .shape-label-new {
  color: var(--orange);
  letter-spacing: 4px;
  transform: translate(-50%, -50%) scale(1.05);
}

/* Clipped Category Title Background Banner */
.shape-label-bg-new {
  position: absolute;
  width: 110%; /* Extends beyond the left/right shape borders */
  left: -5%;
  transform: translateY(-50%) translateZ(5px);
  height: 22%; /* Proportional height relative to shape size */
  min-height: 44px;
  top: 50%;
  background: rgba(0, 0, 0, 0.65);
  z-index: 5;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* Slideshow images */
.shape-slideshow-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  z-index: 1;
  opacity: 0;
}
.shape-slideshow-img.active {
  opacity: 0.7;
}

/* Static logo background in the new dummy container */
.static-logo-background-new {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12%;
  height: auto;
  z-index: 1;
  pointer-events: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.static-logo-background-new img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.2;
  transition: opacity 0.3s ease;
}

/* Logo visible on mobile */

/* Lake and droplets canvas overlay */
#tesseract-lake-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}
