/* CAPTCHA Modal Styles */
.captcha-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.captcha-container:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(230, 57, 70, 0.1);
}

#captchaAnswer {
    font-weight: bold;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

#captchaAnswer:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(230, 57, 70, 0.25);
}

#captchaAnswer.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Countdown Timer */
.countdown-timer {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    display: inline-block;
}

.countdown-timer i {
    animation: pulse 1s infinite;
}

/* Refresh CAPTCHA button */
#refreshCaptcha {
    border-radius: 50px;
    padding: 5px 15px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

#refreshCaptcha:hover {
    transform: rotate(180deg);
    background-color: var(--secondary-color);
    color: white;
}

/* CAPTCHA Error */
#captchaError {
    animation: slideIn 0.3s ease;
    border-radius: 10px;
}

/* Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
#downloadModal .modal-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #d32f2f 100%);
    color: white;
    border-bottom: none;
    border-radius: 15px 15px 0 0;
}

#downloadModal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Responsive CAPTCHA */
@media (max-width: 576px) {
    .captcha-container .d-flex {
        flex-direction: column;
        align-items: center;
    }
    
    .captcha-container .d-flex span,
    .captcha-container .d-flex input {
        margin: 5px 0;
    }
    
    #captchaAnswer {
        width: 60px !important;
    }
    
    .countdown-timer {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}