/* 重置样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 并列容器样式 */
.comparison-container {
  display: flex;
  gap: 5px;
  width: 100%;
  max-width: 1000px;
  margin: 20px auto;
  padding: 0 20px;
}

/* 每个对比组容器 */
.comparison-col {
  position: relative;
  flex: 1;
  min-width: 0;
  border-radius: 5px;
  padding: 5px;
  background: #f8f8f8;
}

/* 对比组件标题 */
.comparison-title {
  position: absolute;
  top: 5%;
  left: 78%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 5px 10px;
  border-radius: 0 0 5px 5px;
  z-index: 10;
  text-align: center;
  font-weight: 600;
  font-size: 10px;
}

/* 图片容器 */
.images-container {
  position: relative;
  height: 300px;
  overflow: hidden;
  border-radius: 1px;
  box-shadow: 0 2px 1px rgba(0,0,0,0.1);
  margin: 0 auto;
}

/* 图片样式 */
.images-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* object-fit: cover; */
  object-fit: contain;
  pointer-events: none;
}


/* 图片容器 */
.images-container2 {
  position: relative;
  height: 300px;
  width: 1000px;
  overflow: hidden;
  border-radius: 1px;
  box-shadow: 0 2px 1px rgba(0,0,0,0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

/* 图片样式 */
.images-container2 img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
}


/* 上层图片 - 添加过渡效果 */
.after-image {
  clip-path: polygon(var(--slider-pos, 50%) 0, 100% 0, 100% 100%, var(--slider-pos, 50%) 100%);
  transition: clip-path 0.1s ease;
}

.before-image {
  clip-path: polygon(0 0, var(--slider-pos, 50%) 0, var(--slider-pos, 50%) 100%, 0 100%);
  transition: clip-path 0.1s ease;
}


/* 滑块相关样式 */
.slider-line {
  position: absolute;
  top: 0;
  left: var(--slider-pos, 50%);
  width: 2px;
  height: 100%;
  background: white;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
}

.slider-icon {
  position: absolute;
  top: 50%;
  left: var(--slider-pos, 50%);
  transform: translate(-50%, -50%);
  background: white;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
  z-index: 2;
  pointer-events: none;
}

.slider-icon svg {
  width: 20px;
  height: 20px;
  color: #333;
  transform: rotate(90deg);
}

input.slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 3;
}

/* 滑块提示 */
.slider-thumb {
  position: absolute;
  top: 0;
  left: var(--slider-pos, 50%);
  width: 5px;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
  display: none;
}

/* 滑块控制时显示滑块位置 */
.images-container:hover .slider-thumb {
  display: block;
}

/* 响应式适应 */
@media (max-width: 900px) {
  .comparison-container {
    flex-direction: column;
    gap: 15px;
  }
  
  .comparison-col {
    width: 100%;
  }
  
  .images-container {
    height: 250px;
  }
}

@media (max-width: 600px) {
  .images-container {
    height: 200px;
  }
}


.global-slider-container {
  width: 80%;
  max-width: 800px;
  margin: 20px auto 40px;
  text-align: center;
}

.global-slider {
  width: 100%;
  margin: 10px 0;
}

.slider-value {
  display: inline-block;
  width: 80px;
  text-align: center;
  font-weight: bold;
}

