/* Custom styles for the application */
body {
    font-family: 'Inter', sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    position: relative;
}

/* Background Image Styling */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Optimized with Cloudflare Image Resizing */
    background-image: url('/cdn-cgi/image/width=1280,format=auto,quality=75/BookImageTransparent.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

/* Style for the loading spinner */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #8a2be2;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 0 rgba(138, 43, 226, 0));
        box-shadow: 0 0 0 0 rgba(138, 43, 226, 0); /* Added for Mobile */
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(138, 43, 226, 0.8));
        box-shadow: 0 0 10px 0 rgba(138, 43, 226, 0.6); /* Added for Mobile */
    }
}
.help-highlight {
    animation: pulse-glow 2s infinite;
    color: #d8b4fe !important;
    /* Optional: Forces the phone's GPU to handle the animation, improving performance */
    will-change: filter, box-shadow;
    transform: translateZ(0);
}
.help-highlight:hover {
    color: white !important;
}
/* Custom scrollbar for better aesthetics */
pre::-webkit-scrollbar,
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}
pre::-webkit-scrollbar-track,
.custom-scrollbar::-webkit-scrollbar-track {
    background: #2c2c2c;
    border-radius: 10px;
}
pre::-webkit-scrollbar-thumb,
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 10px;
}
pre::-webkit-scrollbar-thumb:hover,
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Markdown Styles */
.markdown-body {
    font-family: 'Inter', sans-serif !important;
    white-space: normal !important;
}
.markdown-body h1 {
    font-size: 1.5em;
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 0.5em;
    color: #fff;
    border-bottom: 1px solid #4b5563;
    padding-bottom: 0.3em;
}
.markdown-body h2 {
    font-size: 1.3em;
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 0.5em;
    color: #e5e7eb;
}
.markdown-body h3 {
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 0.5em;
    color: #d1d5db;
}
.markdown-body p {
    margin-bottom: 1em;
    line-height: 1.6;
}
.markdown-body ul, .markdown-body ol {
    margin-bottom: 1em;
    padding-left: 2em;
    list-style-type: disc;
}
.markdown-body li {
    margin-bottom: 0.25em;
}
.markdown-body blockquote {
    border-left: 4px solid #8a2be2;
    padding-left: 1em;
    color: #9ca3af;
    margin-bottom: 1em;
    font-style: italic;
}
.markdown-body table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1em;
}
.markdown-body th, .markdown-body td {
    border: 1px solid #4b5563;
    padding: 0.5em;
    text-align: left;
}
.markdown-body th {
    background-color: #374151;
    font-weight: bold;
}
.markdown-body strong {
    color: #f3f4f6;
    font-weight: bold;
}
.markdown-body em {
    font-style: italic;
}
