/* Critical CSS - Above the fold optimizations */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8fafc;
    color: #0f172a;
    line-height: 1.5;
    padding: 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

/* Professional Design System - Custom Properties */
:root {
    /* Professional Color Palette - Corporate Sophistication */
    --color-primary: #1e293b;           /* Deep Navy */
    --color-primary-light: #334155;     /* Lighter Navy */
    --color-primary-dark: #0f172a;      /* Darker Navy */
    --color-secondary: #3b82f6;         /* Professional Blue */
    --color-secondary-light: #60a5fa;   /* Lighter Blue */
    --color-secondary-dark: #2563eb;    /* Darker Blue */
    --color-accent: #10b981;            /* Success Green */
    --color-accent-light: #34d399;      /* Lighter Green */
    --color-accent-dark: #059669;       /* Darker Green */
    --color-warning: #f59e0b;           /* Professional Orange */
    --color-error: #ef4444;             /* Error Red */
    
    /* Neutral Colors */
    --color-background: #f8fafc;        /* Warm Gray Light */
    --color-surface: #ffffff;           /* Pure White */
    --color-surface-secondary: #f1f5f9; /* Light Gray Surface */
    --color-border: #e2e8f0;            /* Border Gray */
    --color-border-light: #f1f5f9;      /* Lighter Border */
    --color-text: #0f172a;              /* Near Black */
    --color-text-secondary: #475569;    /* Secondary Text */
    --color-text-muted: #64748b;        /* Muted Text */
    --color-text-light: #94a3b8;        /* Light Text */
    
    /* Professional Typography Scale */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Monaco', 'Courier New', monospace;
    
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */
    
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* Professional Spacing Scale */
    --space-px: 1px;
    --space-0: 0;
    --space-1: 0.25rem;      /* 4px */
    --space-2: 0.5rem;       /* 8px */
    --space-3: 0.75rem;      /* 12px */
    --space-4: 1rem;         /* 16px */
    --space-5: 1.25rem;      /* 20px */
    --space-6: 1.5rem;       /* 24px */
    --space-8: 2rem;         /* 32px */
    --space-10: 2.5rem;      /* 40px */
    --space-12: 3rem;        /* 48px */
    --space-16: 4rem;        /* 64px */
    --space-20: 5rem;        /* 80px */
    
    /* Professional Shadow System */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Professional Border Radius */
    --radius-none: 0;
    --radius-sm: 0.125rem;    /* 2px */
    --radius-base: 0.25rem;   /* 4px */
    --radius-md: 0.375rem;    /* 6px */
    --radius-lg: 0.5rem;      /* 8px */
    --radius-xl: 0.75rem;     /* 12px */
    
    /* Transition System */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* Global styles moved to critical CSS above */

body {
    font-family: var(--font-sans);
    background: var(--color-background);
    min-height: 100vh;
    padding: var(--space-5);
    color: var(--color-text);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--color-border-light);
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: calc(100vh - var(--space-10));
}

.header {
    background: var(--color-primary);
    padding: var(--space-8) var(--space-10);
    color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.logo-section {
    margin-bottom: var(--space-4);
}

.logo {
    font-size: var(--text-4xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin: 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--color-surface) 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.logo-subtitle {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-surface);
    opacity: 0.8;
    font-weight: var(--font-weight-medium);
    margin-top: var(--space-1);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tagline {
    font-size: var(--text-lg);
    opacity: 0.9;
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    max-width: 600px;
    margin: 0 auto;
}

.main-content {
    padding: var(--space-10);
    display: grid;
    /* gap: var(--space-8); */
    grid-template-columns: 1fr;
    max-width: 100%;
    align-content: start;
}

.content-section {
    display: grid;
    gap: var(--space-6);
}
/* 
.upload-section {
    order: 10;
} */
/* 
.processing-section {
    order: 20;
} */
/* 
.results-section {
    order: 30;
} */

.drop-zone {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-16) var(--space-6);
    text-align: center;
    background: var(--color-surface-secondary);
    transition: var(--transition-base);
    cursor: pointer;
    margin-bottom: var(--space-8);
    position: relative;
    overflow: hidden;
}

.drop-zone:hover {
    border-color: var(--color-secondary);
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
}

.drop-zone.dragover {
    border-color: var(--color-secondary);
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
    border-style: solid;
}

.drop-zone-content {
    position: relative;
    z-index: 2;
}

.upload-icon {
    color: var(--color-secondary);
    margin-bottom: var(--space-5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.upload-icon svg {
    width: 64px;
    height: 64px;
    transition: var(--transition-base);
}

.drop-zone:hover .upload-icon svg {
    transform: scale(1.1);
    color: var(--color-secondary-dark);
}

.drop-zone h3 {
    font-size: var(--text-2xl);
    color: var(--color-text);
    margin-bottom: var(--space-4);
    font-weight: var(--font-weight-semibold);
}

.drop-zone p {
    color: var(--color-text-muted);
    font-size: var(--text-base);
    margin-bottom: var(--space-4);
}

.upload-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin-bottom: var(--space-5);
}

.upload-details span {
    font-size: var(--text-sm);
    color: var(--color-text-light);
    font-weight: var(--font-weight-medium);
}

.file-input {
    display: none;
}

.browse-btn {
    background: var(--color-secondary);
    color: var(--color-surface);
    border: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.browse-btn:hover {
    background: var(--color-secondary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.browse-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.browse-btn:focus {
    outline: none;
    box-shadow: var(--shadow-md), 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.processing {
    display: none;
    text-align: center;
    padding: var(--space-10);
    background: var(--color-surface-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-8);
    border: 1px solid var(--color-border);
}

/* Spinner removed - progress bar provides better user feedback */

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--color-border);
    border-radius: var(--radius-base);
    overflow: hidden;
    margin-bottom: var(--space-4);
}

.progress-fill {
    height: 100%;
    background: var(--color-secondary);
    width: 0%;
    transition: width var(--transition-slow);
}

.results {
    display: none;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.image-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-5);
    border: 1px solid var(--color-border);
}

.extracted-text {
    background: var(--color-surface-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.extracted-text:hover {
    box-shadow: var(--shadow-md);
}

.text-content {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: var(--line-height-relaxed);
    color: var(--color-text);
    white-space: pre-wrap;
    word-wrap: break-word;
    min-height: 120px;
    max-height: 500px;
    overflow-y: auto;
    padding: var(--space-5);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: var(--transition-base);
}

.text-content:focus-within {
    border-color: var(--color-secondary);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05), 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.text-content::-webkit-scrollbar {
    width: 8px;
}

.text-content::-webkit-scrollbar-track {
    background: var(--color-surface-secondary);
    border-radius: var(--radius-base);
}

.text-content::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-base);
    transition: var(--transition-base);
}

.text-content::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

.copy-btn {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: var(--color-accent);
    color: var(--color-surface);
    border: none;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.copy-btn:hover {
    background: var(--color-accent-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.copy-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.copy-btn:focus {
    outline: none;
    box-shadow: var(--shadow-md), 0 0 0 3px rgba(16, 185, 129, 0.3);
}

.copy-btn.copied {
    background: var(--color-secondary);
}

.copy-btn.copied::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
    animation: shine 0.6s ease-out;
}

@keyframes shine {
    to {
        transform: translateX(100%);
    }
}

.actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    align-items: center;
    margin-top: var(--space-5);
}

.export-group {
    text-align: center;
}

.export-group h4 {
    font-size: var(--text-base);
    color: var(--color-text);
    margin-bottom: var(--space-4);
    font-weight: var(--font-weight-semibold);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.results h3 {
    font-size: var(--text-xl);
    color: var(--color-text);
    margin-bottom: var(--space-6);
    font-weight: var(--font-weight-semibold);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-border-light);
}

.export-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: var(--space-3);
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.export-btn {
    background: var(--color-surface-secondary);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    padding: var(--space-3) var(--space-2);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: var(--transition-base);
    text-align: center;
    white-space: nowrap;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.export-btn:hover {
    background: var(--color-secondary);
    color: var(--color-surface);
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.export-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.export-btn:focus {
    outline: none;
    box-shadow: var(--shadow-sm), 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.action-btn {
    background: var(--color-secondary);
    color: var(--color-surface);
    border: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.action-btn:hover {
    background: var(--color-secondary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.action-btn:focus {
    outline: none;
    box-shadow: var(--shadow-md), 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.clear-btn {
    background: var(--color-error);
    box-shadow: var(--shadow-sm);
}

.clear-btn:hover {
    background: #dc2626;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.clear-btn:focus {
    outline: none;
    box-shadow: var(--shadow-md), 0 0 0 3px rgba(239, 68, 68, 0.3);
}

.error {
    background: #fef2f2;
    color: var(--color-error);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid #fecaca;
    margin-bottom: var(--space-5);
    display: none;
}

.confidence {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-4);
    padding: var(--space-2) var(--space-3);
    background: var(--color-surface);
    border-radius: var(--radius-base);
    border: 1px solid var(--color-border-light);
    display: inline-flex;
    align-items: center;
    font-weight: var(--font-weight-medium);
}

.confidence::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    margin-right: var(--space-2);
    flex-shrink: 0;
}

.auto-copy-notification {
    position: fixed;
    top: var(--space-5);
    right: var(--space-5);
    background: var(--color-accent);
    color: var(--color-surface);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: var(--transition-slow);
    pointer-events: none;
}

.auto-copy-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Professional Icon System */
.section-icon {
    display: inline-block;
    margin-right: var(--space-2);
    vertical-align: middle;
    color: currentColor;
}

.export-btn svg {
    margin-right: var(--space-2);
    vertical-align: middle;
    color: currentColor;
}

.clear-btn svg {
    margin-right: var(--space-2);
    vertical-align: middle;
    color: currentColor;
}

.auto-copy-notification svg {
    margin-right: var(--space-2);
    vertical-align: middle;
    color: currentColor;
}

/* Enhanced hover micro-interactions */
.export-btn:hover svg,
.clear-btn:hover svg {
    transform: scale(1.1);
    transition: var(--transition-base);
}

/* Professional Easter Eggs - Subtle brand personality */
.logo:hover {
    cursor: default;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    transition: text-shadow var(--transition-slow);
}

.logo-subtitle:hover {
    cursor: default;
    color: var(--color-accent);
    transition: color var(--transition-base);
}

/* Clever confidence indicator hover */
.confidence:hover {
    cursor: help;
    background: linear-gradient(135deg, var(--color-surface), var(--color-accent-light));
    border-color: var(--color-accent);
    transform: scale(1.02);
    transition: all var(--transition-base);
}

/* Professional tooltip styling */
[title]:hover {
    position: relative;
}

/* Subtle section icon animations */
.section-icon {
    transition: all var(--transition-base);
}

h3:hover .section-icon,
h4:hover .section-icon {
    transform: rotate(5deg) scale(1.05);
    color: var(--color-secondary);
}

/* Enhanced drop zone personality */
.drop-zone:hover .upload-icon svg {
    animation: subtle-bounce 0.6s ease-in-out;
}

@keyframes subtle-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Spinner hover effect removed - no longer needed */

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Enhanced focus indicators for accessibility */
*:focus {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #000000;
        --color-secondary: #0066cc;
        --color-background: #ffffff;
        --color-text: #000000;
        --color-border: #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;
    }
}

/* Professional Skeleton Loading States */
.skeleton {
    background: linear-gradient(90deg, var(--color-surface-secondary) 25%, var(--color-border-light) 50%, var(--color-surface-secondary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 2s infinite;
    border-radius: var(--radius-base);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1.2em;
    margin: var(--space-2) 0;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-text.long {
    width: 95%;
}

.skeleton-button {
    height: 40px;
    width: 120px;
    margin: var(--space-2);
}

.skeleton-image {
    height: 200px;
    width: 100%;
    margin-bottom: var(--space-4);
}

/* Enhanced spinner removed - progress bar provides superior feedback */

/* Professional Fade Transitions */
.fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.fade-out {
    animation: fadeOut 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

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

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

/* Performance Optimizations */
.processing,
.results {
    contain: layout style paint;
    will-change: transform, opacity;
}

.export-btn,
.copy-btn,
.clear-btn,
.browse-btn {
    contain: layout style;
    will-change: transform, box-shadow;
}

/* Professional Print Styles */
@media print {
    body {
        background: white;
        color: black;
        font-size: 12pt;
        line-height: 1.4;
    }

    .header,
    .upload-section,
    .processing-section,
    .export-buttons,
    .clear-btn,
    .auto-copy-notification {
        display: none !important;
    }

    .results {
        display: block !important;
        box-shadow: none;
        border: none;
        margin: 0;
        padding: 0;
    }

    .text-content {
        border: 1px solid #ccc;
        padding: 20pt;
        font-family: 'Times New Roman', serif;
        font-size: 11pt;
        line-height: 1.6;
        max-height: none;
        overflow: visible;
    }

    .confidence {
        margin-top: 20pt;
        font-size: 9pt;
        color: #666;
    }

    .image-preview {
        max-width: 100%;
        height: auto;
        page-break-inside: avoid;
    }

    h1, h3, h4 {
        page-break-after: avoid;
    }

    @page {
        margin: 2cm;
        @top-center {
            content: "SnapOCR Professional Extraction Results";
            font-size: 10pt;
            color: #666;
        }
    }
}

/* Instructions Section Styling */
.instructions-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-10);
    transition: var(--transition-base);
    /* order: 40; */
}


.instructions-title {
    font-size: var(--text-xl);
    color: var(--color-text);
    margin-bottom: var(--space-8);
    font-weight: var(--font-weight-semibold);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding-bottom: var(--space-3);
    /* border-bottom: 1px solid var(--color-border-light); */
    text-align: center;
    justify-content: center;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-6);
}

.instruction-item {
    background: var(--color-surface-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    transition: var(--transition-base);
}

.instruction-item:hover {
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.instruction-heading {
    font-size: var(--text-base);
    color: var(--color-text);
    margin-bottom: var(--space-4);
    font-weight: var(--font-weight-semibold);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.instruction-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instruction-list li {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-3);
    padding-left: var(--space-4);
    position: relative;
}

.instruction-list li:last-child {
    margin-bottom: 0;
}

.instruction-list li::before {
    content: '•';
    color: var(--color-secondary);
    font-weight: var(--font-weight-semibold);
    position: absolute;
    left: 0;
    top: 0;
}

.instruction-list li strong {
    color: var(--color-text);
    font-weight: var(--font-weight-semibold);
}

/* Hover effects for instruction icons */
.instruction-heading:hover .section-icon {
    transform: rotate(5deg) scale(1.05);
    color: var(--color-secondary);
    transition: all var(--transition-base);
}

@media (max-width: 768px) {
    body {
        padding: var(--space-4);
    }
    
    .header {
        padding: var(--space-6) var(--space-4);
    }
    
    .logo {
        font-size: var(--text-3xl);
    }
    
    .tagline {
        font-size: var(--text-base);
    }
    
    .main-content {
        padding: var(--space-6);
    }
    
    .drop-zone {
        padding: var(--space-10) var(--space-4);
    }
    
    .upload-icon svg {
        width: 48px;
        height: 48px;
    }
    
    .upload-details {
        flex-direction: row;
        justify-content: center;
        gap: var(--space-4);
    }
    
    .export-buttons {
        max-width: 100%;
        grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
        gap: var(--space-2);
    }
    
    .export-btn {
        font-size: var(--text-xs);
        padding: var(--space-2) var(--space-1);
        min-height: 36px;
    }

    /* Instructions section mobile responsiveness */
    .instructions-section {
        padding: var(--space-6);
    }

    .instructions-grid {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }

    .instruction-item {
        padding: var(--space-4);
    }

    .instructions-title {
        font-size: var(--text-lg);
        margin-bottom: var(--space-6);
    }

    .instruction-heading {
        font-size: var(--text-sm);
    }

    .instruction-list li {
        font-size: var(--text-xs);
        margin-bottom: var(--space-2);
    }
}

/* AdSense Container Styles */
.ad-container {
    width: 100%;
    min-width: 300px;
    margin: var(--space-6) 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4);
    border: 1px solid var(--color-border-light);
}

.ad-header {
    margin: var(--space-4) 0 var(--space-6) 0;
    min-height: 90px;
}

.ad-rectangle {
    margin: var(--space-6) 0;
    min-height: 90px;
    max-width: 1200px;
}

.ad-bottom {
    margin: var(--space-6) auto var(--space-4) auto;
    min-height: 90px;
    max-width: 1200px;
}

.adsbygoogle {
    display: block !important;
    width: 100% !important;
    min-width: 300px !important;
    min-height: 90px !important;
}

/* AdSense responsive adjustments */
@media (max-width: 768px) {
    .ad-container {
        margin: var(--space-4) 0;
        min-width: 280px;
    }
    
    .ad-header, .ad-bottom {
        min-height: 60px;
    }
    
    .ad-rectangle {
        min-height: 200px;
        width: 100%;
    }
    
    .adsbygoogle {
        min-width: 280px !important;
        min-height: 60px !important;
    }
}

/* Educational Content Sections */
.educational-content {
    margin: var(--space-8) 0;
    padding: var(--space-6);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.educational-content .section-title {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    line-height: 1.3;
}

.educational-content .section-icon {
    color: var(--accent-primary);
    flex-shrink: 0;
}

.educational-content-body {
    color: var(--text-secondary);
    line-height: 1.7;
}

.educational-content-body p {
    margin-bottom: var(--space-4);
    font-size: var(--text-base);
}

.educational-content-body h3 {
    color: var(--text-primary);
    font-size: var(--text-xl);
    font-weight: 600;
    margin: var(--space-6) 0 var(--space-3) 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.educational-content-body h3:first-child {
    margin-top: var(--space-4);
}

/* FAQ Specific Styling */
.faq-item {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h3 {
    color: var(--accent-primary);
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-3);
    line-height: 1.4;
}

.faq-item p {
    margin-bottom: 0;
}

/* Ad Container Styling */
.ad-container {
    margin: var(--space-8) 0;
    padding: var(--space-4);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-container.ad-responsive {
    min-height: 250px;
}

.ad-container.ad-footer {
    min-height: 90px;
    margin-top: var(--space-12);
    margin-bottom: var(--space-4);
}

/* Ad slots styling */
.adsbygoogle {
    display: block !important;
    width: 100%;
    max-width: 100%;
}

.ad-slot-1, .ad-slot-2 {
    min-height: 250px;
}

.ad-slot-3 {
    min-height: 90px;
}

/* Enhanced responsive design for educational content */
@media (max-width: 768px) {
    .educational-content {
        margin: var(--space-6) 0;
        padding: var(--space-4);
    }
    
    .educational-content .section-title {
        font-size: var(--text-xl);
        gap: var(--space-2);
    }
    
    .educational-content-body h3 {
        font-size: var(--text-lg);
        margin: var(--space-4) 0 var(--space-2) 0;
    }
    
    .faq-item {
        margin-bottom: var(--space-4);
        padding-bottom: var(--space-3);
    }
    
    .faq-item h3 {
        font-size: var(--text-base);
        font-weight: 600;
    }
    
    .ad-container {
        margin: var(--space-6) 0;
        padding: var(--space-3);
        min-height: 80px;
    }
    
    .ad-container.ad-responsive {
        min-height: 200px;
    }
    
    .ad-container.ad-footer {
        min-height: 70px;
        margin-top: var(--space-8);
    }
    
    .ad-slot-1, .ad-slot-2 {
        min-height: 200px;
    }
    
    .ad-slot-3 {
        min-height: 70px;
    }
}

/* Smooth transitions for ads loading */
.adsbygoogle[data-adsbygoogle-status="reserved"] {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.adsbygoogle[data-adsbygoogle-status="done"] {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Print styles - hide ads */
@media print {
    .ad-container,
    .adsbygoogle {
        display: none !important;
    }
}