/* Digital Rain */
.digital-rain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  overflow: hidden;
}

.rain-line {
  position: absolute;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(0, 255, 245, 0.8), transparent);
  animation: rainFall 4s linear infinite;
}

@keyframes rainFall {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  grid-auto-rows: 200px;
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .gallery-large {
    grid-column: span 2;
    grid-row: span 2;
  }
  .gallery-wide {
    grid-column: span 2;
  }
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item.img-error {
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-corners {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.gc {
  position: absolute;
  width: 16px;
  height: 16px;
  transition: border-color 0.3s;
}

.gc-tl {
  top: 0;
  left: 0;
  border-left: 2px solid rgba(0, 255, 245, 0.5);
  border-top: 2px solid rgba(0, 255, 245, 0.5);
}
.gc-tr {
  top: 0;
  right: 0;
  border-right: 2px solid rgba(111, 0, 255, 0.5);
  border-top: 2px solid rgba(111, 0, 255, 0.5);
}
.gc-bl {
  bottom: 0;
  left: 0;
  border-left: 2px solid rgba(111, 0, 255, 0.5);
  border-bottom: 2px solid rgba(111, 0, 255, 0.5);
}
.gc-br {
  bottom: 0;
  right: 0;
  border-right: 2px solid rgba(0, 255, 245, 0.5);
  border-bottom: 2px solid rgba(0, 255, 245, 0.5);
}

.gallery-item:hover .gc-tl {
  border-color: var(--cyan);
}
.gallery-item:hover .gc-tr {
  border-color: var(--purple);
}
.gallery-item:hover .gc-bl {
  border-color: var(--purple);
}
.gallery-item:hover .gc-br {
  border-color: var(--cyan);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 12, 42, 0.95), rgba(5, 12, 42, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(transparent 50%, rgba(0, 255, 245, 0.1) 50%);
  background-size: 100% 4px;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-scanline {
  opacity: 1;
}

.gallery-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s;
  z-index: 5;
}

.gallery-item:hover .gallery-info {
  transform: translateY(0);
}

.gallery-info h3 {
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--light);
  margin-bottom: 0.25rem;
}

.gallery-info-line {
  width: 64px;
  height: 1px;
  background: linear-gradient(to right, var(--cyan), transparent);
}

.gallery-info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.gallery-live {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--cyan);
}

.live-dot {
  width: 6px;
  height: 6px;
  background-color: var(--cyan);
  animation: statusPulse 1.5s ease-in-out infinite;
}

.gallery-live span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.gallery-border-hover {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  transition: border-color 0.3s;
  pointer-events: none;
}

.gallery-item:hover .gallery-border-hover {
  border-color: rgba(0, 255, 245, 0.3);
}

/* Play Button */
.gallery-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.play-btn-inner {
  position: relative;
  width: 80px;
  height: 80px;
  border: 2px solid rgba(0, 255, 245, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 2;
}

.gallery-item:hover .play-btn-inner {
  transform: scale(1.1);
  border-color: var(--cyan);
}

.play-btn-inner svg {
  margin-left: 4px;
}

.play-btn-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  transform: translate(-50%, -50%);
  border: 2px solid var(--cyan);
  animation: playPulse 2s ease-in-out infinite;
}

@keyframes playPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}
