/* 滑动验证码样式 */
.sc-container {
    display: inline-block;
    width: 310px;
    user-select: none;
    font-family: inherit;
}

/* 画布包裹层 */
.sc-canvas-wrap {
    position: relative;
    width: 310px;
    height: 155px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.sc-bg-canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 4px;
}

.sc-piece-canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 4px;
    pointer-events: none;
    transition: none;
}

/* 加载中遮罩 */
.sc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    color: #666;
    z-index: 10;
}

/* 刷新按钮 */
.sc-refresh {
    position: absolute;
    top: 6px;
    right: 8px;
    background: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 16px;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    padding: 0;
    line-height: 1;
    transition: background 0.2s;
}

.sc-refresh:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
}

/* 滑动轨道 */
.sc-track {
    position: relative;
    height: 40px;
    margin-top: 8px;
    background: #f0f0f0;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.sc-track-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 40px;
    background: rgba(64, 169, 255, 0.25);
    border-radius: 20px;
    transition: background 0.3s;
}

.sc-hint {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    line-height: 38px;
    font-size: 13px;
    color: #aaa;
    pointer-events: none;
    z-index: 1;
    transition: color 0.3s;
}

.sc-slider {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 100%;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 20px;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #aaa;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 2;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    touch-action: none;
}

.sc-slider:active {
    cursor: grabbing;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 成功状态 */
.sc-success .sc-slider {
    color: #fff;
    border-color: #52c41a;
}

.sc-success .sc-track {
    border-color: #b7eb8f;
}

/* 失败状态 */
.sc-fail .sc-slider {
    color: #fff;
    border-color: #ff4d4f;
}

.sc-fail .sc-track {
    border-color: #ffccc7;
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .sc-track {
        background: #2a2a2a;
        border-color: #444;
    }
    .sc-slider {
        background: #333;
        border-color: #555;
        color: #ccc;
    }
    .sc-hint {
        color: #666;
    }
    .sc-canvas-wrap {
        border-color: #444;
    }
    .sc-refresh {
        background: rgba(0, 0, 0, 0.5);
        color: #ccc;
    }
}
