<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="style.css">
    <title>Профиль</title>
</head>
<body>
<div class="main-container">
    <div class="profile-header">
    <h1 style="color: white; text-align: center;">Профиль пользователя</h1>
    </div>
    <form>
        <div class="columns">
            <div class="column">
                <img class="avatar" src="/pics/empty_avatar.png" id="avatar" height="200" width="200"><br>
                <input type="file" id="fileInput" style="display:none">
                <button class="add" type="button" onclick="document.getElementById('fileInput').click();"></button><br>
            </div>
            <div class="column">
                <input type="text" name="username" placeholder = "Имя пользователя" value="Some Name" id="username"><br>
                <input type="text" name="login" placeholder="Логин" value="some_login123" id="login" readonly><br>
            </div>
        </div>
        <h3 style="color:#007bb5;">О себе</h3>
        <div class="additional-info">
            <textarea name="bio" placeholder="Напишите о себе..." id="bio"></textarea>
        </div>
        <button class="save" type="submit">Сохранить изменения</button>
    </form>
</div>

<script>
    document.getElementById('fileInput').addEventListener('change', function(event) {
        const file = event.target.files[0];
        if (file) {
            const reader = new FileReader();
            reader.onload = function(e) {
                document.getElementById('avatar').src = e.target.result;
            };
            reader.readAsDataURL(file);
        }
    });
</script>
</body>
</html>