/* ================================================================
   滑块验证码样式
   ================================================================ */

.captcha-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 20000;
  align-items: center; justify-content: center;
}
.captcha-box {
  background: #fff; border-radius: 12px;
  width: 340px; max-width: 94vw;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
  overflow: hidden;
}
.captcha-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid #eee;
  font-size: 14px; font-weight: 600; color: #333;
}
.captcha-close {
  border: none; background: none; font-size: 22px;
  color: #999; cursor: pointer; padding: 0; line-height: 1;
}
.captcha-close:hover { color: #333; }
.captcha-body { padding: 16px; }

.captcha-canvas-wrap {
  position: relative; width: 300px; height: 160px;
  margin: 0 auto; border-radius: 6px; overflow: hidden;
  background: #f0f0f0;
}
.captcha-bg {
  display: block; width: 300px; height: 160px;
}
.captcha-puzzle {
  position: absolute; top: 55px; left: 0;
  width: 50px; height: 50px;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
  border-radius: 4px; transition: none;
}

/* 滑块 */
.captcha-slider-wrap { margin-top: 16px; }
.captcha-slider-track {
  position: relative; width: 280px; height: 40px;
  margin: 0 auto; background: #e8e8e8; border-radius: 20px;
  overflow: hidden; transition: background .3s;
}
.captcha-slider-track.captcha-active { background: #d0e8ff; }
.captcha-slider-track.captcha-success { background: #c8f0d0; }
.captcha-slider-track.captcha-fail { background: #ffd0d0; }

.captcha-slider-btn {
  position: absolute; top: 2px; left: 0;
  width: 40px; height: 36px;
  background: #fff; border-radius: 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  cursor: grab; display: flex; align-items: center; justify-content: center;
  transition: background .2s; user-select: none;
  z-index: 2;
}
.captcha-slider-btn:active { cursor: grabbing; }
.captcha-slider-btn.captcha-active { background: #4a90d9; }
.captcha-slider-btn.captcha-active .captcha-slider-arrow { color: #fff; }
.captcha-slider-btn.captcha-success { background: #4caf50; }
.captcha-slider-btn.captcha-success .captcha-slider-arrow { color: #fff; }
.captcha-slider-btn.captcha-fail { background: #e53935; }
.captcha-slider-btn.captcha-fail .captcha-slider-arrow { color: #fff; }

.captcha-slider-arrow {
  font-size: 18px; color: #666; transition: color .2s;
}
.captcha-slider-label {
  text-align: center; font-size: 12px; color: #999;
  margin-top: 8px; user-select: none;
}

.captcha-footer {
  padding: 8px 16px 12px; text-align: center;
}
.captcha-refresh {
  border: none; background: none; font-size: 12px;
  color: #4a90d9; cursor: pointer;
}
.captcha-refresh:hover { text-decoration: underline; }

/* 手机端适配 */
@media (max-width: 480px) {
  .captcha-box { width: 96vw; }
  .captcha-slider-track { width: 260px; }
}
