/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: transparent;
    min-height: 70vh;
    display: flex;
    align-items: top;
    justify-content: top;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.card {
    background: #f5f5f5;
    border-radius: 12px;
				border-color: #B4B4B4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    padding: 25px;
    text-align: center;
}

.card-title {
    font-size: 1.4em;
    color: #333;
    margin-bottom: 15px;
}

.message {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9em;
    transition: opacity 2s ease-out;
}

.message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #0864AF;
}

.message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #0864AF;
}

/* Форма: Имя, Email, Кнопка — в одну строку */
.form-row {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: nowrap;
}

.form-row input {
    flex: 1;
    min-width: 120px;
    height: 36px; /* Уменьшена высота */
    padding: 0 10px;
    border: 2px solid #ccc; /* ✅ Серая рамка по умолчанию */
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    color: #888; /* Светлый шрифт */
    background: white;
    transition: all 0.3s ease;
}

/* При фокусе — красная рамка */
.form-row input:focus + .form-label,
    .form-input:not(:placeholder-shown) + .form-label {
    outline: none;
    border-color: #ff4d4d; /* 🔴 Красный при наведении */
    color: #333;
}

/* Если поле заполнено — зелёная рамка */
.form-row input:valid:not(:placeholder-shown) {
    border-color: #00a651; /* ✅ Зелёный после ввода */
}


.submit-btn {
    flex: 0 0 auto;
height: 36px;
    padding: 8px 12px;
    background: #04A4CC;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-btn:hover {
    background: #0088cc;
}

/* Капча и политика — в одной строке */
.captcha-policy-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 0 0;
    font-size: 14px;
    color: #333;
    flex-wrap: wrap;
}

.captcha-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.captcha-input {
    width: 40px;
    height: 32px;
    padding: 0 5px;
    border: 2px solid #ccc;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    color: #888;
    transition: border-color 0.3s ease;
}

.captcha-input:focus {
    outline: none;
    border-color: #ff4d4d;
}

.policy-link {
    color: #00aaff;
    text-decoration: none;
    font-size: 14px;
}

.policy-link:hover {
    text-decoration: underline;
}

.bottom-note {
    text-align: center;
    font-size: 0.8em;
    color: #999;
    margin-top: 20px;
}

/* Адаптивность */
@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
    }

    .submit-btn {
        width: 100%;
    }

    .captcha-policy-row {
        flex-direction: column;
        gap: 10px;
    }
}