:root {
    --primary-color: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --success-color: #059669;
    --success-light: #10b981;
    --danger-color: #dc2626;
    --danger-light: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.2s ease-in-out;
}

* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: var(--gray-800);
    line-height: 1.6;
}

.main-container {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 50px;
    margin: 5vh auto;
    max-width: 1200px;
    transition: var(--transition);
}

.main-container:hover {
    box-shadow: var(--shadow-lg);
}

.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius-lg);
    padding: 80px 40px;
    text-align: center;
    transition: var(--transition);
    background: var(--white);
    cursor: pointer;
    margin-bottom: 30px;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary-color);
    background: var(--gray-50);
}

.upload-area.file-selected {
    background: #f0fdf4;
    border-color: var(--success-color);
}

.upload-icon {
    font-size: 4rem;
    color: var(--gray-400);
    margin-bottom: 30px;
    transition: var(--transition);
    display: inline-block;
}

.upload-area:hover .upload-icon {
    color: var(--primary-color);
}

.file-input {
    display: none;
}

.btn-custom {
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    padding: 16px 32px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    color: var(--white);
}

.btn-custom:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.btn-custom:active {
    transform: translateY(0);
}

.progress-container {
    margin: 20px 0;
}

.progress-container .card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.progress-container .card-title {
    color: #2196F3;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.progress {
    height: 20px;
    border-radius: 10px;
    background-color: #E3F2FD;
}

.progress-bar {
    background-color: #2196F3;
    border-radius: 10px;
    transition: width 0.3s ease;
}

#progressText {
    color: #424242;
    font-size: 0.95rem;
}

#currentImages {
    font-size: 0.85rem;
    color: #757575;
    background: #F5F5F5;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 8px 0;
}

#etaText {
    color: #616161;
    font-size: 0.9rem;
}

#cancelBtn {
    background-color: #FFA726;
    border-color: #FB8C00;
    color: white;
}

#cancelBtn:hover {
    background-color: #FB8C00;
}

#cancelBtn:disabled {
    background-color: #FFE0B2;
    border-color: #FFE0B2;
}

/* Results Modal Styles */
#resultsModal .modal-header {
    background-color: #F5F5F5;
    border-bottom: 1px solid #E0E0E0;
}

#resultsModal .modal-title {
    color: #2196F3;
}

#processingStats {
    background-color: #F5F5F5;
    padding: 15px;
    border-radius: 8px;
}

#processingStats h6 {
    color: #424242;
    margin-bottom: 12px;
}

#processingStats ul li {
    margin-bottom: 8px;
    color: #616161;
}

#processingStats ul li i {
    color: #2196F3;
    width: 20px;
}

#processingMessage.alert-success {
    background-color: #E8F5E9;
    border-color: #C8E6C9;
    color: #2E7D32;
}

#processingMessage.alert-warning {
    background-color: #FFF3E0;
    border-color: #FFE0B2;
    color: #EF6C00;
}

#downloadLink {
    background-color: #2196F3;
    border-color: #1E88E5;
}

#downloadLink:hover {
    background-color: #1E88E5;
}

.info-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 35px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 20px;
    transition: var(--transition);
}

.info-card:hover .feature-icon {
    transform: scale(1.05);
}

.alert-custom {
    border-radius: var(--border-radius);
    border: 1px solid;
    padding: 20px 25px;
    margin-bottom: 20px;
}

.alert-success {
    background: #f0fdf4;
    color: var(--success-color);
    border-color: #bbf7d0;
}

.alert-danger {
    background: #fef2f2;
    color: var(--danger-color);
    border-color: #fecaca;
}

.header-title {
    color: var(--gray-900);
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 2.5rem;
}

.header-subtitle {
    color: var(--gray-600);
    font-size: 1.2rem;
    margin-bottom: 40px;
    font-weight: 400;
}

.step-card {
    text-align: center;
    padding: 30px;
    margin-bottom: 30px;
    transition: var(--transition);
}

.step-number {
    background: var(--primary-color);
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.step-card:hover .step-number {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.form-label {
    color: var(--gray-700);
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 1rem;
}

.form-select {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    color: var(--gray-800);
    padding: 15px 20px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-select option {
    background: var(--white);
    color: var(--gray-800);
}

.form-text {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.spinner-border-sm {
    margin-right: 10px;
}

#fileName {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--border-radius);
    padding: 15px 25px;
    margin-top: 20px;
    color: var(--success-color);
    font-weight: 500;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-muted {
    color: var(--gray-500) !important;
}

.text-info {
    color: var(--primary-color) !important;
}

h4, h5 {
    color: var(--gray-800);
    font-weight: 600;
}

p {
    color: var(--gray-600);
}

li {
    color: var(--gray-600);
}

.btn-info {
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    padding: 16px 32px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    color: var(--white);
}

.btn-info:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.btn-outline-success {
    border: 2px solid var(--success-color);
    color: var(--success-color);
    background: var(--white);
    border-radius: 8px;
    padding: 14px 30px;
    font-weight: 600;
}

.btn-outline-success:hover {
    background: var(--success-color);
    border-color: var(--success-color);
    color: var(--white);
}

/* Icons */
.fa-images, .fa-columns, .fa-play, .fa-check, .fa-file-alt, .fa-info-circle {
    color: var(--primary-color);
}

.fa-check.text-success {
    color: var(--success-color) !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .main-container {
        padding: 30px 20px;
        margin: 2vh auto;
    }
    
    .header-title {
        font-size: 2rem;
    }
    
    .header-subtitle {
        font-size: 1.1rem;
    }
    
    .upload-area {
        padding: 60px 20px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .btn-custom {
        padding: 14px 28px;
        font-size: 0.95rem;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .info-card {
        padding: 25px;
    }
}

/* Progress text styling */
#progressText {
    color: var(--gray-700);
    font-weight: 500;
    line-height: 1.4;
    min-height: 60px; /* Ensure consistent height for ETA display */
}

#progressText small {
    font-size: 0.8rem;
    line-height: 1.2;
    display: block;
    margin-top: 2px;
    word-break: break-all;
}

#progressText .text-info {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Clean close button */
.btn-close {
    filter: invert(1);
}

/* Clean upload area styling */
.upload-area h4 {
    color: var(--gray-800);
    font-weight: 600;
    margin-bottom: 15px;
}

.upload-area p {
    color: var(--gray-600);
    margin-bottom: 30px;
} 