@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');
.captcha-overlay {
    display: flex;
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    opacity: 0;
    transform: scale(1);
}

.captcha-overlay.active {
    visibility: visible;
    transform: scale(1);
    opacity: 1;
}

.captcha-title {
    margin: 0;
}

@keyframes xap-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.xap-spinner {
  animation: xap-spin 1.5s ease-in-out infinite;
}

.captcha-container {
    background-image: linear-gradient(#2b2b2ba0, #0e0e0ea1), url('/login/static/img/background.svg');
    background-position: center top;
    background-repeat: no-repeat;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    border-radius: 10px;
    text-align: center;
    color: #fff;
    transform: scale(0.8);
    font-family: "Space Mono", monospace;
    transition: 0.35s ease;
    animation: fadeInBlur 1s ease;
    border: 1px solid #313131;
    overflow: hidden;
}

.captcha-overlay.active .captcha-container {
    transform: scale(1);
}

@keyframes fadeInBlur {
    0% { opacity: 0; filter: blur(50px); transform: scale(0.5); }
    100% { opacity: 1; filter: blur(0); }
}

@keyframes scaleInCheckmark {
    0% { opacity: 0; transform: scale(0.5) translate(-20%, 0%) rotate(135deg); }
    33% { opacity: 0.5; transform: scale(0.5) translate(-50%, -20%) rotate(135deg); }
    62% { opacity: 1; transform: scale(1) translate(-60%, -60%) rotate(-20deg); }
    95% { opacity: 1; transform: scale(1) translate(-47%, -47%) rotate(8deg); }
    100% { opacity: 1; transform: scale(1) translate(-50%, -50%) rotate(0deg); }
}

.captcha-container img {
    background: #141414;
    height: 150px;
    background-size: contain;
    background-repeat: no-repeat;
    border-radius: 7px;
    width: 100%;
    margin-bottom: 10px;
    transition: 0.25s ease;
}

.captcha-container input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background: transparent;
    border: 1px solid #3f3f3f;
    border-radius: 5px;
    color: #fff;
    font-family: 'Consolas', monospace;
}

.captcha-container button {
    padding: 10px 20px;
    margin: 5px;
    border: 1px solid #fff;
    border-radius: 5px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
    float: right;
}

.captcha-container button:hover {
    background: #ffffff38;
}

.captcha-container .error {
    background: #ff81811c;
    color: #ffffff;
    backdrop-filter: blur(3px);
    padding: 10px;
    white-space: nowrap;
    border-radius: 5px;
    margin-bottom: 10px;
    width: 95%;
}

.captcha-container .error::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100%;
    border-radius: 5px;
    opacity: 0.05;
    background-color: white;
    width: 100%;
    animation: shrinkLine 5s linear forwards;
}

@keyframes shrinkLine {
    0% { width: 100%; }
    100% { width: 0; }
}

.captcha-container .loader {
    display: none;
    margin: -10px auto;
}

.captcha-loader-svg {
    width: 14px;
    height: 20px;
    vertical-align: middle;
}

/* New Checkbox Styles */
.captcha-checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
    position: relative;
    margin: 20px 0;
    background: rgba(20, 20, 20, 0.75);
    border: 1px solid #ffffff14;
    backdrop-filter: blur(8px);
    padding: 20px;
    border-radius: 12px;
}

.captcha-checkbox {
    width: 24px;
    height: 24px;
    background: #2b2b2b2e;
    border: 1px solid #ffffff2e;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.8;
    position: relative;
    transition: all 0.3s ease;
}

.captcha-checkbox:hover {
    cursor: pointer;
}

.captcha-checkbox.checked {
    cursor: default;
    border-color: #ffffff6e;
    background: #ffffff36;
    opacity: 1;
    transition: all 0.6s ease;
}

.captcha-checkbox-logo {
    margin-left: auto;
    color: white;
    font-family: 'Space Mono', monospace;
    display: flex;
    align-items: center;
    font-weight: 800;
    gap: 5px;
    transition: 0.3s ease;
}

.captcha-checkbox-logo:hover {
    opacity: 0.7;
    cursor: pointer;
}

.captcha-checkbox.checked::after {
    font-family: "Font Awesome 5 Free";
    content: "\f00c";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffffc7;
    font-size: 11px;
    font-weight: bold;
    animation: scaleInCheckmark 0.5s ease;
}

.captcha-checkbox-label {
    font-size: 16px;
    color: #fff;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.captcha-checkbox-container:hover .captcha-checkbox-label, .captcha-checkbox-container:hover .captcha-checkbox {
    opacity: 1;
}