/* Custom CSS for JPEG Image Compressor */

/* Modern Apple/Microsoft inspired styles */
.backdrop-blur-xl {
    backdrop-filter: blur(16px);
}

.bg-apple-gray {
    background-color: #F2F2F7;
}

/* Custom color classes */
.bg-gold-100 {
    background-color: #fef3c7;
}

.text-gold-800 {
    color: #92400e;
}

/* Glass morphism effects */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Enhanced button hover effects */
.modern-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.modern-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Custom slider styling */
.slider {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

.slider::-webkit-slider-track {
    background: #e2e8f0;
    height: 8px;
    border-radius: 4px;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: #3b82f6;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    cursor: pointer;
}

.slider::-moz-range-track {
    background: #e2e8f0;
    height: 8px;
    border-radius: 4px;
}

.slider::-moz-range-thumb {
    background: #3b82f6;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Custom button hover effects */
.btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* File upload area styling */
.file-upload-area {
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    background-color: #f8fafc;
    border-color: #3b82f6;
}

.file-upload-area.dragover {
    background-color: #eff6ff !important;
    border-color: #2563eb !important;
    transform: scale(1.02);
}

#dropZone.dragover {
    background-color: #eff6ff !important;
    border-color: #2563eb !important;
}

/* Alert animations */
.alert {
    animation: slideIn 0.3s ease-out;
}

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

/* Progress bar animation */
.progress-bar {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    animation: progress 0.5s ease-out;
}

@keyframes progress {
    from {
        width: 0%;
    }
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Mobile responsiveness improvements */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .text-6xl {
        font-size: 3rem;
    }
    
    .text-3xl {
        font-size: 1.875rem;
    }
    
    .p-8 {
        padding: 1.5rem;
    }
    
    .px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

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

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

/* Focus states for accessibility */
input:focus,
button:focus,
select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-gray-50 {
        background-color: #ffffff;
    }
    
    .text-gray-600 {
        color: #000000;
    }
}

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