.before-after-slider {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  cursor: grab;
}

.before-after-slider:active {
  cursor: grabbing;
}

.slider-container {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
}

.before-image,
.after-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.before-image img,
.after-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-label {
  position: absolute;
  top: 20px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  font-weight: 600;
  font-size: 14px;
  border-radius: 4px;
  backdrop-filter: blur(5px);
}

.before-label {
  left: 20px;
  border: 2px solid #4CAF50;
}

.after-label {
  right: 20px;
  border: 2px solid var(--accent-color);
}

.slider-censorship-banner {
  position: absolute;
  bottom: 38%;
  left: 40%;
  transform: translateX(-50%) rotate(-15deg);
  background: #FFD700;
  color: #000;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 2px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  border: 2px solid #FFA000;
}

.slider-censorship-banner-small {
  position: absolute;
  bottom: 0%;
  left: 40%;
  transform: translateX(-50%) rotate(-10deg);
  background: #FF6B35;
  color: #fff;
  padding: 2px 12px;
  font-weight: 600;
  font-size: 8px;
  letter-spacing: 1px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
  border: 2px solid #E55A2B;
  z-index: 5;
}

.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-color);
  cursor: ew-resize;
  z-index: 10;
  box-shadow: var(--neon-glow-soft);
  box-shadow: 0 0 20px rgba(65, 65, 65, 0.8), 0 0 40px var(--accent-color);
}

.handle-line {
  width: 100%;
  height: 100%;
  background: var(--accent-color);
  background: linear-gradient(to bottom, 
    rgba(255, 255, 255, 0.9) 0%,
    var(--accent-color) 20%,
    var(--accent-color) 80%,
    rgba(255, 255, 255, 0.9) 100%
  );
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.5);
}

.slider-handle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -1px;
  width: 6px;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  border-left: 1px solid rgba(255, 255, 255, 0.6);
  border-right: 1px solid rgba(255, 255, 255, 0.6);
  z-index: -1;
}

.handle-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: var(--accent-color);
  border: 3px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(255, 255, 255, 0.7);
  }
  70% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 10px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

.handle-circle:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: var(--neon-glow);
}

@media (max-width: 768px) {
  .slider-container {
    height: 300px;
  }
  
  .handle-circle {
    width: 35px;
    height: 35px;
  }
  
  .image-label {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .slider-censorship-banner {
    font-size: 14px;
    padding: 6px 18px;
  }
}

/* Додаткові мобільні стилі */
@media (max-width: 480px) {
  .before-after-slider {
    max-width: 95%;
    margin: 0 auto;
  }
  
  .slider-container {
    height: 250px; /* Зменшуємо висоту для маленьких екранів */
  }
  
  .handle-circle {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  
  .slider-handle {
    width: 3px; /* Зменшуємо ширину handle */
  }
}