body {
      font-family: sans-serif;
      background-color: #f0f0f0;
      margin: 0;
      padding: 20px;
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 100vh;
    }

    #app {
      background-color: #fff;
      padding: 30px;
      border-radius: 8px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
      width: 100%;
      max-width: 600px;
    }

    h1 {
      text-align: center;
      color: #333;
      margin-bottom: 20px;
    }

    .chat-container {
      display: flex;
      flex-direction: column;
    }

    #chat-log {
      height: 400px;
      overflow-y: auto;
      border: 1px solid #ddd;
      border-radius: 4px;
      padding: 15px;
      margin-bottom: 15px;
      background-color: #f9f9f9;
    }

    .message {
      margin-bottom: 15px;
      padding: 10px 15px;
      border-radius: 18px;
      max-width: 80%;
      line-height: 1.4;
    }

    .user-message {
      background-color: #007bff;
      color: white;
      align-self: flex-end;
      margin-left: auto; /* Push user messages to the right */
      border-bottom-right-radius: 5px;
    }

    .ai-message {
      background-color: #e9e9eb;
      color: #333;
      align-self: flex-start;
      margin-right: auto; /* Push AI messages to the left */
      border-bottom-left-radius: 5px;
    }

    .input-area {
      display: flex;
      gap: 10px;
    }

    #user-input {
      flex-grow: 1;
      padding: 10px;
      border: 1px solid #ddd;
      border-radius: 4px;
      resize: none; /* Prevent manual resizing */
      font-size: 1rem;
      height: 50px; /* Initial height */
      box-sizing: border-box;
    }

    #send-button {
      padding: 10px 20px;
      background-color: #28a745;
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 1rem;
      transition: background-color 0.2s;
    }

    #send-button:hover {
      background-color: #218838;
    }

    #send-button:disabled {
      background-color: #aaa;
      cursor: not-allowed;
    }

    #loading, #error-message {
      text-align: center;
      margin-top: 10px;
      padding: 10px;
      border-radius: 4px;
    }

    #loading {
      color: #555;
    }

    #error-message {
      color: #D8000C;
      background-color: #FFD2D2;
    }

    .hidden {
      display: none;
    }
