body.qx-captcha-open {
  overflow: hidden;
}

.qx-captcha[hidden] {
  display: none;
}

.qx-captcha {
  position: fixed;
  z-index: 20000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 22%, rgba(49, 168, 174, 0.15), transparent 32rem),
    rgba(2, 10, 15, 0.82);
  opacity: 0;
  backdrop-filter: blur(18px);
  transition: opacity 220ms ease;
}

.qx-captcha.is-open {
  opacity: 1;
}

.qx-captcha-panel {
  position: relative;
  width: min(100%, 590px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid rgba(169, 226, 227, 0.22);
  border-radius: 25px;
  color: #f3fbfc;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018) 56%),
    rgba(9, 28, 38, 0.96);
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  transform: translateY(14px) scale(0.975);
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
  isolation: isolate;
}

.qx-captcha-panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(169, 226, 227, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(169, 226, 227, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom right, black, transparent 86%);
}

.qx-captcha.is-open .qx-captcha-panel {
  transform: translateY(0) scale(1);
}

.qx-captcha-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 27px 28px 24px;
  border-bottom: 1px solid rgba(169, 226, 227, 0.13);
}

.qx-captcha-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
  color: #52d1d1;
  font: 700 0.69rem "Manrope", sans-serif;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.qx-captcha-kicker span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #52d1d1;
  box-shadow: 0 0 0 5px rgba(82, 209, 209, 0.1), 0 0 16px rgba(82, 209, 209, 0.7);
}

.qx-captcha-header h2 {
  margin: 0;
  color: #f3fbfc;
  font: 600 1.55rem "Space Grotesk", "Manrope", sans-serif;
  letter-spacing: -0.035em;
}

.qx-captcha-header p {
  margin: 6px 0 0;
  color: #8da5af;
  font-size: 0.91rem;
  line-height: 1.55;
}

.qx-captcha button {
  margin: 0;
  border: 0;
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
}

.qx-captcha-close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(169, 226, 227, 0.15) !important;
  border-radius: 12px !important;
  color: #9eb7c0 !important;
  background: rgba(255, 255, 255, 0.045) !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease !important;
}

.qx-captcha-close:hover {
  color: #efffff !important;
  border-color: rgba(82, 209, 209, 0.42) !important;
  background: rgba(82, 209, 209, 0.08) !important;
  transform: none !important;
}

.qx-captcha-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.qx-captcha-body {
  padding: 25px 28px 28px;
}

.qx-captcha-sequence-wrap {
  padding: 15px 17px 17px;
  border: 1px solid rgba(169, 226, 227, 0.14);
  border-radius: 15px;
  background: rgba(3, 14, 21, 0.44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.qx-captcha-sequence-label {
  display: block;
  margin-bottom: 10px;
  color: #78949f;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.qx-captcha-sequence {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.qx-captcha-instruction-icon {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.22));
}

.qx-captcha-arrow {
  color: #3fb6ba;
  font: 500 1rem "Space Grotesk", sans-serif;
  opacity: 0.72;
}

.qx-captcha-loading {
  color: #78949f;
  font-size: 0.83rem;
  letter-spacing: 0.04em;
}

.qx-captcha-loading::after {
  content: "…";
  display: inline-block;
  width: 1.2em;
  overflow: hidden;
  vertical-align: bottom;
  animation: qx-captcha-dots 1.15s steps(4, end) infinite;
}

.qx-captcha-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-top: 14px;
}

.qx-captcha-option {
  position: relative;
  width: 100%;
  height: auto !important;
  min-height: 104px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 15px !important;
  overflow: hidden;
  border: 1px solid rgba(169, 226, 227, 0.16) !important;
  border-radius: 16px !important;
  color: #f3fbfc !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018)),
    rgba(11, 35, 47, 0.82) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  cursor: pointer;
  user-select: none;
  transform: none !important;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease !important;
}

.qx-captcha-option:hover:not(:disabled) {
  border-color: rgba(82, 209, 209, 0.48) !important;
  background:
    linear-gradient(145deg, rgba(82, 209, 209, 0.1), rgba(255, 255, 255, 0.018)),
    rgba(11, 35, 47, 0.9) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.055) !important;
  transform: translateY(-2px) !important;
}

.qx-captcha-option:focus-visible,
.qx-captcha-close:focus-visible,
.qx-captcha-primary:focus-visible {
  outline: 2px solid #82e2e1;
  outline-offset: 3px;
}

.qx-captcha-option.is-selected {
  border-color: rgba(82, 209, 209, 0.78) !important;
  background:
    linear-gradient(145deg, rgba(82, 209, 209, 0.2), rgba(49, 168, 174, 0.08)),
    rgba(10, 37, 48, 0.96) !important;
  box-shadow: 0 0 0 1px rgba(82, 209, 209, 0.15), 0 12px 26px rgba(0, 0, 0, 0.2) !important;
}

.qx-captcha-option-symbol {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: clamp(2.6rem, 5vw, 3.35rem);
  line-height: 1;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.24));
}

.qx-captcha-order {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(210, 255, 255, 0.4);
  border-radius: 50%;
  color: #061419;
  background: #82e2e1;
  box-shadow: 0 5px 14px rgba(49, 168, 174, 0.3);
  font-size: 0.75rem;
  font-weight: 800;
}

.qx-captcha-option-loading {
  display: block;
  border-color: rgba(169, 226, 227, 0.08) !important;
  background: rgba(255, 255, 255, 0.035) !important;
  cursor: default;
  animation: qx-captcha-pulse 1.2s ease-in-out infinite;
}

.qx-captcha-feedback-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  color: #718d98;
  font-size: 0.69rem;
}

.qx-captcha-progress {
  color: #9ab5be;
  font-weight: 700;
}

.qx-captcha-error {
  margin: 13px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(239, 183, 183, 0.22);
  border-radius: 11px;
  color: #f3c6c6;
  background: rgba(123, 47, 54, 0.16);
  font-size: 0.79rem;
  line-height: 1.45;
  text-align: center;
}

.qx-captcha-error[hidden] {
  display: none;
}

.qx-captcha-actions {
  margin-top: 18px;
}

.qx-captcha-primary {
  width: 100%;
  height: 52px !important;
  padding: 0 18px !important;
  border-radius: 11px !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, filter 150ms ease, opacity 150ms ease !important;
}

.qx-captcha-primary {
  color: #041116 !important;
  background: linear-gradient(135deg, #b7f0ef 0%, #52d1d1 52%, #31a8ae 100%) !important;
  box-shadow: 0 12px 26px rgba(49, 168, 174, 0.22) !important;
}

.qx-captcha-primary:hover:not(:disabled) {
  filter: saturate(1.08) brightness(1.04);
  transform: translateY(-1px) !important;
}

.qx-captcha button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

@keyframes qx-captcha-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.8; }
}

@keyframes qx-captcha-dots {
  0% { width: 0; }
  100% { width: 1.2em; }
}

@media (max-width: 520px) {
  .qx-captcha {
    place-items: center;
    padding: 12px;
  }

  .qx-captcha-panel {
    max-height: calc(100dvh - 24px);
    border-radius: 21px;
  }

  .qx-captcha-header {
    gap: 14px;
    padding: 21px 20px 18px;
  }

  .qx-captcha-header h2 {
    font-size: 1.34rem;
  }

  .qx-captcha-header p {
    max-width: 260px;
    font-size: 0.84rem;
  }

  .qx-captcha-close {
    width: 38px;
    height: 38px;
  }

  .qx-captcha-body {
    padding: 18px 20px 21px;
  }

  .qx-captcha-sequence-wrap {
    padding: 13px 12px 15px;
  }

  .qx-captcha-sequence {
    gap: 7px;
  }

  .qx-captcha-instruction-icon {
    min-width: 33px;
    font-size: 1.76rem;
  }

  .qx-captcha-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 11px;
  }

  .qx-captcha-option {
    min-height: 102px;
    aspect-ratio: 1.32;
  }

  .qx-captcha-option-symbol {
    font-size: 2.75rem;
  }

  .qx-captcha-feedback-row {
    font-size: 0.64rem;
  }

  .qx-captcha-actions {
    margin-top: 15px;
  }

  .qx-captcha-primary {
    height: 49px !important;
  }
}

@media (max-width: 360px) {
  .qx-captcha-expiry {
    display: none;
  }

  .qx-captcha-feedback-row {
    justify-content: center;
  }

  .qx-captcha-header,
  .qx-captcha-body {
    padding-inline: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qx-captcha,
  .qx-captcha-panel,
  .qx-captcha button {
    transition: none !important;
  }

  .qx-captcha-loading::after,
  .qx-captcha-option-loading {
    animation: none;
  }
}
