/**
 * Text Compare AI - Custom Styles
 */

/* Base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Textarea custom styling */
textarea {
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.6;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles */
textarea:focus,
button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3);
}

/* Button hover effects */
button {
    transition: all 0.2s ease;
}

button:active {
    transform: scale(0.98);
}

/* Results animation */
#resultsContainer {
    animation: fadeIn 0.3s ease;
}

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

/* Loading spinner animation */
.animate-spin {
    animation: spin 1s linear infinite;
}

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

/* Progress bar animation */
#similarityProgress,
#textSimilarityProgress,
#semanticSimilarityProgress {
    transition: width 0.5s ease;
}

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

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* RTL support */
[dir="rtl"] .text-left {
    text-align: right;
}

[dir="rtl"] .flex-row {
    flex-direction: row-reverse;
}

/* Print styles */
@media print {
    nav,
    footer,
    .no-print {
        display: none !important;
    }

    #resultsContainer {
        display: block !important;
    }
}

/* Accessibility - Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .diff-line.addition {
        border: 2px solid #166534;
    }

    .diff-line.deletion {
        border: 2px solid #991b1b;
    }
}