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

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

.prose {
    line-height: 1.75;
}

.prose p {
    margin-bottom: 1.25em;
}

.prose h1, .prose h2, .prose h3 {
    margin-top: 2em;
    margin-bottom: 1em;
    font-weight: 600;
}

.prose h1 {
    font-size: 1.5em;
}

.prose h2 {
    font-size: 1.25em;
}

.prose h3 {
    font-size: 1.125em;
}

.prose ul, .prose ol {
    margin: 1.25em 0;
    padding-left: 1.625em;
}

.prose li {
    margin: 0.5em 0;
}

.typewriter-cursor::after {
    content: '|';
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Code block styling */
.hljs {
    background: #1e293b !important;
    border-radius: 0 0 8px 8px;
}

pre {
    margin: 0 !important;
    background: #1e293b !important;
}

code {
    font-family: 'Fira Code', monospace !important;
    font-size: 0.875rem;
}

/* Grammar highlighting */
.grammar-highlight {
    background-color: #fef3c7;
    padding: 1px 2px;
    border-radius: 2px;
    cursor: pointer;
}

.grammar-highlight:hover {
    background-color: #fde68a;
}

/* Hashtag styling */
.hashtag {
    color: #3b82f6;
    font-weight: 600;
}

.hashtag:hover {
    color: #1d4ed8;
}

/* Dark mode overrides */
.dark .bg-white {
    background-color: #1f2937;
}

.dark .text-gray-900 {
    color: #f9fafb;
}

.dark .text-gray-800 {
    color: #e5e7eb;
}

.dark .text-gray-700 {
    color: #d1d5db;
}

.dark .text-gray-600 {
    color: #9ca3af;
}

.dark .text-gray-500 {
    color: #6b7280;
}

.dark .border-gray-200 {
    border-color: #374151;
}

.dark .border-gray-300 {
    border-color: #4b5563;
}

.dark .bg-gray-100 {
    background-color: #374151;
}

.dark .bg-gray-50 {
    background-color: #111827;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .prose {
        font-size: 0.875rem;
    }
    
    .grid-cols-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Loading animations */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

/* Smooth transitions */
.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-shadow {
    transition-property: box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Focus states */
input:focus, textarea:focus, select:focus {
    outline: none;
    ring-width: 2px;
    ring-color: #2563eb;
    border-color: transparent;
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

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

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

.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}