/* ============================================
   PDF COMPRESSOR - PROFESSIONAL STYLES
   Version: 2.0
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Primary Colors */
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --primary-lighter: #c7d2fe;
    
    /* Secondary Colors */
    --secondary: #7c3aed;
    --secondary-dark: #6d28d9;
    --secondary-light: #a78bfa;
    
    /* Status Colors */
    --success: #10b981;
    --success-dark: #059669;
    --success-light: #34d399;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --danger-light: #f87171;
    --warning: #f59e0b;
    --warning-dark: #d97706;
    --info: #3b82f6;
    --info-dark: #2563eb;
    
    /* Neutral Colors */
    --dark: #1f2937;
    --dark-light: #374151;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    
    /* Layout Variables */
    --border-radius-xs: 4px;
    --border-radius-sm: 8px;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-full: 9999px;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-primary: 0 4px 14px 0 rgba(79, 70, 229, 0.3);
    --shadow-success: 0 4px 14px 0 rgba(16, 185, 129, 0.3);
    
    /* Transitions */
    --transition-fast: all 0.15s ease;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-tooltip: 600;
    --z-toast: 700;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 50%, #fef3f2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, video, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none !important; }
.visible { display: block !important; }

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-xs);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    box-shadow: var(--shadow-primary);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.nav-link i {
    font-size: 1rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background: var(--gray-100);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-fixed);
    padding: 16px;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
}

.mobile-nav.active {
    display: block;
    animation: slideUp 0.3s ease;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    margin-bottom: 4px;
}

.mobile-nav-link:hover {
    background: var(--gray-100);
    color: var(--primary);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    padding: 40px 0 60px;
    min-height: calc(100vh - 180px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto 24px;
    line-height: 1.7;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: 10px 20px;
    border-radius: var(--border-radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge i {
    font-size: 1rem;
}

/* ============================================
   COMPRESSOR CARD
   ============================================ */
.compressor-card {
    background: var(--white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 40px;
    margin-bottom: 60px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.compressor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* ============================================
   UPLOAD SECTION
   ============================================ */
.upload-section {
    text-align: center;
}

.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius-lg);
    padding: 60px 40px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-50);
    position: relative;
    margin-bottom: 24px;
}

.upload-area:hover {
    border-color: var(--primary-light);
    background: rgba(79, 70, 229, 0.02);
}

.upload-area.dragover {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
    transform: scale(1.01);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.upload-area.has-file {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.02);
}

.upload-icon {
    font-size: 64px;
    color: var(--primary);
    margin-bottom: 20px;
    opacity: 0.8;
}

.upload-area h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 8px;
    font-weight: 600;
}

.upload-text {
    color: var(--gray-500);
    font-size: 1rem;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.upload-actions {
    margin-bottom: 16px;
}

.upload-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-primary);
}

.upload-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.upload-button:active {
    transform: translateY(0);
}

.file-info-text {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.file-info-text i {
    margin-right: 6px;
    color: var(--info);
}

/* ============================================
   FILE INFO SECTION
   ============================================ */
.file-info-section {
    margin-bottom: 32px;
    animation: slideUp 0.3s ease;
}

.file-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.file-card:hover {
    border-color: var(--gray-300);
}

.file-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.file-details {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.file-details h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-details p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.upload-progress {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar-mini {
    flex: 1;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill-mini {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

#uploadProgressText {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 40px;
}

.remove-file-btn {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.remove-file-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* ============================================
   SETTINGS SECTION
   ============================================ */
.settings-section {
    padding: 32px;
    background: var(--gray-50);
    border-radius: var(--border-radius-lg);
    margin-bottom: 24px;
    animation: slideUp 0.3s ease;
}

.settings-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.settings-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.settings-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
}

.setting-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
}

/* Compression Slider */
.compression-level-section {
    margin-bottom: 32px;
}

.compression-slider-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 24px;
    border: 1px solid var(--gray-200);
}

.slider-labels-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
}

.label-less { color: var(--success); }
.label-more { color: var(--danger); }

.slider-wrapper {
    position: relative;
    padding: 10px 0;
    margin-bottom: 16px;
}

.compression-slider {
    width: 100%;
    height: 12px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.compression-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 12px;
    background: transparent;
    border-radius: 6px;
}

.compression-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: var(--white);
    border: 3px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    margin-top: -8px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-fast);
}

.compression-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.compression-slider::-moz-range-track {
    width: 100%;
    height: 12px;
    background: transparent;
    border-radius: 6px;
}

.compression-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    background: var(--white);
    border: 3px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.slider-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 12px;
    transform: translateY(-50%);
    background: var(--gray-200);
    border-radius: 6px;
    z-index: 1;
    overflow: hidden;
}

.slider-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--warning), var(--danger));
    border-radius: 6px;
    width: 50%;
    transition: width 0.1s ease;
}

.compression-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.compression-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.compression-description {
    flex: 1;
    font-size: 0.9rem;
    color: var(--gray-600);
    text-align: right;
}

/* Presets Section */
.presets-section {
    margin-bottom: 32px;
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.preset-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.preset-btn:hover {
    border-color: var(--primary-light);
    background: rgba(79, 70, 229, 0.02);
}

.preset-btn.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(124, 58, 237, 0.05));
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.preset-btn i {
    font-size: 1.5rem;
    color: var(--primary);
}

.preset-btn span {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.preset-btn small {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Expected Result */
.expected-result {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.1));
    border-radius: var(--border-radius);
    border: 1px solid rgba(16, 185, 129, 0.2);
    margin-bottom: 24px;
}

.result-icon {
    width: 48px;
    height: 48px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.result-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.result-label {
    color: var(--gray-600);
    font-size: 0.95rem;
}

.result-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success-dark);
}

.result-reduction {
    font-size: 0.9rem;
    color: var(--success);
    font-weight: 500;
}

/* ============================================
   BUTTONS
   ============================================ */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    min-height: 52px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--dark);
    border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    color: var(--white);
    box-shadow: var(--shadow-success);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-outline {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: rgba(79, 70, 229, 0.05);
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.1rem;
}

/* ============================================
   PROGRESS SECTION
   ============================================ */
.progress-section {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.3s ease;
}

.progress-content {
    max-width: 500px;
    margin: 0 auto;
}

.progress-icon {
    margin-bottom: 24px;
}

.spinner {
    width: 64px;
    height: 64px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.progress-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.progress-section p {
    color: var(--gray-500);
    margin-bottom: 32px;
}

.progress-bar-container {
    margin-bottom: 24px;
}

.progress-bar {
    height: 12px;
    background: var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 6px;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
    background-size: 200% 100%;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--gray-600);
}

#progressPercent {
    font-weight: 600;
    color: var(--primary);
}

.queue-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--gray-100);
    border-radius: var(--border-radius-full);
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-top: 16px;
}

.queue-info i {
    color: var(--warning);
}

/* Continue in Part 2... */
/* ============================================
   RESULTS SECTION
   ============================================ */
.results-section {
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 0.4s ease;
}

.results-header {
    margin-bottom: 40px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--white);
    font-size: 2.5rem;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    animation: pulse 2s infinite;
}

.results-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 8px;
}

.results-header p {
    color: var(--gray-500);
    font-size: 1rem;
}

/* Compression Stats */
.compression-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 24px 32px;
    min-width: 140px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.stat-card.original {
    border-left: 4px solid var(--gray-400);
}

.stat-card.compressed {
    border-left: 4px solid var(--success);
}

.stat-card.reduction {
    border-left: 4px solid var(--primary);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(124, 58, 237, 0.05));
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.stat-card.reduction .stat-value {
    color: var(--primary);
}

.stat-arrow {
    font-size: 1.5rem;
    color: var(--gray-300);
}

/* Comparison Bar */
.comparison-bar {
    display: flex;
    height: 40px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}

.comparison-original {
    background: var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.5s ease;
    position: relative;
}

.comparison-original span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}

.comparison-compressed {
    background: linear-gradient(90deg, var(--success), var(--success-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.5s ease;
}

.comparison-compressed span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
}

/* Download Actions */
.download-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

/* Expiry Notice */
.expiry-notice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--gray-100);
    border-radius: var(--border-radius-full);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.expiry-notice i {
    color: var(--warning);
}

/* ============================================
   ERROR SECTION
   ============================================ */
.error-section {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.3s ease;
}

.error-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--danger), var(--danger-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--white);
    font-size: 2.5rem;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.error-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--danger);
    margin-bottom: 8px;
}

.error-section p {
    color: var(--gray-600);
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   HOW IT WORKS SECTION
   ============================================ */
.how-it-works-section {
    margin-bottom: 60px;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 40px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.step-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    position: relative;
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: var(--shadow-primary);
}

.step-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px auto 20px;
    color: var(--primary);
    font-size: 1.75rem;
}

.step-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
}

.step-card p {
    color: var(--gray-500);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features-section {
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary);
    font-size: 1.5rem;
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--gray-500);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-section {
    margin-bottom: 60px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.faq-item {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: var(--shadow);
}

.faq-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.faq-item h4::before {
    content: 'Q';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.faq-item p {
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.7;
    padding-left: 34px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
}

.footer-section p {
    color: var(--gray-400);
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    transform: translateX(5px);
}

.footer-links a i {
    width: 20px;
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--gray-800);
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--dark);
    color: var(--white);
    padding: 16px 24px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-xl);
    z-index: var(--z-toast);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

.toast.warning {
    background: var(--warning);
    color: var(--dark);
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-message {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .compressor-card {
        padding: 24px;
        margin-bottom: 40px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .upload-icon {
        font-size: 48px;
    }
    
    .upload-area h3 {
        font-size: 1.25rem;
    }
    
    .settings-section {
        padding: 24px;
    }
    
    .presets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .compression-info {
        flex-direction: column;
        text-align: center;
    }
    
    .compression-description {
        text-align: center;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .step-card {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .compression-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .stat-arrow {
        transform: rotate(90deg);
    }
    
    .stat-card {
        width: 100%;
        max-width: 300px;
    }
    
    .comparison-bar {
        flex-direction: column;
        height: auto;
    }
    
    .comparison-original,
    .comparison-compressed {
        width: 100% !important;
        padding: 12px;
    }
    
    .download-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .download-actions .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links {
        align-items: center;
    }
    
    .footer-links a:hover {
        transform: none;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .header-content {
        padding: 12px 0;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .main-content {
        padding: 24px 0 40px;
    }
    
    .hero-section {
        margin-bottom: 24px;
    }
    
    .hero-title {
        font-size: 1.625rem;
        padding: 0;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .status-badge {
        font-size: 0.8rem;
        padding: 8px 16px;
    }
    
    .compressor-card {
        padding: 20px;
        border-radius: var(--border-radius-lg);
    }
    
    .upload-area {
        padding: 32px 16px;
    }
    
    .upload-icon {
        font-size: 40px;
        margin-bottom: 16px;
    }
    
    .upload-area h3 {
        font-size: 1.125rem;
    }
    
    .upload-text {
        font-size: 0.9rem;
    }
    
    .upload-button {
        width: 100%;
        padding: 14px 24px;
    }
    
    .file-info-text {
        font-size: 0.8rem;
    }
    
    .file-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .file-details {
        text-align: center;
    }
    
    .settings-section {
        padding: 20px;
    }
    
    .settings-header h3 {
        font-size: 1.1rem;
    }
    
    .compression-slider-container {
        padding: 16px;
    }
    
    .compression-value {
        font-size: 1.5rem;
    }
    
    .presets-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .preset-btn {
        padding: 16px 12px;
    }
    
    .preset-btn i {
        font-size: 1.25rem;
    }
    
    .preset-btn span {
        font-size: 0.85rem;
    }
    
    .preset-btn small {
        font-size: 0.7rem;
    }
    
    .expected-result {
        flex-direction: column;
        text-align: center;
    }
    
    .result-info {
        flex-direction: column;
    }
    
    .btn {
        padding: 14px 24px;
        font-size: 0.95rem;
        min-height: 48px;
    }
    
    .btn-large {
        padding: 16px 28px;
        font-size: 1rem;
    }
    
    .progress-section {
        padding: 40px 16px;
    }
    
    .spinner {
        width: 56px;
        height: 56px;
    }
    
    .progress-section h3 {
        font-size: 1.25rem;
    }
    
    .results-section {
        padding: 32px 16px;
    }
    
    .success-icon {
        width: 64px;
        height: 64px;
        font-size: 2rem;
    }
    
    .results-header h3 {
        font-size: 1.5rem;
    }
    
    .stat-card {
        padding: 20px 24px;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .step-card {
        padding: 28px 20px;
    }
    
    .step-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .feature-card {
        padding: 24px 20px;
    }
    
    .feature-icon {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }
    
    .faq-item {
        padding: 20px;
    }
    
    .faq-item h4 {
        font-size: 0.95rem;
    }
    
    .faq-item p {
        font-size: 0.85rem;
        padding-left: 0;
        margin-top: 8px;
    }
    
    .faq-item h4::before {
        display: none;
    }
    
    .footer {
        padding: 40px 0 24px;
    }
    
    .footer-section h4 {
        font-size: 1rem;
    }
    
    .toast {
        bottom: 16px;
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .presets-grid {
        grid-template-columns: 1fr;
    }
    
    .preset-btn {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        text-align: left;
    }
    
    .compression-stats {
        gap: 12px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .upload-button,
    .btn,
    .preset-btn,
    .nav-link,
    .mobile-nav-link {
        min-height: 48px;
    }
    
    .compression-slider::-webkit-slider-thumb {
        width: 32px;
        height: 32px;
    }
    
    .remove-file-btn {
        width: 48px;
        height: 48px;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .main-content {
        padding: 20px 0;
    }
    
    .hero-section {
        margin-bottom: 20px;
    }
    
    .upload-area {
        padding: 24px 20px;
    }
    
    .upload-icon {
        font-size: 36px;
        margin-bottom: 12px;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #0000cc;
        --secondary: #6600cc;
        --success: #006600;
        --danger: #cc0000;
    }
    
    .upload-area {
        border-width: 3px;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .upload-section,
    .settings-section,
    .action-buttons,
    .toast {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .compressor-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Focus Visible States for Accessibility */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Selection Color */
::selection {
    background: var(--primary-light);
    color: var(--white);
}

::-moz-selection {
    background: var(--primary-light);
    color: var(--white);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) var(--gray-100);
}
/* ============================================
   INDETERMINATE PROGRESS BAR
   ============================================ */

.progress-bar {
    position: relative;
    overflow: hidden;
}

.progress-bar.indeterminate .progress-fill,
.progress-fill.indeterminate {
    width: 100% !important;
    background: linear-gradient(
        90deg,
        #4f46e5 0%,
        #7c3aed 25%,
        #4f46e5 50%,
        #7c3aed 75%,
        #4f46e5 100%
    );
    background-size: 200% 100%;
    animation: progressSlide 1.5s linear infinite;
}

@keyframes progressSlide {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Shimmer effect overlay */
.progress-bar.indeterminate::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Complete state - green */
.progress-fill.complete {
    background: linear-gradient(90deg, #10b981, #059669) !important;
    animation: none !important;
}
/* ============================================
   MOBILE UPLOAD PROGRESS FIX
   Prevents horizontal overflow on mobile
   ============================================ */

/* File Info Container */
#fileInfoSection {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* File Name - Truncate with ellipsis */
#fileName {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    word-break: break-all;
}

/* File Size */
#fileSize {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Upload Progress Container */
#uploadProgressContainer {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    padding: 0 5px;
}

/* Upload Progress Bar Container */
#uploadProgressContainer > div,
.upload-progress,
.progress-container {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Upload Progress Bar */
#uploadProgressBar {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Upload Progress Text */
#uploadProgressText {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    box-sizing: border-box;
}

/* ============================================
   MOBILE SPECIFIC FIXES
   ============================================ */

@media screen and (max-width: 768px) {
    /* Prevent any horizontal scroll */
    body {
        overflow-x: hidden;
    }
    
    /* Main container */
    .compressor-card,
    .card,
    .upload-card {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* File info section */
    #fileInfoSection {
        padding: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* File info row */
    .file-info,
    .file-details,
    .file-info-row {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        box-sizing: border-box;
    }
    
    /* File name on mobile */
    #fileName {
        max-width: calc(100% - 80px); /* Leave space for file size */
        font-size: 14px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* Alternative: If filename and size are stacked */
    .file-name-wrapper,
    .file-info-text {
        max-width: 100%;
        overflow: hidden;
    }
    
    /* File size on mobile */
    #fileSize {
        font-size: 12px;
        flex-shrink: 0;
    }
    
    /* Upload progress container on mobile */
    #uploadProgressContainer {
        width: 100%;
        max-width: 100%;
        padding: 10px 0;
        box-sizing: border-box;
    }
    
    /* Progress bar wrapper */
    .progress-bar-wrapper,
    .upload-progress-wrapper {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        border-radius: 10px;
        box-sizing: border-box;
    }
    
    /* Progress bar track */
    .progress-bar-track,
    .progress-track,
    .upload-progress-track {
        width: 100%;
        max-width: 100%;
        height: 8px;
        background: #e5e7eb;
        border-radius: 10px;
        overflow: hidden;
    }
    
    /* Progress bar fill */
    #uploadProgressBar {
        height: 100%;
        max-width: 100%;
        border-radius: 10px;
        transition: width 0.15s ease-out;
    }
    
    /* Progress text on mobile */
    #uploadProgressText {
        font-size: 12px;
        margin-top: 5px;
        text-align: center;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding: 0 5px;
        box-sizing: border-box;
    }
    
    /* Remove file button */
    #removeFileBtn {
        flex-shrink: 0;
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* ============================================
   EXTRA SMALL SCREENS (< 380px)
   ============================================ */

@media screen and (max-width: 380px) {
    #fileName {
        max-width: calc(100% - 70px);
        font-size: 13px;
    }
    
    #fileSize {
        font-size: 11px;
    }
    
    #uploadProgressText {
        font-size: 11px;
    }
    
    .compressor-card,
    .card {
        padding-left: 10px;
        padding-right: 10px;
    }
}