.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.8;
}

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

.prose h1, .prose h2, .prose h3 {
    margin-top: 2.5em;
    margin-bottom: 1em;
    font-weight: 700;
    font-family: 'Roboto Condensed', sans-serif;
}

.prose h1 {
    font-size: 1.75em;
    color: #dc2626;
}

.prose h2 {
    font-size: 1.5em;
    color: #1e40af;
}

.prose h3 {
    font-size: 1.25em;
    color: #374151;
}

.prose ul, .prose ol {
    margin: 1.5em 0;
    padding-left: 2em;
}

.prose li {
    margin: 0.75em 0;
}

.prose strong {
    font-weight: 700;
    color: #dc2626;
}

.prose em {
    font-style: italic;
    color: #1e40af;
}

.prose blockquote {
    border-left: 4px solid #dc2626;
    padding-left: 1.5em;
    margin: 2em 0;
    font-style: italic;
    background: #fef2f2;
    padding: 1em 1.5em;
    border-radius: 0 0.5em 0.5em 0;
}

/* Typewriter effect */
.typewriter-cursor::after {
    content: '|';
    animation: blink 1s infinite;
    font-weight: 100;
    color: #dc2626;
}

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

/* Custom animations */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .8;
    }
}

/* Gradient text effects */
.gradient-text {
    background: linear-gradient(135deg, #dc2626, #1e40af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom scrollbar for content areas */
.prose::-webkit-scrollbar {
    width: 6px;
}

.prose::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.prose::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 3px;
}

.prose::-webkit-scrollbar-thumb:hover {
    background: #b91c1c;
}

/* Enhanced focus states */
input:focus, textarea:focus, select:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

/* Button hover effects */
button:hover {
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

button:active {
    transform: translateY(0);
}

/* Card hover effects */
.group:hover {
    transform: translateY(-2px);
}

/* 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;
}

.dark .prose h1 {
    color: #f87171;
}

.dark .prose h2 {
    color: #60a5fa;
}

.dark .prose h3 {
    color: #d1d5db;
}

.dark .prose strong {
    color: #f87171;
}

.dark .prose em {
    color: #60a5fa;
}

.dark .prose blockquote {
    background: #1f2937;
    border-left-color: #f87171;
    color: #d1d5db;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .prose {
        font-size: 16px;
    }
    
    .prose h1 {
        font-size: 1.5em;
    }
    
    .prose h2 {
        font-size: 1.3em;
    }
    
    .prose h3 {
        font-size: 1.1em;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .prose {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .prose h1, .prose h2, .prose h3 {
        color: #000 !important;
        page-break-after: avoid;
    }
    
    .prose p {
        orphans: 3;
        widows: 3;
    }
}