/* Стили для капчи - в стиле Telegram Web App */
.captcha-section {
    margin: 20px 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

.box-captcha {
    text-align: center;
    padding: 0;
    width: 100%;
}

.box-captcha h3 {
    margin-bottom: 15px;
    color: var(--tg-theme-text-color);
    font-size: 16px;
    font-weight: 600;
}

.captcha-image-container {
    margin: 15px auto;
    padding: 15px;
    background: var(--tg-theme-secondary-bg-color);
    border-radius: 12px;
    border: 1px solid var(--tg-theme-section-separator-color);
    display: inline-block;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 100%;
}

.captcha-image-container:hover {
    border-color: var(--tg-theme-link-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.captcha-image-container img {
    border-radius: 6px;
    display: block;
    width: 100%;
    max-width: 200px;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    background: white;
    margin: 0 auto;
}

.captcha-input-container {
    margin: 20px 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.captcha-input-container input {
    width: 100%;
    max-width: 220px;
    padding: 16px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 10px;
    border: 2px solid var(--tg-theme-section-separator-color);
    border-radius: 12px;
    background: var(--tg-theme-bg-color);
    color: var(--tg-theme-text-color);
    transition: all 0.2s ease;
    font-family: 'Courier New', Courier, monospace;
    box-sizing: border-box;
}

.captcha-input-container input:focus {
    border-color: var(--tg-theme-link-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.captcha-input-container input::placeholder {
    color: var(--tg-theme-hint-color);
    font-size: 18px;
    letter-spacing: normal;
}

.captcha-message {
    margin: 15px 0;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    min-height: 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--tg-theme-secondary-bg-color);
    border: 1px solid transparent;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.captcha-error {
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
    border-color: rgba(255, 77, 77, 0.2);
}

.captcha-success {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.2);
}

.captcha-loading {
    color: var(--tg-theme-subtitle-text-color);
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Контейнер для кнопок */
.captcha-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

/* Кнопки в стиле Telegram */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 120px;
    max-width: 100%;
}

.btn--primary {
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    flex: 2;
    min-width: 180px;
}

.btn--primary:hover {
    background: var(--tg-theme-link-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn--light {
    background: var(--tg-theme-secondary-bg-color);
    color: var(--tg-theme-text-color);
    border: 1px solid var(--tg-theme-section-separator-color);
}

.btn--light:hover {
    background: var(--tg-theme-bg-color);
    border-color: var(--tg-theme-link-color);
}

.btn--tt-none {
    text-transform: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Адаптивность */
@media (max-width: 480px) {
    .captcha-section {
        margin: 15px 0;
    }

    .captcha-input-container input {
        max-width: 180px;
        padding: 14px;
        font-size: 20px;
        letter-spacing: 8px;
    }

    .captcha-image-container {
        padding: 12px;
    }

    .captcha-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        max-width: 100%;
    }

    .btn--primary,
    .btn--light {
        flex: 1;
        min-width: 0;
    }
}