 <style>
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: Vazirmatn, sans-serif;
      }

      body {
        background: #f0f0f0;
        padding: 20px;
        direction: rtl;
      }

      .container {
        max-width: 600px;
        margin: 0 auto;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        overflow: hidden;
      }

      .header {
        background: #007bff;
        color: white;
        padding: 15px;
        text-align: center;
      }

      .login-form {
        padding: 20px;
      }

      .form-group {
        margin-bottom: 15px;
      }

      label {
        display: block;
        margin-bottom: 5px;
        text-align: right;
      }

      input {
        width: 100%;
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
        text-align: right;
      }

      button {
        background: #007bff;
        color: white;
        padding: 8px 16px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
      }

      button:hover {
        background: #0056b3;
      }

      button:disabled {
        background: #6c757d;
        cursor: not-allowed;
        opacity: 0.6;
      }

      .error {
        background: #f8d7da;
        color: #721c24;
        padding: 10px;
        border-radius: 4px;
        margin-bottom: 15px;
        display: none;
        text-align: right;
      }

      .chat-interface {
        display: none;
      }

      .status {
        padding: 10px;
        text-align: center;
        background: #fff3cd;
        color: #856404;
      }

      .messages {
        height: 300px;
        overflow-y: auto;
        padding: 15px;
        background: #f8f9fa;
      }

      .message {
        margin-bottom: 10px;
        padding: 8px;
        border-radius: 4px;
        max-width: 80%;
        text-align: right;
      }

      .message.own {
        background: #007bff;
        color: white;
        margin-right: 0;
        margin-left: auto;
      }

      .message.other {
        background: white;
        border: 1px solid #ddd;
        margin-left: 0;
        margin-right: auto;
      }

      .message-input {
        padding: 15px;
        display: flex;
        gap: 10px;
        direction: rtl;
        flex-direction: row-reverse;
      }

      .message-input input {
        flex: 1;
      }

      .loading {
        opacity: 0.7;
      }
    </style>