.gallery {
  position: relative;
  width: 100%;
  gap: 1%;
  height: auto;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.vhs-container {
  flex: 0 0 25%;
  max-width: 25%;
  height: 200px;
  margin: 0.5%;
  border-radius: 8px;
  filter: url(#screen-curvature);
  animation: brightness-flicker 0.1s steps(2) infinite;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vhs-container img {
  width: auto;
  max-height: 200px;
  display: block;
  margin: 0 auto;
  cursor: url('cursor02.png'), auto;
}

.vhs-container .vhs-title {
  position: absolute;
  display: flex;
  justify-content: center;
  font-size: 8px;
  text-align: center;
  color: white;
  opacity: 0;
  background-color: rgba(0,0,0,0.7);
  padding: 2px 4px;
  border-radius: 2px;
  text-shadow:-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000;
  transition: opacity .15s ease-in-out;
}

.vhs-container:hover .vhs-title { opacity: 1; }

.vhs-container .bars {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to right, rgba(0,0,0,0.3) 0,
              rgba(0,0,0,0.3) 2px, transparent 2px, transparent 8px);
  filter: blur(1px);
  animation: bars-scroll 0.3s linear infinite;
}

.vhs-container .scanlines {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0.1) 0,
              rgba(0,0,0,0.1) 1px, transparent 1px, transparent 2px);
  mix-blend-mode: multiply;
  animation: scanlines-flicker 0.2s linear infinite, scanlines-horizontal 5s linear infinite;
}

.vhs-container .noise-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.2;
}

.vhs-slot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes scanlines-flicker { 0%,100% { background-position: 0 0; opacity: 0.1 }
                                50% { background-position: 0 4px; opacity: 0.2 } }
@keyframes scanlines-horizontal { from { background-position-y: 0 }
                                to { background-position-y: 100% } }
@keyframes bars-scroll { from { background-position-x: 0 }
                                to { background-position-x: 4px } }
@keyframes brightness-flicker { 0%,100% { filter: brightness(0.85) }
                                50% { filter: brightness(1) } }

@media (min-width: 1601px) { #links { transform: scale(1.4); }  
                            #gallery { transform: scale(1.2); transform-origin: top center; } }