/* :root {
    --bg-image: url('https://www.mattersuite.com/wp-content/uploads/2025/04/mattersuite-Chat-UI.png'); 
    --primary-color: #6e6cff;
    --primary-dark: #5a58e6;
    --text-color: #333;
    --bg-color: #fff;
    --sidebar-color: #f7f7f8;
    --message-bg: #f7f7f8;
    --user-message-bg: #6e6cff;
    --user-text-color: #fff;
    --border-color: #e5e5e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --secondary-text: #666;
    --error-color: #ff4d4f;
  } */
    
   :root {
      /* Futuristic Color Palette */
      --primary-color: #2528da;
      --primaryyy-color: #2528da8a;
      --primary-glow: rgba(110, 108, 255, 0.4);
      --primary-dark: #5a58e6;
      --accent-color: #00d4ff;
      --accent-glow: rgba(0, 212, 255, 0.3);
      --text-color: #ffffff;
      --text-secondary: #b0b0b0;
      --bg-color: #0a0a14;
      --bg-secondary: #12121e;
      --bg-tertiary: #1a1a2e;
      --sidebar-color: #0f0f1a;
      --message-bg: #1e1e2e;
      --user-message-bg: linear-gradient(135deg, #6e6cff, #5a58e6);
      --user-text-color: #fff;
      --border-color: #2a2a3a;
      --shadow-color: rgba(0, 0, 0, 0.5);
      --error-color: #ff4d4f;
      --success-color: #00ff9d;

      /* Glassmorphism Effects */
      --glass-bg: rgba(255, 255, 255, 0.05);
      --glass-border: rgba(255, 255, 255, 0.1);
      --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

      /* Futuristic Gradients */
      --bg-gradient: radial-gradient(circle at top right, #0a0a14, #12121e, #1a1a2e);
      --card-gradient: linear-gradient(135deg, rgba(30, 30, 46, 0.8), rgba(26, 26, 46, 0.6));
      --sidebar-gradient: linear-gradient(180deg, #0f0f1a9c, #08086e94);

      /* Typography */
      --default-font: "Epilogue", sans-serif;
      --heading-font: "Source Sans Pro", sans-serif;
      --nav-font: "Epilogue", sans-serif;
      --body-font-weight: 400;
    }

    /* Base Styles */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: var(--default-font);
      font-weight: var(--body-font-weight);
      background: var(--bg-gradient) no-repeat center center fixed;
      background-size: cover;
      color: var(--text-color);
      transition: background-color 0.3s, color 0.3s;
      height: 100vh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    /* Layout */
    .app-container {
      display: flex;
      height: 100vh;
      position: relative;
    }

    /* Futuristic Sidebar */
    .sidebar {
      width: 300px;
      background: var(--sidebar-gradient);
      border-right: 1px solid var(--border-color);
      display: flex;
      flex-direction: column;
      transition: transform 0.3s ease;
      z-index: 100;
      position: relative;
      overflow: hidden;
    }

    .sidebar::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 1px;
      background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
      animation: scanline 3s linear infinite;
    }

    @keyframes scanline {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(100%); }
    }

    .sidebar-logo {
      padding: 20px;
      text-align: center;
      position: relative;
    }

    .close-sidebar-btn {
      display: none;
      background: none;
      border: none;
      font-size: 20px;
      color: var(--text-color);
      padding: 10px 10px 0px 0px;
      align-self: flex-end;
      cursor: pointer;
      z-index: 10;
    }

    .logo {
      max-width: 100px;
      height: auto;
      filter: drop-shadow(0 0 10px var(--primary-glow));
    }

    .new-chat-btn {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px;
      margin: 10px;
      border: 1px solid var(--border-color);
      border-radius: 12px;
      background: var(--glass-bg);
      backdrop-filter: blur(10px);
      color: var(--text-color);
      cursor: pointer;
      font-size: 14px;
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
    }

    .new-chat-btn::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
      transition: left 0.5s;
    }

    .new-chat-btn:hover::before {
      left: 100%;
    }

    .new-chat-btn:hover {
      border-color: var(--primary-color);
      box-shadow: 0 0 15px var(--primary-glow);
    }

    .chat-history-container {
      flex: 1;
      overflow-y: auto;
      padding: 10px;
      scrollbar-width:none;
    }

    .chat-history-container h3 {
      font-size: 14px;
      font-weight: 500;
      color: var(--text-secondary);
      padding: 10px 12px;
      margin-bottom: 5px;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .chat-history-list {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .chat-history-item {
      padding: 10px 12px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 14px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      display: flex;
      align-items: center;
      gap: 10px;
      transition: all 0.2s ease;
      background: var(--glass-bg);
      backdrop-filter: blur(5px);
      border: 1px solid transparent;
    }

    .chat-history-item:hover {
      background: rgba(110, 108, 255, 0.1);
      border-color: var(--primary-color);
    }

    .chat-history-item img {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      object-fit: cover;
    }

    .chat-history-item span {
      font-size: 14px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      flex: 1;
    }

    /* Promo Card */
    .promo-card {
      width: 270px;
      height: 350px;
      border-radius: 16px;
      background: var(--card-gradient);
      box-shadow: var(--glass-shadow);
      overflow: hidden;
      position: relative;
      margin: 10px;
      border: 1px solid var(--glass-border);
      backdrop-filter: blur(10px);
    }

    .promo-overlay {
      padding: 28px;
      background: transparent;
      height: 100%;
      box-sizing: border-box;
    }

    .promo-badge {
      display: inline-block;
      background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
      color: white;
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 600;
      margin-bottom: 18px;
      box-shadow: 0 0 10px var(--primary-glow);
    }

    .promo-title {
      font-size: 15.5px;
      font-weight: 700;
      line-height: 1.2;
      margin: 0 0 10px 0;
      color: var(--text-color);
    }

    .promo-title span {
      background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .promo-benefits {
      margin-bottom: 10px;
    }

    .benefit-item {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin-bottom: 14px;
    }

    .check-icon {
      background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
      color: white;
      width: 15px;
      height: 15px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 10px;
      flex-shrink: 0;
      margin-top: 2px;
      box-shadow: 0 0 5px var(--primary-glow);
    }

    .benefit-item p {
      margin: 0;
      font-size: 12px;
      line-height: 1.2;
      color: var(--text-secondary);
    }

    .promo-stats {
      border-radius: 12px;
      padding: 7px;
      margin-bottom: 1px;
    }

    .trust-badge {
      font-weight: 700;
      font-size: 11px;
      background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      margin-bottom: 4px;
    }

    .stats-text {
      margin: 0;
      font-size: 10px;
      color: var(--text-secondary);
    }

    .promo-actions {
      display: flex;
      margin-top: 10px;
      gap: 12px;
    }

    .promo-btn {
      border: none;
      padding: 8px 10px;
      border-radius: 8px;
      font-weight: 600;
      font-size: 12px;
      cursor: pointer;
      transition: all 0.3s ease;
      flex: 1;
      position: relative;
      overflow: hidden;
    }

    .primary {
      background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
      color: white;
      width: 100px;
    }

    .secondary {
      background: var(--glass-bg);
      color: var(--text-color);
      border: 1px solid var(--glass-border);
    }

    .promo-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px var(--shadow-color);
    }

    /* Main Content */
    .main-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      position: relative;
    }

    .main-content::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: 
        radial-gradient(circle at 20% 80%, rgba(110, 108, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
      pointer-events: none;
      z-index: -1;
    }

    .app-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 12px 20px;
      border-bottom: 1px solid var(--border-color);
      background: var(--glass-bg);
      backdrop-filter: blur(10px);
      position: relative;
      z-index: 10;
    }

    .menu-toggle {
      background: none;
      border: none;
      color: var(--text-color);
      font-size: 18px;
      cursor: pointer;
      margin-right: 10px;
      display: none;
      transition: all 0.3s ease;
    }

    .menu-toggle:hover {
      color: var(--accent-color);
    }

    .header-left {
      display: flex;
      align-items: center;
      gap: 0px;
    }

    .header-right {
      display: flex;
      gap: 10px;
    }

    .header-btn {
      background: var(--glass-bg);
      border: 1px solid var(--glass-border);
      border-radius: 8px;
      padding: 6px 12px;
      color: var(--text-color);
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 14px;
      transition: all 0.3s ease;
      backdrop-filter: blur(5px);
    }

    .header-btn:hover {
      border-color: var(--primary-color);
      box-shadow: 0 0 10px var(--primary-glow);
    }

    /* Chat Container */
    .chat-container {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      padding: 20px;
    }

    .document-drafting-container {
      position: relative;
      max-width: 800px;
      margin: 2rem auto;
      padding: 1.5rem;
      background: var(--card-gradient);
      backdrop-filter: blur(10px);
      border-radius: 24px;
      box-shadow: var(--glass-shadow);
      border: 1px solid var(--glass-border);
      position: relative;
      overflow: hidden;
    }

    .document-drafting-container::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 1px;
      background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    }

    .feature-badge {
      position: absolute;
      top: -16px;
      left: 50%;
      transform: translateX(-50%);
    }

    .beta-label {
      display: inline-block;
      background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
      color: var(--user-text-color);
      padding: 4px 16px;
      border-radius: 20px;
      font-size: 0.75rem;
      font-weight: 600;
      letter-spacing: 0.5px;
      box-shadow: 0 2px 8px var(--shadow-color);
      transition: all 0.3s ease;
      margin-top: 5px;
      z-index: 99;
      position: relative; /* Add this */
    }

    .feature-badge {
      position: absolute;
      top: -15px; /* Reduced from -16px to show more of the badge */
      left: 50%;
      transform: translateX(-50%);
      z-index: 100; /* Ensure it's above the container */
    }

    .document-drafting-container {
      position: relative;
      max-width: 800px;
      margin: 2rem auto;
      padding: 1.5rem;
      background: var(--card-gradient);
      backdrop-filter: blur(10px);
      border-radius: 24px;
      box-shadow: var(--glass-shadow);
      border: 1px solid var(--glass-border);
      position: relative;
      overflow: visible; /* Changed from hidden to visible */
    }

    .content-wrapper {
      text-align: center;
      padding: 1rem;
    }

    .feature-title {
      font-size: 1.75rem;
      font-weight: 700;
      margin-bottom: 0.5rem;
      color: var(--text-color);
      line-height: 1.3;
      background: linear-gradient(90deg, var(--text-color), var(--accent-color));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .feature-subtext {
      color: var(--text-secondary);
      font-size: 1rem;
      margin: 0 auto 2rem;
      max-width: 600px;
      line-height: 1.5;
    }

    .action-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1rem;
      justify-content: center;
      padding: 0;
    }

    .action-card {
      background: var(--glass-bg);
      border: 1px solid var(--glass-border);
      padding: 1rem;
      border-radius: 16px;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      min-height: 160px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      position: relative;
      overflow: hidden;
      backdrop-filter: blur(5px);
    }

    .action-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, rgba(110, 108, 255, 0.1), rgba(0, 212, 255, 0.1));
      opacity: 0;
      transition: opacity 0.3s ease;
    }

    .action-card:hover::before {
      opacity: 1;

    }

    .action-card.selected {
      border-color: var(--primaryyy-color);
      box-shadow: 0 0 10px var(--primary-glow);
    }

    .action-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 6px 20px var(--shadow-color);
    }

    .card-icon {
      font-size: 1.8rem;
      color: var(--accent-color);
      margin-bottom: 0.75rem;
      transition: transform 0.3s ease;
      filter: drop-shadow(0 0 5px var(--accent-glow));
    }

    .card-title {
      font-size: 1.05rem;
      font-weight: 600;
      margin-bottom: 0.5rem;
      color: var(--text-color);
      line-height: 1.3;
      text-align: center;
    }

    .card-hint {
      color: var(--text-secondary);
      font-size: 0.85rem;
      line-height: 1.4;
      opacity: 0.9;
      text-align: center;
    }

    /* Chat History */
    .chat-history {
      flex: 1;
      overflow-y: auto;
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 20px;
      scrollbar-width:none;
    }

    .message {
      display: flex;
      gap: 20px;
      max-width: 800px;
      margin: 10px 15px;
      width: 100%;
    }

    .avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      overflow: hidden;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--glass-border);
      background: var(--glass-bg);
    }

    .avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .user-message {
      margin-left: auto;
    }

    .message-content {
      display: flex;
      flex-direction: column;
      max-width: 99%;
    }

    .user-message .message-content {
      color: var(--text-color);
    }

    .message-text {
      font-size: 14px;
      margin-top: 4px;
      margin-bottom: 20px;
      line-height: 1.6;
      white-space: pre-wrap;
      user-select: none;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      pointer-events: none;
    }

    .user-message-wrapper {
      display: flex;
      justify-content: flex-end;
      width: 100%;
    }

    .user-message {
      background: var(--user-message-bg);
      color: var(--user-text-color);
      padding: 7px 10px;
      border-radius: 20px 20px 3px 20px;
      max-width: 30%;
      align-self: left;
      box-shadow: 0 4px 10px rgba(110, 108, 255, 0.3);
    }

    .ai-message {
      background: var(--message-bg);
      padding: 7px 10px;
      border-radius: 20px 20px 20px 2px;
      align-self: flex-start;
      max-width: 90%;
      border: 1px solid var(--glass-border);
    }

    .message.ai-message {
      animation: fadeInUp 0.3s ease-out;
    }

    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(8px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* Input Area */
    .input-container {
      padding: 10px;
      position: relative;
    }

    .input-box {
      position: relative;
      max-width: 800px;
      margin: 0 auto;
      display: flex;
      border: 1px solid var(--glass-border);
      border-radius: 16px;
      padding: 10px 15px;
      background: var(--glass-bg);
      backdrop-filter: blur(10px);
      box-shadow: var(--glass-shadow);
    }

    textarea {
      flex: 1;
      border: none;
      resize: none;
      outline: none;
      font-size: 16px;
      color: var(--text-color);
      background-color: transparent;
      max-height: 200px;
      min-height: 24px;
      line-height: 1.5;
      padding-right: 40px;
    }

    textarea::placeholder {
      color: var(--text-secondary);
    }

    .send-btn {
      background: none;
      border: none;
      color: var(--primary-color);
      cursor: pointer;
      font-size: 18px;
      padding: 0 0 0 10px;
      align-self: flex-end;
      transition: transform 0.2s;
    }

    #sendBtn.disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }

    .send-btn:hover {
      transform: scale(1.1);
      color: var(--accent-color);
    }

    .disclaimer {
      text-align: center;
      font-size: 12px;
      color: var(--text-secondary);
      margin-top: 10px;
      max-width: 800px;
      margin-left: auto;
      margin-right: auto;
    }

    /* Typing Indicator */
    .typing-indicator {
      display: flex;
      gap: 5px;
      padding: 10px 0;
    }

    .typing-dot {
      width: 8px;
      height: 8px;
      background-color: var(--accent-color);
      border-radius: 50%;
      animation: typingAnimation 1.4s infinite ease-in-out;
      box-shadow: 0 0 5px var(--accent-glow);
    }

    .typing-dot:nth-child(1) {
      animation-delay: 0s;
    }

    .typing-dot:nth-child(2) {
      animation-delay: 0.2s;
    }

    .typing-dot:nth-child(3) {
      animation-delay: 0.4s;
    }

    @keyframes typingAnimation {
      0%, 60%, 100% {
        transform: translateY(0);
      }
      30% {
        transform: translateY(-5px);
      }
    }

    /* Modal Styles */
    .modal {
      display: none;
      position: fixed;
      inset: 0;
      background-color: rgba(0, 0, 0, 0.7);
      justify-content: center;
      align-items: center;
      z-index: 1000;
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
      backdrop-filter: blur(5px);
    }

    .modal.active {
      display: flex;
      opacity: 1;
      visibility: visible;
    }

    .modal-content {
      background: var(--card-gradient);
      border-radius: 24px;
      width: 90%;
      max-width: 450px;
      padding: 32px;
      box-shadow: var(--glass-shadow);
      position: relative;
      transform: translateY(20px) scale(0.98);
      transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
      border: 1px solid var(--glass-border);
      backdrop-filter: blur(10px);
    }

    .modal.active .modal-content {
      transform: translateY(0) scale(1);
    }

    .modal-header {
      text-align: center;
      margin-bottom: 15px;
      padding: 10px;
    }

    .modal-logo {
      width: 270px;
      height: auto;
      margin-bottom: 1px;
      filter: drop-shadow(0 0 10px var(--primary-glow));
    }

    .modal-header h3 {
      font-size: 22px;
      color: var(--text-color);
      margin: 0 0 8px 0;
      font-weight: 600;
      line-height: 1.4;
    }

    .modal-header h3 span {
      background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .modal-subtitle {
      color: var(--text-secondary);
      font-size: 14px;
      margin: 0;
    }

    .modal-body {
      margin-top: 20px;
    }

    .input-group {
      margin-bottom: 24px;
    }

    .input-group label {
      display: block;
      margin-bottom: 8px;
      color: var(--text-secondary);
      font-size: 14px;
      font-weight: 500;
      padding: 10px;
      margin-bottom: -10px;
    }

    .input-container {
      position: relative;
    }

    .input-icon {
      position: absolute;
      left: 16px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-secondary);
      font-size: 16px;
      padding: 10px;
    }

    #emailInput {
      width: 100%;
      padding: 14px 16px 14px 42px;
      border: 1px solid var(--glass-border);
      border-radius: 12px;
      font-size: 15px;
      transition: all 0.3s ease;
      background: var(--glass-bg);
      color: var(--text-color);
      backdrop-filter: blur(5px);
    }

    #emailInput:focus {
      border-color: var(--primary-color);
      outline: none;
      box-shadow: 0 0 0 3px var(--primary-glow);
    }

    #emailInput::placeholder {
      color: var(--text-secondary);
      opacity: 0.7;
    }

    .action-buttons {
      display: flex;
      gap: 12px;
      margin-bottom: 24px;
      margin-top: -30px;
      padding: 10px;
    }

    .primary-btn {
      background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
      color: white;
      border: none;
      padding: 12px 80px;
      border-radius: 12px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 15%;
      margin-bottom: 10px;
      box-shadow: 0 4px 10px var(--primary-glow);
    }

    .primary-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 15px var(--primary-glow);
    }

    .secondary-btn {
      background: var(--glass-bg);
      color: var(--text-color);
      border: 1px solid var(--glass-border);
      padding: 12px 20px;
      border-radius: 12px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin-bottom: 10px;
      backdrop-filter: blur(5px);
    }

    .secondary-btn:hover {
      background: var(--message-bg);
      border-color: var(--primary-color);
    }

    .confirmation-note {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px;
      background: var(--glass-bg);
      border-radius: 12px;
      color: var(--text-secondary);
      font-size: 13px;
      margin: 10px;
      margin-top: -30px;
      backdrop-filter: blur(5px);
    }

    .confirmation-icon {
      color: var(--accent-color);
      font-size: 16px;
      filter: drop-shadow(0 0 5px var(--accent-glow));
    }

    .close-btn {
      position: absolute;
      top: 16px;
      right: 16px;
      background: none;
      border: none;
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      font-size: 20px;
      color: var(--text-secondary);
      cursor: pointer;
      transition: all 0.2s ease;
      background: var(--glass-bg);
      backdrop-filter: blur(5px);
    }

    .close-btn:hover {
      color: var(--accent-color);
      background: var(--message-bg);
      transform: rotate(90deg);
    }

    .logo-header {
      display: none;
    }

    /* Responsive Styles */
    @media (max-width: 768px) {
      .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
        background: linear-gradient(180deg, #0f0f1a, #08086e);
      }


      .sidebar.visible {
        transform: translateX(0);
      }

      .menu-toggle, .close-sidebar-btn {
        display: block;
      }

      .message {
        gap: 10px;
      }

      .user-message {
        max-width: 60%;
      }

      .avatar {
        width: 30px;
        height: 30px;
        font-size: 14px;
      }

      .message-text {
        font-size: 12px;
      }

      .input-box {
        padding: 8px 12px;
      }

      textarea {
        font-size: 15px;
      }

      .confirmation-note {
        margin-top: -40px;
      }

      .app-container {
        display: flex;
        height: 95vh;
      }

      .action-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
      }

      .card-title {
        font-size: 0.6rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: var(--text-color);
        line-height: 1.3;
        text-align: center;
      }

      .card-icon {
        font-size: 1.2rem;
        color: var(--accent-color);
        margin-bottom: 0.75rem;
        transition: transform 0.3s ease;
      }

      .action-card {
        min-height: 10px;
        padding: 0.5rem;
      }

      .feature-title {
        font-size: 1.6rem;
      }

      .feature-subtext {
        font-size: 0.95rem;
      }

      .document-drafting-container {
        position: relative;
        max-width: 90%;
        margin: 1rem auto;
        padding: 0.5rem;
        background: var(--card-gradient);
        backdrop-filter: blur(10px);
        border-radius: 24px;
        box-shadow: var(--glass-shadow);
        border: 1px solid var(--glass-border);
      }

      .logo-header {
        margin-right: 30px;
        display: block;
      }
    }

    @media (max-width: 480px) {
      .document-drafting-container {
        padding: 1rem;
        margin-top: 50px;
      }

      .beta-label {
        font-size: 0.7rem;
        padding: 3px 12px;
      }

      .card-icon {
        font-size: 1.1rem;
        color: var(--accent-color);
        margin-bottom: 0.65rem;
        transition: transform 0.3s ease;
      }

      .feature-title {
        font-size: 1.2rem;
      }

      .card-title {
        font-size: 0.5rem;
        font-weight: 600;
        margin-bottom: 0rem;
        color: var(--text-color);
        line-height: 1.3;
        text-align: center;
      }

      .card-hint {
        font-size: 0.8rem;
      }

      .modal-content {
        padding: 20px 15px;
      }

      .modal-header h3 {
        font-size: 18px;
      }

      .modal-body p {
        font-size: 14px;
      }

      #emailInput {
        padding: 10px 14px;
        padding-left: 40px;
        font-size: 14px;
      }

      .primary-btn, .secondary-btn {
        padding: 10px 18px;
        font-size: 14px;
        width: 120px;
        margin-bottom: 20px;
      }

      .modal-footer {
        flex-direction: column;
        align-items: stretch;
      }
    }

    /* Floating particles effect */
    .particles {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: -1;
    }

    .particle {
      position: absolute;
      width: 2px;
      height: 2px;
      background: var(--accent-color);
      border-radius: 50%;
      animation: float 15s infinite linear;
      opacity: 0.3;
    }

    @keyframes float {
      0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
      }
      10% {
        opacity: 0.3;
      }
      90% {
        opacity: 0.3;
      }
      100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
      }
    }



    /* ===== ADD-ON: Document Analytics modal tweaks ===== */
.doc-modal-content { max-width: 560px; }

.doc-file-input,
.doc-goal-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: var(--glass-bg);
  color: var(--text-color);
  backdrop-filter: blur(5px);
}

.doc-file-input:focus,
.doc-goal-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.doc-progress {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 8px 0 6px;
}

.analysis-title {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 6px 0;
}

.analysis-preview {
  white-space: pre-wrap;
  background: var(--message-bg);
  border: 1px solid var(--glass-border);
  padding: 12px;
  border-radius: 12px;
  max-height: 220px;
  overflow: auto;
}

/* Make 4 cards wrap nicely on small screens */
@media (max-width: 992px) {
  .action-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 520px) {
  .action-grid {
    grid-template-columns: 1fr;
  }
}
/* ... (all existing CSS remains the same until the document upload section) ... */

/* Document Upload Section in Sidebar */
.document-upload-section {
  padding: 0px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 10px;
  max-width: 400px;
  margin: auto;
}

.document-upload-section h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

.file-upload-container {
  position: relative;
  margin-bottom: 10px;
  
}

.file-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.file-upload-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--glass-bg);
  border: 1px dashed var(--glass-border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.file-upload-label:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(110, 108, 255, 0.1);
}

.file-upload-label i {
  font-size: 16px;
}

.file-info {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 5px;
  padding: 5px;
  text-align: center;
  background: var(--glass-bg);
  border-radius: 4px;
  border: 1px solid var(--glass-border);
}

.upload-hint {
  margin-top: 8px;
}

.upload-hint p {
  font-size: 11px;
  color: var(--text-secondary);
  margin: 2px 0;
  line-height: 1.3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .document-upload-section {
    padding: 10px;
  }
  
  .file-upload-label {
    padding: 8px 10px;
    font-size: 13px;
  }
}

/* ... (rest of existing CSS remains the same) ... */