.ucaptcha-container {
  border: 1px solid #e7eaee;
  border-radius: 5px;
  text-align: center;
  max-width: 320px;
  background-color: white;
  background-clip: border-box;
  display: block; /* fix: container visible when JS removes d-none */
  padding: 0;
  margin-bottom: 15px;
}

[data-pc-theme=dark] .ucaptcha-container {
  border: 1px solid #444c56;
  background-color: #2d333b;
}

/* Captcha image display */
.ucaptcha-show {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 320px;
  height: 250px;
  margin-bottom: 10px;
  background-color: white;
  border-radius: 2px;
  border-top: 2px solid #e7eaee;
  border-bottom: 2px solid #e7eaee;
  overflow: hidden;
  background-clip: border-box;
  cursor: pointer;
}

[data-pc-theme=dark] .ucaptcha-show {
  background-color: #2d333b;
  border-top: 2px solid #444c56;
  border-bottom: 2px solid #444c56;
}

.ucaptcha-show img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  z-index: 1;
}

/* Click dot */
[data-uc-dot] {
  width: 10px;
  height: 10px;
  background-color: #333333;
  position: absolute;
  border-radius: 50%;
  z-index: 2;
}

/* Click dot dark */
[data-pc-theme=dark] [data-uc-dot] {
  width: 10px;
  height: 10px;
  background-color: #14FAB5;
  position: absolute;
  border-radius: 50%;
  z-index: 2;
}

/* Checkbox container */
.ucaptcha-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  border: 1px solid #e7eaee;
  border-radius: 5px;
  background: white;
  background-size: cover;
  max-width: 320px;
  margin-bottom: 15px;
  background-clip: border-box;
}

[data-pc-theme=dark] .ucaptcha-box {
  background-color: #2d333b;
  border: 1px solid #444c56;
}

.ucaptcha-box input[type="checkbox"] {
  display: none;
}

/* Label styling */
.ucaptcha-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  padding-left: 50px;
  font-size: 17px;
  font-weight: bold;
  color: #333333;
}

[data-pc-theme=dark] .ucaptcha-label {
  color: #ccc;
}

.ucaptcha-label::before {
  content: '';
  width: 30px;
  height: 30px;
  border: 2px solid #4E46FF;
  border-radius: 4px;
  background: transparent;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Loading spinner */
.ucaptcha-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #4E46FF;
  border-top: 3px solid blue;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
  position: absolute;
  left: 5px;
}

input[type="checkbox"]:checked + .ucaptcha-label::before {
  background: transparent;
}

input[type="checkbox"]:checked + .ucaptcha-label .ucaptcha-spinner {
  display: block;
}

/* Spinner animation */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Captcha title text */
.ucaptcha-title {
  color: #5B5B5B;
  font-size: 14px;
  font-weight: 400;
  margin-top: 2px;
  margin-bottom: 2px;
}

[data-pc-theme=dark] .ucaptcha-title {
  color: #ccc;
}

/* Footer */
.ucaptcha-footer {
  border-top: 2px solid #e7eaee;
  font-size: 12px;
  font-weight: bold;
  color: #4E46FF;
}

/* Wave animation */
.ucaptcha-wave {
  position: relative;
  overflow: hidden;
  --captcha-wave-color: #ffffff80;
}

[data-pc-theme="dark"] .ucaptcha-wave {
  --captcha-wave-color: #5c6b8a;
}

.ucaptcha-wave::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--captcha-wave-color), transparent);
  animation: captcha-wave 1.5s ease-in-out 0.5s infinite;
}

@keyframes captcha-wave {
  0% { transform: translateX(-100%); }
  50%, 100% { transform: translateX(100%); }
}

