
    body, html {
      height: 100%;
      margin: 0;
      background-color: #ffffff;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }

    .witaaigradient {
      background: linear-gradient(108deg, #0894FF, #C959DD 34%, #FF2E54 68%, #FF9004);
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
    }
  
    .chat-layout {
      display: flex;
      height: 100vh;
      overflow: hidden;
      flex-direction: row;
    }
  
    .sidebar {
      width: 280px;
      background-color: #f1f5f9;
      color: #1e293b;
      display: flex;
      flex-direction: column;
      padding: 16px;
      transition: transform 0.3s ease;
    }
  
    .sidebar.collapsed {
      transform: translateX(-100%);
    }
  
    .sidebar h2 {
      font-size: 1.2rem;
      margin-bottom: 20px;
    }
  
    .chat-list {
      flex: 1;
      overflow-y: hidden;
      transition: overflow 0.2s;
    }
    .chat-list:hover {
      overflow-y: auto;
    }
    .chat-list::-webkit-scrollbar {
      margin-left: 10px !important;
      padding-left: 10px !important;
      width: 6px;
      background: #f1f5f9;
    }
    .chat-list:hover::-webkit-scrollbar-thumb {
      background: #cbd5e1;
      border-radius: 8px;
    }
  
    .chat-list .chat-item {
      padding: 8px; /* 10px */
      margin-bottom: 0px; /*8px */
      border-radius: 8px;
      color: #395073ff;
      /* background-color: #e2e8f0; */
      cursor: pointer;
    }

    .new-chat {
      padding: 10px;
      margin-bottom: 8px;
      border-radius: 8px;
      background-color: #e2e8f0;
      cursor: pointer;
    }
  
    .chat-list .chat-item:hover , .new-chat:hover {
      background-color: #cbd5e1;
    }

    .new-chat:hover {
      transform: scale(1.01);
      transition: transform 0.15s;
    }

    .chat-list a{
      text-decoration: none;
      color: inherit;
    }

    /* Add this to your existing CSS */

    .chat-item {
        position: relative; /* Essential for positioning the dropdown */
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .chat-item a {
        text-decoration: none;
        color: inherit;
        flex-grow: 1; /* Allows the link to take up available space */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .chat-actions-btn {
        display: none; /* Hidden by default */
        cursor: pointer;
        padding: 0px;
        font-weight: bold;
        border-radius: 5px;
    }

    .chat-item:hover .chat-actions-btn {
        display: block; /* Show on hover */
    }

    .chat-actions-dropdown {
        display: none; /* Hidden by default */
        position: absolute;
        right: 15px;
        top: 30px;
        background-color: white;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        z-index: 100;
        min-width: 120px;
    }

    .chat-actions-dropdown.show {
        display: block; /* Class to show the dropdown */
    }

    .chat-actions-dropdown a {
        color: black;
        padding: 8px 12px;
        text-decoration: none;
        display: block;
        font-size: 0.9em;
    }

    .chat-actions-dropdown a:hover {
        background-color: #f1f1f1;
    }
  
    .main-chat {
      flex: 1;
      display: flex;
      flex-direction: column;
      background-color: #ffffff;
      position: relative;
      height: 100%;
    }
  
    .chat-header {
      background: linear-gradient(145deg, rgba(255, 255, 255, 0.75), rgba(240, 244, 255, 0.85));
      background: white;
      color: #1e293b;
      padding: 20px 20px;
      padding-bottom: 10px;
      font-size: 1.25rem;
      border-bottom: 0px solid #e2e8f0;

      position: sticky;
      top: 0;
      z-index: 10;
    }

    .newhead {
      display: flex;
      align-items: center;
      gap: 10px;
    }
  
    .chat-body {
      flex: 1;
      padding: 20px;
      overflow-y: auto;
      background-color: #ffffff;
      padding-left: 160px; /* 150px */
      padding-right: 160px;
      padding-top: 50px;
    }
  
    .chat-message {
      margin-bottom: 16px;
    }
  
    .user-message {
      text-align: right;
    }
  
    .user-bubble, .bot-bubble {
      display: inline-block;
      padding: 12px 16px;
      border-radius: 20px;
      max-width: 75%;
      word-wrap: break-word;
    }
  
    .user-bubble {
      background-color: #2563eb;
      color: white;
    }
  
    .bot-bubble {
      background-color: #f1f5f9;
      background-color: #ffffffff;
      color: #1e293b;
      max-width: 84%;
    }

    .first-bot-bubble {
      background-color: #f1f5f9;
      color: #1e293b;
      padding: 12px 16px !important;
    }
  
    .chat-footer {
      padding: 20px 190px;
      border-top: 1px solid #eee;
      background-color: #ffffff;

      position: sticky;
      bottom: 0;
      z-index: 10;
    }
  
    .chat-footer input {
      border-radius: 20px;
      padding-left: 20px;
      height: 50px !important;
      flex: 1;
    }
  
    .send-btn {
      border-radius: 20px;
      padding: 6px 16px;
      height: 50px !important;
      width:100%;
    }
  
    .toggle-btn {
      border: none;
      background: transparent;
      font-size: 1.5rem;
      cursor: pointer;
    }
  
    /* Mobile Responsiveness */
    @media (max-width: 768px) {
      
      .chat-layout {
        flex-direction: column;
      }
  
      .sidebar {
        position: absolute;
        z-index: 1000;
        height: 100%;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        width: 200px;
      }
  
      .sidebar.collapsed {
        transform: translateX(0);
      }
  
      .chat-header {
        padding-top: 10px;
      }
  
      .chat-body {
        flex: 1;
        padding: 15px 20px 120px; /* bottom padding to avoid overlap with input */
        overflow-y: auto;
        background-color: #ffffff;
      }
      
      .chat-body {
        padding-bottom: 150px; /* increase if needed */
      }

      .bot-bubble {
        padding-left: 6px;
        max-width: 90%;
      }
  
      .chat-footer {
        padding: 15px 14px;
        flex-direction: column;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        z-index: 1000;
        border-top: 1px solid #eee;
      }
  
      .chat-footer input {
        width: 100%;
        margin-bottom: 10px;
        height: 50px;
        padding-left: 20px;
        border-radius: 20px;
      }
  
      .send-btn {
        width: 100%;
        border-radius: 20px;
        padding: 10px;
      }

      .mobiletogg{
        display: inline !important;
      }

      .chat-body::-webkit-scrollbar {
        width: 4px;
      }

      /* Add these styles inside your @media (max-width: 768px) { ... } block */

      /* 1. Reduce the space between the tool icons */
      .chat-footer .d-flex.align-items-center.gap-2.flex-wrap {
          gap: 0.45rem !important; /* Reduces space from 1rem to 0.75rem */
      }

      /* 2. Make the tool icons and their text smaller */
      .chat-footer .btn-sm,
      .chat-footer .form-select-sm {
          font-size: 0.7rem; /* Smaller text for "Tools" and model selector */
      }
      .chat-footer .bi {
          font-size: 1.02rem; /* Slightly smaller paperclip, mic, etc. */
      }

      #sendButton .send-text {
          display: none;
      }

      /* 4. Reshape the send button into a circle */
      #sendButton {
        padding: 0;
        width: 36px;   /* Fixed width */
        height: 36px;  /* Fixed height */
        border-radius: 50% !important; /* Force it to be a circle */
        
        /* Center the icon inside the new circular button */
        display: flex;
        align-items: center;
        justify-content: center;
      }



      /* 2. Shrink the AI logo image */
      .chat-header {
          margin-top: 8px;
          height: 70px !important; /* From 45px */
      }

      .col-9 img {
          height: 38px !important; /* From 45px */
      }

      /* 3. Make the title text smaller */
      .chat-header .col-9 span {
          font-size: 1.15rem; /* From 1.25rem */
      }

      /* 4. Reduce the size of the user's profile picture and its 'pro' wrapper */
      .chat-header .profile-image-wrapper {
          width: 38px;  /* From 44px */
          height: 38px;
      }

      .chat-header .profile-image-wrapper img {
          width: 32px;  /* From 38px */
          height: 32px;
      }

      /* This targets the profile picture for non-pro users */
      .chat-header .dropdown > a > img.rounded-circle {
          width: 38px !important;  /* From 41px */
          height: 38px !important;
      }
    }

    .dropdown-menu .dropdown-item {
      border-radius: 8px;
      padding: 8px 12px;
      font-size: 0.9rem;
    }

    .dropdown-menu .dropdown-item:hover {
      background-color: #f1f5f9;
    }

    #userInput {
      max-height: 200px; /* prevent too-tall input */
      line-height: 1.5;
    }

    #typing-indicator .bot-bubble {
      font-style: italic;
      opacity: 0.7;
    }

    @keyframes blink {
      0%, 100% { opacity: 0.2; }
      50% { opacity: 1; }
    }

    #typing-indicator i.bi-three-dots::after {
      content: '...';
      animation: blink 1s infinite;
    }

    /* === Code Block Styling (Light Theme FIX) === */

  /* Style for the bot bubble containing code */
  .bot-bubble pre {
      /* Make the pre background transparent to show the bubble's color */
      background-color: transparent; 
      padding: 0;
      border: none;
      color: #383a42; /* Dark text for light theme */
  }

  /* We still need styles for the Copy button, but adjusted for the new context */
  .bot-bubble pre {
      position: relative;
      border-radius: 12px;
  }

  .bot-bubble pre::after {
      content: 'Copy';
      position: absolute;
      top: 5px;  /* Adjusted position */
      right: 5px; /* Adjusted position */
      padding: 4px 8px;
      background-color: #eaeaeb;
      color: #383a42;
      border-radius: 5px;
      font-size: 0.8em;
      cursor: pointer;
      opacity: 0;
      transition: opacity 0.2s ease-in-out;
  }

  .bot-bubble pre:hover::after {
      opacity: 1;
  }

  .bot-bubble pre.copied::after {
      content: 'Copied!';
      opacity: 1;
  }

  /* === Table Styling (ChatGPT Style) === */
  .bot-bubble table {
      width: 100%;
      border-collapse: collapse; /* Removes space between borders */
      margin: 1.5em 0; /* More vertical space around the table */
      font-size: 0.9em;
      text-align: left;
      border-radius: 8px; /* Optional: rounded corners for the container */
      overflow: hidden;   /* Ensures content respects the rounded corners */
      background-color: #ffffff; /* Light background for the table */
  }

  /* Style for table cells and headers */
  .bot-bubble th, .bot-bubble td {
      padding: 12px 15px;
      border: none; /* REMOVED all cell borders */
  }

  /* Style specifically for the table header */
  .bot-bubble th {
      background-color: transparent; /* Cleaner header background */
      color: #1e293b; /* Match your other text color */
      font-weight: 600; /* Bolder header text */
      border-bottom: 2px solid #e2e8f0; /* Thicker line under the header */
  }

  /* Style for the table body rows */
  .bot-bubble tbody tr {
      border-bottom: 1px solid #e2e8f0; /* Thin line between rows */
  }

  /* Remove the border from the very last row for a cleaner look */
  .bot-bubble tbody tr:last-of-type {
      border-bottom: none;
  }

  .profile-image-wrapper {
  width: 44px;
  height: 44px;
  /* Adjust the percentage of transparency to close the white gap */
  background: conic-gradient(from 0deg, #0894FF, #C959DD, #FF2E54, #FF9004 100%, transparent 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease-in-out;
  }

  .profile-image-wrapper {
      width: 44px;
      height: 44px;

      /* This creates four distinct, non-blending color segments */
      background: conic-gradient(
          #DB4437 0% 25%,    /* Google Blue */
          #F4B400 25% 50%,   /* Google Red */
          #0F9D58 50% 75%,   /* Google Yellow */
          #4285F4 75% 100%   /* Google Green */
      );

      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: transform 0.2s ease-in-out;
  }

  .profile-image-wrapper:hover {
    transform: scale(1.1);
  }

  .profile-image-wrapper img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    
    /* This white border is crucial for the clean separation effect */
    border: 2px solid #fff;
  }
    
