 body {
      font-family: 'Vazir', 'Segoe UI', Tahoma, sans-serif;
      margin: 0;
      padding: 0;
      background-color: #f5f5f5;
    }

    /* انیمیشن جلب توجه */
    @keyframes attention-pulse {
      0% { transform: scale(1); }
      50% { transform: scale(1.1); box-shadow: 0 4px 20px rgba(0, 123, 255, 0.4); }
      100% { transform: scale(1); }
    }

    /* دکمه شناور چت */
    .chat-toggle {
      position: fixed;
      bottom: 20px;
      right: 20px;
      width: 60px;
      height: 60px;
      background-color: #007BFF;
      color: white;
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
      z-index: 1000;
      transition: all 0.3s ease;
      /* اعمال انیمیشن جلب توجه: 1.5 ثانیه، 3 بار تکرار با تاخیر 1 ثانیه‌ای */
      animation: attention-pulse 1.5s ease-in-out 3;
      animation-delay: 1s;
    }

    .chat-toggle:hover {
      background-color: #0056b3;
      transform: scale(1.05);
      animation: none; /* توقف انیمیشن هنگام هاور */
    }

    .chat-toggle i {
      font-size: 24px;
    }

    /* مودال چت */
    .chat-modal {
      display: none;
      position: fixed;
      bottom: 90px;
      right: 20px;
      width: 380px;
      max-width: calc(100% - 40px);
      height: 500px;
      max-height: calc(100vh - 110px);
      background-color: white;
      border-radius: 12px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
      flex-direction: column;
      z-index: 1000;
      overflow: hidden;
      border: 1px solid #e0e0e0;
    }

    .chat-modal.active {
      display: flex;
      animation: fadeInUp 0.3s ease;
    }

    /* هدر چت */
    .chat-header {
      background-color: #007BFF;
      color: white;
      padding: 10px 15px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid #e0e0e0;
    }

    .chat-header-content {
        display: flex;
        align-items: center;
    }

    .chat-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        margin-left: 10px;
        border: 2px solid white;
    }

    .chat-header-info {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .chat-title {
      font-weight: bold;
      font-size: 16px;
    }

    .chat-status {
        font-size: 12px;
        color: #f0f0f0;
    }

    .chat-close {
      background: none;
      border: none;
      color: white;
      font-size: 20px;
      cursor: pointer;
      padding: 5px;
    }

    /* بدنه چت */
    .chat-body {
      flex: 1;
      overflow-y: auto;
      padding: 15px;
      background-color: #f9f9f9;
      display: flex;
      flex-direction: column;
    }

    /* پیام‌ها */
    .message {
      margin-bottom: 15px;
      display: flex;
      flex-direction: column;
      max-width: 80%;
      animation: fadeIn 0.3s ease;
    }

    .message-user {
      align-items: flex-end;
      margin-left: auto;
    }

    .message-admin {
      align-items: flex-start;
      margin-right: auto;
    }

    .message-sender {
      font-size: 12px;
      color: #666;
      margin-bottom: 4px;
      font-weight: bold;
    }

    .message-content {
      padding: 12px 16px;
      border-radius: 18px;
      margin-top: 2px;
      word-wrap: break-word;
      line-height: 1.5;
      font-size: 14px;
      box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }

    .message-user .message-content {
      background-color: #007BFF;
      color: white;
      border-bottom-right-radius: 4px;
    }

    .message-admin .message-content {
      background-color: #ffffff;
      color: #333;
      border-bottom-left-radius: 4px;
      border: 1px solid #e0e0e0;
    }

    .message-time {
      font-size: 11px;
      color: #888;
      margin-top: 4px;
      align-self: inherit;
    }

    .message-user .message-time { text-align: right; }
    .message-admin .message-time { text-align: left; }

    /* فوتر چت */
    .chat-footer {
      padding: 12px;
      background-color: white;
      border-top: 1px solid #e0e0e0;
    }

    .chat-input-group {
      display: flex;
      align-items: center;
    }

    .chat-input {
      flex: 1;
      padding: 12px 16px;
      border: 1px solid #ddd;
      border-radius: 24px;
      outline: none;
      font-size: 14px;
      font-family: 'Vazir', sans-serif;
      transition: border 0.3s;
    }

    .chat-input:focus { border-color: #007BFF; }

    .chat-send-btn {
      margin-right: 8px;
      background-color: #007BFF;
      color: white;
      border: none;
      width: 42px;
      height: 42px;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      justify-content: center;
      align-items: center;
      transition: background 0.3s;
    }

    .chat-send-btn:hover { background-color: #0056b3; }

    /* انیمیشن‌ها */
    @keyframes fadeInUp {
      from { opacity: 0; transform: translateY(20px); }
      to { opacity: 1; transform: translateY(0); }
    }
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* رسپانسیو برای موبایل */
    @media (max-width: 576px) {
      .chat-modal {
        width: calc(100% - 30px);
        left: auto;
        right: 15px;
        bottom: 150px; /* بالاتر آمدن مودال چت */
        height: 60vh;
      }

      .chat-toggle {
       width: 60px;
    height: 64px;
    bottom: 99px;
    left: auto;
    right: 10px;
      }

      .message { max-width: 90%; }
    }