/
bytevalue
/
optimal
Обзор
Документация
Войти
/
bytevalue
/
optimal
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/main/resources/static/css/chat.css
613 строк
13 KB
bytevalue
Nexus -> optimal switch
08 дек 2025, 14:17
08 дек 2025, 14:17
a892ce4
Код
Авторство
О чём код?
/* ===== ШАПКА ЧАТА ===== */ .chat-header { padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); min-height: 72px; width: 100%; flex-shrink: 0; background: rgba(255, 255, 255, 0.02); } .chat-header-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; } .chat-info { flex: 1; min-width: 0; } .chat-title { font-size: 12px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .chat-header-actions { display: flex; align-items: center; gap: 8px; } /* Мобильная кнопка меню */ .mobile-menu-btn { display: none; width: 40px; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); color: var(--text-secondary); cursor: pointer; transition: all 0.2s ease; align-items: center; justify-content: center; flex-shrink: 0; } .mobile-menu-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.12); color: var(--text-primary); } /* ===== ОБЛАСТЬ СООБЩЕНИЙ ===== */ .messages-container { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 20px; width: 100%; min-height: 0; } /* ===== СООБЩЕНИЯ ===== */ .message { display: flex; gap: 12px; animation: messageAppear 0.3s ease forwards; opacity: 0; transform: translateY(10px); align-items: flex-end; margin-bottom: 20px; max-width: 85%; } .message.user { flex-direction: row; margin-left: auto; justify-content: flex-end; } .message.assistant { flex-direction: row; margin-right: auto; justify-content: flex-start; } .message-avatar { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; position: relative; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); align-self: flex-end; margin-bottom: 4px; } .message.user .message-avatar { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); color: white; order: 2; margin-left: 8px; } .message.assistant .message-avatar { background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%); color: white; order: 1; margin-right: 8px; } .message-content { max-width: calc(100% - 48px); display: flex; flex-direction: column; order: 1; } .message.user .message-content { align-items: flex-end; order: 1; } .message.assistant .message-content { align-items: flex-start; order: 2; } .message-bubble { padding: 12px 16px; border-radius: 16px; position: relative; word-wrap: break-word; line-height: 1.6; animation: bubbleExpand 0.3s ease forwards; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid transparent; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); } .message.user .message-bubble { background: linear-gradient(135deg, rgba(99, 102, 241, 0.95) 0%, rgba(139, 92, 246, 0.9) 100%); color: white; border-bottom-right-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.15); box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25); } .message.assistant .message-bubble { background: rgba(30, 33, 46, 0.85); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border: 1px solid rgba(255, 255, 255, 0.1); border-bottom-left-radius: 4px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 20px rgba(0, 0, 0, 0.2); } .message-text { font-size: 14px; line-height: 1.6; color: rgba(255, 255, 255, 0.95); } .message.assistant .message-text { color: rgba(255, 255, 255, 0.95); } .message.user .message-text { color: white; } .message-text a { color: var(--accent-primary); text-decoration: none; } .message-text a:hover { text-decoration: underline; } .message-text pre, .message-text code { background: rgba(0, 0, 0, 0.3); border-radius: var(--radius-sm); padding: 2px 6px; font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 13px; border: 1px solid rgba(255, 255, 255, 0.1); } .message-text pre { padding: var(--spacing-md); overflow-x: auto; margin: var(--spacing-sm) 0; background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.08); } .message-meta { display: flex; align-items: center; gap: var(--spacing-sm); margin-top: var(--spacing-xs); } .message-time { font-size: 11px; opacity: 0.7; font-weight: 500; } .message.user .message-time { color: rgba(255, 255, 255, 0.8); } .message.assistant .message-time { color: rgba(255, 255, 255, 0.6); } /* ===== ИНДИКАТОР ПЕЧАТАНИЯ ===== */ .typing-indicator { padding: 0 var(--spacing-xl) var(--spacing-lg); width: 100%; flex-shrink: 0; } .typing-content { display: flex; gap: var(--spacing-md); align-items: flex-start; } .typing-avatar { width: 36px; height: 36px; border-radius: var(--radius-md); background: var(--gradient-primary); display: flex; align-items: center; justify-content: center; color: white; font-size: 16px; flex-shrink: 0; } .typing-bubble { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--radius-lg); padding: var(--spacing-md) var(--spacing-lg); flex: 1; } .typing-text { display: flex; align-items: center; gap: 4px; margin-bottom: var(--spacing-xs); } .typing-dots { display: flex; gap: 4px; } .typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-secondary); animation: typingBounce 1.4s infinite ease-in-out both; } .typing-dots span:nth-child(1) { animation-delay: -0.32s; } .typing-dots span:nth-child(2) { animation-delay: -0.16s; } .typing-stage { font-size: 13px; color: var(--text-muted); font-style: italic; } /* ===== ПОЛЕ ВВОДА ===== */ .chat-input-container { margin: 20px 24px; display: flex; flex-direction: column; gap: var(--spacing-md); border: 1px solid rgba(255, 255, 255, 0.1); transition: all var(--transition-fast); border-radius: var(--radius-lg); width: calc(100% - 48px); margin-left: auto; margin-right: auto; flex-shrink: 0; } .chat-input-container:focus-within { border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); } .input-wrapper { display: flex; flex-direction: column; gap: var(--spacing-sm); padding: var(--spacing-md); } .message-input { width: 100%; min-height: 24px; max-height: 200px; padding: var(--spacing-sm) 0; background: transparent; border: none; color: var(--text-primary); font-size: 14px; line-height: 1.6; resize: none; outline: none; font-family: inherit; } .message-input::placeholder { color: var(--text-muted); } .input-actions { display: flex; justify-content: space-between; align-items: center; } .char-counter { font-size: 12px; color: var(--text-muted); transition: color var(--transition-fast); } .char-counter.warning { color: var(--accent-warning); } .char-counter.error { color: var(--accent-danger); font-weight: 600; } /* ===== ПРИВЕТСТВЕННЫЙ ЭКРАН ===== */ .welcome-header { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--spacing-lg); } .welcome-icon { width: 100px; height: 100px; border-radius: var(--radius-xl); background: var(--gradient-primary); display: flex; align-items: center; justify-content: center; color: white; font-size: 48px; margin-bottom: var(--spacing-md); } .welcome-title { font-size: 48px; font-weight: 800; background: linear-gradient(135deg, #fff 0%, #a0a0c0 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1.2; } .welcome-subtitle { font-size: 18px; color: var(--text-secondary); max-width: 600px; line-height: 1.6; } .quick-actions { display: flex; flex-direction: column; gap: var(--spacing-lg); } .recent-chats { margin-top: var(--spacing-xl); } /* ===== ИНДИКАТОР ПЕЧАТАНИЯ В СООБЩЕНИИ ===== */ .message-typing .message-bubble { background: rgba(30, 33, 46, 0.9); backdrop-filter: blur(20px); border: 1px solid rgba(59, 130, 246, 0.2); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); } .typing-indicator-inline { display: flex; flex-direction: column; align-items: flex-start; gap: var(--spacing-sm); padding: var(--spacing-sm) 0; } .typing-dots { display: flex; gap: 6px; margin-bottom: 8px; } .typing-dot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%); animation: typingDot 1.5s 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 typingDot { 0%, 100% { transform: translateY(0); opacity: 0.4; } 50% { transform: translateY(-4px); opacity: 1; } } .typing-stage { font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.9); margin-bottom: 4px; } .stage-description { font-size: 11px; color: rgba(255, 255, 255, 0.6); font-weight: 400; } .message-typing .message-meta { opacity: 0.7; } /* ===== ПРИВЕТСТВЕННОЕ СООБЩЕНИЕ В ПУСТОМ ЧАТЕ ===== */ .chat-welcome-message { text-align: center; padding: var(--spacing-xxl) var(--spacing-xl); color: var(--text-secondary); display: flex; flex-direction: column; align-items: center; gap: var(--spacing-md); } .welcome-icon-sm { width: 60px; height: 60px; border-radius: var(--radius-lg); background: var(--gradient-primary); display: flex; align-items: center; justify-content: center; color: white; font-size: 24px; } .chat-welcome-message h3 { font-size: 20px; font-weight: 600; color: var(--text-primary); } .chat-welcome-message p { max-width: 400px; line-height: 1.6; } /* ===== НЕДАВНИЕ ЧАТЫ В ПРИВЕТСТВЕННОМ ЭКРАНЕ ===== */ .recent-chats-list { display: flex; flex-direction: column; gap: var(--spacing-sm); margin-top: var(--spacing-md); } .recent-chat-item { display: flex; align-items: center; gap: var(--spacing-md); padding: var(--spacing-sm) var(--spacing-md); border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.05); cursor: pointer; transition: all var(--transition-fast); } .recent-chat-item:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--accent-primary); } .recent-chat-icon { width: 32px; height: 32px; border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.05); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 14px; } .recent-chat-info { flex: 1; min-width: 0; } .recent-chat-title { font-size: 14px; font-weight: 500; color: var(--text-primary); margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .recent-chat-time { font-size: 11px; color: var(--text-muted); } .empty-recent-chats { text-align: center; padding: var(--spacing-md); color: var(--text-muted); font-style: italic; } .chat-title-input { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--accent-primary); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 15px; font-weight: 600; padding: 4px 8px; width: 100%; outline: none; font-family: inherit; transition: all var(--transition-fast); box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1); } .chat-title-input:focus { background: rgba(255, 255, 255, 0.08); border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2); } .chat-title-text { cursor: pointer; transition: color var(--transition-fast); padding: 4px 8px; border-radius: var(--radius-sm); } .chat-title-text:hover { background: rgba(255, 255, 255, 0.05); color: var(--accent-primary); }