.slider {
    position: relative;
    width: 100%;
    height: 44px;
    background: #e8e8e8;  /* 浅灰色背景 */
    border-radius: 22px;  /* 圆形边框 */
    margin-bottom: 10px;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    touch-action: none;
}

/* 滑块背景条 - 移动部分 */
.slider::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: #409eff;  /* 蓝色背景表示已滑动区域 */
    border-radius: 22px;
    transition: width 0.1s ease;
    z-index: 1;
}

.slider-block {
    position: absolute;
    left: 0;
    top: 0;
    width: 44px;
    height: 44px;
    background: #fff;
    border: 1px solid #409eff;
    border-radius: 50%;  /* 圆形滑块 */
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #409eff;
    font-size: 20px;
    transition: box-shadow 0.2s;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(64,158,255,0.3);
    touch-action: none;
    user-select: none;
    -webkit-user-drag: none;
}

.slider-block:active {
    cursor: grabbing;
    box-shadow: 0 4px 10px rgba(64,158,255,0.5);
    transform: scale(1.02);
}

.slider-text {
    position: absolute;
    width: 100%;
    height: 100%;
    line-height: 44px;
    text-align: center;
    font-size: 14px;
    color: #666;
    z-index: 2;
    pointer-events: none;
    left: 0;
}

/* 电脑端：滑块轨道不宜过长，居中显示 */
@media (min-width: 769px) {
    .slider {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* 手机端适配 */
@media (max-width: 768px) {
    .slider {
        height: 40px;
    }
    
    .slider-block {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .slider-text {
        line-height: 40px;
        font-size: 13px;
    }
}

/* 小屏手机 */
@media (max-width: 375px) {
    .slider {
        height: 38px;
    }
    
    .slider-block {
        width: 38px;
        height: 38px;
    }
    
    .slider-text {
        line-height: 38px;
        font-size: 12px;
    }
}