    /* Base Styles */
    :root {
        --primary: #6366f1;
        --primary-dark: #4f46e5;
        --background: #f8fafc;
        --surface: #ffffff;
        --text-primary: #1e293b;
        --text-secondary: #64748b;
        --border: #e2e8f0;
        --success: #22c55e;
        --error: #ef4444;
        --warning: #eab308;
      }
  
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        -webkit-tap-highlight-color: transparent;
      }
  
      body {
        font-family: 'Inter', system-ui, -apple-system, sans-serif;
        background: var(--background);
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 1rem;
      }
  
      /* Chat Container */
      .chat-wrapper {
        width: 100%;
        max-width: 480px;
        height: 90vh;
        max-height: 900px;
        background: var(--surface);
        border-radius: 1.5rem;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }
  
      /* Header */
      .chat-header {
        padding: 1.25rem;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: center;
        gap: 1rem;
      }
  
      .header-content {
        flex: 1;
      }
  
      .chat-title {
        font-weight: 600;
        color: var(--text-primary);
        font-size: 1.125rem;
      }
  
      .chat-status {
        font-size: 0.875rem;
        color: var(--text-secondary);
        display: flex;
        align-items: center;
        gap: 0.5rem;
      }
  
      .status-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--success);
      }
  
      /* Chat Body */
      .chat-body {
        flex: 1;
        padding: 1.5rem 1rem;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        background: var(--background);
      }
  
      /* Messages */
      .message {
        max-width: 80%;
        padding: 0.875rem 1rem;
        border-radius: 1rem;
        position: relative;
        animation: messageIn 0.3s ease;
      }
  
      .message.sent {
        background: var(--primary);
        color: white;
        align-self: flex-end;
        border-bottom-right-radius: 0.25rem;
      }
  
      .message.received {
        background: var(--surface);
        color: var(--text-primary);
        align-self: flex-start;
        border-bottom-left-radius: 0.25rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
      }
  
      .message-time {
        display: block;
        font-size: 0.75rem;
        color: var(--text-secondary);
        margin-top: 0.5rem;
        opacity: 0.8;
      }
  
      .message.received .message-time {
        color: var(--text-secondary);
      }
  
      .message.sent .message-time {
        color: rgba(255, 255, 255, 0.8);
      }
  
      /* Reply Preview */
      .reply-preview {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        background: rgba(0, 0, 0, 0.05);
        padding: 0.5rem;
        border-radius: 0.75rem;
        margin-bottom: 0.5rem;
        cursor: pointer;
      }
  
      .reply-preview::before {
        content: "";
        width: 3px;
        height: 100%;
        background: var(--primary);
        border-radius: 2px;
      }
  
      .reply-text {
        font-size: 0.875rem;
        color: var(--text-secondary);
        flex: 1;
      }
  
      .close-reply {
        color: var(--text-secondary);
        padding: 0.25rem;
      }
  
      /* Input Area */
      .chat-footer {
        padding: 1rem;
        background: var(--surface);
        border-top: 1px solid var(--border);
        position: relative;
      }
  
      .input-wrapper {
        display: flex;
        gap: 0.75rem;
        align-items: flex-end;
      }
  
      .message-input {
        flex: 1;
        padding: 0.75rem 1rem;
        border: 1px solid var(--border);
        border-radius: 0.75rem;
        font-size: 1rem;
        line-height: 1.5;
        resize: none;
        max-height: 120px;
        background: var(--surface);
        color: var(--text-primary);
      }
  
      .message-input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
      }
  
      .action-button {
        width: 40px;
        height: 40px;
        border: none;
        border-radius: 0.75rem;
        background: var(--background);
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
      }
  
      .action-button:hover {
        background: var(--primary);
        color: white;
      }
  
      .send-button {
        background: var(--primary);
        color: white;
      }
  
      .send-button:hover {
        background: var(--primary-dark);
      }
  
      /* Attachment Menu */
      .attachment-menu {
        position: absolute;
        bottom: calc(100% + 0.5rem);
        left: 0;
        background: var(--surface);
        border-radius: 0.75rem;
        padding: 0.5rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        display: none;
        gap: 0.5rem;
      }
  
      .attachment-menu.active {
        display: flex;
      }
  
      .attachment-button {
        width: 40px;
        height: 40px;
        border-radius: 0.5rem;
        background: var(--background);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
      }
  
      .attachment-button.recording {
        background: var(--error);
        color: white;
        animation: pulse 1.5s infinite;
      }
  
      .attachment-button.location {
        background: var(--warning);
        color: white;
      }
  
      /* Recording Indicator */
      .recording-indicator {
        position: absolute;
        bottom: calc(100% + 1rem);
        left: 50%;
        transform: translateX(-50%);
        background: var(--error);
        color: white;
        padding: 0.75rem 1.25rem;
        border-radius: 2rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        display: none;
        align-items: center;
        gap: 0.75rem;
        animation: slideUp 0.3s ease;
      }
  
      .recording-indicator i {
        color: white;
      }
  
      .recording-dot {
        width: 10px;
        height: 10px;
        background: white;
        border-radius: 50%;
        animation: blink 1s infinite;
      }
  
      @keyframes blink {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.5; }
      }
  
      @keyframes pulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.1); }
        100% { transform: scale(1); }
      }
  
      @keyframes slideUp {
        from {
          opacity: 0;
          transform: translate(-50%, 10px);
        }
        to {
          opacity: 1;
          transform: translate(-50%, 0);
        }
      }
  
      @keyframes messageIn {
        from {
          opacity: 0;
          transform: translateY(10px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }
  
      /* Responsive Design */
      @media (max-width: 640px) {
        .chat-wrapper {
          height: 100vh;
          max-height: none;
          border-radius: 0;
        }
  
        .message {
          max-width: 85%;
        }
  
        .chat-footer {
          padding: 0.75rem;
        }
  
        .action-button {
          width: 36px;
          height: 36px;
        }
  
        .recording-indicator {
          bottom: calc(100% + 0.5rem);
          padding: 0.5rem 1rem;
        }
      }
  
      /* Scrollbar Styling */
      ::-webkit-scrollbar {
        width: 6px;
      }
  
      ::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
      }
  
      ::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 4px;
      }
  