/**
 * CAPTCHA Modal Styles
 * Matches the site's design language: dark backgrounds, white text, rounded corners
 */

/* Modal Overlay */
.captcha-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
}

.captcha-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.captcha-modal {
    background: #000000;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.captcha-overlay.visible .captcha-modal {
    transform: scale(1) translateY(0);
}

/* Header */
.captcha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #333;
}

.captcha-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
}

.captcha-close {
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.captcha-close:hover {
    color: #ffffff;
}

/* Body */
.captcha-body {
    padding: 24px 20px;
}

.captcha-instruction {
    color: #aaaaaa;
    margin: 0 0 20px 0;
    font-size: 14px;
    text-align: center;
}

/* Question Area */
.captcha-question {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

#captcha-problem {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 2px;
}

.captcha-equals {
    font-size: 24px;
    color: #ffaa00;
    font-weight: 600;
}

/* Input Field */
.captcha-input {
    width: 80px;
    height: 50px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -moz-appearance: textfield;
}

.captcha-input::-webkit-outer-spin-button,
.captcha-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.captcha-input:focus {
    border-color: #ffaa00;
    box-shadow: 0 0 0 3px rgba(255, 170, 0, 0.2);
}

/* Error Message */
.captcha-error {
    color: #ff4444;
    font-size: 13px;
    text-align: center;
    margin: 0;
    min-height: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.captcha-error.visible {
    opacity: 1;
}

/* Hint Text */
.captcha-hint {
    display: block;
    color: #888888;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    margin-top: 12px;
}

/* Footer */
.captcha-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #333;
    justify-content: flex-end;
}

/* Buttons */
.captcha-btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.captcha-btn:active {
    transform: scale(0.98);
}

.captcha-btn-cancel {
    background: #333;
    color: #ffffff;
}

.captcha-btn-cancel:hover {
    background: #444;
}

.captcha-btn-submit {
    background: #23e;
    color: #ffffff;
}

.captcha-btn-submit:hover {
    background: #34f;
}

/* Shake Animation */
@keyframes captcha-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

.captcha-modal.captcha-shake {
    animation: captcha-shake 0.5s ease;
}

/* Mobile Responsive */
@media screen and (max-width: 480px) {
    .captcha-modal {
        width: 95%;
        max-width: none;
        margin: 16px;
    }

    .captcha-header {
        padding: 14px 16px;
    }

    .captcha-body {
        padding: 20px 16px;
    }

    .captcha-footer {
        padding: 14px 16px;
        flex-direction: column;
    }

    .captcha-btn {
        width: 100%;
        text-align: center;
    }

    #captcha-problem {
        font-size: 24px;
    }

    .captcha-input {
        width: 70px;
        height: 45px;
        font-size: 22px;
    }
}

