/* 滑动验证码样式 */
.captcha-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.captcha-container.show {
    display: flex;
}

.captcha-box {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 340px;
}

.captcha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.captcha-header span {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.captcha-close {
    cursor: pointer;
    font-size: 20px;
    color: #999;
    line-height: 1;
}

.captcha-close:hover {
    color: #333;
}

.captcha-image-container {
    position: relative;
    width: 100%;
    height: 155px;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
}

.captcha-image {
    width: 100%;
    height: 100%;
    display: block;
}

.captcha-puzzle-piece {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    background-size: 300px 155px;
    cursor: move;
    z-index: 10;
}

.captcha-gap {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(255, 255, 255, 0.5);
}

.captcha-slider-container {
    position: relative;
    width: 100%;
    height: 40px;
    background: #f0f0f0;
    border-radius: 20px;
    border: 1px solid #ddd;
    overflow: hidden;
}

.captcha-slider-track {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(to right, #76c63f, #5cb85c);
    border-radius: 20px;
    transition: width 0.1s;
}

.captcha-slider-button {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.1s;
    z-index: 10;
}

.captcha-slider-button::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 8px solid #666;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.captcha-slider-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    pointer-events: none;
}

.captcha-slider-text.success {
    color: #fff;
}

.captcha-slider-text.fail {
    color: #fff;
}

.captcha-tips {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    line-height: 30px;
    text-align: center;
    color: #fff;
    font-size: 12px;
    transition: all 0.3s;
}

.captcha-tips.success {
    background: rgba(92, 184, 92, 0.8);
}

.captcha-tips.fail {
    background: rgba(217, 83, 79, 0.8);
}

.captcha-refresh {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
}

.captcha-refresh svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

/* 成功状态 */
.captcha-slider-container.success .captcha-slider-track {
    background: linear-gradient(to right, #5cb85c, #4cae4c);
}

.captcha-slider-container.success .captcha-slider-button::after {
    border-left-color: #4cae4c;
}

/* 失败状态 */
.captcha-slider-container.fail .captcha-slider-track {
    background: linear-gradient(to right, #d9534f, #c9302c);
}
