/* MATH CAPTCHA SECTION */
.captcha-section {
    grid-column: 1 / -1;
    background: rgba(0, 255, 136, 0.05);
    border: 2px solid rgba(0, 255, 136, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.captcha-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #00ff88, #00ccdd);
    transition: left 0.6s ease;
}

.captcha-section:hover::before {
    left: 100%;
}

.captcha-section:hover {
    border-color: rgba(0, 255, 136, 0.4);
    background: rgba(0, 255, 136, 0.08);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.1);
}

.captcha-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #00ff88, #00ccdd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.captcha-label::before {
    content: '🔐';
    font-size: 1.3rem;
}

#captcha-question {
    font-weight: bold;
    margin-bottom: 1rem;
    display: block;
    color: #ffffff;
    font-size: 1.3rem;
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 136, 0.2);
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

#captcha-answer {
    width: 100%;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

#captcha-answer::placeholder {
    color: #666;
}

#captcha-answer:focus {
    outline: none;
    border-color: #00ff88;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
    transform: scale(1.02);
}

#captcha-answer:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(0, 255, 136, 0.3);
}

.captcha-helper-text {
    color: #888;
    font-size: 0.85rem;
    margin-top: 0.7rem;
    display: block;
    text-align: center;
}

.captcha-helper-text::before {
    content: '💡 ';
}

.captcha-button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

#refresh-captcha {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 204, 221, 0.2));
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00ff88;
    padding: 0.7rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

#refresh-captcha:hover {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.3), rgba(0, 204, 221, 0.3));
    border-color: #00ff88;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.2);
}

#refresh-captcha:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 255, 136, 0.1);
}

/* Анимация при перезагрузке капчи */
@keyframes refreshPulse {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#refresh-captcha:active::before {
    animation: refreshPulse 0.6s ease;
}

/* Украинский текст - адаптация */
.captcha-section .form-group:last-child {
    margin-bottom: 0;
}

/* Mobile Responsive для CAPTCHA */
@media (max-width: 768px) {
    .captcha-section {
        grid-column: 1 / -1;
        padding: 1.2rem;
        margin: 1rem 0;
    }

    .captcha-label {
        font-size: 1rem;
    }

    #captcha-question {
        font-size: 1.1rem;
        padding: 0.8rem;
    }

    #captcha-answer {
        padding: 0.8rem 0.9rem;
        font-size: 0.95rem;
    }

    .captcha-button-group {
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    #refresh-captcha {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .captcha-section {
        padding: 1rem;
        border-radius: 10px;
    }

    #captcha-question {
        font-size: 1rem;
        padding: 0.7rem;
    }

    #captcha-answer {
        padding: 0.7rem;
        font-size: 0.9rem;
    }

    .captcha-button-group {
        flex-direction: column;
    }

    #refresh-captcha {
        width: 100%;
        padding: 0.7rem;
    }
}