/* SliderCaptcha 样式 - 支持 PC 和 H5 */
.sc-wrap {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sc-canvas-wrap {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sc-bg-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.sc-slider-canvas {
  position: absolute;
  top: 0;
  left: 0;
  cursor: grab;
  pointer-events: none;
}

.sc-slider-canvas:active {
  cursor: grabbing;
}

.sc-slider-mask {
  position: absolute;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
  background: transparent;
}

.sc-fresh-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  z-index: 10;
  transition: transform 0.3s;
}

.sc-fresh-icon:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: rotate(180deg);
}

.sc-fresh-icon:active {
  transform: rotate(360deg);
}

/* 底部轨道 */
.sc-track {
  position: relative;
  height: 40px;
  background: #f5f5f5;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.sc-track-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #e8e8e8, #f5f5f5);
}

.sc-track-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(to right, #4caf50, #66bb6a);
  transition: width 0.2s;
  border-radius: 20px;
}

.sc-track-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  color: #666;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 1;
}

.sc-track-text-success {
  color: #fff;
  font-weight: 500;
}

.sc-track-text-fail {
  color: #f44336;
}

.sc-track-text-loading {
  color: #2196f3;
}

.sc-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  color: #999;
  z-index: 5;
  display: none;
}

.sc-track-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 38px;
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 20px;
  cursor: grab;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s;
  touch-action: none;
}

.sc-track-slider:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.sc-track-slider:active {
  cursor: grabbing;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}

.sc-track-icon {
  font-size: 18px;
  color: #999;
  font-weight: bold;
}

/* 移动端适配 */
@media (max-width: 480px) {
  .sc-wrap {
    width: 100% !important;
    max-width: 310px;
    margin: 0 auto;
  }

  .sc-track {
    height: 44px;
  }

  .sc-track-slider {
    height: 42px;
  }

  .sc-track-text {
    font-size: 13px;
  }
}

/* ==================== 弹窗样式 ==================== */
.sc-modal-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: sc-fade-in 0.2s ease;
}

.sc-modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: sc-zoom-in 0.25s ease;
}

.sc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.sc-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.sc-modal-close {
  font-size: 18px;
  color: #999;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.sc-modal-close:hover {
  background: #f5f5f5;
  color: #333;
}

.sc-modal-body {
  padding: 24px;
}

/* 弹窗关闭动画 */
.sc-modal-hide {
  animation: sc-fade-out 0.2s ease forwards;
}

.sc-modal-hide .sc-modal {
  animation: sc-zoom-out 0.2s ease forwards;
}

@keyframes sc-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sc-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes sc-zoom-in {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes sc-zoom-out {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(0.9); opacity: 0; }
}

/* 弹窗移动端适配 */
@media (max-width: 480px) {
  .sc-modal {
    width: calc(100% - 32px);
    max-width: 350px;
  }

  .sc-modal-header {
    padding: 12px 16px;
  }

  .sc-modal-body {
    padding: 16px;
  }
}
