MANIT_Chat / client /style.css
WizardCoder2007's picture
first commit
2e9afea
Raw
History Blame Contribute Delete
9.81 kB
/* ==========================================================================
MANIT Chat — Sleek Minimalist Stylesheet
========================================================================== */
/* --- Theme Variables --- */
:root {
--bg-primary: #FFFFFF;
--text-primary: #000000;
--bg-secondary: #F3F4F6;
--border-color: #E5E7EB;
--placeholder-color: #9CA3AF;
--max-width: 768px;
--transition-speed: 0.2s;
--font-ui: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
--font-heading: 'Caveat', cursive;
}
/* --- Base Resets & Layout --- */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html, body {
height: 100dvh;
background-color: var(--bg-primary);
color: var(--text-primary);
font-family: var(--font-ui);
overflow: hidden;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* --- Layout Container --- */
.app-container {
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
max-width: var(--max-width);
margin: 0 auto;
background-color: var(--bg-primary);
position: relative;
}
/* --- Header Section --- */
.app-header {
height: 80px;
display: flex;
align-items: center;
justify-content: center;
border-bottom: 1px solid var(--bg-secondary);
padding: 0 24px;
background-color: var(--bg-primary);
z-index: 10;
}
.header-content {
text-align: center;
}
.header-title {
font-family: var(--font-heading);
font-size: 2.4rem;
font-weight: 700;
line-height: 1;
letter-spacing: -0.01em;
}
.header-subtitle {
font-size: 0.72rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.15em;
color: #4B5563;
margin-top: 4px;
}
/* --- Chat Scroll Area --- */
.chat-area {
flex: 1;
overflow-y: auto;
padding: 24px;
scroll-behavior: smooth;
display: flex;
flex-direction: column;
}
/* Custom Minimalist Scrollbar */
.chat-area::-webkit-scrollbar {
width: 6px;
}
.chat-area::-webkit-scrollbar-track {
background: transparent;
}
.chat-area::-webkit-scrollbar-thumb {
background: #E5E7EB;
border-radius: 9999px;
}
.chat-area::-webkit-scrollbar-thumb:hover {
background: #D1D5DB;
}
/* Chat inner wrapper to help layout flow */
.chat-wrapper {
display: flex;
flex-direction: column;
gap: 24px;
margin-top: auto; /* Pushes content down if chat list is short */
justify-content: flex-end;
}
/* --- Message Bubbles --- */
.message {
max-width: 85%;
font-size: 0.95rem;
line-height: 1.6;
animation: fadeInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
opacity: 0;
transform: translateY(8px);
}
.message-content {
word-break: break-word;
white-space: pre-wrap;
}
.bot-message .message-content {
white-space: normal;
}
/* --- Markdown Styling in Bot Messages --- */
.bot-message .message-content p {
margin-bottom: 0.8em;
}
.bot-message .message-content p:last-child {
margin-bottom: 0;
}
.bot-message .message-content ul,
.bot-message .message-content ol {
margin-bottom: 0.8em;
padding-left: 20px;
}
.bot-message .message-content li {
margin-bottom: 0.4em;
list-style-position: outside;
}
.bot-message .message-content li:last-child {
margin-bottom: 0;
}
.bot-message .message-content ul {
list-style-type: disc;
}
.bot-message .message-content ul ul {
list-style-type: circle;
margin-top: 0.4em;
margin-bottom: 0;
}
.bot-message .message-content ul ul ul {
list-style-type: square;
}
.bot-message .message-content ol {
list-style-type: decimal;
}
.bot-message .message-content h1,
.bot-message .message-content h2,
.bot-message .message-content h3,
.bot-message .message-content h4,
.bot-message .message-content h5,
.bot-message .message-content h6 {
margin-top: 1em;
margin-bottom: 0.5em;
font-weight: 600;
line-height: 1.25;
}
.bot-message .message-content a {
color: #2563EB;
text-decoration: underline;
}
.bot-message .message-content a:hover {
color: #1D4ED8;
}
.bot-message .message-content blockquote {
border-left: 4px solid var(--border-color);
padding-left: 12px;
color: #4B5563;
font-style: italic;
margin-bottom: 0.8em;
}
.bot-message .message-content code {
background-color: var(--bg-secondary);
padding: 2px 6px;
border-radius: 4px;
font-family: monospace;
font-size: 0.9em;
}
.bot-message .message-content pre {
background-color: var(--bg-secondary);
padding: 12px;
border-radius: 8px;
overflow-x: auto;
margin-bottom: 0.8em;
}
.bot-message .message-content pre code {
background-color: transparent;
padding: 0;
border-radius: 0;
}
/* --- Markdown Tables --- */
.bot-message .message-content table {
width: 100%;
border-collapse: collapse;
margin-top: 0.8em;
margin-bottom: 0.8em;
font-size: 0.9em;
}
.bot-message .message-content th,
.bot-message .message-content td {
border: 1px solid var(--border-color);
padding: 8px 12px;
text-align: left;
}
.bot-message .message-content th {
background-color: var(--bg-secondary);
font-weight: 600;
}
.bot-message .message-content tr:nth-child(even) {
background-color: rgba(0, 0, 0, 0.02);
}
/* --- Markdown Images --- */
.bot-message .message-content img {
max-width: 100%;
height: auto;
border-radius: 8px;
margin: 8px 0;
}
/* User Message Specifics */
.user-message {
align-self: flex-end;
background-color: var(--bg-secondary);
color: var(--text-primary);
border-radius: 18px 18px 4px 18px;
padding: 12px 18px;
max-width: 75%;
}
/* Bot Message Specifics */
.bot-message {
align-self: flex-start;
background-color: var(--bg-primary);
color: var(--text-primary);
border: none;
padding: 12px 0;
max-width: 88%;
}
/* Cursive Accent within Bot Responses (e.g. key subheaders) */
.bot-message .academic-quote,
.bot-message .academic-heading {
font-family: var(--font-heading);
font-size: 1.55rem;
display: block;
margin: 14px 0 6px 0;
line-height: 1.2;
font-weight: 700;
}
.bot-message .academic-heading:first-child {
margin-top: 0;
}
/* --- Typing Stream Effect --- */
.typing::after {
content: '';
display: inline-block;
width: 8px;
height: 8px;
background-color: var(--text-primary);
border-radius: 50%;
margin-left: 5px;
animation: blink 0.75s step-end infinite;
vertical-align: middle;
}
@keyframes blink {
from, to { opacity: 0; }
50% { opacity: 1; }
}
/* --- Loading Indicator --- */
.loading-bubble {
align-self: flex-start;
display: flex;
align-items: center;
gap: 8px;
padding: 12px 0;
color: var(--text-primary);
font-family: var(--font-ui);
font-size: 0.9rem;
}
.loading-dots {
display: flex;
gap: 4px;
margin-right: 6px;
}
.loading-dot {
width: 6px;
height: 6px;
background-color: var(--text-primary);
border-radius: 50%;
animation: pulseDot 1.4s infinite ease-in-out both;
}
.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
.loading-text-span {
font-style: italic;
opacity: 0.6;
transition: opacity 0.3s ease-in-out;
}
.loading-text-span.fade-out {
opacity: 0;
}
/* --- Bottom Input Area --- */
.input-area {
padding: 16px 24px 28px 24px;
background-color: var(--bg-primary);
}
.input-form {
display: flex;
align-items: center;
background-color: var(--bg-secondary);
border-radius: 9999px;
padding: 4px 6px 4px 18px;
border: 1.5px solid transparent;
transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}
.input-form:focus-within {
border-color: var(--text-primary);
background-color: var(--bg-primary);
box-shadow: 0 0 0 1px var(--text-primary);
}
.chat-input {
flex: 1;
border: none;
background: transparent;
outline: none;
padding: 12px 0;
font-family: var(--font-ui);
font-size: 0.95rem;
color: var(--text-primary);
}
.chat-input::placeholder {
color: var(--placeholder-color);
font-weight: 400;
}
.send-button {
background: transparent;
border: none;
outline: none;
width: 42px;
height: 42px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
color: var(--text-primary);
opacity: 0.35;
transition: opacity var(--transition-speed), transform var(--transition-speed), background-color var(--transition-speed);
}
.input-form:focus-within .send-button,
.send-button.active {
opacity: 1;
}
.send-button:hover {
transform: scale(1.05);
background-color: rgba(0, 0, 0, 0.04);
}
.send-button:active {
transform: scale(0.95);
}
.send-icon {
width: 18px;
height: 18px;
transform: rotate(0deg);
transition: transform var(--transition-speed);
}
.send-button:hover .send-icon {
transform: translate(2px, -2px);
}
/* --- Animations --- */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes pulseDot {
0%, 80%, 100% {
transform: scale(0);
opacity: 0.3;
}
40% {
transform: scale(1.0);
opacity: 1;
}
}
/* --- Responsive Adjustments --- */
@media (max-width: 640px) {
.app-header {
height: 72px;
}
.header-title {
font-size: 2.1rem;
}
.chat-area {
padding: 16px;
}
.input-area {
padding: 12px 16px 20px 16px;
}
.message {
max-width: 90%;
}
}