*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f5f5f5;
  padding: 20px;
}

img {
  display: block;
  max-width: 100%;
}

main {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

h1 {
  margin-bottom: 30px;
  color: #333;
  font-size: 2.5rem;
  text-align: center;
}

.controls {
  margin-bottom: 30px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.controls label {
  font-weight: bold;
  color: #333;
}

.controls select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.mode-selector {
  display: flex;
  gap: 5px;
  margin-right: 20px;
}

.mode-btn {
  padding: 8px 16px;
  border: 2px solid #007acc;
  background: white;
  color: #007acc;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.mode-btn:hover {
  background: #007acc;
  color: white;
}

.mode-btn.active {
  background: #007acc;
  color: white;
}

.container {
  display: grid;
  place-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  --position: 50%;
  max-width: 1600px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.image-container {
  max-width: 1600px;
  height: 1000px;
  aspect-ratio: 3/2;
  position: relative;
  background: #f0f0f0;
  border: 2px solid #ccc;
}

.slider-image,
.slider-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left;
  position: absolute;
  top: 0;
  left: 0;
  user-select: none;
}

#beforeImage,
#beforeVideo {
  z-index: 2;
  clip-path: inset(0 0 0 var(--position));
}

#afterImage,
#afterVideo {
  z-index: 1;
}

.slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  opacity: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
}

.slider:focus-visible ~ .slider-button {
  outline: 5px solid black;
  outline-offset: 3px;
}

.slider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: .2rem;
  background-color: #fff;
  left: var(--position);
  transform: translateX(-50%);
  pointer-events: none;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  z-index: 5;
}

.slider-button {
  position: absolute;
  background-color: #fff;
  color: black;
  padding: .5rem;
  border-radius: 100vw;
  display: grid;
  place-items: center;
  top: 50%;
  left: var(--position);
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 1px 1px 1px hsl(0, 50%, 2%, .5);
  z-index: 5;
}

.overlay-label {
  position: absolute;
  bottom: 20px;
  font-weight: bold;
  font-size: 28px;
  padding: 8px 16px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  z-index: 6;
  pointer-events: none;
  text-shadow: none;
  font-family: Arial, sans-serif;
  letter-spacing: 0.5px;
  transition: clip-path 0.02s linear;
}

.overlay-label-left {
  left: 13px;
}

.overlay-label-right {
  right: 13px;
}

.labels {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  font-weight: bold;
  font-size: 20px;
  padding: 0 20px;
}

/* Video Controls Styles */
.video-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.control-btn {
  padding: 10px 20px;
  border: 2px solid #007acc;
  background: white;
  color: #007acc;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.control-btn:hover {
  background: #007acc;
  color: white;
}

/* Navigation Links */
.mode-btn {
  padding: 8px 16px;
  border: 2px solid #007acc;
  background: white;
  color: #007acc;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.mode-btn:hover {
  background: #007acc;
  color: white;
}

.mode-btn.active {
  background: #007acc;
  color: white;
}

/* .label-left {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.15);
  padding: 12px 20px;
  border-radius: 25px;
  border: 2px solid #e74c3c;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
}

.label-right {
  color: #3498db;
  background: rgba(52, 152, 219, 0.15);
  padding: 12px 20px;
  border-radius: 25px;
  border: 2px solid #3498db;
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
} */