* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #111827;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.prose {
    color: #374151;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    color: #111827;
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

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

.prose h2 {
    font-size: 1.875em;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5em;
}

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

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

.prose ul,
.prose ol {
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.prose li {
    margin-bottom: 0.5em;
}

.prose code {
    background-color: #f3f4f6;
    padding: 0.2em 0.4em;
    border-radius: 0.25em;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: #dc2626;
}

.prose pre {
    background-color: #1f2937;
    color: #f3f4f6;
    padding: 1em;
    border-radius: 0.5em;
    overflow-x: auto;
    margin-bottom: 1em;
}

.prose pre code {
    color: #f3f4f6;
    background-color: transparent;
    padding: 0;
}

.prose blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1em;
    margin-left: 0;
    margin-bottom: 1em;
    color: #6b7280;
    font-style: italic;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

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

.prose table th {
    background-color: #f9fafb;
    font-weight: 700;
}

.prose table tr:nth-child(even) {
    background-color: #f9fafb;
}

.prose a {
    color: #3b82f6;
    text-decoration: underline;
}

.prose a:hover {
    color: #1d4ed8;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5em;
    margin: 1em 0;
}

@media (max-width: 640px) {
    .prose h1 {
        font-size: 1.875em;
    }

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

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

/* Removed - using Tailwind's built-in .hidden class instead */

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

.drop-zone {
    position: relative;
    overflow: hidden;
}

.drop-zone:hover .upload-icon {
    transform: translateY(-4px);
    transition: transform 0.3s ease;
}

.drop-zone.dragging {
    transform: scale(1.02);
    border-color: #3b82f6;
    box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.1), 0 10px 10px -5px rgba(59, 130, 246, 0.04);
}

.upload-icon {
    transition: transform 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

#filePreview {
    animation: fadeIn 0.3s ease-in-out;
}

#progressContainer {
    animation: slideIn 0.3s ease-in-out;
}

#errorContainer {
    animation: fadeIn 0.3s ease-in-out;
}

.drop-zone-icon {
    transition: transform 0.3s ease;
}

.drop-zone:hover .drop-zone-icon {
    transform: scale(1.05);
}

#previewModal {
    backdrop-filter: blur(4px);
}

.modal-panel {
    max-height: 90vh;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes backdropFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#modalBackdrop {
    animation: backdropFadeIn 0.3s ease-out;
}

@media (max-width: 640px) {
    .modal-panel {
        max-height: 95vh;
        margin: 0;
        border-radius: 1rem 1rem 0 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .drop-zone:hover .upload-icon,
    .drop-zone:hover .drop-zone-icon {
        transform: none;
    }
}
