Reality123b's picture
Update application/static/css/style.css
e370985 verified
raw
history blame
11.5 kB
/* Enhanced Base Styles & Variables */
:root {
--primary-color: #7710ee;
--primary-gradient: linear-gradient(45deg, #7710ee, #b44dff);
--primary-light: rgba(119, 16, 238, 0.15);
--background-dark: #0a0a16;
--background-light: #12121f;
--text-primary: #e1e1e1;
--text-secondary: #9ca3af;
--surface-1: rgba(40, 40, 60, 0.6);
--surface-2: rgba(50, 50, 70, 0.4);
--surface-3: rgba(60, 60, 80, 0.4);
--border-color: rgba(255, 255, 255, 0.07);
--shadow-color: rgba(0, 0, 0, 0.2);
--blur-strength: 20px;
--transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
--transition-standard: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
--font-family: 'Plus Jakarta Sans', sans-serif;
}
/* Enhanced Scrollbar */
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.1);
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.2);
}
/* Base Layout */
body {
font-family: var(--font-family);
background: radial-gradient(circle at top right, var(--background-light), var(--background-dark));
color: var(--text-primary);
line-height: 1.6;
overflow: hidden;
}
/* Enhanced Navigation */
.nav-container {
position: fixed;
top: 0;
width: 100%;
height: 60px;
z-index: 1000;
}
.nav-blur {
position: absolute;
inset: 0;
background: rgba(10, 10, 20, 0.7);
backdrop-filter: blur(var(--blur-strength));
border-bottom: 1px solid var(--border-color);
}
.nav-content {
position: relative;
max-width: 1400px;
margin: 0 auto;
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20px;
}
/* Enhanced Brand */
.brand {
display: flex;
align-items: center;
gap: 12px;
}
.brand-icon {
position: relative;
width: 32px;
height: 32px;
border-radius: 8px;
background: var(--primary-gradient);
overflow: hidden;
}
.brand-animate {
position: absolute;
inset: 0;
background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
animation: shine 3s infinite;
}
/* Enhanced Message Bubbles */
.message-group {
display: flex;
gap: 16px;
margin-bottom: 24px;
opacity: 0;
transform: translateY(20px);
animation: messageAppear 0.5s forwards;
}
.avatar {
position: relative;
width: 40px;
height: 40px;
flex-shrink: 0;
}
.avatar-img {
width: 100%;
height: 100%;
border-radius: 12px;
background: var(--primary-gradient);
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
font-size: 14px;
color: white;
}
.avatar-status {
position: absolute;
bottom: -2px;
right: -2px;
width: 12px;
height: 12px;
border-radius: 50%;
background: #10b981;
border: 2px solid var(--background-dark);
}
.message {
position: relative;
max-width: 70%;
padding: 16px;
border-radius: 16px;
background: var(--surface-1);
border: 1px solid var(--border-color);
backdrop-filter: blur(var(--blur-strength));
}
.ai-message {
border-top-left-radius: 4px;
}
.user-message {
border-top-right-radius: 4px;
background: var(--surface-2);
}
.message-content {
color: var(--text-primary);
font-size: 15px;
line-height: 1.6;
}
.message-actions {
position: absolute;
right: -60px;
top: 50%;
transform: translateY(-50%);
display: flex;
flex-direction: column;
gap: 8px;
opacity: 0;
transition: var(--transition-standard);
}
.message:hover .message-actions {
opacity: 1;
}
.action-btn {
width: 32px;
height: 32px;
border-radius: 8px;
background: var(--surface-2);
border: 1px solid var(--border-color);
color: var(--text-secondary);
cursor: pointer;
transition: var(--transition-standard);
}
.action-btn:hover {
background: var(--surface-3);
color: var(--text-primary);
transform: translateY(-2px);
}
/* Enhanced Input Area */
.input-container {
position: relative;
margin-top: auto;
padding: 20px;
}
.input-blur {
position: absolute;
inset: 0;
background: rgba(10, 10, 20, 0.7);
backdrop-filter: blur(var(--blur-strength));
}
.inputs {
position: relative;
display: flex;
align-items: center;
gap: 12px;
padding: 12px 20px;
background: var(--surface-2);
border: 1px solid var(--border-color);
border-radius: 16px;
}
.text-box-container {
position: relative;
flex: 1;
display: flex;
align-items: center;
}
.text-box {
width: 100%;
background: none;
border: none;
outline: none;
color: var(--text-primary);
font-family: var(--font-family);
font-size: 15px;
line-height: 1.5;
max-height: 200px;
resize: none;
padding: 8px;
}
.text-box-actions {
display: flex;
gap: 8px;
padding-right: 8px;
}
/* Enhanced Animations */
@keyframes messageAppear {
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes shine {
from {
transform: translateX(-100%);
}
to {
transform: translateX(100%);
}
}
@keyframes pulse {
0% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
100% {
transform: scale(1);
}
}
/* Enhanced Button Styles */
.web-search,
.send-btn {
position: relative;
width: 40px;
height: 40px;
border-radius: 12px;
background: var(--surface-1);
border: 1px solid var(--border-color);
color: var(--text-secondary);
cursor: pointer;
transition: var(--transition-standard);
overflow: hidden;
}
.web-search:hover,
.send-btn:hover {
color: var(--text-primary);
transform: translateY(-2px);
}
.button-ripple {
position: absolute;
inset: 0;
background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
opacity: 0;
transform: scale(0);
transition: var(--transition-standard);
}
.web-search:hover .button-ripple,
.send-btn:hover .button-ripple {
opacity: 1;
transform: scale(2);
}
/* Enhanced Typing Indicator */
.typing-indicator {
display: none;
gap: 4px;
padding: 8px 16px;
background: var(--surface-1);
border: 1px solid var(--border-color);
border-radius: 20px;
position: absolute;
bottom: 100%;
left: 76px;
margin-bottom: 8px;
}
.typing-indicator.active {
display: flex;
}
.typing-indicator span {
width: 8px;
height: 8px;
background: var(--text-secondary);
border-radius: 50%;
animation: typing 1s infinite;
}
.typing-indicator span:nth-child(2) {
animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes typing {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-4px);
}
}
/* Enhanced Model Selector */
.model-selector {
position: relative;
width: 200px;
}
.models {
width: 100%;
padding: 10px 16px;
background: var(--surface-1);
border: 1px solid var(--border-color);
border-radius: 12px;
color: var(--text-primary);
font-family: var(--font-family);
font-size: 14px;
cursor: pointer;
transition: var(--transition-standard);
appearance: none;
}
.model-indicator {
position: absolute;
right: 12px;
top: 50%;
transform: translateY(-50%);
width: 8px;
height: 8px;
border-radius: 50%;
background: #10b981;
animation: pulse 2s infinite;
}
/* Enhanced Menu Items */
.chat-item {
display: flex;
align-items: center;
gap: 12px;
padding: 12px;
border-radius: 12px;
cursor: pointer;
transition: var(--transition-standard);
border: 1px solid transparent;
}
.chat-item:hover {
background: var(--surface-1);
border-color: var(--border-color);
transform: translateX(4px);
}
.chat-icon {
width: 32px;
height: 32px;
border-radius: 8px;
background: var(--surface-2);
display: flex;
align-items: center;
justify-content: center;
color: var(--text-secondary);
}
/* Code Block Styling */
.code-block {
position: relative;
margin: 16px 0;
background: var(--surface-1);
border-radius: 12px;
border: 1px solid var(--border-color);
overflow: hidden;
}
.code-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 16px;
background: var(--surface-2);
border-bottom: 1px solid var(--border-color);
}
.code-language {
font-size: 13px;
color: var(--text-secondary);
}
.code-copy {
padding: 4px 8px;
border-radius: 6px;
background: var(--surface-3);
border: none;
color: var(--text-secondary);
cursor: pointer;
transition: var(--transition-standard);
}
.code-copy:hover {
color: var(--text-primary);
background: var(--surface-1);
}
.code-content {
padding: 16px;
overflow-x: auto;
}
/* Enhanced Modal Animations */
.modal,
.settings-modal {
animation: modalFadeIn 0.3s forwards;
}
.modal-content,
.settings-content {
animation: modalSlideUp 0.3s forwards;
}
@keyframes modalFadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes modalSlideUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Message Markdown Styling */
.message-content pre {
margin: 16px 0;
white-space: pre-wrap;
}
.message-content p {
margin-bottom: 12px;
}
.message-content a {
color: var(--primary-color);
text-decoration: none;
border-bottom: 1px dashed currentColor;
}
.message-content img {
max-width: 100%;
border-radius: 8px;
margin: 16px 0;
}
/* Responsive Enhancements */
@media screen and (max-width: 768px) {
.message {
max-width: 85%;
}
.message-actions {
position: relative;
right: 0;
top: 0;
transform: none;
flex-direction: row;
justify-content: flex-end;
margin-top: 8px;
}
.model-selector {
width: 150px;
}
.brand-text {
display: none;
}
}
/* Dark Mode Transitions */
.theme-transition {
transition: background-color 0.5s ease,
color 0.5s ease,
border-color 0.5s ease;
}
/* Loading States */
.loading {
position: relative;
overflow: hidden;
}
.loading::after {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(90deg,
transparent,
rgba(255, 255, 255, 0.05),
transparent
);
animation: loading 1.5s infinite;
}
@keyframes loading {
from {
transform: translateX(-100%);
}
to {
transform: translateX(100%);
}
}
/* Message Grouping */
.message-group + .message-group {
margin-top: 24px;
}
.message + .message {
margin-top: 8px;
}
/* System Message Styling */
.system-message {
text-align: center;
padding: 8px 16px;
background: var(--surface-1);
border-radius: 20px;
font-size: 13px;
color: var(--text-secondary);
margin: 16px 0;
animation: systemMessage 0.3s forwards;
}
@keyframes systemMessage {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}