/* ===== 滑动验证（适配登录界面背景色） ===== */
.sc-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
}
.sc-overlay.sc-show { opacity: 1; pointer-events: all; }

.sc-box {
    position: relative;
    background: linear-gradient(145deg, #fef3e2, #fde4d4);
    border-radius: 16px;
    padding: 22px 26px 20px;
    width: 360px;
    box-shadow: 
        0 0 0 1px rgba(251, 146, 60, 0.3),
        0 8px 32px rgba(139, 90, 43, 0.12),
        0 25px 60px rgba(0,0,0,0.08);
}

.sc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sc-title { 
    font-size: 15px; 
    color: #8b5a2b;
    font-weight: 600; 
}
.sc-close {
    width: 28px; height: 28px; border: none; 
    background: rgba(251, 146, 60, 0.2);
    border-radius: 50%; color: #8b5a2b; cursor: pointer; font-size: 16px;
    line-height: 28px; text-align: center; transition: all 0.2s;
}
.sc-close:hover { 
    background: linear-gradient(135deg, #fb923c, #f472b6); 
    color: #fff; 
}

/* 画布 */
.sc-canvas-wrap {
    position: relative; width: 312px; height: 160px;
    border-radius: 10px; overflow: hidden; margin: 0 auto 14px;
    background: #fcefe3; 
    border: 1px solid rgba(251, 146, 60, 0.25);
    box-shadow: inset 0 2px 8px rgba(139, 90, 43, 0.08);
}
.sc-canvas-wrap #sc-bg,
.sc-canvas-wrap #sc-block { position: absolute; top: 0; left: 0; }
#sc-block { z-index: 2; }

.sc-refresh {
    position: absolute; top: 6px; right: 6px; width: 28px; height: 28px;
    border: none; 
    background: rgba(251, 146, 60, 0.2);
    border-radius: 50%;
    color: #8b5a2b; cursor: pointer; font-size: 14px;
    line-height: 28px; text-align: center; z-index: 10; transition: all 0.3s;
}
.sc-refresh:hover { 
    transform: rotate(180deg); 
    background: linear-gradient(135deg, #fb923c, #f472b6);
    color: #fff;
}

/* 提示 */
.sc-tip { 
    font-size: 12px; 
    color: #a08060; 
    text-align: center; 
    margin-bottom: 12px;
}

/* 滑轨 */
.sc-track {
    position: relative; width: 312px; height: 46px;
    background: #fef3e2;
    border: 1px solid rgba(251, 146, 60, 0.3);
    border-radius: 23px; margin: 0 auto;
    overflow: visible; user-select: none;
    box-shadow: inset 0 2px 6px rgba(139, 90, 43, 0.1);
}

/* 滑块按钮 */
.sc-btn {
    position: absolute; left: 0; top: 0;
    width: 46px; height: 46px;
    background: linear-gradient(135deg, #fb923c, #f472b6);
    border-radius: 50%; cursor: grab; z-index: 3;
    border: 3px solid rgba(255,255,255,0.5);
    box-shadow: 
        0 4px 15px rgba(251,146,60,0.4),
        0 0 20px rgba(244,114,182,0.2);
    transition: transform 0.1s, box-shadow 0.2s;
}
.sc-btn:active { 
    cursor: grabbing; 
    transform: scale(1.08); 
    box-shadow: 
        0 6px 25px rgba(251,146,60,0.5),
        0 0 30px rgba(244,114,182,0.3);
}

/* 滑块内部箭头 */
.sc-btn::after {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 18l6-6-6-6'/%3E%3C/svg%3E") center/18px no-repeat;
}

/* 滑轨文字 */
.sc-text {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px; color: #c4a882;
    pointer-events: none; letter-spacing: 2px;
}

/* 成功 */
.sc-track.sc-success .sc-btn {
    background: linear-gradient(135deg, #34d399, #10b981);
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 4px 15px rgba(52,211,153,0.4);
}

/* 失败 */
.sc-track.sc-fail .sc-btn {
    background: linear-gradient(135deg, #fb923c, #f472b6);
    border-color: rgba(251,146,60,0.5);
    animation: sc-shake 0.4s ease;
}

@keyframes sc-shake {
    0%,100% { left: var(--sc-btn-x, 0); }
    20% { left: calc(var(--sc-btn-x, 0) - 6px); }
    40% { left: calc(var(--sc-btn-x, 0) + 6px); }
    60% { left: calc(var(--sc-btn-x, 0) - 4px); }
    80% { left: calc(var(--sc-btn-x, 0) + 4px); }
}
