:root {
            --primary-color: #4361ee;
            --secondary-color: #3f37c9;
            --accent-color: #4895ef;
            --light-color: #f8f9fa;
            --dark-color: #212529;
            --success-color: #4cc9f0;
            --border-radius: 8px;
            --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            --transition: all 0.3s ease;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background-color: #f5f7ff;
            color: var(--dark-color);
            line-height: 1.6;
            padding: 20px;
        }

        .container {
            max-width: 800px;
            margin: 0 auto;
            /* padding: 20px; */
        }

        header {
            text-align: center;
            /* margin-bottom: 30px; */
        }

        h1 {
            color: var(--primary-color);
            line-height: 35px;
            /* margin-bottom: 10px; */
            /* font-size: 2.5rem; */
        }

        .subtitle {
            color: #6c757d;
            font-size: 1.1rem;
            line-height: 25px;
        }

        .converter-card {
            background-color: white;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            padding: 30px;
            margin-bottom: 30px;
            margin-top: 30px;
            transition: var(--transition);
        }

        .converter-card:hover {
            box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        }

        .upload-area {
            border: 2px dashed #ced4da;
            border-radius: var(--border-radius);
            padding: 40px 20px;
            text-align: center;
            cursor: pointer;
            margin-bottom: 20px;
            transition: var(--transition);
            position: relative;
            overflow: hidden;
        }

        .upload-area:hover {
            border-color: var(--accent-color);
            background-color: rgba(72, 149, 239, 0.05);
        }

        .upload-area.active {
            border-color: var(--success-color);
            background-color: rgba(76, 201, 240, 0.05);
        }

        .upload-icon {
            font-size: 48px;
            color: var(--accent-color);
            margin-bottom: 15px;
        }

        .upload-text {
            margin-bottom: 10px;
            font-weight: 500;
        }

        .upload-hint {
            color: #6c757d;
            font-size: 0.9rem;
        }

        #file-input {
            display: none;
        }

        .preview-container {
            display: none;
            margin-top: 20px;
            text-align: center;
        }

        #image-preview {
            max-width: 100%;
            max-height: 300px;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
        }

        .controls {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            margin-top: 25px;
        }

        .control-group {
            flex: 1;
            min-width: 200px;
        }

        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: var(--dark-color);
        }

        select, button {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #ced4da;
            border-radius: var(--border-radius);
            font-size: 1rem;
            transition: var(--transition);
        }

        select {
            background-color: white;
            cursor: pointer;
        }

        select:focus {
            border-color: var(--accent-color);
            outline: none;
            box-shadow: 0 0 0 3px rgba(72, 149, 239, 0.25);
        }

        button {
            background-color: var(--primary-color);
            color: white;
            font-weight: 600;
            border: none;
            cursor: pointer;
        }

        button:hover {
            background-color: var(--secondary-color);
            transform: translateY(-2px);
        }

        button:disabled {
            background-color: #adb5bd;
            cursor: not-allowed;
            transform: none;
        }

        .download-btn {
            background-color: var(--success-color);
        }

        .download-btn:hover {
            background-color: #3aa8d8;
        }

        .file-info {
            margin-top: 15px;
            font-size: 0.9rem;
            color: #6c757d;
        }

        footer {
            text-align: center;
            margin-top: 40px;
            color: #6c757d;
            font-size: 0.9rem;
        }

        @media (max-width: 600px) {
            .controls {
                flex-direction: column;
            }
            
            .control-group {
                width: 100%;
            }
        }

        /* Анимация загрузки */
        .loading {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(255, 255, 255, 0.8);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 10;
            display: none;
        }

        .spinner {
            width: 40px;
            height: 40px;
            border: 4px solid rgba(67, 97, 238, 0.2);
            border-top: 4px solid var(--primary-color);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
.header_order {
    display: flex;
    justify-content: space-between;
}
.header_text {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
}
.header_order img {
    display: flex;
    width: 118px;
    height: 50%;
    margin: auto 0;
}

.contact-form-wrapper h2 {
    margin-bottom: 25px;
    text-align: center;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Чекбокс */
.consent-group {
    margin: 25px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-custom {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    margin-top: 2px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: #fff;
    flex-shrink: 0;
}

.checkbox-label input:checked ~ .checkbox-custom {
    background: #007bff;
    border-color: #007bff;
}

.checkbox-label input:checked ~ .checkbox-custom:after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.consent-text {
    color: #555;
    line-height: 1.4;
}

.consent-text a {
    color: #007bff;
    text-decoration: none;
}

.consent-text a:hover {
    text-decoration: underline;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #0056b3;
}

.submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Адаптив */
@media (max-width: 768px) {
    .contact-form-wrapper {
        padding: 20px;
        margin: 15px;
    }
}

.flash-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: #28a745;
    color: white;
    border-radius: 5px;
    z-index: 9999;
}
.flash-message.error { background: #dc3545; }
.flash-message.warning { background: #ffc107; color: #333; }