/* ===== ОСНОВНАЯ ПАЛИТРА И СБРОС ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #340f0f;
    color: #f6efc3;
    min-height: 100vh;
    line-height: 1.6;
    padding: 20px;
}

/* ===== ЛОГОТИП И ЗАГОЛОВОК ===== */
.page-header {
    text-align: center;
    padding: 20px 0 30px 0;
    background: transparent;
    max-width: 1200px;
    margin: 0 auto;
}
.logo {
    max-width: 300px;
    margin: 0 auto 20px;
    display: block;
}
.page-header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    color: #f6efc3;
}
.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* ===== ГЛАВНЫЙ КОНТЕЙНЕР ===== */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 30px;
    background: #340f0f;
    padding: 20px;
    border-radius: 15px;
}

/* Остальные стили оставляем как есть из оригинального файла */
            margin: 0 auto 20px;
            display: block;
        }
        .page-header h1 {
            font-size: 2.8rem;
            margin-bottom: 10px;
            color: #f6efc3;
        }
        .page-header p {
            font-size: 1.2rem;
            opacity: 0.9;
        }

        /* ===== ГЛАВНЫЙ КОНТЕЙНЕР ===== */
        .main-container {
            box-sizing: border-box;
            max-width: 1000px;
            margin: 0 auto 0 0;
            display: flex;
            gap: 30px;
            background: #340f0f;
            padding: 20px;
            border-radius: 15px;
        }

        /* ===== ЛЕВАЯ КОЛОНКА - ФОРМА ===== */
        .form-column {
            flex: 1;
            background: transparent;
        }

        /* ===== БЛОКИ ФОРМЫ (ПРОЗРАЧНЫЕ) ===== */
        .form-section {
            margin-bottom: 30px;
            padding: 25px;
            background: transparent;
            border-radius: 10px;
            border: 2px solid #f6efc3;
        }
        .form-section h2 {
            color: #f6efc3;
            margin-bottom: 20px;
            font-size: 1.6rem;
        }

        /* ===== СЕТКА ПОЛЕЙ ===== */
        .form-row { display: flex; gap: 15px; margin-bottom: 15px; }
        .form-column-inner { flex: 1; }
        .form-group { margin-bottom: 15px; }
        .form-group label {
            display: block; margin-bottom: 6px; font-weight: 600; color: #f6efc3;
        }

        /* ===== ПОЛЯ ВВОДА (ПРОЗРАЧНЫЕ) ===== */
        .form-group input,
        .form-group textarea {
            width: 100%; padding: 10px; border: 2px solid #f6efc3; border-radius: 6px;
            font-size: 16px; background: transparent; color: #f6efc3;
        }
        /* ===== ВЫПАДАЮЩИЕ СПИСКИ (ТЁМНЫЕ) ===== */
        .form-group select {
            width: 100%; padding: 10px; border: 2px solid #f6efc3; border-radius: 6px;
            font-size: 16px; background: #340f0f !important; color: #f6efc3 !important;
            cursor: pointer;
        }
        .form-group select option { background: #340f0f; color: #f6efc3; }
        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            border-color: #f6efc3; outline: none; box-shadow: 0 0 0 3px rgba(246, 239, 195, 0.1);
        }
        .form-group input::placeholder,
        .form-group textarea::placeholder { color: rgba(246, 239, 195, 0.7); }

        /* ===== КНОПКИ (ПРОЗРАЧНЫЕ) ===== */
        .btn {
            background: transparent;
            color: #f6efc3; padding: 12px 25px; border: 2px solid #f6efc3; border-radius: 6px;
            font-size: 16px; font-weight: bold; cursor: pointer; display: inline-block;
            transition: all 0.3s ease;
        }
        .btn-block { display: block; width: 100%; margin-bottom: 20px; }
        .remove-btn { position: absolute; bottom: 15px; right: 15px; }
        .btn:hover { background: #f6efc3; color: #340f0f; border-color: #340f0f; }
        .btn-ai { width: 100%; margin-top: 10px; }

        /* ===== БЛОКИ ОПЫТА/ОБРАЗОВАНИЯ (ПРОЗРАЧНЫЕ) ===== */
        .experience-block,
        .education-block {
            background: transparent;
            padding: 15px 15px 50px 15px; border-radius: 8px; border: 1px solid #f6efc3;
            margin-bottom: 15px; position: relative;
        }

        /* ===== ПРАВАЯ КОЛОНКА - КНОПКА И ЧАТ ===== */
        .sidebar-column {
            width: 500px;
            background: transparent; position: fixed; top: 385px; right: 10px; width: 500px;
        }
        /* КНОПКА "СОХРАНИТЬ ДАННЫЕ" */
        .save-data-btn:hover {
            background: #ff0000; color: #00ff00; border-color: #00ff00;
        }
        /* ЧАТ (ПРОЗРАЧНЫЙ) */
        .master-chat {
            background: transparent; border: 2px solid #f6efc3; border-radius: 10px; overflow: hidden;
        }
        .chat-header { background: transparent; color: #f6efc3; padding: 15px; border-bottom: 1px solid #f6efc3; cursor: pointer; }
        .chat-content { padding: 15px; max-height: 300px; overflow-y: auto; background: transparent; }
        .chat-message { padding: 10px 14px; border-radius: 8px; margin-bottom: 10px; max-width: 85%; word-wrap: break-word; }
        .master-message { background: transparent; color: #f6efc3; border: 1px solid #f6efc3; margin-right: auto; }
        .user-message { background: transparent; color: #f6efc3; border: 1px solid #f6efc3; margin-left: auto; text-align: right; }
        .chat-input-container { padding: 15px; border-top: 1px solid #f6efc3; background: transparent; display: flex; gap: 10px; }
        .chat-input-container input { flex: 1; padding: 10px; border: 1px solid #f6efc3; border-radius: 6px; background: transparent; color: #f6efc3; }

        /* ===== АДАПТИВНОСТЬ ===== */
        @media (max-width: 1024px) {
            .main-container {
            box-sizing: border-box; flex-direction: column; }
            .sidebar-column {
            box-sizing: border-box; width: 100%; }
        }

/* Стили для сообщений анализа от Мастера */
.chat-message.analysis-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-left: 4px solid #4CAF50;
    padding: 15px 20px;
    margin: 10px 0;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.chat-message.analysis-message strong {
    color: #FFD700;
    font-weight: 600;
}

.chat-message.analysis-message br {
    margin-bottom: 8px;
    display: block;
    content: "";
}

/* Адаптивная высота чата */
.chat-content {
    min-height: 200px;
    max-height: 500px;
    transition: max-height 0.5s ease;
    overflow-y: auto;
}

.chat-content.expanded {
    max-height: 700px;
}

/* Анимация для кнопки анализа */
#check_data_btn {
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

#check_data_btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

#check_data_btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Стили для уведомлений */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #4CAF50;
    color: white;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transform: translateX(100px);
    animation: slideIn 0.5s forwards, fadeOut 0.5s 4.5s forwards;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}
/* ===== ПОЛНЫЙ ФИКС ДЛЯ АДАПТИВНОСТИ ===== */

/* 1. Базовые исправления для мобильных */
@media (max-width: 768px) {
    .container {
        padding: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    .form-row {
        flex-direction: column !important;
        margin-bottom: 0 !important;
        gap: 10px !important;
    }
    
    .form-row .form-group {
        width: 100% !important;
        margin-bottom: 15px !important;
        flex: 1 1 100% !important;
    }
    
    .form-section {
        padding: 15px !important;
        margin-bottom: 15px !important;
        border-radius: 8px !important;
    }
    
    /* Предотвращение выхода текста за пределы */
    .form-group input, 
    .form-group textarea, 
    .form-group select {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Исправление для блоков образования и опыта */
    .education-block, .experience-block {
        padding: 12px !important;
        margin-bottom: 15px !important;
        border-left: 4px solid #4a6fa5 !important;
        overflow: hidden !important;
        word-wrap: break-word !important;
    }
    
    /* Кнопки в блоках */
    .remove-btn {
        margin-top: 10px !important;
        width: 100% !important;
    }
}

/* 2. Для очень маленьких экранов */
@media (max-width: 480px) {
    .btn {
        padding: 12px 15px !important;
        font-size: 14px !important;
        margin: 8px 0 !important;
        width: 100% !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    .add-btn, .remove-btn {
        width: auto !important;
        display: inline-block !important;
        min-width: 140px !important;
        margin: 5px !important;
    }
    
    h1 { font-size: 24px !important; }
    h2 { font-size: 20px !important; }
    h3 { font-size: 18px !important; }
    
    /* Уменьшаем отступы */
    .form-section {
        padding: 12px !important;
    }
}

/* 3. Предотвращение наложения блоков */
.form-group {
    clear: both !important;
    overflow: hidden !important;
}

/* 4. Исправление для предпросмотра фото */
#photo_preview {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 10px auto !important;
    border: 2px solid #4a6fa5 !important;
}

/* 5. Фикс для чата (будем дорабатывать отдельно) */
.chat-container {
    min-height: 200px !important;
    max-height: 400px !important;
    overflow-y: auto !important;
}
