/* 雪猫 Before&After Slider - 前端样式 */

.yukicat-bas-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    cursor: col-resize;
    user-select: none;
    background: #f8f9fa;
}

.yukicat-bas-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.yukicat-bas-layer.active {
    opacity: 1;
}

.yukicat-bas-layer.next {
    opacity: 0.3;
    clip-path: inset(0 50% 0 0);
}

.yukicat-bas-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.yukicat-bas-label {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 8px 16px;
    background: rgba(0,0,0,0.8);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.yukicat-bas-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
    z-index: 20;
    transform: translateX(-50%);
    cursor: col-resize;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.yukicat-bas-handle-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: col-resize;
    transition: all 0.2s ease;
}

.yukicat-bas-handle-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.yukicat-bas-handle-button::before,
.yukicat-bas-handle-button::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.yukicat-bas-handle-button::before {
    left: 12px;
    border-width: 6px 8px 6px 0;
    border-color: transparent #333 transparent transparent;
}

.yukicat-bas-handle-button::after {
    right: 12px;
    border-width: 6px 0 6px 8px;
    border-color: transparent transparent transparent #333;
}

.yukicat-bas-progress {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
    z-index: 15;
}

.yukicat-bas-progress-bar {
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
    border-radius: 2px;
    transition: width 0.1s ease;
}

.yukicat-bas-indicators {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 15;
    background: rgba(0,0,0,0.5);
    padding: 8px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.yukicat-bas-indicator {
    padding: 4px 12px;
    background: rgba(255,255,255,0.2);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yukicat-bas-indicator:hover {
    background: rgba(255,255,255,0.3);
}

.yukicat-bas-indicator.active {
    background: white;
    color: #333;
}

.yukicat-bas-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-size: 16px;
    text-align: center;
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.yukicat-bas-handle-button.active {
    animation: pulse 2s infinite;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .yukicat-bas-container {
        border-radius: 8px;
    }
    
    .yukicat-bas-label {
        top: 10px;
        left: 10px;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .yukicat-bas-handle-button {
        width: 35px;
        height: 35px;
    }
    
    .yukicat-bas-handle-button::before {
        left: 10px;
        border-width: 5px 6px 5px 0;
    }
    
    .yukicat-bas-handle-button::after {
        right: 10px;
        border-width: 5px 0 5px 6px;
    }
    
    .yukicat-bas-progress {
        bottom: 15px;
        left: 15px;
        right: 15px;
    }
    
    .yukicat-bas-indicators {
        bottom: 30px;
        gap: 6px;
        padding: 6px 10px;
    }
    
    .yukicat-bas-indicator {
        padding: 3px 8px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .yukicat-bas-indicators {
        flex-wrap: wrap;
        max-width: 90%;
    }
    
    .yukicat-bas-label {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* 加载状态 */
.yukicat-bas-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #ff6b6b;
    animation: spin 1s ease-in-out infinite;
    z-index: 30;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 暗黑模式支持 */
@media (prefers-color-scheme: dark) {
    .yukicat-bas-container {
        background: #2d3748;
    }
    
    .yukicat-bas-placeholder {
        background: #2d3748;
        border-color: #4a5568;
        color: #a0aec0;
    }
}

/* 无障碍支持 */
.yukicat-bas-container:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

.yukicat-bas-indicator:focus {
    outline: 1px solid white;
    outline-offset: 1px;
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .yukicat-bas-handle {
        background: #000;
    }
    
    .yukicat-bas-handle-button {
        background: #fff;
        border: 2px solid #000;
    }
    
    .yukicat-bas-label {
        background: #000;
        border: 1px solid #fff;
    }
}