erowid-bot/app/static/style.css

327 lines
5.8 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--bg-primary: #0a0a0f;
--bg-secondary: #12121a;
--bg-tertiary: #1a1a2e;
--text-primary: #e0e0e8;
--text-secondary: #8888a0;
--accent: #6c5ce7;
--accent-glow: rgba(108, 92, 231, 0.3);
--user-bg: #2d2d44;
--bot-bg: #1a1a2e;
--border: #2a2a3e;
--danger: #e74c3c;
--success: #2ecc71;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
height: 100vh;
display: flex;
flex-direction: column;
overflow: hidden;
}
/* Header */
.header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 20px;
background: var(--bg-secondary);
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.header-left {
display: flex;
align-items: center;
gap: 12px;
}
.logo {
font-size: 24px;
font-weight: 700;
background: linear-gradient(135deg, var(--accent), #a29bfe);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.tagline {
font-size: 12px;
color: var(--text-secondary);
letter-spacing: 0.5px;
}
.stats-badge {
font-size: 11px;
color: var(--text-secondary);
background: var(--bg-tertiary);
padding: 4px 10px;
border-radius: 12px;
border: 1px solid var(--border);
}
/* Chat area */
.chat-container {
flex: 1;
overflow-y: auto;
padding: 20px;
scroll-behavior: smooth;
}
.chat-container::-webkit-scrollbar {
width: 6px;
}
.chat-container::-webkit-scrollbar-track {
background: transparent;
}
.chat-container::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 3px;
}
.welcome {
text-align: center;
padding: 60px 20px;
max-width: 600px;
margin: 0 auto;
}
.welcome h2 {
font-size: 22px;
margin-bottom: 12px;
color: var(--text-primary);
}
.welcome p {
color: var(--text-secondary);
line-height: 1.6;
margin-bottom: 20px;
font-size: 14px;
}
.suggestions {
display: flex;
flex-wrap: wrap;
gap: 8px;
justify-content: center;
}
.suggestion {
background: var(--bg-tertiary);
border: 1px solid var(--border);
color: var(--text-secondary);
padding: 8px 14px;
border-radius: 20px;
font-size: 13px;
cursor: pointer;
transition: all 0.2s;
}
.suggestion:hover {
border-color: var(--accent);
color: var(--text-primary);
background: rgba(108, 92, 231, 0.1);
}
/* Messages */
.message {
display: flex;
gap: 12px;
margin-bottom: 16px;
max-width: 800px;
margin-left: auto;
margin-right: auto;
animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
.message.user {
flex-direction: row-reverse;
}
.message-avatar {
width: 32px;
height: 32px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
flex-shrink: 0;
}
.message.user .message-avatar {
background: var(--user-bg);
}
.message.assistant .message-avatar {
background: var(--accent);
}
.message-content {
padding: 10px 16px;
border-radius: 12px;
max-width: 75%;
line-height: 1.6;
font-size: 14px;
white-space: pre-wrap;
word-wrap: break-word;
}
.message.user .message-content {
background: var(--user-bg);
border-bottom-right-radius: 4px;
}
.message.assistant .message-content {
background: var(--bot-bg);
border: 1px solid var(--border);
border-bottom-left-radius: 4px;
}
.message-content p {
margin-bottom: 8px;
}
.message-content p:last-child {
margin-bottom: 0;
}
.message-content strong {
color: #a29bfe;
}
.message-content code {
background: rgba(108, 92, 231, 0.15);
padding: 1px 5px;
border-radius: 3px;
font-size: 13px;
}
/* Typing indicator */
.typing {
display: flex;
gap: 4px;
padding: 4px 0;
}
.typing span {
width: 6px;
height: 6px;
background: var(--text-secondary);
border-radius: 50%;
animation: bounce 1.4s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
0%, 60%, 100% { transform: translateY(0); }
30% { transform: translateY(-6px); }
}
/* Input area */
.input-container {
padding: 16px 20px;
background: var(--bg-secondary);
border-top: 1px solid var(--border);
flex-shrink: 0;
}
.input-wrapper {
display: flex;
gap: 10px;
max-width: 800px;
margin: 0 auto;
}
#message-input {
flex: 1;
background: var(--bg-tertiary);
border: 1px solid var(--border);
color: var(--text-primary);
padding: 12px 16px;
border-radius: 12px;
font-size: 14px;
font-family: inherit;
resize: none;
outline: none;
min-height: 44px;
max-height: 120px;
transition: border-color 0.2s;
}
#message-input:focus {
border-color: var(--accent);
box-shadow: 0 0 0 2px var(--accent-glow);
}
#message-input::placeholder {
color: var(--text-secondary);
}
#send-btn {
background: var(--accent);
color: white;
border: none;
width: 44px;
height: 44px;
border-radius: 12px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
flex-shrink: 0;
}
#send-btn:hover {
background: #5b4bd5;
transform: scale(1.05);
}
#send-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
}
#send-btn svg {
width: 18px;
height: 18px;
}
.disclaimer {
text-align: center;
font-size: 11px;
color: var(--text-secondary);
margin-top: 8px;
max-width: 800px;
margin-left: auto;
margin-right: auto;
}
/* Mobile */
@media (max-width: 640px) {
.header { padding: 10px 14px; }
.chat-container { padding: 12px; }
.message-content { max-width: 85%; font-size: 13px; }
.input-container { padding: 10px 14px; }
.suggestions { gap: 6px; }
.suggestion { font-size: 12px; padding: 6px 12px; }
}