|
|
| :root {
|
| --primary-color: #6366f1;
|
| --secondary-color: #4f46e5;
|
| --text-color: #1f2937;
|
| --text-secondary: #6b7280;
|
| --bg-color: #ffffff;
|
| --bg-secondary: #f3f4f6;
|
| --border-color: #e5e7eb;
|
| --shadow-color: rgba(0, 0, 0, 0.1);
|
| --message-user-bg: #f3f4f6;
|
| --message-ai-bg: #ffffff;
|
| --code-bg: #282c34;
|
| }
|
|
|
|
|
| body.dark-mode {
|
| --primary-color: #818cf8;
|
| --secondary-color: #6366f1;
|
| --text-color: #f9fafb;
|
| --text-secondary: #d1d5db;
|
| --bg-color: #111827;
|
| --bg-secondary: #1f2937;
|
| --border-color: #374151;
|
| --shadow-color: rgba(0, 0, 0, 0.3);
|
| --message-user-bg: #1f2937;
|
| --message-ai-bg: #111827;
|
| --code-bg: #1a1d23;
|
| }
|
|
|
| * {
|
| margin: 0;
|
| padding: 0;
|
| box-sizing: border-box;
|
| }
|
|
|
| body {
|
| font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
| color: var(--text-color);
|
| background-color: var(--bg-color);
|
| transition: background-color 0.3s, color 0.3s;
|
| }
|
|
|
| .app-container {
|
| display: flex;
|
| height: 100vh;
|
| overflow: hidden;
|
| }
|
|
|
|
|
| .sidebar {
|
| width: 260px;
|
| background-color: var(--bg-secondary);
|
| border-right: 1px solid var(--border-color);
|
| display: flex;
|
| flex-direction: column;
|
| padding: 16px;
|
| transition: background-color 0.3s;
|
| }
|
|
|
| .logo {
|
| display: flex;
|
| align-items: center;
|
| gap: 10px;
|
| margin-bottom: 20px;
|
| padding: 10px;
|
| }
|
|
|
| .logo i {
|
| font-size: 24px;
|
| color: var(--primary-color);
|
| }
|
|
|
| .logo h1 {
|
| font-size: 18px;
|
| font-weight: 600;
|
| }
|
|
|
| .new-chat-btn {
|
| display: flex;
|
| align-items: center;
|
| justify-content: center;
|
| gap: 8px;
|
| background-color: var(--primary-color);
|
| color: white;
|
| border: none;
|
| border-radius: 8px;
|
| padding: 10px 16px;
|
| font-size: 14px;
|
| font-weight: 500;
|
| cursor: pointer;
|
| transition: background-color 0.2s;
|
| margin-bottom: 20px;
|
| }
|
|
|
| .new-chat-btn:hover {
|
| background-color: var(--secondary-color);
|
| }
|
|
|
| .chat-history {
|
| flex: 1;
|
| overflow-y: auto;
|
| display: flex;
|
| flex-direction: column;
|
| gap: 8px;
|
| }
|
|
|
| .chat-item {
|
| display: flex;
|
| align-items: center;
|
| gap: 8px;
|
| padding: 8px 12px;
|
| border-radius: 8px;
|
| cursor: pointer;
|
| transition: background-color 0.2s;
|
| color: var(--text-secondary);
|
| }
|
|
|
| .chat-item:hover {
|
| background-color: rgba(99, 102, 241, 0.1);
|
| }
|
|
|
| .chat-item.active {
|
| background-color: rgba(99, 102, 241, 0.15);
|
| color: var(--primary-color);
|
| }
|
|
|
| .chat-item i {
|
| font-size: 14px;
|
| }
|
|
|
| .chat-item span {
|
| font-size: 14px;
|
| white-space: nowrap;
|
| overflow: hidden;
|
| text-overflow: ellipsis;
|
| }
|
|
|
| .sidebar-footer {
|
| display: flex;
|
| align-items: center;
|
| justify-content: space-between;
|
| padding-top: 16px;
|
| border-top: 1px solid var(--border-color);
|
| margin-top: 16px;
|
| }
|
|
|
| .toggle-mode-btn {
|
| background: none;
|
| border: none;
|
| color: var(--text-secondary);
|
| cursor: pointer;
|
| font-size: 16px;
|
| padding: 8px;
|
| border-radius: 8px;
|
| transition: background-color 0.2s;
|
| }
|
|
|
| .toggle-mode-btn:hover {
|
| background-color: rgba(99, 102, 241, 0.1);
|
| }
|
|
|
| .model-info {
|
| font-size: 12px;
|
| color: var(--text-secondary);
|
| }
|
|
|
|
|
| .main-content {
|
| flex: 1;
|
| display: flex;
|
| flex-direction: column;
|
| height: 100%;
|
| overflow: hidden;
|
| }
|
|
|
| .chat-container {
|
| flex: 1;
|
| overflow-y: auto;
|
| padding: 20px;
|
| display: flex;
|
| flex-direction: column;
|
| }
|
|
|
|
|
| .welcome-screen {
|
| display: flex;
|
| flex-direction: column;
|
| align-items: center;
|
| justify-content: center;
|
| text-align: center;
|
| height: 100%;
|
| padding: 20px;
|
| max-width: 800px;
|
| margin: 0 auto;
|
| }
|
|
|
| .welcome-logo {
|
| font-size: 48px;
|
| color: var(--primary-color);
|
| margin-bottom: 20px;
|
| background-color: rgba(99, 102, 241, 0.1);
|
| width: 100px;
|
| height: 100px;
|
| display: flex;
|
| align-items: center;
|
| justify-content: center;
|
| border-radius: 20px;
|
| }
|
|
|
| .welcome-screen h1 {
|
| font-size: 28px;
|
| margin-bottom: 10px;
|
| }
|
|
|
| .welcome-screen p {
|
| font-size: 16px;
|
| color: var(--text-secondary);
|
| margin-bottom: 30px;
|
| }
|
|
|
| .examples {
|
| width: 100%;
|
| }
|
|
|
| .examples h3 {
|
| font-size: 16px;
|
| margin-bottom: 16px;
|
| }
|
|
|
| .example-grid {
|
| display: grid;
|
| grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
| gap: 16px;
|
| }
|
|
|
| .example {
|
| background-color: var(--bg-secondary);
|
| border: 1px solid var(--border-color);
|
| border-radius: 8px;
|
| padding: 16px;
|
| cursor: pointer;
|
| transition: border-color 0.2s, transform 0.2s;
|
| display: flex;
|
| align-items: center;
|
| gap: 12px;
|
| }
|
|
|
| .example:hover {
|
| border-color: var(--primary-color);
|
| transform: translateY(-2px);
|
| }
|
|
|
| .example i {
|
| font-size: 18px;
|
| color: var(--primary-color);
|
| }
|
|
|
| .example span {
|
| font-size: 14px;
|
| }
|
|
|
|
|
| .messages {
|
| display: flex;
|
| flex-direction: column;
|
| gap: 24px;
|
| }
|
|
|
| .message {
|
| display: flex;
|
| gap: 16px;
|
| padding: 16px;
|
| border-radius: 8px;
|
| animation: fadeIn 0.3s ease-out;
|
| }
|
|
|
| @keyframes fadeIn {
|
| from { opacity: 0; transform: translateY(10px); }
|
| to { opacity: 1; transform: translateY(0); }
|
| }
|
|
|
| .message.user {
|
| background-color: var(--message-user-bg);
|
| align-self: flex-end;
|
| max-width: 85%;
|
| }
|
|
|
| .message.ai {
|
| background-color: var(--message-ai-bg);
|
| border: 1px solid var(--border-color);
|
| align-self: flex-start;
|
| max-width: 85%;
|
| }
|
|
|
| .message-avatar {
|
| width: 36px;
|
| height: 36px;
|
| border-radius: 50%;
|
| background-color: var(--primary-color);
|
| display: flex;
|
| align-items: center;
|
| justify-content: center;
|
| color: white;
|
| font-size: 16px;
|
| flex-shrink: 0;
|
| }
|
|
|
| .message-avatar.user {
|
| background-color: var(--text-secondary);
|
| }
|
|
|
| .message-content {
|
| flex: 1;
|
| overflow-wrap: break-word;
|
| }
|
|
|
| .message-sender {
|
| font-weight: 600;
|
| margin-bottom: 4px;
|
| }
|
|
|
| .message-text {
|
| line-height: 1.5;
|
| font-size: 15px;
|
| }
|
|
|
| .message-text p {
|
| margin-bottom: 12px;
|
| }
|
|
|
| .message-text p:last-child {
|
| margin-bottom: 0;
|
| }
|
|
|
| .message-text pre {
|
| background-color: var(--code-bg);
|
| border-radius: 6px;
|
| padding: 12px;
|
| overflow-x: auto;
|
| margin: 12px 0;
|
| }
|
|
|
| .message-text code {
|
| font-family: 'Fira Code', monospace;
|
| font-size: 14px;
|
| }
|
|
|
| .message-text code:not(pre code) {
|
| background-color: rgba(99, 102, 241, 0.1);
|
| padding: 2px 4px;
|
| border-radius: 4px;
|
| font-size: 14px;
|
| }
|
|
|
| .message-text ul, .message-text ol {
|
| margin: 12px 0;
|
| padding-left: 24px;
|
| }
|
|
|
| .message-text li {
|
| margin-bottom: 6px;
|
| }
|
|
|
| .message-text a {
|
| color: var(--primary-color);
|
| text-decoration: none;
|
| }
|
|
|
| .message-text a:hover {
|
| text-decoration: underline;
|
| }
|
|
|
|
|
| .input-container {
|
| padding: 16px;
|
| border-top: 1px solid var(--border-color);
|
| background-color: var(--bg-color);
|
| }
|
|
|
| .input-wrapper {
|
| display: flex;
|
| gap: 12px;
|
| background-color: var(--bg-secondary);
|
| border: 1px solid var(--border-color);
|
| border-radius: 8px;
|
| padding: 8px 16px;
|
| transition: border-color 0.2s;
|
| }
|
|
|
| .input-wrapper:focus-within {
|
| border-color: var(--primary-color);
|
| }
|
|
|
| textarea {
|
| flex: 1;
|
| border: none;
|
| background: none;
|
| resize: none;
|
| height: 24px;
|
| max-height: 200px;
|
| font-family: inherit;
|
| font-size: 15px;
|
| color: var(--text-color);
|
| outline: none;
|
| padding: 4px 0;
|
| line-height: 1.5;
|
| }
|
|
|
| textarea::placeholder {
|
| color: var(--text-secondary);
|
| }
|
|
|
| .send-btn {
|
| background: none;
|
| border: none;
|
| color: var(--primary-color);
|
| cursor: pointer;
|
| font-size: 16px;
|
| padding: 8px;
|
| border-radius: 8px;
|
| transition: background-color 0.2s;
|
| align-self: flex-end;
|
| }
|
|
|
| .send-btn:hover {
|
| background-color: rgba(99, 102, 241, 0.1);
|
| }
|
|
|
| .send-btn:disabled {
|
| color: var(--text-secondary);
|
| cursor: not-allowed;
|
| }
|
|
|
| .input-footer {
|
| display: flex;
|
| justify-content: center;
|
| margin-top: 8px;
|
| }
|
|
|
| .disclaimer {
|
| font-size: 12px;
|
| color: var(--text-secondary);
|
| }
|
|
|
|
|
| @media (max-width: 768px) {
|
| .app-container {
|
| flex-direction: column;
|
| }
|
|
|
| .sidebar {
|
| width: 100%;
|
| height: auto;
|
| border-right: none;
|
| border-bottom: 1px solid var(--border-color);
|
| padding: 12px;
|
| }
|
|
|
| .chat-history {
|
| display: none;
|
| }
|
|
|
| .logo {
|
| margin-bottom: 12px;
|
| }
|
|
|
| .new-chat-btn {
|
| margin-bottom: 0;
|
| }
|
|
|
| .sidebar-footer {
|
| display: none;
|
| }
|
|
|
| .main-content {
|
| height: 0;
|
| flex: 1;
|
| }
|
|
|
| .example-grid {
|
| grid-template-columns: 1fr;
|
| }
|
|
|
| .message.user, .message.ai {
|
| max-width: 100%;
|
| }
|
| }
|
|
|
|
|
| .typing-indicator {
|
| display: flex;
|
| align-items: center;
|
| gap: 6px;
|
| padding: 8px 12px;
|
| border-radius: 16px;
|
| background-color: var(--bg-secondary);
|
| width: fit-content;
|
| margin-top: 8px;
|
| }
|
|
|
| .typing-dot {
|
| width: 8px;
|
| height: 8px;
|
| background-color: var(--text-secondary);
|
| border-radius: 50%;
|
| animation: typingAnimation 1.4s infinite ease-in-out;
|
| }
|
|
|
| .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);
|
| opacity: 0.6;
|
| }
|
| 30% {
|
| transform: translateY(-4px);
|
| opacity: 1;
|
| }
|
| }
|
|
|
|
|
| .message-actions {
|
| display: flex;
|
| gap: 8px;
|
| margin-top: 8px;
|
| }
|
|
|
| .action-btn {
|
| background: none;
|
| border: none;
|
| color: var(--text-secondary);
|
| cursor: pointer;
|
| font-size: 14px;
|
| padding: 4px 8px;
|
| border-radius: 4px;
|
| transition: background-color 0.2s, color 0.2s;
|
| display: flex;
|
| align-items: center;
|
| gap: 4px;
|
| }
|
|
|
| .action-btn:hover {
|
| background-color: rgba(99, 102, 241, 0.1);
|
| color: var(--primary-color);
|
| }
|
|
|
|
|
| .hljs {
|
| background: var(--code-bg) !important;
|
| border-radius: 6px;
|
| }
|
|
|
|
|
| ::-webkit-scrollbar {
|
| width: 8px;
|
| height: 8px;
|
| }
|
|
|
| ::-webkit-scrollbar-track {
|
| background: transparent;
|
| }
|
|
|
| ::-webkit-scrollbar-thumb {
|
| background-color: var(--border-color);
|
| border-radius: 4px;
|
| }
|
|
|
| ::-webkit-scrollbar-thumb:hover {
|
| background-color: var(--text-secondary);
|
| } |