/* Override any light backgrounds on code blocks */
.prose .codehilite,
.prose .highlight,
.prose pre {
    background-color: #2d2d2d !important;
    color: #f8f8f2 !important;
}

.prose .codehilite code,
.prose .highlight code,
.prose pre code {
    background-color: transparent !important;
    color: #f8f8f2 !important;
}

/* Ensure syntax highlighting works properly */
.prose .codehilite pre {
    background-color: #2d2d2d !important;
    margin: 0;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
}

/* Fix for any markdown-generated code blocks */
.prose .highlight pre,
.prose .codehilite pre {
    background-color: #2d2d2d !important;
    color: #f8f8f2 !important;
}



/* Custom styles for the blog */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}


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

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Hover effects for cards */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
}

/* Typography improvements */
.prose h1::before,
.prose h2::before,
.prose h3::before {
    content: "#";
    color: #3b82f6;
    margin-right: 0.5rem;
    font-weight: normal;
}

/* Responsive images in content */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* Table styles */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.prose table th,
.prose table td {
    border: 1px solid #e5e7eb;
    padding: 0.5rem 1rem;
    text-align: left;
}

.prose table th {
    background-color: #f3f4f6;
    font-weight: bold;
}

/* Mobile menu animation */
[x-cloak] {
    display: none !important;
}


/* Apply to pre and code inside .codehilite */
.codehilite, 
.codehilite pre, 
.codehilite code {
  background-color: #2d2d2d !important;
  color: #f8f8f2 !important;
  font-family: 'Fira Code', monospace;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
}


p code, li code {
  background-color: #444;
  color: #f8f8f2;
  padding: 0.15em 0.3em;
  border-radius: 0.3rem;
  font-family: 'Fira Code', monospace;
}


.codehilite {
  background-color: #2d2d2d !important;
  color: #f8f8f2 !important;
  font-family: 'Fira Code', monospace;
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.codehilite pre {
  margin: 0;
  background: transparent !important;
  color: inherit !important;
  font-family: inherit;
}

.codehilite code {
  background: transparent !important;
  color: inherit !important;
}



/* Code block base style */
pre, code {
  background-color: #1e1e1e;   /* dark background */
  color: #f8f8f2;              /* light text */
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.95rem;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.6;
}

/* Prevent long lines from breaking layout */
pre {
  white-space: pre;
}
