[x-cloak] { display: none !important; }

.scrollbar-thin::-webkit-scrollbar           { width: 6px; }
.scrollbar-thin::-webkit-scrollbar-track     { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb     { background: #d1d5db; border-radius: 3px; }
.scrollbar-thin::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
.scrollbar-dark::-webkit-scrollbar           { width: 6px; }
.scrollbar-dark::-webkit-scrollbar-track     { background: transparent; }
.scrollbar-dark::-webkit-scrollbar-thumb     { background: #4b5563; border-radius: 3px; }
.scrollbar-dark::-webkit-scrollbar-thumb:hover { background: #6b7280; }

.input-textarea {
    resize: none;
    min-height: 44px;
    max-height: 200px;
    overflow-y: auto;
    line-height: 1.5;
    overflow-wrap: break-word;
    word-break: break-word;
}

.msg-content {
    overflow-wrap: break-word;
    word-break: break-word;
}

.loading-dots span {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #9ca3af;
    animation: dot-bounce 1.4s ease-in-out infinite both;
}
.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes dot-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
@keyframes msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.msg-animate { animation: msg-in 0.25s ease-out; }

@media (max-width: 767px) {
    .sidebar-overlay {
        background: rgba(0,0,0,.5);
        backdrop-filter: blur(2px);
    }
}
.msg-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 12px 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 8px 0;
}
.msg-content code {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;
    font-size: 0.875em;
}
.msg-content :not(pre) > code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    color: #374151;
}
.msg-content p { margin: 4px 0; }
.msg-content ul, .msg-content ol { padding-left: 1.5em; margin: 4px 0; }
.msg-content blockquote {
    border-left: 3px solid #d1d5db;
    padding-left: 12px;
    color: #6b7280;
    margin: 8px 0;
}