/* Main styles for CyberGuard AI Assistant */ :root { --primary-color: #2563eb; --primary-hover: #1d4ed8; --secondary-color: #0f172a; --accent-color: #3b82f6; --light-bg: #f8fafc; --dark-bg: #1e293b; --text-light: #f1f5f9; --text-dark: #334155; --border-color: #e2e8f0; --success-color: #10b981; --error-color: #ef4444; --warning-color: #f59e0b; --info-color: #3b82f6; --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); --radius-sm: 0.25rem; --radius-md: 0.375rem; --radius-lg: 0.5rem; --radius-xl: 0.75rem; --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; --sidebar-width: 320px; --header-height: 60px; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font-sans); } body { background-color: var(--light-bg); color: var(--text-dark); line-height: 1.5; } .app-container { display: flex; height: 100vh; position: relative; overflow: hidden; } /* Sidebar styles */ .sidebar { width: var(--sidebar-width); background-color: var(--secondary-color); color: var(--text-light); height: 100%; overflow-y: auto; transition: transform 0.3s ease; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; box-shadow: var(--shadow-lg); transform: translateX(-100%); } .sidebar.active { transform: translateX(0); } .sidebar-header { padding: 1.25rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255, 255, 255, 0.1); } .sidebar-header h2 { font-size: 1.25rem; font-weight: 600; } .new-chat-btn { display: flex; align-items: center; gap: 0.5rem; background-color: var(--primary-color); color: white; border: none; padding: 0.5rem 1rem; border-radius: var(--radius-md); cursor: pointer; font-size: 0.875rem; font-weight: 500; transition: background-color 0.2s; } .new-chat-btn:hover { background-color: var(--primary-hover); } #header-new-chat-btn { margin-left: 0.5rem; } .conversation-list { padding: 1rem; } .conversation-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; border-radius: var(--radius-md); cursor: pointer; transition: background-color 0.2s; margin-bottom: 0.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .conversation-item:hover { background-color: rgba(255, 255, 255, 0.1); } .conversation-item.active { background-color: rgba(59, 130, 246, 0.2); } .conversation-item i { color: var(--accent-color); } .conversation-title { font-size: 0.9rem; flex: 1; overflow: hidden; text-overflow: ellipsis; } .conversation-time { font-size: 0.75rem; color: rgba(255, 255, 255, 0.6); } /* Chat container styles */ .chat-container { flex: 1; display: flex; flex-direction: column; height: 100%; margin-left: 0; transition: margin-left 0.3s ease; } .chat-container.sidebar-open { margin-left: var(--sidebar-width); } .chat-header { height: var(--header-height); background-color: white; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; padding: 0 1rem; position: sticky; top: 0; z-index: 10; box-shadow: var(--shadow-sm); } .menu-toggle { background: none; border: none; font-size: 1.25rem; cursor: pointer; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background-color 0.2s; color: var(--text-dark); } .menu-toggle:hover { background-color: var(--border-color); } .chat-title { font-size: 1.125rem; font-weight: 600; margin-left: 1rem; flex: 1; } .header-actions { display: flex; align-items: center; gap: 0.75rem; position: relative; } .language-btn, .info-btn { background: none; border: none; font-size: 1rem; cursor: pointer; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background-color 0.2s; color: var(--text-dark); } .language-btn { width: auto; padding: 0 0.75rem; border-radius: var(--radius-md); gap: 0.5rem; } .language-btn:hover, .info-btn:hover { background-color: var(--border-color); } .language-dropdown { position: absolute; top: 100%; right: 0; background-color: white; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); width: 180px; z-index: 100; overflow: hidden; display: none; } .language-dropdown.active { display: block; } .language-option { padding: 0.75rem 1rem; cursor: pointer; transition: background-color 0.2s; } .language-option:hover { background-color: var(--light-bg); } /* Chat messages area */ .chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 1.5rem; } .welcome-container { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem 1rem; max-width: 700px; margin: auto; } .welcome-logo { font-size: 3rem; color: var(--primary-color); margin-bottom: 1.5rem; height: 80px; width: 80px; border-radius: 50%; background-color: rgba(37, 99, 235, 0.1); display: flex; align-items: center; justify-content: center; } .welcome-container h1 { margin-bottom: 1rem; font-size: 2rem; font-weight: 700; color: var(--secondary-color); } .welcome-container p { margin-bottom: 2rem; font-size: 1.125rem; color: var(--text-dark); max-width: 600px; } .example-queries { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; width: 100%; } .example-query { background-color: white; padding: 1rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 0.75rem; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; text-align: left; } .example-query:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); } .example-query i { color: var(--primary-color); font-size: 1.25rem; } .message { display: flex; gap: 1rem; max-width: 900px; margin: 0 auto; width: 100%; } .message-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.25rem; } .message.user .message-avatar { background-color: var(--primary-color); color: white; } .message.bot .message-avatar { background-color: var(--secondary-color); color: white; } .message-content { background-color: white; padding: 1rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); flex: 1; } .message.user .message-content { background-color: var(--primary-color); color: white; } .message-content p { margin-bottom: 0.75rem; } .message-content p:last-child { margin-bottom: 0; } .message-content pre { background-color: #f1f5f9; padding: 1rem; border-radius: var(--radius-md); overflow-x: auto; margin: 0.75rem 0; font-family: monospace; } .message.user .message-content pre { background-color: rgba(0, 0, 0, 0.1); } .message-time { font-size: 0.75rem; color: #64748b; margin-top: 0.5rem; text-align: right; } .message.user .message-time { color: rgba(255, 255, 255, 0.8); } /* Input area */ .chat-input-container { padding: 1rem; background-color: white; border-top: 1px solid var(--border-color); position: sticky; bottom: 0; z-index: 10; } .chat-input-wrapper { display: flex; align-items: center; background-color: var(--light-bg); border-radius: var(--radius-lg); padding: 0.5rem 1rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); } .chat-input-wrapper:focus-within { box-shadow: 0 0 0 2px var(--primary-color); } #user-input { flex: 1; border: none; background: none; outline: none; padding: 0.75rem 0; resize: none; font-size: 1rem; max-height: 150px; } .send-btn { background-color: var(--primary-color); color: white; border: none; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color 0.2s; margin-left: 0.5rem; } .send-btn:hover { background-color: var(--primary-hover); } .send-btn:disabled { background-color: var(--border-color); cursor: not-allowed; } .typing-indicator { display: none; padding: 0.75rem 0 0; text-align: center; } .typing-indicator.active { display: block; } .typing-indicator span { display: inline-block; width: 10px; height: 10px; background-color: var(--primary-color); border-radius: 50%; margin: 0 2px; opacity: 0.6; animation: bounce 1.4s infinite ease-in-out; } .typing-indicator span:nth-child(1) { animation-delay: 0s; } .typing-indicator span:nth-child(2) { animation-delay: 0.2s; } .typing-indicator span:nth-child(3) { animation-delay: 0.4s; } @keyframes bounce { 0%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } } /* Modal styles */ .modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 200; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; } .modal.active { opacity: 1; visibility: visible; } .modal-content { background-color: white; border-radius: var(--radius-lg); max-width: 600px; width: 90%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); transform: translateY(20px); transition: transform 0.3s; } .modal.active .modal-content { transform: translateY(0); } .modal-header { padding: 1.25rem; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; } .modal-header h2 { font-size: 1.25rem; font-weight: 600; } .close-modal { font-size: 1.5rem; cursor: pointer; opacity: 0.7; transition: opacity 0.2s; } .close-modal:hover { opacity: 1; } .modal-body { padding: 1.5rem; } .modal-body h3 { margin: 1.5rem 0 0.75rem; color: var(--secondary-color); } .modal-body ul { margin-left: 1.5rem; margin-bottom: 1.5rem; } .modal-body ul li { margin-bottom: 0.5rem; } .modal-footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border-color); text-align: center; font-size: 0.875rem; color: var(--text-dark); } .language-selection { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; } .language-selection .language-option { display: flex; align-items: center; gap: 0.75rem; padding: 1rem; border-radius: var(--radius-md); cursor: pointer; transition: background-color 0.2s; border: 1px solid var(--border-color); } .language-selection .language-option:hover { background-color: var(--light-bg); } .language-selection .language-option.active { border-color: var(--primary-color); background-color: rgba(37, 99, 235, 0.05); } /* Responsive styles */ @media (max-width: 992px) { #header-new-chat-btn span { display: none; } #header-new-chat-btn { width: 40px; height: 40px; border-radius: 50%; padding: 0; justify-content: center; } } @media (max-width: 768px) { .sidebar { width: 85%; max-width: 320px; } .chat-container.sidebar-open { margin-left: 0; } .example-queries { grid-template-columns: 1fr; } .welcome-container h1 { font-size: 1.75rem; } .welcome-container p { font-size: 1rem; } .modal-content { width: 95%; } .language-selection { grid-template-columns: 1fr; } .header-actions { gap: 0.5rem; } }