/* Word to JPG Converter Styles - Clean & Elegant UI/UX */

/* File Item Styling */
.file-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(228, 228, 231, 0.8);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.file-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 15px rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
    background: rgba(255, 255, 255, 0.95);
}

/* Drag and Drop Zone */
.drag-over {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-color: #6366f1;
    border-width: 2px;
    border-style: solid;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    animation: gentle-pulse 2s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.01);
    }
}

.drag-over * {
    pointer-events: none;
}

/* Badge Styling */
.format-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0.025em;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.page-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0.025em;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
}

/* Loading Spinner */
.loading-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-top: 3px solid #6366f1;
    border-radius: 50%;
    animation: smooth-spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes smooth-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #f8fafc, #f1f5f9);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a855f7);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 25%, rgba(255, 255, 255, 0.1) 25%, rgba(255, 255, 255, 0.1) 50%, transparent 50%, transparent 75%, rgba(255, 255, 255, 0.1) 75%);
    background-size: 20px 20px;
    animation: progress-stripe 1s linear infinite;
}

@keyframes progress-stripe {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 0;
    }
}

/* Message Styling */
.error-message {
    padding: 12px 16px;
    background: linear-gradient(135deg, #fef2f2, #fecaca);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #dc2626;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.1);
    backdrop-filter: blur(8px);
}

.success-message {
    padding: 12px 16px;
    background: linear-gradient(135deg, #f0f9ff, #bae6fd);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #0369a1;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(3, 105, 161, 0.1);
    backdrop-filter: blur(8px);
}

/* Preset Button Styling */
.preset-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.preset-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.6s ease;
}

.preset-btn:hover {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.15);
}

.preset-btn:hover::before {
    left: 100%;
}

.preset-btn.active {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    color: #1e293b;
    border: 2px solid #6366f1;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.15), 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
    font-weight: 600;
    position: relative;
}

.preset-btn.active::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border-radius: 8px;
    z-index: -1;
}

.preset-btn.active::before {
    display: none;
}

/* Color Swatch Styling */
.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-swatch::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 4px;
    background: inherit;
}

.color-swatch:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.color-swatch.selected {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), 0 4px 12px rgba(99, 102, 241, 0.3);
    transform: scale(1.1);
}

/* Page Preview Styling */
.page-preview {
    max-width: 100%;
    max-height: 220px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.page-preview:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #6366f1;
}

.document-page {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(228, 228, 231, 0.6);
    transition: all 0.3s ease;
}

.document-page:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Range Input Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: linear-gradient(90deg, #e2e8f0, #cbd5e1);
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 12px rgba(99, 102, 241, 0.4);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* Document Viewer */
.document-viewer {
    max-height: 450px;
    overflow-y: auto;
    border: 1px solid rgba(228, 228, 231, 0.6);
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    backdrop-filter: blur(10px);
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

.document-viewer::-webkit-scrollbar {
    width: 6px;
}

.document-viewer::-webkit-scrollbar-track {
    background: transparent;
}

.document-viewer::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
    border-radius: 3px;
}

.document-viewer::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(139, 92, 246, 0.5));
}

/* Additional Enhancements */
.glass-effect {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.shadow-elegant {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.04);
}

.transition-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus States for Accessibility */
button:focus,
input:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .file-item {
        border-radius: 12px;
    }

    .preset-btn {
        border-radius: 10px;
    }

    .color-swatch {
        width: 32px;
        height: 32px;
    }

    .page-preview {
        max-width: 140px;
        max-height: 200px;
    }
}
