/* 滑动验证模块样式 */
.slider-captcha {
    display: none;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 15px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.captcha-container {
    width: 100%;
    height: 160px;
    background-color: #f5f5f5;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

/* 加载指示器 */
.captcha-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e0e0e0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.captcha-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #666;
    background-size: cover;
    background-position: center;
}

/* 拼图块样式 - 自定义多边形形状 */
.puzzle-piece {
    width: 56px;
    height: 56px;
    position: absolute;
    top: 0;
    left: 0;
    cursor: move;
    display: none;
    background-size: cover;
    background-position: center;
    /* 自定义多边形形状 */
    clip-path: polygon(
        15% 0, 85% 0, 
        100% 15%, 100% 85%, 
        85% 100%, 15% 100%, 
        0 85%, 0 15%
    );
    border: 2px solid rgba(255,255,255,0.9);
    box-shadow: 0 3px 10px rgba(0,0,0,0.25), 
                inset 0 0 0 1px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    z-index: 5; /* 确保拼图块在缺口上方 */
}

/* 拖拽时的效果 */
.puzzle-piece.dragging {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* 拼图缺口样式 - 增强可见性 */
.puzzle-hole {
    width: 56px;
    height: 56px;
    position: absolute;
    top: 0;
    left: 150px;
    display: none;
    /* 与拼图块相同的形状 */
    clip-path: polygon(
        15% 0, 85% 0, 
        100% 15%, 100% 85%, 
        85% 100%, 15% 100%, 
        0 85%, 0 15%
    );
    /* 增强缺口可见性的样式 */
    background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(255,255,255,0.1) 100%);
    border: 2px dashed rgba(255,255,255,0.8);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.2), 
                inset 0 0 15px rgba(0,0,0,0.3);
    /* 增加发光效果增强辨识度 */
    box-shadow: 0 0 0 1px rgba(0,0,0,0.2),
                inset 0 0 15px rgba(0,0,0,0.3),
                0 0 0 2px rgba(255,255,255,0.5);
    z-index: 3;
}

/* 缺口额外高亮效果 */
.puzzle-hole::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    clip-path: polygon(
        15% 0, 85% 0, 
        100% 15%, 100% 85%, 
        85% 100%, 15% 100%, 
        0 85%, 0 15%
    );
    border: 1px solid rgba(255,255,255,0.6);
    pointer-events: none;
}

/* 刷新按钮样式 */
.refresh-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    padding: 0;
    margin: 0;
    background-color: rgba(255,255,255,0.9);
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 4;
}

.refresh-button svg {
    width: 16px;
    height: 16px;
    transition: all 0.3s ease;
}

/* 刷新按钮提示 */
.refresh-tooltip {
    position: absolute;
    top: 12px;
    right: 50px;
    background-color: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateX(5px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 5;
}

/* 滑块轨道样式 */
.slider-track {
    width: 100%;
    height: 40px;
    background-color: #f0f0f0;
    border-radius: 20px;
    margin-top: 15px;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.slider-progress {
    height: 100%;
    width: 0;
    background-color: #3b82f6;
    border-radius: 20px;
    transition: width 0.1s;
}

/* 滑块按钮样式 */
.slider-button {
    width: 40px;
    height: 40px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.slider-button.dragging {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.slider-button.success {
    background-color: #10b981;
    border-color: #10b981;
    color: white;
}

.slider-button.error {
    background-color: #ef4444;
    border-color: #ef4444;
    color: white;
}

/* 成功脉冲动画 */
.slider-button.success-pulse {
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* 抖动动画 */
.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-3px); }
    40%, 60% { transform: translateX(3px); }
}

.slider-button i {
    font-size: 20px;
    color: #6b7280;
}

.slider-button.success i,
.slider-button.error i {
    color: white;
}

.slider-text {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #6b7280;
    pointer-events: none;
    transition: all 0.3s ease;
}

.slider-text.success {
    color: #10b981;
}

.slider-text.error {
    color: #ef4444;
}

/* 验证按钮样式 */
.verify-button {
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 消息提示样式 */
.slider-verify-message {
    position: fixed;
    top: 20px;
    left: 50%;
    padding: 8px 16px;
    border-radius: 4px;
    color: #fff;
    z-index: 9999;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}
