@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --hn-orange: #ff6600;
    --hn-bg: #f6f6ef;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--hn-bg);
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

.card-hover {
    transition: all 0.2s ease-in-out;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-color: var(--hn-orange);
}

.highlight {
    background-color: #ffeba1;
    border-radius: 2px;
    padding: 0 2px;
}

.spinner {
    border: 3px solid #e5e7eb;
    border-top: 3px solid var(--hn-orange);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Custom scrollbar for raw comments */
.raw-comment::-webkit-scrollbar {
    width: 6px;
}
.raw-comment::-webkit-scrollbar-track {
    background: #f1f1f1; 
}
.raw-comment::-webkit-scrollbar-thumb {
    background: #d1d5db; 
    border-radius: 3px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1; 
}
::-webkit-scrollbar-thumb {
    background: #d1d5db; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9ca3af; 
}

.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Modal Transitions */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.modal-backdrop.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

/* --- MARKDOWN RENDERING STYLES --- */
.markdown-content {
    color: #334155; /* slate-700 */
    line-height: 1.7;
}
.markdown-content > h1:first-child {
    margin-top: 0;
}
.markdown-content h1 {
    font-size: 1.875rem;
    font-weight: 800;
    color: #0f172a; /* slate-900 */
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}
.markdown-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b; /* slate-800 */
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}
.markdown-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #334155;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
.markdown-content p {
    margin-bottom: 1.25rem;
}
.markdown-content ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}
.markdown-content ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}
.markdown-content li {
    margin-bottom: 0.5rem;
}
.markdown-content strong {
    font-weight: 700;
    color: #0f172a;
}
.markdown-content blockquote {
    border-left: 4px solid #ff6600;
    background-color: #fff7ed; /* orange-50 */
    padding: 1rem;
    font-style: italic;
    border-radius: 0 0.5rem 0.5rem 0;
    margin-bottom: 1.5rem;
    color: #475569;
}
.markdown-content code {
    font-family: 'JetBrains Mono', monospace;
    background-color: #f1f5f9; /* slate-100 */
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    color: #be185d; /* pink-700 */
}
.markdown-content pre {
    background-color: #0f172a; /* slate-900 */
    color: #f8fafc;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}
.markdown-content pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}
.markdown-content a {
    color: #ff6600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.markdown-content a:hover {
    color: #c2410c;
}
.markdown-content hr {
    border-color: #e2e8f0;
    margin: 2rem 0;
}
