:root {
    --sc-primary: #1890ff;
    --sc-primary-bg: #d2e8ff;
    --sc-success: #52c41a;
    --sc-success-bg: #d9f7be;
    --sc-fail: #f5222d;
    --sc-fail-bg: #fff1f0;
    --sc-text: #333;
    --sc-text-sub: #999;
    --sc-border: #e4e7eb;
}

.sc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

.sc-modal.sc-active {
    display: flex;
    animation: sc-fade-in 0.25s ease both;
}

@keyframes sc-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.sc-container {
    margin-right: 15px;
    margin-bottom: 125px;
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 340px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
    animation: sc-zoom-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes sc-zoom-in {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.sc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--sc-text);
}

.sc-close {
    cursor: pointer;
    font-size: 20px;
    color: var(--sc-text-sub);
    line-height: 1;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.2s, background-color 0.2s;
}

.sc-close:hover {
    color: var(--sc-text);
    background: #e8e8e8;
}

.sc-image-wrapper {
    position: relative;
    width: 342px;
    height: 130px;
    overflow: hidden;
    border-radius: 6px;
    background: #e8e8e8;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.sc-bg-canvas, .sc-block-canvas {
    position: absolute;
    top: 0;
    left: 0;
}

.sc-bg-canvas {
    z-index: 1;
}

.sc-block-canvas {
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.sc-refresh {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    font-size: 13px;
}

.sc-refresh-btn {
    color: var(--sc-primary);
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.sc-refresh-btn:hover {
    opacity: 0.7;
}

.sc-tip {
    font-size: 13px;
    transition: color 0.25s;
}

.sc-tip-success {
    color: var(--sc-success);
}

.sc-tip-fail {
    color: var(--sc-fail);
}

.sc-slider-track {
    position: relative;
    width: 342px;
    height: 40px;
    background: #f5f5f5;
    border-radius: 20px;
    border: 1px solid var(--sc-border); /* ⚠️ 保留原 border */
    overflow: hidden;
}

.sc-slider-bg {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg,
    rgba(24, 144, 255, 0.18) 0%,
    rgba(24, 144, 255, 0.32) 100%);
    border-radius: 20px;
    transition: width 0.1s linear,
    background 0.25s ease;
}

.sc-slider-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.4),
    rgba(255, 255, 255, 0));
    border-radius: 20px 0 0 0;
    pointer-events: none;
}

.sc-slider-bg::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0px;
    width: 20px;
    height: 100%;
    background: inherit;
    border-radius: 0 20px 20px 0;
    pointer-events: none;
}

.sc-slider-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--sc-text-sub);
    user-select: none;
}

.sc-slider-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    background: var(--sc-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    z-index: 3;
    color: #fff;
    font-size: 18px;
    user-select: none;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
    transition: box-shadow 0.2s, background-color 0.25s;
}

.sc-slider-btn:hover {
    box-shadow: 0 4px 14px rgba(24, 144, 255, 0.5);
}

.sc-slider-btn:active {
    cursor: grabbing;
}

.sc-track-success .sc-slider-bg {
    background: var(--sc-success-bg);
}

.sc-track-success .sc-slider-btn {
    background: var(--sc-success);
    animation: sc-bounce 0.4s ease;
}

.sc-track-fail .sc-slider-bg {
    background: var(--sc-fail-bg);
}

.sc-track-fail .sc-slider-btn {
    background: var(--sc-fail);
    animation: sc-shake 0.4s ease;
}

@keyframes sc-bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

@keyframes sc-shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-4px);
    }
    75% {
        transform: translateX(4px);
    }
}