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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom range slider styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    transition: background 0.3s ease;
}

input[type="range"]:hover {
    background: #cbd5e1;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #1d4ed8;
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.4);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
    border: none;
    transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    background: #1d4ed8;
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.4);
}

/* Input focus styles */
input[type="text"]:focus,
input[type="checkbox"]:focus {
    outline: none;
}

/* Button styles */
button {
    transition: all 0.2s ease;
    outline: none;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Animation for loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

/* Preview container */
#previewContainer {
    position: relative;
    overflow: hidden;
}

#previewImage {
    transition: opacity 0.3s ease;
    display: block;
    margin: 0 auto;
}

/* Drag and drop visual feedback */
#dropzone {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#dropzone:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: #3b82f6;
}

/* Checkbox custom styling */
input[type="checkbox"] {
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* Card hover effects */
.hover\:shadow-md:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Smooth transitions for hidden elements */
.hidden {
    display: none;
}

/* Stats display animation */
#statsDisplay > div {
    transition: all 0.3s ease;
}

#statsDisplay > div:hover {
    transform: scale(1.05);
}

/* Loading overlay */
#loadingIndicator {
    backdrop-filter: blur(4px);
}

/* Feature cards */
.bg-white {
    transition: all 0.3s ease;
}

/* Alert/info boxes */
.bg-green-50 {
    transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h2.text-4xl {
        font-size: 2rem;
    }
    
    #processingSection .grid {
        grid-template-columns: 1fr;
    }
    
    #dropzone {
        padding: 3rem 1rem;
    }
    
    button {
        font-size: 0.875rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    header h1 {
        font-size: 1.125rem;
    }
    
    #statsDisplay {
        display: none !important;
    }
}

/* Accessibility improvements */
*:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

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

/* Print styles */
@media print {
    header,
    footer,
    #features,
    button {
        display: none;
    }
}