<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <title>User Settings with Profile Image</title>
  <style>
    * {
      box-sizing: border-box;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }

    body {
      background: #f5f7ff;
      margin: 0;
      padding: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 100vh;
    }

    .settings-wrapper {
      background: #ffffff;
      border-radius: 16px;
      box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
      max-width: 900px;
      width: 100%;
      display: flex;
      overflow: hidden;
      flex-wrap: wrap;
    }

    .profile-section {
      background: #f7f9fc;
      padding: 40px 30px;
      flex: 1;
      min-width: 280px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
    }

    .profile-image {
      width: 130px;
      height: 130px;
      border-radius: 50%;
      object-fit: cover;
      box-shadow: 0 4px 8px rgba(0,0,0,0.1);
      margin-bottom: 20px;
      transition: transform 0.3s ease;
    }

    .profile-image:hover {
      transform: scale(1.05);
    }

    .change-photo-btn {
      display: inline-block;
      padding: 8px 16px;
      background-color: #4a90e2;
      color: white;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      font-size: 14px;
      transition: background 0.3s ease;
      text-decoration: none;
    }

    .change-photo-btn:hover {
      background-color: #3a78c2;
    }

    .settings-form {
      flex: 2;
      padding: 40px;
      min-width: 300px;
    }

    .settings-form h2 {
      margin-bottom: 24px;
      color: #333;
    }

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

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

    .form-group input,
    .form-group textarea {
      width: 100%;
      padding: 12px;
      border-radius: 10px;
      border: 1px solid #ddd;
      background: #f9f9f9;
      font-size: 16px;
      transition: border 0.2s ease;
    }

    .form-group input:focus,
    .form-group textarea:focus {
      border-color: #4a90e2;
      outline: none;
    }

    .password-group {
      position: relative;
    }

    .toggle-password {
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      cursor: pointer;
      font-size: 14px;
      color: #888;
    }

    .btn {
      width: 100%;
      padding: 12px;
      background-color: #4a90e2;
      color: white;
      border: none;
      border-radius: 10px;
      font-size: 16px;
      cursor: pointer;
      transition: background 0.3s ease;
    }

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

    @media (max-width: 768px) {
      .settings-wrapper {
        flex-direction: column;
      }

      .profile-section {
        padding: 30px;
      }

      .settings-form {
        padding: 30px;
      }
    }
  </style>
</head>
<body>
  <div class="settings-wrapper">
    <!-- Profile Section -->
    <div class="profile-section">
      <img src="#" alt="Profile Picture" class="profile-image" id="profileImage">
      <input type="file" id="fileUpload" accept="image/*" style="display: none;" onchange="loadImage(event)" disabled>
      <button class="change-photo-btn" onclick="document.getElementById('fileUpload').click()" disabled>Change Photo</button>
    </div>

    <!-- Settings Form -->
    <div class="settings-form">
      <h2>User Settings</h2>
      <form>
        <div class="form-group">
          <label for="username">Name</label>
          <input type="text" id="username" placeholder="Your Name" />
        </div>

        <div class="form-group">
          <label for="bio">Bio</label>
          <textarea id="bio" rows="3" placeholder="A little about yourself..."></textarea>
        </div>

        <div class="form-group">
          <label for="email">Email</label>
          <input type="email" id="email" placeholder="example@email.com" />
        </div>

        <div class="form-group password-group">
          <label for="password">Password</label>
          <input type="password" id="password" placeholder="••••••••" />
          <span class="toggle-password" onclick="togglePassword()">Show</span>
        </div>

        <button type="submit" class="btn">Save Changes</button>
      </form>
    </div>
  </div>

  <script>
    function togglePassword() {
      const passwordField = document.getElementById("password");
      const toggle = document.querySelector(".toggle-password");
      if (passwordField.type === "password") {
        passwordField.type = "text";
        toggle.textContent = "Hide";
      } else {
        passwordField.type = "password";
        toggle.textContent = "Show";
      }
    }

    function loadImage(event) {
      const image = document.getElementById('profileImage');
      image.src = URL.createObjectURL(event.target.files[0]);
    }
  </script>
</body>
</html>
