/* Default styles for slider-captcha-js */
.slider-captcha-stage {
  position: relative;
  border: 1px solid rgba(232,180,74,0.22);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 28px rgba(0,0,0,0.38);
}

.slider-captcha-stage canvas {
  position: absolute;
  top: 0;
  left: 0;
  touch-action: none;
}

/* Theme: Light */
.slider-captcha-light .slider-captcha-bar {
  background: #f3f0e8;
  border: 1px solid rgba(10,10,10,0.08);
  color: rgba(10,10,10,0.42);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}
.slider-captcha-light .slider-captcha-thumb {
  background: linear-gradient(135deg, #F7DE9C 0%, #E8B44A 55%, #d9a43a 100%);
  border: 1px solid rgba(255,238,196,0.85);
  color: #241a05;
  box-shadow: 0 4px 12px rgba(232,180,74,0.32), inset 0 1px 0 rgba(255,255,255,0.55);
}
.slider-captcha-light .slider-captcha-fill {
  background: linear-gradient(90deg, rgba(232,180,74,0.18), rgba(232,180,74,0.4));
  border-right: 1px solid rgba(232,180,74,0.35);
  box-shadow: none;
}
.slider-captcha-light .slider-captcha-status {
  background: none;
  border: none;
  color: rgba(10,10,10,0.42);
}
.slider-captcha-light .slider-captcha-status.is-active {
  color: #5c4310;
}
.slider-captcha-light .slider-captcha-status.ok,
.slider-captcha-light .slider-captcha-status.is-active.ok {
  color: #15803d;
}
.slider-captcha-light .slider-captcha-status.err,
.slider-captcha-light .slider-captcha-status.is-active.err {
  color: #dc2626;
}

/* Theme: Dark (GoldAlert 金色主题) */
.slider-captcha-dark .slider-captcha-bar {
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.008)), #0b0b0d;
  border: 1px solid rgba(232,180,74,0.22);
  color: rgba(232,224,200,0.45);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
}
.slider-captcha-dark .slider-captcha-thumb {
  background: linear-gradient(135deg, #F7DE9C 0%, #E8B44A 55%, #d9a43a 100%);
  border: 1px solid rgba(255,238,196,0.85);
  color: #241a05;
  box-shadow: 0 5px 16px rgba(232,180,74,0.45), inset 0 1px 0 rgba(255,255,255,0.55);
}
.slider-captcha-dark .slider-captcha-status {
  color: rgba(232,224,200,0.42);
}
.slider-captcha-dark .slider-captcha-status.is-active {
  color: #f3e2b3;
}
.slider-captcha-dark .slider-captcha-status.ok,
.slider-captcha-dark .slider-captcha-status.is-active.ok {
  color: #3ddc84;
  text-shadow: 0 0 14px rgba(61,220,132,0.45);
}
.slider-captcha-dark .slider-captcha-status.err,
.slider-captcha-dark .slider-captcha-status.is-active.err {
  color: #ff6b6b;
  text-shadow: 0 0 14px rgba(255,107,107,0.35);
}

.slider-captcha-bar {
  position: relative;
  display: flex;
  align-items: center;
  width: var(--w, 320px);
  height: 46px;
  background: #0b0b0d;
  border-radius: 999px;
  margin-top: 14px;
  border: 1px solid rgba(232,180,74,0.22);
  font-size: 13px;
  color: #9d9d99;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.slider-captcha-bar.is-fail {
  animation: slider-bar-shake 0.32s ease;
}
.slider-captcha-bar.is-dragging {
  cursor: grabbing;
}

.slider-captcha-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  overflow: hidden;
  pointer-events: none;
}

.slider-captcha-fill {
  display: none;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
  background: linear-gradient(90deg, rgba(232,180,74,0.22), rgba(232,180,74,0.5));
  border-right: 1px solid rgba(245,215,142,0.65);
  box-shadow: 0 0 14px rgba(232,180,74,0.28);
  pointer-events: none;
}

.slider-captcha-thumb {
  position: relative;
  z-index: 2;
  margin-left: 3px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(135deg, #F7DE9C 0%, #E8B44A 55%, #d9a43a 100%);
  border: 1px solid rgba(255,238,196,0.85);
  color: #241a05;
  display: grid;
  place-items: center;
  cursor: grab;
  user-select: none;
  touch-action: none;
  -webkit-user-select: none;
  will-change: transform;
  box-shadow: 0 5px 16px rgba(232,180,74,0.45), inset 0 1px 0 rgba(255,255,255,0.55);
  /* 拖动时绝不能过渡 transform，否则会明显不跟手 */
  transition: box-shadow 0.2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .slider-captcha-thumb:not(.is-dragging):hover {
    box-shadow: 0 7px 22px rgba(232,180,74,0.6), inset 0 1px 0 rgba(255,255,255,0.55);
  }
}
.slider-captcha-thumb.is-dragging,
.slider-captcha-thumb:active {
  cursor: grabbing;
  transition: none;
}
.slider-captcha-thumb svg {
  width: 18px;
  height: 18px;
  opacity: 1;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.28));
  pointer-events: none;
}

.slider-captcha-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  pointer-events: none;
  z-index: 1;
  color: #8f8f8a;
  letter-spacing: 0.12em;
  /* 抵消 letter-spacing 在末字右侧多出的空隙，保证视觉居中 */
  text-indent: 0.12em;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  transition: color 0.2s ease;
}
.slider-captcha-status.is-active {
  z-index: 1;
  color: #f3e2b3;
  clip-path: inset(0 100% 0 0);
}
.slider-captcha-status.ok {
  color: #3ddc84;
  letter-spacing: 0.2em;
}
.slider-captcha-status.err {
  color: #ff6b6b;
  letter-spacing: 0.12em;
}
@keyframes slider-bar-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}

.slider-captcha-refresh {
  cursor: pointer;
  margin-left: auto;
  background: rgba(16,14,8,0.82) !important;
  border: 1px solid rgba(232,180,74,0.38) !important;
  box-shadow: 0 3px 12px rgba(0,0,0,0.45) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  transition: transform 0.35s ease, border-color 0.2s ease !important;
}
.slider-captcha-refresh:hover {
  background: rgba(16,14,8,0.82) !important;
  transform: rotate(80deg);
  border-color: rgba(232,180,74,0.7) !important;
}
.slider-captcha-refresh svg {
  fill: #E8B44A !important;
  width: 15px !important;
  height: 15px !important;
}

/* Loading overlay and spinner */
.slider-captcha-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8,8,8,0.62);
  z-index: 15;
}

.slider-captcha-loading .spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(232,180,74,0.22);
  border-top-color: #E8B44A;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
