body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#chat-stream::-webkit-scrollbar,
#knowledge-list::-webkit-scrollbar {
    width: 6px;
}

#chat-stream::-webkit-scrollbar-thumb,
#knowledge-list::-webkit-scrollbar-thumb {
    background-color: rgba(148, 163, 184, 0.4);
    border-radius: 9999px;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-fade-in {
    animation: fade-in 0.3s ease-out;
}

/* Loading spinner for real-time status */
.loading-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

.quick-reply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

#user-message {
    resize: none;
    min-height: 3rem;
    max-height: 8rem;
    transition: height 0.2s ease;
}

#typing-indicator {
    animation: fade-in 0.2s ease-out;
}

/* Markdown styling for chat messages */
.prose h1 {
    color: #f1f5f9;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem 0;
    line-height: 1.3;
}

.prose h2 {
    color: #f1f5f9;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0.75rem 0 0.5rem 0;
    line-height: 1.3;
}

.prose h3 {
    color: #f1f5f9;
    font-size: 1rem;
    font-weight: 600;
    margin: 0.5rem 0 0.25rem 0;
    line-height: 1.3;
}

.prose strong {
    color: #f1f5f9;
    font-weight: 600;
}

.prose em {
    color: #cbd5e1;
    font-style: italic;
}

.prose code {
    background-color: #334155;
    color: #e2e8f0;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

.prose pre {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 0.5rem 0;
}

.prose pre code {
    background-color: transparent;
    padding: 0;
}

.prose ul, .prose ol {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.prose li {
    margin: 0.25rem 0;
}

.prose p {
    margin: 0.5rem 0;
    line-height: 1.5;
}

.prose blockquote {
    border-left: 4px solid #475569;
    padding-left: 1rem;
    margin: 0.5rem 0;
    color: #94a3b8;
    font-style: italic;
}

.prose a {
    color: #22d3ee;
    text-decoration: underline;
    text-decoration-color: rgba(34, 211, 238, 0.3);
}

.prose a:hover {
    text-decoration-color: rgba(34, 211, 238, 0.8);
}

/* Glass Logo Effect */
.glass-logo-container {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-logo {
    width: 140px;
    height: 140px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 8px 32px rgba(59, 130, 246, 0.6));
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 12px 40px rgba(59, 130, 246, 0.8));
}

.glass-reflection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    z-index: 3;
    pointer-events: none;
}

.glass-shine {
    position: absolute;
    top: -30%;
    left: -30%;
    width: 60%;
    height: 60%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.6), rgba(59, 130, 246, 0.4), transparent);
    border-radius: 50%;
    z-index: 4;
    pointer-events: none;
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0%, 100% {
        opacity: 0;
        transform: translate(-30%, -30%) scale(0.6);
    }
    50% {
        opacity: 1;
        transform: translate(40%, 40%) scale(1.4);
    }
}

/* Loading Spinner with Logo */
.glass-spinner {
    width: 150px;
    height: 150px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.3);
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 0 30px rgba(59, 130, 246, 0.3),
        inset 0 0 30px rgba(255, 255, 255, 0.1);
}

.glass-spinner::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top: 2px solid rgba(59, 130, 246, 0.8);
    border-right: 2px solid rgba(16, 185, 129, 0.6);
    animation: spinner-spin 2s linear infinite;
}

.spinning-logo {
    width: 90px;
    height: 90px;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5));
    z-index: 2;
    position: relative;
}

@keyframes spinner-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}



/* Pulse animation for connection text */
.animate-pulse-custom {
    animation: pulse-custom 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-custom {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
