/* Custom Styles for Universal PDF Converter */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Mega Menu Styles */
.group:hover .group-hover\:opacity-100 {
    pointer-events: auto;
}

.group .group-hover\:opacity-100 {
    pointer-events: none;
}

/* Ensure mega menu stays visible when hovering over it */
.group:hover > div {
    display: block;
}

/* Mega menu link hover effect */
#megaMenuImages a:hover,
#megaMenuDocuments a:hover,
#megaMenuSpreadsheets a:hover,
#megaMenuEbooks a:hover,
#megaMenuPresentations a:hover,
#megaMenuOther a:hover {
    padding-left: 4px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #3B82F6;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563EB;
}

/* Dark mode scrollbar */
.dark ::-webkit-scrollbar-track {
    background: #1F2937;
}

/* Category Tab Styles */
.category-tab {
    background-color: #E5E7EB;
    color: #374151;
    transition: all 0.3s ease;
}

.dark .category-tab {
    background-color: #374151;
    color: #D1D5DB;
}

.category-tab:hover {
    background-color: #3B82F6;
    color: white;
    transform: translateY(-2px);
}

.category-tab.active {
    background-color: #3B82F6;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

/* Format Card Styles - Now using Tailwind classes directly in JS */

/* Drop Zone Styles */
#dropZone.dragover {
    border-color: #3B82F6;
    background-color: #EFF6FF;
}

.dark #dropZone.dragover {
    background-color: #1E3A8A;
}

/* Progress Bar Styles */
.progress-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.dark .progress-container {
    background: #1F2937;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
    margin: 16px 0;
}

.dark .progress-bar {
    background-color: #374151;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3B82F6, #6366F1);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* File Item Styles */
.file-item {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark .file-item {
    background: #374151;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: #EFF6FF;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3B82F6;
    font-size: 20px;
}

.dark .file-icon {
    background: #1E3A8A;
}

.file-details h4 {
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.dark .file-details h4 {
    color: white;
}

.file-details p {
    font-size: 14px;
    color: #6B7280;
}

.dark .file-details p {
    color: #9CA3AF;
}

/* Button Styles */
.btn-primary {
    background: #3B82F6;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #2563EB;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: #6B7280;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #4B5563;
}

.btn-success {
    background: #10B981;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #EF4444;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-danger:hover {
    background: #DC2626;
}

/* Animation Classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4B5563 50%, #374151 75%);
    background-size: 200% 100%;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.dark .toast {
    background: #1F2937;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid #10B981;
}

.toast.error {
    border-left: 4px solid #EF4444;
}

.toast.warning {
    border-left: 4px solid #F59E0B;
}

.toast.info {
    border-left: 4px solid #3B82F6;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.dark .modal-content {
    background: #1F2937;
}

.modal.active .modal-content {
    transform: scale(1);
}

/* Responsive Design Adjustments */
@media (max-width: 768px) {
    .format-card {
        padding: 16px;
    }
    
    .format-card-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .format-card-title {
        font-size: 16px;
    }
    
    .toast {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
}

/* Focus Styles for Accessibility */
button:focus,
a:focus,
input:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    header,
    footer,
    .no-print {
        display: none;
    }
}
