/* Blockchain CAPTCHA Widget */
.captcha-container {
    background: #0a0a0a;
    border: 1px solid #03BFCB;
    border-radius: 4px;
    padding: 12px 16px;
    margin: 18px 0;
    font-family: 'DejaVu Sans Mono', 'Courier New', monospace;
    position: relative;
    overflow: hidden;
    max-width: 440px;
}

/* Scanline overlay */
.captcha-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
    pointer-events: none;
    z-index: 1;
}

.captcha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.captcha-label {
    color: #03BFCB;
    font-size: 12px;
    opacity: 0.8;
}

.captcha-refresh {
    background: none;
    border: 1px solid #03BFCB;
    color: #03BFCB;
    width: 28px;
    height: 28px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.3s;
    padding: 0;
    line-height: 1;
}

.captcha-refresh:hover {
    background: rgba(3, 191, 203, 0.15);
}

.captcha-refresh.spinning {
    animation: captcha-spin 0.5s ease;
}

@keyframes captcha-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.captcha-image-wrap {
    position: relative;
    z-index: 2;
    margin-bottom: 10px;
}

.captcha-image-wrap img {
    display: block;
    width: 100%;
    max-width: 400px;
    height: auto;
    border: 1px solid #013033;
    border-radius: 2px;
}

.captcha-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.captcha-prompt {
    color: #03BFCB;
    font-size: 13px;
    white-space: nowrap;
}

.captcha-input {
    background: #0d0d0d;
    border: 1px solid #03BFCB;
    color: #03BFCB;
    font-family: 'DejaVu Sans Mono', 'Courier New', monospace;
    font-size: 16px;
    width: 42px;
    height: 32px;
    text-align: center;
    border-radius: 3px;
    outline: none;
    transition: box-shadow 0.2s;
}

.captcha-input:focus {
    box-shadow: 0 0 6px rgba(3, 191, 203, 0.4);
}

.captcha-input::placeholder {
    color: #013033;
}

.captcha-error {
    display: none;
    color: #ff4444;
    font-size: 11px;
    margin-top: 8px;
    position: relative;
    z-index: 2;
    font-family: 'DejaVu Sans Mono', 'Courier New', monospace;
}

.captcha-error.visible {
    display: block;
}

/* Responsive */
@media (max-width: 480px) {
    .captcha-container {
        padding: 10px 12px;
        max-width: 100%;
    }

    .captcha-label {
        font-size: 11px;
    }

    .captcha-prompt {
        font-size: 12px;
    }

    .captcha-input {
        font-size: 14px;
        width: 38px;
        height: 30px;
    }
}
