/* 基础样式 */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: #1b1b1b;
    color: #ffffff;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #5B3FD9, #165DFF);
    z-index: 50;
    transition: width 0.2s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

/* .testimonial-slider {
    scroll-snap-type: x mandatory;
} */
 /* 底部滑动条 */
.testimonial-slider {
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

/* 隐藏滚动条 */
.testimonial-slider::-webkit-scrollbar {
    display: none;
}

.testimonial-slide {
    scroll-snap-align: start;
}

.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

/* 图片对比滑块样式 */
.compare-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(99, 102, 241, 0.05));
    touch-action: none; /* 禁用浏览器默认触摸行为 */
    will-change: --slider-position; /* 告诉浏览器这个属性会频繁变化 */
}

@media (max-width: 768px) {
    .compare-container {
        height: 350px;
    }
}

.compare-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.before-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: all 0.3s ease;
}

.after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 2;
    clip-path: inset(0 0 0 50%);
    transition: clip-path 0.1s ease-out; /* 优化过渡过渡时间 */
    will-change: clip-path; /* 告诉浏览器浏览器这个属性会频繁变化 */
}

.slider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 100%);
    z-index: 3;
    transform: translateX(-50%);
    cursor: grab;
    transition: left 0.1s ease-out; /* 优化过渡效果 */
    will-change: left; /* 告诉浏览器这个属性会频繁变化 */
}

.slider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.slider::after {
    content: '⟷';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-size: 20px;
    font-weight: bold;
    z-index: 4;
    transition: all 0.3s ease;
}

.slider:hover::before {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

.slider.dragging::before {
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.8);
}

.before-label, .after-label {
    position: absolute;
    top: 20px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(99, 102, 241, 0.8));
    color: white;
    font-weight: bold;
    border-radius: 20px;
    z-index: 4;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.before-label:hover, .after-label:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.before-label {
    left: 20px;
}

.after-label {
    right: 20px;
}

/* 内容区域样式 */
.content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.blemishes-info {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.blemishes-info-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blemishes-info-desc {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Tab 切换组件样式 */
.switch-tab {
    position: relative;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 0;
    margin-bottom: 20px;
    justify-content: center; /* 水平居中选项 */
    align-items: center;     /* 垂直居中选项 */
}

.switch-tab::-webkit-scrollbar {
    display: none;
}

.switch-tab-item {
    flex: 0 0 auto;
    padding: 10px 20px;
    margin: 0 8px;
    cursor: pointer;
    color: rgb(0, 132, 255);
    font-size: 16px;
    font-weight: 500;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.switch-tab-item.btn-active {
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.switch-line-area {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.switch-line {
    height: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.choose-btn-area {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
}

.swiper-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.swiper-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.swiper-btn.btn-disable {
    opacity: 0.5;
    cursor: not-allowed;
}

.left-icon, .right-icon {
    width: 12px;
    height: 12px;
    border-top: 2px solid white;
    border-left: 2px solid white;
}

.left-icon {
    transform: rotate(-45deg);
    margin-left: 8px;
}

.right-icon {
    transform: rotate(135deg);
    margin-right: 8px;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 0.5s ease-in-out;
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 滚动显示动画 */
.section {
    min-height: vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.active {
    opacity: 1;
    transform: translateY(0);
}

.image-container {
    position: relative;
}

.image-container img {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-radius: 0.5rem;
}

.side-images {
    position: absolute;
    right: -100px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.side-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.side-image:hover {
    transform: scale(1.05);
}

.nav-dots {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 100;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-dot.active {
    background-color: #000;
    transform: scale(1.2);
}

.scroll-indicator {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-20px) translateX(-50%);
    }
    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}
