 body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f0f4ff, #d9e8ff);
    margin: 0; padding: 0;
    display: flex; flex-direction: column; height: 100vh;
    color: #1a237e;
  }
  header {
    background-color: #3949ab;
    color: #fff;
    padding: 18px 20px;
    text-align: center;
    font-size: 2em;
    font-weight: 700;
    user-select: none;
    box-shadow: 0 3px 8px rgba(57,73,171,0.6);
  }
  main {
    flex: 1;
    display: flex;
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
  }
  #chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 600px;
    min-width: 320px;
    height: 100%;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 15px rgba(57,73,171,0.15);
    overflow: hidden;
  }
  #chat {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    font-size: 1.15em;
    line-height: 1.5em;
    background: #e8ebff;
    border-bottom: 2px solid #3949ab;
  }
  .message.user {
    text-align: right;
    margin-bottom: 14px;
  }
  .message.user .text {
    display: inline-block;
    background-color: #3949ab;
    color: #e3e9ff;
    padding: 12px 20px;
    border-radius: 25px 25px 5px 25px;
    max-width: 75%;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(57,73,171,0.3);
    word-wrap: break-word;
  }
  .message.bot {
    text-align: left;
    margin-bottom: 14px;
  }
  .message.bot .text {
    display: inline-block;
    background-color: #c5cae9;
    color: #1a237e;
    padding: 14px 22px;
    border-radius: 25px 25px 25px 5px;
    max-width: 80%;
    box-shadow: 0 2px 8px rgba(57,73,171,0.15);
    word-wrap: break-word;
    white-space: pre-line;
    user-select: text;
  }
  form {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    background: #3949ab;
  }
  input[type="text"] {
    flex: 1;
    padding: 14px 18px;
    font-size: 1.15em;
    border-radius: 35px;
    border: none;
    outline: none;
    background: #e8ebff;
    color: #1a237e;
    font-weight: 600;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease;
  }
  
  input[type="text"]::placeholder {
    color: #5c6bc0;
    font-weight: 400;
  }
  input[type="text"]:focus {
    background-color: #fff;
    box-shadow: 0 0 8px 2px rgba(57,73,171,0.5);
  }
  button {
    background-color: #ff7043;
    border: none;
    color: #fff;
    font-size: 1.3em;
    padding: 0 24px;
    border-radius: 35px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(255,112,67,0.6);
    transition: background-color 0.3s ease;
    user-select: none;
  }
  button:hover, button:focus {
    background-color: #ff5722;
    outline: none;
  }
  #image-container {
    flex: 1;
    min-width: 420px;
    max-height: 480px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 15px rgba(57,73,171,0.15);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  #image-container img {
    max-width: 100%;
    max-height: 440px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(57,73,171,0.3);
    user-select: none;
  }
  #image-container .placeholder {
    font-weight: 600;
    font-size: 1.1em;
    color: #1a237e;
    user-select: none;
    text-align: center;
  }
  @media (max-width: 900px) {
    main {
      flex-direction: column;
      padding: 12px;
    }
    #chat-container, #image-container {
      max-width: 100%;
      min-width: auto;
      height: 45vh;
      margin-bottom: 16px;
      max-height: none;
    }
    #image-container {
      height: 50vh;
    }
  }