StudyAssist / src /index.css
sanch1tx's picture
Upload 24 files
1ccbe7c verified
@tailwind base;
@tailwind components;
@tailwind utilities;
:root {
--primary-bg: #f3f4f6;
--secondary-bg: #ffffff;
--text-primary: #1f2937;
--text-secondary: #4b5563;
--accent-color: #3b82f6;
}
body {
background-color: var(--primary-bg);
font-family: 'Inter', sans-serif;
color: var(--text-primary);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* Responsive container */
.container {
width: 100%;
max-width: 100vw;
margin: 0 auto;
padding: 0 0.5rem;
}
@media (min-width: 640px) {
.container {
padding: 0 1rem;
}
}
@media (min-width: 1024px) {
.container {
padding: 0 1.5rem;
}
}
/* Custom scrollbar styles */
.custom-scrollbar {
scrollbar-width: thin;
scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
}
.custom-scrollbar::-webkit-scrollbar {
width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
background-color: rgba(156, 163, 175, 0.5);
border-radius: 2px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
background-color: rgba(156, 163, 175, 0.8);
}
.no-scrollbar {
-ms-overflow-style: none;
scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
display: none;
}
/* Chat message styles */
.chat-message {
@apply p-4 rounded-lg mb-4 break-words;
max-width: 800px;
width: 100%;
animation: fade-up 0.3s ease-out forwards;
}
.chat-message.user {
@apply bg-blue-50 ml-auto;
}
.chat-message.assistant {
@apply bg-white mr-auto;
}
/* Input area styles */
.input-area {
@apply fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 p-4;
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
}
@media (min-width: 768px) {
.input-area {
@apply p-6;
}
}
/* Message container */
.messages-container {
@apply pb-32 md:pb-40;
min-height: calc(100vh - 200px);
}
/* Responsive text sizes */
.text-responsive {
font-size: clamp(0.875rem, 2vw, 1rem);
}
/* Mobile optimizations */
@media (max-width: 640px) {
.chat-message {
max-width: 95%;
@apply p-3;
}
.input-area {
@apply p-3;
}
.messages-container {
@apply pb-28;
}
}
/* Touch-friendly buttons */
.touch-button {
@apply p-2 rounded-lg transition-colors;
min-height: 44px;
min-width: 44px;
}
/* Loading animation */
@keyframes loading-dot {
0%, 80%, 100% {
opacity: 0;
}
40% {
opacity: 1;
}
}
.loading-dot {
@apply w-2 h-2 bg-gray-400 rounded-full mx-1;
animation: loading-dot 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; }
/* KaTeX Math Styles */
.katex {
font-size: 1.1em !important;
}
.katex-display {
overflow-x: auto;
overflow-y: hidden;
padding: 0.5em 0;
margin: 0.5em 0 !important;
}
.katex-display > .katex {
white-space: normal;
}
.katex-inline {
padding: 0 0.2em;
}
/* Dark mode support */
@media (prefers-color-scheme: dark) {
:root {
--primary-bg: #1a1a1a;
--secondary-bg: #2d2d2d;
--text-primary: #ffffff;
--text-secondary: #a1a1aa;
}
body {
background-color: var(--primary-bg);
color: var(--text-primary);
}
.chat-message.user {
@apply bg-blue-900/20;
}
.chat-message.assistant {
@apply bg-gray-800;
}
.input-area {
@apply bg-gray-900 border-gray-700;
}
.prose-invert .katex {
color: white !important;
}
.prose-invert .katex .mord,
.prose-invert .katex .mbin,
.prose-invert .katex .mrel,
.prose-invert .katex .mopen,
.prose-invert .katex .mclose,
.prose-invert .katex .mpunct,
.prose-invert .katex .minner {
color: white !important;
}
}
/* Replace glow effect with neon effect */
.neon-hover {
transition: box-shadow 0.3s ease-in-out;
}
.neon-hover:hover {
box-shadow: 0 0 5px rgba(66, 153, 225, 0.5),
0 0 10px rgba(66, 153, 225, 0.4),
0 0 15px rgba(66, 153, 225, 0.3),
0 0 20px rgba(66, 153, 225, 0.2);
}
@keyframes slide-up {
from {
transform: translateY(100%);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
.animate-slide-up {
animation: slide-up 0.3s ease-out forwards;
}
@keyframes fade-up {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes bounce-subtle {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-10px);
}
}
.animate-fade-up {
animation: fade-up 0.6s ease-out forwards;
}
.animate-bounce-subtle {
animation: bounce-subtle 2s ease-in-out infinite;
}
.animate-loading-dot {
animation: loading-dot 1.4s infinite ease-in-out both;
}
@keyframes shine {
from {
-webkit-mask-position: 150%;
}
to {
-webkit-mask-position: -50%;
}
}
.animate-shine {
mask-image: linear-gradient(
-75deg,
rgba(0,0,0,.6) 30%,
#000 50%,
rgba(0,0,0,.6) 70%
);
-webkit-mask-image: linear-gradient(
-75deg,
rgba(0,0,0,.6) 30%,
#000 50%,
rgba(0,0,0,.6) 70%
);
mask-size: 200%;
-webkit-mask-size: 200%;
animation: shine 2s infinite;
}