* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* Объявляем шрифт */
        @font-face {
            font-family: 'MyCustomFont';
            src: url('fonts/Metrika-Regular.woff2') format('woff2');
            font-weight: normal;
            font-style: normal;
            font-display: swap;
        }
        
        @font-face {
            font-family: 'MyCustomFont';
            src: url('fonts/Metrika-Regular.woff2') format('woff2');
            font-weight: bold;
            font-style: normal;
        }


        body {
            font-family: 'MyCustomFont', sans-serif;
            min-height: 100vh;
            padding: 20px;
            margin: 0;
            padding: 0;
            background-image: url('images/bg.jpg');
            background-repeat: no-repeat;
            background-size: cover; /* или contain */
            background-position: center;
            background-attachment: fixed; /* фиксированный фон при прокрутке */
            min-height: 100vh; /* минимальная высота на весь экран */
        }

        span {
            font-family: 'MyCustomFont', sans-serif;
            color:#28345E ;
        }

        ::placeholder{
            font-family: 'MyCustomFont', sans-serif;
            font-size: 1.0em;
        }

        input {
            font-family: 'MyCustomFont', sans-serif;
        }

        select{
            font-family: 'MyCustomFont', sans-serif;
        }

        button{
            font-family: 'MyCustomFont', sans-serif;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 1.5fr 1fr;
            gap: 40px;
            align-items: start;
        }

        /* Сделаем секцию ввода немного выше */
        .input-section {
            background: white;
            padding: 15px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            min-height: 100vh; /* Занимает всю высоту окна */
        }

        /* Обновленный блок предпросмотра с дополнительной кнопкой */
        .output-section {
            background: white;
            padding: 15px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            position: sticky;
            top: 10px; /* Прилипает к верху при прокрутке */
            max-height: 92vh; /* Увеличим высоту */
            overflow-y: auto; /* Прокрутка если контента много */
            display: flex;
            flex-direction: column;
        }

        /* Новый контейнер для кнопок в предпросмотре */
        .preview-controls {
            position: sticky;
            bottom: 0;
            background: white;
            padding: 10px 0;
            margin-top: auto;
            margin-bottom: 0;
            border-top: 1px solid #e1e5e9;
        }

        @media (max-width: 1024px) {
            .container {
                grid-template-columns: 60% 40%;
            }
        }

        @media (max-width: 768px) {
            .container {
                grid-template-columns: 1fr;
            }
            
            .output-section {
                position: static;
                max-height: none;
            }
            
            .preview-controls {
                position: static;
            }
        }

        h2 {
            color: #28345E;
            text-align: center;
            margin-bottom: 30px;
            font-size: 2.8em;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
        }

        .section-title {
            color: #28345E;
            margin: 25px 0 15px 0;
            padding-bottom: 10px;
            border-bottom: 2px solid #28345E;
            font-size: 1.5em;
        }

        input, textarea, select {
            width: 100%;
            margin: 8px 0;
            padding: 12px;
            border: 2px solid #e1e5e9;
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.3s ease;
        }

        input:focus, textarea:focus, select:focus {
            outline: none;
            border-color: #28345E;
            box-shadow: 0 0 0 3px rgba(40, 52, 94, 0.1);
        }

        .photo-upload {
            border: 2px dashed #28345E;
            padding: 20px;
            text-align: center;
            border-radius: 8px;
            margin: 15px 0;
            background: #f8f9fa;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .photo-upload:hover {
            background: #e9ecef;
            border-color: #1a2550;
        }

        .photo-preview {
            max-width: 150px;
            max-height: 150px;
            border-radius: 8px;
            object-fit: cover;
            border: 3px solid white;
            display: none;
        }

        .main-button {
            background: linear-gradient(135deg, #28345E, #1a2550);
            font-family: 'MyCustomFont', sans-serif;
            color: white;
            padding: 15px 30px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 30px;
            font-weight: 600;
            transition: all 0.3s ease;
            margin: 10px 5px;
            width: 100%;
        }

        .main-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        }

        .vivod-button {
            background: linear-gradient(135deg, #28345E, #1a2550);
            font-family: 'MyCustomFont', sans-serif;
            color: white;
            padding: 15px 25px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 22px;
            font-weight: 600;
            transition: all 0.3s ease;
            margin: 10px 5px;
            flex: 1; /* Добавь это вместо width: 100% */
            min-width: 150px; /* Минимальная ширина кнопок */
            justify-content: space-between;
        }

        .vivod-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        }


        .download-buttons {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            margin: 10px 0;
        }

        .download-buttons .main-button {
            flex: 1;
            min-width: 120px;
        }

        .resume-output {
            background: white;
            min-height: 400px;
            color: #28345E;
            flex: 1;
            overflow-y: auto;
        }

        .header-bg {
            background: #28345E;
            color: white;
            padding: 15px 20px;
            margin: 20px 0 15px 0;
            border-radius: 8px;
            font-weight: bold;
        }

        .text-content {
            color: #28345E;
            line-height: 1.6;
        }

        .separator {
            border-top: 2px solid #28345E;
            margin: 15px 0;
            opacity: 0.3;
        }

        /* ИСПРАВЛЕННЫЙ СТИЛЬ ДЛЯ ПЕРСОНАЛЬНОГО ЗАГОЛОВКА */
        .personal-header {
            display: grid;
            grid-template-columns: 150px 1fr;
            gap: 0;
            margin: 20px 0;
            background: #28345E;
            border-radius: 12px; /* ВОЗВРАЩАЕМ ЗАКРУГЛЕННЫЕ УГЛЫ */
            overflow: hidden;
            border-left: 5px solid #28345E;
            position: relative;
        }

        .photo-container {
            padding: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .resume-photo {
            width: 120px;
            height: 150px;
            border-radius: 4px;
            object-fit: cover;
            border: 2px solid white;
        }

        .contact-info {
            padding: 20px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            color: white;
        }

        .name {
            font-size: 24px;
            font-weight: bold;
            color: white;
            margin-bottom: 10px;
        }

        .vacancy-title {
            font-size: 14px;
            color: rgba(255,255,255,0.8);
            margin-bottom: 5px;
        }

        .vacancies {
            font-size: 16px;
            font-weight: bold;
            color: white;
            margin-bottom: 15px;
        }

        .contact-details {
            display: flex;
            justify-content: space-between;
            font-size: 14px;
            color: white;
        }

        .phone, .email {
            color: white;
        }

        .education-item {
            display: flex;
            gap: 10px;
            margin: 10px 0;
            align-items: center;
        }

        .education-inputs {
            display: flex;
            gap: 10px;
            align-items: center;
            flex: 1;
        }

        .education-year {
            width: 100px;
        }

        .education-name {
            flex: 1;
        }

        .education-specialty {
            flex: 1;
        }

        .dash {
            color: #28345E;
            font-weight: bold;
        }

        .circle-button {
            background: #28345E;
            color: white;
            border: none;
            border-radius: 50%;
            width: 30px;
            height: 30px;
            cursor: pointer;
            font-size: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            padding: 0;
            min-width: auto;
        }

        .circle-button.add {
            background: #28345E;
        }

        .circle-button.add:hover {
            background: #1a2550;
            transform: scale(1.1);
        }

        .circle-button.remove {
            background: #dc3545;
        }

        .circle-button.remove:hover {
            background: #c82333;
            transform: scale(1.1);
        }

        .education-buttons {
            display: flex;
            gap: 5px;
        }

        .education-list-input {
            margin: 15px 0;
        }

        .education-list-output {
            margin-left: 20px;
        }

        .education-output-item {
            margin: 8px 0;
            padding-left: 10px;
            border-left: 3px solid #28345E;
        }

        .experience-item {
            background: #f8f9fa;
            padding: 20px;
            border-radius: 8px;
            margin: 15px 0;
            border-left: 4px solid #28345E;
            position: relative;
        }

        .period-inputs {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-bottom: 15px;
        }

        .date-selectors {
            display: flex;
            gap: 10px;
        }

        .month-select, .year-select {
            flex: 1;
        }

        .current-work-checkbox {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 15px;
        }

        .current-work-checkbox input {
            width: auto;
        }

        .project-item {
            background: white;
            padding: 15px;
            border-radius: 6px;
            margin: 10px 0;
            border: 1px solid #e1e5e9;
            position: relative;
        }

        .project-inputs {
            margin-bottom: 10px;
        }

        .project-task {
            display: flex;
            gap: 10px;
            margin: 5px 0;
            align-items: center;
        }

        .project-task input {
            flex: 1;
        }

        .reason-block {
            background: #f8f9fa;
            padding: 12px;
            border-radius: 6px;
            margin-top: 15px;
            color: #6c757d;
            font-size: 14px;
        }

        .experience-buttons {
            display: flex;
            gap: 5px;
            margin-top: 10px;
        }

        .rect-button {
            background: #28345E;
            color: white;
            border: none;
            border-radius: 6px;
            padding: 8px 15px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .rect-button.add {
            background: #28345E;
        }

        .rect-button.add:hover {
            background: #1a2550;
            transform: translateY(-1px);
        }

        .rect-button.remove {
            background: #dc3545;
        }

        .rect-button.remove:hover {
            background: #c82333;
            transform: translateY(-1px);
        }

        .rect-button.small {
            padding: 5px 10px;
            font-size: 12px;
        }

        .delete-experience {
            background: #dc3545;
            color: white;
            border: none;
            border-radius: 6px;
            padding: 8px 12px;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 5px;
            transition: all 0.3s ease;
            margin-bottom: 15px;
        }

        .delete-experience:hover {
            background: #c82333;
            transform: translateY(-1px);
        }

        .delete-project {
            background: #dc3545;
            color: white;
            border: none;
            border-radius: 6px;
            padding: 6px 10px;
            cursor: pointer;
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 5px;
            transition: all 0.3s ease;
            margin-top: 10px;
        }

        .delete-project:hover {
            background: #c82333;
            transform: translateY(-1px);
        }

        .buttons-row {
            display: flex;
            gap: 10px;
            margin: 10px 0;
            flex-wrap: wrap;
        }

        .experience-output-item {
            margin-bottom: 25px;
            padding-bottom: 20px;
            border-bottom: 1px solid #e1e5e9;
        }

        .experience-period {
            font-weight: bold;
            color: #28345E;
            margin-bottom: 8px;
        }

        .company-name {
            font-weight: bold;
            margin-bottom: 5px;
        }

        .position-name {
            font-weight: bold;
            margin: 8px 0 5px 0;
        }

        .projects-list {
            margin: 15px 0 0 20px;
        }

        .project-output-item {
            margin: 10px 0;
        }

        .project-name {
            font-weight: bold;
            margin-bottom: 5px;
        }

        .project-tasks {
            margin-left: 20px;
        }

        .additional-item {
            display: flex;
            gap: 10px;
            margin: 10px 0;
            align-items: center;
        }

        .additional-input {
            flex: 1;
        }

        .additional-buttons {
            display: flex;
            gap: 5px;
        }

        .additional-list-output {
            margin-left: 20px;
        }

        .additional-output-item {
            margin: 8px 0;
            padding-left: 10px;
            border-left: 3px solid #28345E;
        }

        .color-picker-section {
            margin: 20px 0;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 8px;
            border: 2px solid #e1e5e9;
        }

        .color-picker-title {
            font-weight: bold;
            margin-bottom: 10px;
            color: #28345E;
        }

        .color-options {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .color-option {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            cursor: pointer;
            border: 3px solid transparent;
            transition: all 0.3s ease;
        }

        .color-option:hover {
            transform: scale(1.1);
        }

        .color-option.active {
            border-color: #28345E;
            transform: scale(1.1);
        }

        .custom-color-input {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 10px;
        }

        .custom-color-input input {
            width: 60px;
            margin: 0;
        }

        @media (max-width: 768px) {
            .container {
                grid-template-columns: 1fr;
                gap: 20px;
            }
            
            .personal-header {
                grid-template-columns: 1fr;
                text-align: center;
            }
            
            .download-buttons {
                flex-direction: column;
            }
            
            .contact-details {
                flex-direction: column;
                gap: 10px;
            }
            
            .period-inputs {
                grid-template-columns: 1fr;
            }
            
            .date-selectors {
                flex-direction: column;
            }
            
            .buttons-row {
                flex-direction: column;
            }
            
            .color-options {
                justify-content: center;
            }
        }


        /* Стили для системы выбора вакансий */
    .vacancies-container {
        position: relative;
        margin: 8px 0;
    }

    .vacancy-results {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: 300px;
        overflow-y: auto;
        background: white;
        border: 2px solid #e1e5e9;
        border-radius: 8px;
        z-index: 1000;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        display: none;
    }

    .vacancy-item {
        padding: 10px 15px;
        cursor: pointer;
        border-bottom: 1px solid #f0f0f0;
        transition: all 0.2s ease;
    }

    .vacancy-item:hover {
        background-color: #f8f9fa;
    }

    .vacancy-item.selected {
        background-color: #e3f2fd;
        color: #28345E;
        font-weight: bold;
    }

    .selected-vacancies {
        margin-top: 10px;
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        min-height: 40px;
        padding: 10px;
        border: 2px solid #e1e5e9;
        border-radius: 8px;
        background: #f8f9fa;
    }

    .vacancy-tag {
        background: #28345E;
        color: white;
        padding: 5px 10px;
        border-radius: 20px;
        font-size: 14px;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

    .vacancy-tag-remove {
        background: white;
        color: #28345E;
        border-radius: 50%;
        width: 18px;
        height: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 12px;
        font-weight: bold;
        margin-left: 5px;
    }

    .vacancy-tag-remove:hover {
        background: #ff4444;
        color: white;
    }