/* ════════════════════════════════════════════
   CAPTCHA STYLES — All types
════════════════════════════════════════════ */

/* ── Shared captcha wrapper ── */
.captcha-box {
  background: rgba(255,255,255,.04);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 16px;
  margin-top: 4px;
}

/* ══════════════════════════════════════════
   TYPE: math
══════════════════════════════════════════ */
.captcha-question {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-bottom: 12px;
  font-size: 1.6rem; font-weight: 900; letter-spacing: .04em;
}
.captcha-nums {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(108,92,231,.25), rgba(162,155,254,.15));
  border: 1.5px solid rgba(162,155,254,.3);
  color: #a29bfe; font-size: 1.3rem; font-weight: 900;
}
.captcha-op {
  color: #ffd700; font-size: 1.5rem; font-weight: 900;
  text-shadow: 0 0 12px rgba(255,215,0,.5);
}
.captcha-eq  { color: rgba(240,242,248,.4); font-size: 1.2rem; }
.captcha-mark { color: #00e676; font-size: 1.5rem; font-weight: 900; animation: captchaBlink 1.2s ease-in-out infinite; }
@keyframes captchaBlink { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ══════════════════════════════════════════
   TYPE: slider — drag to target %
══════════════════════════════════════════ */
.captcha-slider-wrap { margin-bottom: 10px; }
.captcha-slider-target {
  text-align: center; margin-bottom: 10px;
  font-size: .82rem; color: rgba(240,242,248,.55);
}
.captcha-slider-target strong { color: #a29bfe; font-size: 1rem; }
.captcha-slider-track {
  position: relative; height: 10px; border-radius: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  margin: 14px 0;
  cursor: pointer;
}
.captcha-slider-fill {
  height: 100%; border-radius: 10px;
  background: linear-gradient(90deg, #6c5ce7, #a29bfe);
  transition: width .05s;
  pointer-events: none;
}
.captcha-slider-thumb {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #a29bfe, #6c5ce7);
  border: 2px solid #fff;
  box-shadow: 0 2px 12px rgba(108,92,231,.5);
  cursor: grab; user-select: none;
  transition: box-shadow .15s;
  display: flex; align-items: center; justify-content: center;
}
.captcha-slider-thumb:active { cursor: grabbing; box-shadow: 0 2px 20px rgba(108,92,231,.7); }
.captcha-slider-thumb i { color: #fff; font-size: .7rem; }
.captcha-slider-value {
  text-align: center; font-size: .78rem; color: rgba(240,242,248,.4);
  margin-top: 4px;
}
.captcha-slider-value span { color: #a29bfe; font-weight: 700; }
/* Target zone marker */
.captcha-slider-marker {
  position: absolute; top: -6px;
  width: 3px; height: calc(100% + 12px);
  background: rgba(0,230,118,.6);
  border-radius: 2px;
  pointer-events: none;
}
.captcha-slider-marker::after {
  content: '目标';
  display: none;
}

/* ══════════════════════════════════════════
   TYPE: text — display scrambled characters
══════════════════════════════════════════ */
.captcha-text-display {
  display: flex; justify-content: center; align-items: center;
  gap: 4px; margin-bottom: 12px;
  padding: 12px 16px;
  background: rgba(0,0,0,.3);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  user-select: none; letter-spacing: .06em;
}
.captcha-char {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 36px;
  font-size: 1.3rem; font-weight: 900;
  color: #f0f2f8;
  text-shadow: 0 0 8px rgba(162,155,254,.4);
  /* Random slight rotation per char applied via inline style */
}
.captcha-char:nth-child(odd)  { color: #a29bfe; }
.captcha-char:nth-child(even) { color: #00e676; }
.captcha-char:nth-child(3n)   { color: #ffd700; }
/* Strikethrough noise lines via pseudo */
.captcha-text-display::before,
.captcha-text-display::after {
  content: ''; position: absolute;
  height: 1px; left: 0; right: 0;
  background: rgba(255,255,255,.08);
  pointer-events: none;
}
.captcha-text-display { position: relative; }
.captcha-text-hint {
  text-align: center; font-size: .72rem;
  color: rgba(240,242,248,.35); margin-bottom: 8px;
}

/* ══════════════════════════════════════════
   TYPE: emoji — click the odd one out
══════════════════════════════════════════ */
.captcha-emoji-label {
  font-size: .82rem; color: rgba(240,242,248,.55);
  text-align: center; margin-bottom: 10px;
}
.captcha-emoji-label strong { color: #ffd700; }
.captcha-emoji-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin-bottom: 10px;
}
.captcha-emoji-btn {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(255,255,255,.1);
  font-size: 1.5rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
  user-select: none;
}
.captcha-emoji-btn:hover {
  background: rgba(162,155,254,.12);
  border-color: rgba(162,155,254,.3);
  transform: scale(1.08);
}
.captcha-emoji-btn.selected-wrong {
  border-color: rgba(255,71,87,.6);
  background: rgba(255,71,87,.1);
  animation: captchaShake .3s ease;
}
.captcha-emoji-btn.selected-right {
  border-color: rgba(0,230,118,.6);
  background: rgba(0,230,118,.12);
}
@keyframes captchaShake {
  0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)}
}
.captcha-emoji-hint { text-align: center; font-size: .72rem; color: rgba(240,242,248,.3); margin-top: 6px; }

/* ══════════════════════════════════════════
   TYPE: sequence — complete the number pattern
══════════════════════════════════════════ */
.captcha-seq-display {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-bottom: 12px; flex-wrap: wrap;
}
.captcha-seq-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; border-radius: 10px; padding: 0 8px;
  background: rgba(108,92,231,.12);
  border: 1.5px solid rgba(108,92,231,.25);
  color: #a29bfe; font-size: 1.1rem; font-weight: 800;
}
.captcha-seq-missing {
  background: rgba(0,230,118,.1);
  border: 1.5px dashed rgba(0,230,118,.4);
  color: #00e676;
}
.captcha-seq-arrow { color: rgba(240,242,248,.3); font-size: .9rem; }
.captcha-seq-rule {
  text-align: center; font-size: .75rem; color: rgba(240,242,248,.35);
  margin-bottom: 8px;
}

/* ══════════════════════════════════════════
   Refresh captcha button
══════════════════════════════════════════ */
.captcha-refresh-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 8px; margin-top: 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(240,242,248,.5); font-size: .75rem; cursor: pointer;
  transition: all .15s;
}
.captcha-refresh-btn:hover {
  background: rgba(162,155,254,.1);
  border-color: rgba(162,155,254,.25);
  color: #a29bfe;
}
.captcha-refresh-btn i { transition: transform .4s; }
.captcha-refresh-btn:hover i { transform: rotate(180deg); }

/* Status feedback */
.captcha-hint {
  font-size: .74rem; min-height: 18px; margin-top: 5px;
  display: flex; align-items: center; gap: 4px;
}
.captcha-hint.ok    { color: #00e676; }
.captcha-hint.error { color: #ff4757; }
