/* ==========================================================================
   首页「效果演示」视频前后对比模块 专用样式（仅作用于 #demo 作用域）
   避免与页面 Tailwind / styles.css 全局样式冲突
   ========================================================================== */
#demo {
  --primary-color: #5b57ff;
  --text-color: #222222;
  --text-secondary: #666666;
}

#demo .container-fluid {
  width: 100%;
}

#demo .container {
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 640px) {
  #demo .container { max-width: 640px; }
}
@media (min-width: 768px) {
  #demo .container {
    max-width: 768px;
    padding: 0 3rem;
  }
}
@media (min-width: 1024px) {
  #demo .container { max-width: 1024px; }
}
@media (min-width: 1280px) {
  #demo .container { max-width: 1280px; }
}
@media (min-width: 1536px) {
  #demo .container { max-width: 1536px; }
}

#demo .application-section {
  padding: 80px 0 30px;
}

#demo .section-title {
  font-size: 34px;
  font-weight: 700;
  color: var(--text-color);
  text-align: center;
  line-height: 1.3;
}

#demo .section-title .main-color,
#demo .main-color {
  color: #6233ff;
}

#demo .section-desc {
  margin-top: 12px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 16px;
}

#demo .application-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  margin-top: 80px;
}

#demo .application-text {
  flex: 1;
  max-width: 460px;
  min-width: 0;
}

#demo .application-text .tag {
  margin-bottom: 18px;
}

#demo .application-text .title {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 16px;
}

#demo .application-text .desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 30px;
}

#demo .application-swiper-content {
  flex: 1;
  min-width: 0;
}

#demo .swiper-image {
  border-radius: 18px;
  overflow: hidden;
  background: #f5f5f5;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* ---------- 视频前后对比滑块（两层视频全尺寸对齐，上层用 clip-path 裁掉右侧） ---------- */
#demo .video-compare {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  user-select: none;
  cursor: ew-resize;
}

#demo .video-compare .layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#demo .video-compare .layer-after {
  z-index: 1;
}

#demo .video-compare .layer-before {
  z-index: 2;
  clip-path: inset(0 50% 0 0);
}

#demo .video-compare .cmp-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  background: #000;
}

#demo .video-compare .cmp-tag {
  position: absolute;
  top: 14px;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  color: #fff;
  z-index: 5;
}

#demo .video-compare .tag-before {
  left: 14px;
  background: rgba(0, 0, 0, 0.55);
}

#demo .video-compare .tag-after {
  right: 14px;
  background: var(--primary-color);
}

#demo .video-compare .cmp-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #fff;
  z-index: 6;
  transform: translateX(-50%);
}

#demo .video-compare .cmp-divider::after {
  content: "\21c4";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: var(--primary-color);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  border: 2px solid var(--primary-color);
}

#demo .application-text a.btn-cta {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6c63ff 0%, #5b57ff 100%);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 6px 18px rgba(91, 87, 255, 0.25);
  transition: all 0.25s ease;
  text-decoration: none;
}

#demo .application-text a.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(91, 87, 255, 0.35);
  text-decoration: none;
}

@media (max-width: 900px) {
  #demo .application-item {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 32px;
    margin-top: 56px;
  }

  #demo .application-text {
    max-width: 100%;
  }

  #demo .application-swiper-content {
    width: 100%;
    max-width: 100%;
  }

  #demo .application-text .title {
    font-size: 24px;
  }

  #demo .section-title {
    font-size: 26px;
  }
}
