611 lines
11 KiB
CSS
611 lines
11 KiB
CSS
|
|
/* Egregore Chat - Infinite Scroll DM Style */
|
||
|
|
|
||
|
|
/* Scrollbar styling */
|
||
|
|
::-webkit-scrollbar {
|
||
|
|
width: 6px;
|
||
|
|
}
|
||
|
|
|
||
|
|
::-webkit-scrollbar-track {
|
||
|
|
background: transparent;
|
||
|
|
}
|
||
|
|
|
||
|
|
::-webkit-scrollbar-thumb {
|
||
|
|
background: #7c3aed;
|
||
|
|
border-radius: 3px;
|
||
|
|
}
|
||
|
|
|
||
|
|
::-webkit-scrollbar-thumb:hover {
|
||
|
|
background: #8b5cf6;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Message wrappers */
|
||
|
|
.message-wrapper {
|
||
|
|
animation: fadeIn 0.2s ease-out;
|
||
|
|
-webkit-user-select: none;
|
||
|
|
user-select: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.message-wrapper-user {
|
||
|
|
display: flex;
|
||
|
|
flex-direction: column;
|
||
|
|
align-items: flex-end;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Message bubbles */
|
||
|
|
.message {
|
||
|
|
max-width: 85%;
|
||
|
|
-webkit-user-select: text;
|
||
|
|
user-select: text;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Contain selection within each message */
|
||
|
|
.message-content {
|
||
|
|
-webkit-user-select: text;
|
||
|
|
user-select: text;
|
||
|
|
}
|
||
|
|
|
||
|
|
#messages {
|
||
|
|
-webkit-user-select: none;
|
||
|
|
user-select: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.message-user {
|
||
|
|
background: #7c3aed;
|
||
|
|
border-radius: 1.25rem 1.25rem 0.25rem 1.25rem;
|
||
|
|
color: white;
|
||
|
|
}
|
||
|
|
|
||
|
|
.message-assistant {
|
||
|
|
background: #2e1065;
|
||
|
|
border-radius: 1.25rem 1.25rem 1.25rem 0.25rem;
|
||
|
|
border: 1px solid #581c87;
|
||
|
|
}
|
||
|
|
|
||
|
|
@keyframes fadeIn {
|
||
|
|
from {
|
||
|
|
opacity: 0;
|
||
|
|
transform: translateY(8px);
|
||
|
|
}
|
||
|
|
to {
|
||
|
|
opacity: 1;
|
||
|
|
transform: translateY(0);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Markdown content styling */
|
||
|
|
.message-content {
|
||
|
|
line-height: 1.6;
|
||
|
|
word-wrap: break-word;
|
||
|
|
}
|
||
|
|
|
||
|
|
.message-content p {
|
||
|
|
margin-bottom: 0.75rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.message-content p:last-child {
|
||
|
|
margin-bottom: 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
.message-content pre {
|
||
|
|
background: #0d1117;
|
||
|
|
border-radius: 0.5rem;
|
||
|
|
padding: 1rem;
|
||
|
|
overflow-x: auto;
|
||
|
|
margin: 0.75rem 0;
|
||
|
|
border: 1px solid #30363d;
|
||
|
|
}
|
||
|
|
|
||
|
|
.message-content code {
|
||
|
|
font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
|
||
|
|
font-size: 0.85rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.message-content :not(pre) > code {
|
||
|
|
background: #0d1117;
|
||
|
|
padding: 0.15rem 0.4rem;
|
||
|
|
border-radius: 0.25rem;
|
||
|
|
font-size: 0.9em;
|
||
|
|
}
|
||
|
|
|
||
|
|
.message-content ul, .message-content ol {
|
||
|
|
margin: 0.5rem 0;
|
||
|
|
padding-left: 1.5rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.message-content li {
|
||
|
|
margin: 0.25rem 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
.message-content blockquote {
|
||
|
|
border-left: 3px solid #7c3aed;
|
||
|
|
padding-left: 1rem;
|
||
|
|
margin: 0.75rem 0;
|
||
|
|
color: #c4b5fd;
|
||
|
|
}
|
||
|
|
|
||
|
|
.message-content a {
|
||
|
|
color: #c4b5fd;
|
||
|
|
text-decoration: underline;
|
||
|
|
}
|
||
|
|
|
||
|
|
.message-content img {
|
||
|
|
max-width: 100%;
|
||
|
|
border-radius: 0.5rem;
|
||
|
|
margin: 0.5rem 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
.message-content table {
|
||
|
|
border-collapse: collapse;
|
||
|
|
margin: 0.75rem 0;
|
||
|
|
width: 100%;
|
||
|
|
font-size: 0.9rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.message-content th, .message-content td {
|
||
|
|
border: 1px solid #374151;
|
||
|
|
padding: 0.5rem;
|
||
|
|
text-align: left;
|
||
|
|
}
|
||
|
|
|
||
|
|
.message-content th {
|
||
|
|
background: #1f2937;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Code block wrapper for copy button */
|
||
|
|
.code-block-wrapper {
|
||
|
|
position: relative;
|
||
|
|
}
|
||
|
|
|
||
|
|
.code-block-wrapper pre {
|
||
|
|
margin: 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
.copy-btn {
|
||
|
|
z-index: 10;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Textarea */
|
||
|
|
#message-input {
|
||
|
|
max-height: 200px;
|
||
|
|
min-height: 48px;
|
||
|
|
scrollbar-width: thin;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Loading spinner */
|
||
|
|
.loading-spinner {
|
||
|
|
width: 20px;
|
||
|
|
height: 20px;
|
||
|
|
border: 2px solid #581c87;
|
||
|
|
border-top-color: #c4b5fd;
|
||
|
|
border-radius: 50%;
|
||
|
|
animation: spin 0.8s linear infinite;
|
||
|
|
}
|
||
|
|
|
||
|
|
@keyframes spin {
|
||
|
|
to { transform: rotate(360deg); }
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Typing indicator */
|
||
|
|
.typing-indicator {
|
||
|
|
display: flex;
|
||
|
|
gap: 4px;
|
||
|
|
padding: 0.5rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.typing-indicator span {
|
||
|
|
width: 8px;
|
||
|
|
height: 8px;
|
||
|
|
background: #a855f7;
|
||
|
|
border-radius: 50%;
|
||
|
|
animation: bounce 1.4s infinite ease-in-out;
|
||
|
|
}
|
||
|
|
|
||
|
|
.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
|
||
|
|
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
|
||
|
|
|
||
|
|
@keyframes bounce {
|
||
|
|
0%, 80%, 100% { transform: scale(0); }
|
||
|
|
40% { transform: scale(1); }
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Mobile adjustments */
|
||
|
|
@media (max-width: 640px) {
|
||
|
|
.message {
|
||
|
|
max-width: 92%;
|
||
|
|
}
|
||
|
|
|
||
|
|
#messages {
|
||
|
|
padding: 0.75rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Fixed header and footer on mobile */
|
||
|
|
body {
|
||
|
|
position: fixed;
|
||
|
|
width: 100%;
|
||
|
|
height: 100vh;
|
||
|
|
height: 100dvh; /* Use dynamic viewport height if supported */
|
||
|
|
overflow: hidden;
|
||
|
|
/* Prevent iOS bounce scroll */
|
||
|
|
-webkit-overflow-scrolling: auto;
|
||
|
|
overscroll-behavior: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Prevent touch scrolling on the document */
|
||
|
|
html {
|
||
|
|
overflow: hidden;
|
||
|
|
height: 100vh;
|
||
|
|
height: 100dvh;
|
||
|
|
}
|
||
|
|
|
||
|
|
header {
|
||
|
|
position: fixed;
|
||
|
|
top: 0;
|
||
|
|
left: 0;
|
||
|
|
right: 0;
|
||
|
|
z-index: 40;
|
||
|
|
/* Add a subtle backdrop to ensure visibility */
|
||
|
|
backdrop-filter: blur(8px);
|
||
|
|
background: rgba(29, 16, 51, 0.95);
|
||
|
|
}
|
||
|
|
|
||
|
|
footer {
|
||
|
|
position: fixed;
|
||
|
|
bottom: 0;
|
||
|
|
left: 0;
|
||
|
|
right: 0;
|
||
|
|
z-index: 40;
|
||
|
|
padding: 0.75rem;
|
||
|
|
/* Add a subtle backdrop to ensure visibility */
|
||
|
|
backdrop-filter: blur(8px);
|
||
|
|
background: rgba(29, 16, 51, 0.95);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Adjust main content to account for fixed header/footer */
|
||
|
|
main#messages-scroll {
|
||
|
|
position: fixed;
|
||
|
|
top: 0;
|
||
|
|
bottom: 0;
|
||
|
|
left: 0;
|
||
|
|
right: 0;
|
||
|
|
padding-top: var(--header-height, 60px);
|
||
|
|
padding-bottom: var(--footer-height, 80px);
|
||
|
|
box-sizing: border-box;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Adjust typing indicator position */
|
||
|
|
#typing-indicator {
|
||
|
|
position: fixed;
|
||
|
|
bottom: var(--footer-height, 80px);
|
||
|
|
left: 0;
|
||
|
|
right: 0;
|
||
|
|
z-index: 30;
|
||
|
|
background: rgba(29, 16, 51, 0.95);
|
||
|
|
backdrop-filter: blur(4px);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Toast container adjustment for fixed layout */
|
||
|
|
#toast-container {
|
||
|
|
bottom: calc(var(--footer-height, 80px) + 1rem);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/* PWA standalone mode */
|
||
|
|
@media (display-mode: standalone) {
|
||
|
|
header {
|
||
|
|
padding-top: env(safe-area-inset-top);
|
||
|
|
}
|
||
|
|
|
||
|
|
footer {
|
||
|
|
padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
|
||
|
|
}
|
||
|
|
|
||
|
|
@media (max-width: 640px) {
|
||
|
|
main#messages-scroll {
|
||
|
|
padding-top: calc(60px + env(safe-area-inset-top));
|
||
|
|
padding-bottom: calc(80px + env(safe-area-inset-bottom));
|
||
|
|
}
|
||
|
|
|
||
|
|
#typing-indicator {
|
||
|
|
bottom: calc(80px + env(safe-area-inset-bottom));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Tool blocks */
|
||
|
|
.tool-block {
|
||
|
|
animation: fadeIn 0.2s ease-out;
|
||
|
|
}
|
||
|
|
|
||
|
|
.tool-block pre {
|
||
|
|
margin: 0;
|
||
|
|
white-space: pre-wrap;
|
||
|
|
word-break: break-word;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Tool result widget */
|
||
|
|
.tool-result {
|
||
|
|
animation: fadeIn 0.2s ease-out;
|
||
|
|
border-left: 2px solid #7c3aed;
|
||
|
|
}
|
||
|
|
|
||
|
|
.tool-result pre {
|
||
|
|
margin: 0;
|
||
|
|
white-space: pre-wrap;
|
||
|
|
word-break: break-word;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Scrollbar for tool output */
|
||
|
|
.tool-result pre::-webkit-scrollbar {
|
||
|
|
width: 4px;
|
||
|
|
height: 4px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.tool-result pre::-webkit-scrollbar-thumb {
|
||
|
|
background: #4c1d95;
|
||
|
|
border-radius: 2px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.bg-gray-750 {
|
||
|
|
background-color: #3b0764;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Thinking blocks */
|
||
|
|
.thinking-block {
|
||
|
|
animation: fadeIn 0.2s ease-out;
|
||
|
|
}
|
||
|
|
|
||
|
|
.thinking-block summary {
|
||
|
|
cursor: pointer;
|
||
|
|
}
|
||
|
|
|
||
|
|
.thinking-block summary::marker {
|
||
|
|
color: #9ca3af;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Question blocks - highlighted for attention */
|
||
|
|
.question-block {
|
||
|
|
background: linear-gradient(90deg, rgba(234, 179, 8, 0.1), transparent);
|
||
|
|
animation: fadeIn 0.2s ease-out;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Error blocks */
|
||
|
|
.error-block {
|
||
|
|
animation: fadeIn 0.2s ease-out;
|
||
|
|
background: rgba(239, 68, 68, 0.1);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Mode change blocks */
|
||
|
|
.mode-change-block {
|
||
|
|
animation: fadeIn 0.2s ease-out;
|
||
|
|
opacity: 0.7;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Terminal output */
|
||
|
|
.terminal-output {
|
||
|
|
font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
|
||
|
|
color: #e2e8f0;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Diff output */
|
||
|
|
.diff-output {
|
||
|
|
font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
|
||
|
|
}
|
||
|
|
|
||
|
|
.diff-output code {
|
||
|
|
white-space: pre;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Assistant response container */
|
||
|
|
.assistant-response {
|
||
|
|
animation: fadeIn 0.2s ease-out;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Details styling */
|
||
|
|
details summary {
|
||
|
|
list-style: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
details summary::-webkit-details-marker {
|
||
|
|
display: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
details summary::before {
|
||
|
|
content: '▶ ';
|
||
|
|
font-size: 0.75em;
|
||
|
|
margin-right: 0.25rem;
|
||
|
|
display: inline-block;
|
||
|
|
transition: transform 0.2s;
|
||
|
|
}
|
||
|
|
|
||
|
|
details[open] summary::before {
|
||
|
|
transform: rotate(90deg);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Input focus ring */
|
||
|
|
#message-input:focus {
|
||
|
|
box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.5);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Send button animation */
|
||
|
|
#send-btn:not(:disabled):hover {
|
||
|
|
transform: scale(1.05);
|
||
|
|
}
|
||
|
|
|
||
|
|
#send-btn:not(:disabled):active {
|
||
|
|
transform: scale(0.95);
|
||
|
|
}
|
||
|
|
|
||
|
|
#send-btn {
|
||
|
|
transition: all 0.15s ease;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Smooth scroll behavior */
|
||
|
|
#messages-scroll {
|
||
|
|
scroll-behavior: smooth;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Selection color */
|
||
|
|
::selection {
|
||
|
|
background: rgba(168, 85, 247, 0.4);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Search */
|
||
|
|
.search-result mark {
|
||
|
|
background: rgba(168, 85, 247, 0.3);
|
||
|
|
color: inherit;
|
||
|
|
padding: 0.1em 0.2em;
|
||
|
|
border-radius: 0.2em;
|
||
|
|
}
|
||
|
|
|
||
|
|
.search-preview {
|
||
|
|
overflow: hidden;
|
||
|
|
display: -webkit-box;
|
||
|
|
-webkit-line-clamp: 2;
|
||
|
|
-webkit-box-orient: vertical;
|
||
|
|
}
|
||
|
|
|
||
|
|
.search-highlight {
|
||
|
|
animation: highlightPulse 2s ease-out;
|
||
|
|
}
|
||
|
|
|
||
|
|
@keyframes highlightPulse {
|
||
|
|
0%, 100% { background: transparent; }
|
||
|
|
25% { background: rgba(168, 85, 247, 0.2); }
|
||
|
|
50% { background: rgba(168, 85, 247, 0.15); }
|
||
|
|
75% { background: rgba(168, 85, 247, 0.1); }
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Search modal scrollbar */
|
||
|
|
#search-results::-webkit-scrollbar {
|
||
|
|
width: 6px;
|
||
|
|
}
|
||
|
|
|
||
|
|
#search-results::-webkit-scrollbar-track {
|
||
|
|
background: transparent;
|
||
|
|
}
|
||
|
|
|
||
|
|
#search-results::-webkit-scrollbar-thumb {
|
||
|
|
background: #7c3aed;
|
||
|
|
border-radius: 3px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Typing indicator dots */
|
||
|
|
.typing-dots span {
|
||
|
|
width: 6px;
|
||
|
|
height: 6px;
|
||
|
|
background: #a855f7;
|
||
|
|
border-radius: 50%;
|
||
|
|
animation: typingBounce 1.4s infinite ease-in-out;
|
||
|
|
}
|
||
|
|
|
||
|
|
.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
|
||
|
|
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }
|
||
|
|
.typing-dots span:nth-child(3) { animation-delay: 0s; }
|
||
|
|
|
||
|
|
@keyframes typingBounce {
|
||
|
|
0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
|
||
|
|
40% { transform: scale(1); opacity: 1; }
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Context menu */
|
||
|
|
#context-menu {
|
||
|
|
animation: contextMenuIn 0.15s ease-out;
|
||
|
|
}
|
||
|
|
|
||
|
|
@keyframes contextMenuIn {
|
||
|
|
from {
|
||
|
|
opacity: 0;
|
||
|
|
transform: scale(0.95);
|
||
|
|
}
|
||
|
|
to {
|
||
|
|
opacity: 1;
|
||
|
|
transform: scale(1);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Mobile menu */
|
||
|
|
#mobile-menu {
|
||
|
|
animation: mobileMenuIn 0.2s ease-out;
|
||
|
|
}
|
||
|
|
|
||
|
|
@keyframes mobileMenuIn {
|
||
|
|
from {
|
||
|
|
opacity: 0;
|
||
|
|
}
|
||
|
|
to {
|
||
|
|
opacity: 1;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
#mobile-menu button {
|
||
|
|
transition: transform 0.1s, background-color 0.15s;
|
||
|
|
}
|
||
|
|
|
||
|
|
#mobile-menu button:active {
|
||
|
|
transform: scale(0.98);
|
||
|
|
}
|
||
|
|
|
||
|
|
.line-clamp-3 {
|
||
|
|
display: -webkit-box;
|
||
|
|
-webkit-line-clamp: 3;
|
||
|
|
-webkit-box-orient: vertical;
|
||
|
|
overflow: hidden;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Message delete animation */
|
||
|
|
.message-wrapper {
|
||
|
|
transition: opacity 0.2s, transform 0.2s;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Toast notifications */
|
||
|
|
.toast {
|
||
|
|
animation: toastIn 0.2s ease-out;
|
||
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||
|
|
}
|
||
|
|
|
||
|
|
.toast-fade-out {
|
||
|
|
animation: toastOut 0.2s ease-out forwards;
|
||
|
|
}
|
||
|
|
|
||
|
|
@keyframes toastIn {
|
||
|
|
from {
|
||
|
|
opacity: 0;
|
||
|
|
transform: translateY(10px);
|
||
|
|
}
|
||
|
|
to {
|
||
|
|
opacity: 1;
|
||
|
|
transform: translateY(0);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
@keyframes toastOut {
|
||
|
|
from {
|
||
|
|
opacity: 1;
|
||
|
|
transform: translateY(0);
|
||
|
|
}
|
||
|
|
to {
|
||
|
|
opacity: 0;
|
||
|
|
transform: translateY(-10px);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Voice mode */
|
||
|
|
#voice-btn {
|
||
|
|
position: relative;
|
||
|
|
overflow: hidden;
|
||
|
|
}
|
||
|
|
|
||
|
|
#mic-pulse {
|
||
|
|
animation: micPulse 1.5s ease-in-out infinite;
|
||
|
|
}
|
||
|
|
|
||
|
|
@keyframes micPulse {
|
||
|
|
0%, 100% { opacity: 0.3; }
|
||
|
|
50% { opacity: 0.6; }
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Hands-free indicator */
|
||
|
|
#voice-btn.bg-red-600 #mic-icon {
|
||
|
|
color: white;
|
||
|
|
}
|