/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Markdown Styles Override */
.prose h1 {
    color: #0f172a;
    font-weight: 800;
}

.prose h2 {
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

.prose a {
    color: #3b82f6;
    text-decoration: none;
}

.prose a:hover {
    text-decoration: underline;
}

.prose blockquote {
    border-left-color: #3b82f6;
    background-color: #eff6ff;
    padding: 1rem;
    font-style: italic;
}

/* Loader */
.loader {
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top: 3px solid #3b82f6;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Canvas Prose Overrides (Dark Mode) */
.prose-invert h1,
.prose-invert h2,
.prose-invert h3 {
    color: #e2e8f0;
    border-bottom: 1px solid #334155;
    padding-bottom: 0.5rem;
    margin-top: 1.5rem;
}

.prose-invert p,
.prose-invert li {
    color: #cbd5e1;
}

.prose-invert a {
    color: #60a5fa;
}

.prose-invert blockquote {
    border-left-color: #3b82f6;
    background: #1e293b;
    padding: 1rem;
}

.prose-invert code {
    background: #1e293b;
    color: #f472b6;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
}

/* Search Highlight */
.search-highlight {
    background-color: #facc15;
    color: #0f172a;
    padding: 0 2px;
    border-radius: 2px;
}