@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');

:root {
    /* ЦВЕТА И ПЕРЕМЕННЫЕ (Синхронизированы с style.css) */
    --input-bg: rgba(0, 0, 0, 0.3); /* Темный полупрозрачный фон */
    --input-border: rgba(255, 255, 255, 0.1); /* Тонкая рамка */
    --input-focus-border: #3b82f6;
    
    /* Градиенты для кнопки из вашего style.css */
    --primary-gradient: linear-gradient(135deg, #1e3a8a, #3b82f6);
    --hover-gradient: linear-gradient(135deg, #2563eb, #60a5fa);
    --btn-shadow: 0 10px 30px rgba(30, 58, 138, 0.5);
    --btn-shadow-hover: 0 15px 40px rgba(59, 130, 246, 0.6);

    --text-white: #ffffff;
    --text-placeholder: #a0aec0; /* text-muted */
    
    /* Валидация */
    --error-bg: rgba(239, 68, 68, 0.1);
    --error-border: #ef4444;
    --success-bg: rgba(16, 185, 129, 0.1);
    --success-border: #10b981;

    --form-radius: 12px; /* Чуть мягче углы, как у .option */
    --form-anim: 0.3s ease;
}

/* =============================
   ОСНОВНОЙ КОНТЕЙНЕР
   ============================= */
._form.form {
    width: 100%;
    max-width: 100%; /* Занимает всю ширину шага */
    margin: 0 auto;
    padding: 10px 0; /* Убираем лишние отступы, так как они есть у .step */
    font-family: 'Segoe UI', 'Roboto', sans-serif; /* Наследуем шрифт страницы */
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    text-align: center;
    background: transparent;
}

/* Группы полей */
._form .form-group {
    width: 100%;
    margin-bottom: 20px; /* Больше воздуха между полями */
    text-align: left;
    position: relative;
}

/* =============================
   ПОЛЯ ВВОДА (INPUTS)
   ============================= */
._form input {
    width: 100%;
    height: 54px; /* Чуть выше для удобства */
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 400;
    
    /* Стили под темную тему */
    color: var(--text-white);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--form-radius);
    
    outline: none;
    transition: all var(--form-anim);
    box-sizing: border-box;
    font-family: inherit;
    box-shadow: none;
}

/* Плейсхолдер */
._form input::placeholder {
    color: var(--text-placeholder);
    opacity: 0.8;
    font-weight: 400;
}

/* Фокус */
._form input:focus {
    border-color: var(--input-focus-border);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15); /* Мягкое свечение */
}

/* =============================
   ВАЛИДАЦИЯ
   ============================= */
._form input.correct, 
._form input.valid {
    background: var(--success-bg) !important;
    border-color: var(--success-border) !important;
    box-shadow: none !important;
}

._form input.error, 
._form input.invalid {
    background: var(--error-bg) !important;
    border-color: var(--error-border) !important;
    box-shadow: none !important;
}

._form label.error {
    display: none !important;
}

/* =============================
   ТЕЛЕФОН (INTL-TEL-INPUT)
   ============================= */
._form .iti {
    width: 100%;
    display: block;
}

._form input[type="tel"] {
    padding-left: 95px !important; /* Отступ для флага */
}

/* Цвет кода страны */
.iti__selected-dial-code {
    color: #e2e8f0 !important;
    font-weight: 500;
}

/* Выпадающий список стран */
.iti__country-list {
    background-color: #152036; /* Цвет карточки из style.css (--card-bg) */
    border: 1px solid var(--input-border);
    color: #fff;
    border-radius: 12px;
    white-space: normal;
    width: 300px;
    max-width: 85vw;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.iti__country {
    padding: 12px 15px;
    font-size: 14px;
}

.iti__country.iti__highlight {
    background-color: rgba(59, 130, 246, 0.2);
}

.iti__divider {
    border-bottom-color: var(--input-border);
}

/* =============================
   КНОПКА (REG-BTN) - Полная копия стиля .btn
   ============================= */
._form .reg-btn {
    width: 100%;
    padding: 16px 28px;
    margin-top: 15px;
    
    /* Градиент и тени */
    background: var(--primary-gradient);
    box-shadow: var(--btn-shadow);
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    
    /* Типографика */
    font-size: 18px;
    font-weight: 600;
    text-transform: none; /* Убираем капс, чтобы было как в референсе */
    letter-spacing: normal;
    
    /* Форма */
    border-radius: 50px; /* Капсульная форма */
    cursor: pointer;
    transition: all 0.3s ease;
    
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    
    /* Анимация пульсации отключена для соответствия строгому стилю, 
       но можно оставить hover эффект */
}

/* Эффект стрелочки */
._form .reg-btn::after {
    content: '➔';
    font-size: 18px;
    margin-left: 5px;
    transition: transform 0.3s;
}

/* Hover эффект */
._form .reg-btn:hover:not(:disabled) {
    background: var(--hover-gradient);
    transform: translateY(-2px);
    box-shadow: var(--btn-shadow-hover);
}

._form .reg-btn:hover:not(:disabled)::after {
    transform: translateX(3px); /* Стрелка двигается при наведении */
}

/* Disabled state */
._form .reg-btn:disabled {
    background: #4a5568 !important;
    box-shadow: none;
    color: #a0aec0;
    cursor: not-allowed;
    transform: none;
    border-color: transparent;
}

/* =============================
   АДАПТИВНОСТЬ
   ============================= */
@media (max-width: 480px) {
    ._form input {
        height: 50px;
        font-size: 15px;
    }
    
    ._form .reg-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
}

.loader {
    display: none;
}