
.captcha-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}

.captcha-container .captcha-row,
.captcha-container .captcha-image-row,
.captcha-container .captcha-image-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.captcha-container .captcha-image-wrap,
.captcha-container .captcha-image-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    line-height: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.captcha-container .captcha-image {
    display: block;
    width: auto;
    max-width: 180px;
    height: 40px;
    object-fit: contain;
    border: 0;
    border-radius: 4px;
    transition: opacity 0.2s ease;
}

.captcha-container .captcha-refresh-btn,
.captcha-container .captcha-refresh-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(12, 18, 48, 0.65);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.captcha-container .captcha-refresh-btn span,
.captcha-container .captcha-refresh-button span {
    display: none;
}

.captcha-container .captcha-refresh-btn svg,
.captcha-container .captcha-refresh-button svg {
    flex-shrink: 0;
}

.captcha-container .captcha-refresh-btn:hover:not(:disabled),
.captcha-container .captcha-refresh-button:hover:not(:disabled) {
    border-color: rgba(124, 151, 255, 0.55);
    background: rgba(18, 26, 68, 0.85);
    color: #7c97ff;
}

.captcha-container .captcha-refresh-btn:active:not(:disabled),
.captcha-container .captcha-refresh-button:active:not(:disabled) {
    transform: scale(0.97);
}

.captcha-container .captcha-refresh-btn:disabled,
.captcha-container .captcha-refresh-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.captcha-container .captcha-status {
    min-height: 0;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.58);
}

.captcha-container .captcha-status:not(:empty) {
    min-height: 18px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(124, 151, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.captcha-container .captcha-input,
.captcha-container .captcha-input-wrapper input[type="text"],
.captcha-container .captcha-input-wrapper .captcha-input,
.captcha-container .captcha-input-wrapper #captcha-input,
.captcha-container #captcha-input {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0.95rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    transition: all 0.25s ease;
    background: rgba(12, 18, 48, 0.65);
    color: rgba(255, 255, 255, 0.95);
    box-sizing: border-box;
}

.captcha-container .captcha-input::placeholder,
.captcha-container .captcha-input-wrapper input[type="text"]::placeholder,
.captcha-container #captcha-input::placeholder {
    color: rgba(255, 255, 255, 0.38);
    letter-spacing: normal;
    font-weight: 400;
}

.captcha-container .captcha-input:focus,
.captcha-container .captcha-input-wrapper input[type="text"]:focus,
.captcha-container #captcha-input:focus {
    outline: none;
    border-color: rgba(124, 151, 255, 0.55);
    background: rgba(18, 26, 68, 0.85);
    box-shadow: 0 0 0 3px rgba(124, 151, 255, 0.18);
}

.captcha-container .captcha-input.error,
.captcha-container .captcha-input-wrapper input[type="text"].error,
.captcha-container #captcha-input.error {
    border-color: rgba(244, 67, 54, 0.75);
    background: rgba(244, 67, 54, 0.08);
}

.captcha-container .captcha-input.success,
.captcha-container .captcha-input-wrapper input[type="text"].success,
.captcha-container #captcha-input.success {
    border-color: rgba(76, 175, 80, 0.75);
}

.captcha-container .captcha-header,
.captcha-container .captcha-label,
.captcha-container .captcha-title,
.captcha-container .captcha-input-wrapper label,
.captcha-container .captcha-input-label {
    display: none;
}

.captcha-container .captcha-input-wrapper {
    display: contents;
}

.captcha-container .captcha-error-message {
    display: block;
    padding: 8px 12px;
    font-size: 13px;
    color: #ff8a80;
    background: rgba(244, 67, 54, 0.12);
    border: 1px solid rgba(244, 67, 54, 0.35);
    border-radius: 8px;
    margin: 0;
}

.captcha-container .captcha-success-message {
    display: block;
    padding: 8px 12px;
    font-size: 13px;
    color: #a5d6a7;
    background: rgba(76, 175, 80, 0.12);
    border: 1px solid rgba(76, 175, 80, 0.35);
    border-radius: 8px;
    margin: 0;
}

@media (max-width: 480px) {
    .captcha-container .captcha-image {
        max-width: 150px;
        height: 36px;
    }

    .captcha-container .captcha-refresh-btn,
    .captcha-container .captcha-refresh-button {
        width: 40px;
        height: 40px;
    }
}

.captcha-error-alert {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    background: rgba(244, 67, 54, 0.12);
    border: 1px solid rgba(244, 67, 54, 0.35);
    border-radius: 12px;
    padding: 20px;
    animation: slideDown 0.4s ease-out;
    box-shadow: 0 8px 24px rgba(244, 67, 54, 0.12);
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
}

.captcha-error-alert .alert-icon {
    font-size: 32px;
    line-height: 1;
}

.captcha-error-alert .alert-content strong {
    display: block;
    color: #ff8a80;
    font-weight: 700;
    margin-bottom: 5px;
}

.captcha-error-alert .alert-content p {
    color: rgba(255, 138, 128, 0.9);
    margin: 0 0 5px 0;
}

.captcha-error-alert .alert-content small {
    color: rgba(255, 138, 128, 0.75);
    font-size: 13px;
    font-style: italic;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.field-error {
    color: #ff8a80;
    font-size: 0.9em;
    margin-top: 5px;
    padding: 6px 10px;
    background: rgba(244, 67, 54, 0.12);
    border-radius: 6px;
    border-left: 3px solid rgba(244, 67, 54, 0.55);
}

.field-success {
    color: #a5d6a7;
    font-size: 0.9em;
    margin-top: 5px;
    padding: 6px 10px;
    background: rgba(76, 175, 80, 0.12);
    border-radius: 6px;
    border-left: 3px solid rgba(76, 175, 80, 0.55);
}
