/**
 * 滑块验证码样式 V2.0
 * 配合 slider-captcha.js 使用
 */

.slider-captcha-wrapper {
  position: relative;
  margin: 15px auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.slider-captcha-wrapper canvas {
  display: block;
}

.slider-block {
  position: absolute;
  cursor: pointer;
  transition: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.slider-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(135deg, #f3a233 0%, #e63946 100%);
  border-top: 1px solid #ddd;
  display: flex;
  align-items: center;
  padding-left: 10px;
  color: white;
  font-size: 14px;
  user-select: none;
  font-weight: 500;
}

.slider-hint-text {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

/* 动画箭头效果 */
.hint-arrows {
  display: inline-block;
  color: #fff;
  font-weight: bold;
  animation: arrows-blink 1.5s ease-in-out infinite;
  letter-spacing: 1px;
}

@keyframes arrows-blink {
  0%, 100% {
    opacity: 0.3;
    transform: translateX(0);
  }
  50% {
    opacity: 1;
    transform: translateX(5px);
  }
}

.hint-content {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: white;
}

.slider-thumb {
  position: absolute;
  bottom: 5px;
  left: 10px;
  width: 30px;
  height: 30px;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: background 0.3s, transform 0.1s;
  z-index: 15;
}

.slider-thumb:hover {
  background: #f8f9fa;
  transform: scale(1.05);
}

.slider-thumb:active {
  transform: scale(0.95);
}

.refresh-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  z-index: 20;
  transition: transform 0.3s;
}

.refresh-btn:hover {
  transform: rotate(180deg);
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .slider-captcha-wrapper {
    width: 100% !important;
    max-width: 320px;
    margin: 10px auto;
  }
  
  .slider-bar {
    height: 35px;
  }
  
  .hint-arrows {
    font-size: 12px;
    letter-spacing: 0.5px;
  }
  
  .hint-content {
    font-size: 12px;
  }
  
  .slider-thumb {
    width: 35px;
    height: 35px;
    font-size: 20px;
  }
}

/* 超小屏适配 */
@media (max-width: 375px) {
  .slider-captcha-wrapper {
    height: 140px !important;
  }
  
  .slider-bar {
    height: 32px;
  }
  
  .hint-content {
    font-size: 11px;
  }
}

/* 验证成功状态 */
.slider-thumb.success {
  background: #52c41a !important;
  color: white;
  animation: success-pulse 0.5s ease-out;
}

@keyframes success-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* 验证失败状态 */
.slider-thumb.fail {
  background: #ff4d4f !important;
  color: white;
  animation: fail-shake 0.3s ease-out;
}

@keyframes fail-shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px);
  }
  75% {
    transform: translateX(3px);
  }
}