:root { --bg-dark: #020617; --primary: #0ea5e9; }
body { font-family: 'Outfit', sans-serif; background-color: var(--bg-dark); color: #e2e8f0; overscroll-behavior-y: none; overflow: hidden; }

/* Aurora Canvas Background */
.aurora-bg { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; background: var(--bg-dark); overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.3; animation: float 20s infinite ease-in-out; }
.orb-1 { width: 60vw; height: 60vw; background: #4338ca; top: -20%; left: -20%; }
.orb-2 { width: 50vw; height: 50vw; background: #0ea5e9; bottom: -20%; right: -20%; animation-delay: -5s; }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -30px); } }

/* Glass UI */
.glass-panel { background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, 0.08); }
.sidebar-glass { background: rgba(2, 6, 23, 0.95); backdrop-filter: blur(20px); border-right: 1px solid rgba(255, 255, 255, 0.05); }

/* Chat Bubbles */
.user-msg { background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%); border-radius: 1.5rem 1.5rem 0 1.5rem; box-shadow: 0 4px 20px rgba(37, 99, 235, 0.2); }
.ai-msg { background: rgba(30, 41, 59, 0.6); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 1.5rem 1.5rem 1.5rem 0; }

/* Updated Markdown & Math Styles for Code Blocks */
.code-block-wrapper { background: #0d1117; border-radius: 0.75rem; margin: 1rem 0; border: 1px solid #30363d; overflow: hidden; }
.code-header { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 1rem; background: #161b22; border-bottom: 1px solid #30363d; }
.prose pre { background: transparent !important; padding: 1rem; margin: 0; border: none; overflow-x: auto; border-radius: 0; }
.prose code { font-family: 'JetBrains Mono', monospace; font-size: 0.85em; color: #e2e8f0; }
.prose p { margin-bottom: 0.5rem; line-height: 1.6; }
.katex { font-size: 1.1em; color: #bae6fd; }

/* Utilities */
.mobile-safe-height { height: 100dvh; }
.cursor { display: inline-block; width: 8px; height: 16px; background: #38bdf8; margin-left: 2px; animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.active-chat { background: linear-gradient(90deg, rgba(14, 165, 233, 0.1), transparent); border-left: 2px solid #0ea5e9; }

/* Context Menu for Delete */
#context-menu {
    position: absolute;
    z-index: 100;
    display: none;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    animation: menuFade 0.2s ease-out;
}
@keyframes menuFade { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* Typing dots */
.typing-dots { display:flex; gap:4px; align-items:center; }
.typing-dots span {
    width:6px; height:6px; background:#94a3b8; border-radius:50%;
    animation:bounce 1.4s infinite;
}
.typing-dots span:nth-child(2){animation-delay:0.2s;}
.typing-dots span:nth-child(3){animation-delay:0.4s;}
@keyframes bounce {
    0%,80%,100%{transform:scale(0);opacity:0.5;}
    40%{transform:scale(1);opacity:1;}
}
