* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Navigation Bar Styles */
.top-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.back-home-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.back-home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

.nav-title {
    font-weight: 600;
    color: #2d3748;
    font-size: 16px;
}

@media (max-width: 768px) {
    .nav-container {
        padding: 12px 15px;
    }
    
    .back-home-btn span {
        display: none;
    }
    
    .nav-title {
        font-size: 14px;
    }
}

/* Improved Text Selection */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: #2d3748;
    text-shadow: none;
}

::-moz-selection {
    background: rgba(102, 126, 234, 0.3);
    color: #2d3748;
    text-shadow: none;
}

/* Prevent text selection on interactive elements */
button,
.upload-area,
.image-item,
.progress-bar,
.file-item-remove,
.remove-btn,
.clear-all-btn {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow text selection on content areas */
.file-name,
.progress-text,
.image-info,
input,
textarea,
p,
span:not(.btn-text):not(.btn-icon) {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --danger-color: #e53e3e;
    --warning-color: #ed8936;
    
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    
    --border-color: #e2e8f0;
    --border-focus: #667eea;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.15);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    --transition-fast: all 0.15s ease;
    --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 50px;
    color: white;
    position: relative;
}

header::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.brand-label {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 12px 25px;
    margin-bottom: 25px;
    display: inline-block;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.brand-text {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.features-highlight {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.features-highlight span {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-normal);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.features-highlight span:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

header h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

header p {
    font-size: clamp(1rem, 2vw, 1.3rem);
    opacity: 0.95;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

main {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: clamp(30px, 5vw, 50px);
    box-shadow: var(--shadow-xl);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

main::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed var(--primary-color);
    border-radius: var(--radius-lg);
    padding: clamp(40px, 8vw, 80px) 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.upload-area:hover {
    border-color: var(--primary-dark);
    background: linear-gradient(135deg, #f0f4ff 0%, #e6f3ff 100%);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.upload-area:hover::before {
    left: 100%;
}

.upload-area.dragover {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 20px 40px rgba(72, 187, 120, 0.2);
    border-style: solid;
}

.upload-area.dragover .upload-icon {
    animation: bounce 0.6s ease-in-out infinite alternate;
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

.upload-icon {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 25px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: var(--transition-normal);
}

.upload-area:hover .upload-icon {
    transform: scale(1.1) rotateY(15deg);
}

.upload-area h3 {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.upload-area p {
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 400;
}

.browse-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    font-weight: 600;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.browse-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.browse-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.browse-btn:hover::before {
    left: 100%;
}

.browse-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* File Info */
.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    margin-top: 20px;
    box-shadow: var(--shadow-sm);
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
}

.file-size {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.remove-btn {
    background: var(--danger-gradient);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.remove-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: var(--shadow-md);
}

/* Multiple Files Section */
.multiple-files-section {
    margin-top: 25px;
    background: linear-gradient(135deg, #f0fff4 0%, #f7fafc 100%);
    border-radius: var(--radius-lg);
    padding: 25px;
    border: 2px solid rgba(72, 187, 120, 0.1);
    box-shadow: var(--shadow-sm);
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.files-header h4 {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.clear-all-btn {
    background: var(--danger-gradient);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.clear-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.files-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.file-item {
    background: var(--bg-primary);
    padding: 15px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    position: relative;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.file-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.file-item-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.3;
    word-break: break-word;
    flex: 1;
    margin-right: 10px;
}

.file-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 2px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.file-item-remove:hover {
    background: var(--danger-color);
    color: white;
    transform: rotate(90deg);
}

.file-item-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-item-detail {
    background: var(--bg-tertiary);
    padding: 4px 8px;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
}

.batch-summary {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    text-align: center;
}

.summary-stats span {
    background: var(--primary-gradient);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

/* Controls Section */
.controls-section {
    margin-bottom: 40px;
    padding: 40px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.pdf-preview {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.pdf-preview h4 {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.pdf-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.pdf-info span {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-group label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-group select,
.option-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: inherit;
}

.option-group select:focus,
.option-group input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #fafbff;
}

.option-group select:hover,
.option-group input:hover {
    border-color: var(--primary-color);
}

.option-group small {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.4;
}

.conversion-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.convert-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    min-width: 200px;
    justify-content: center;
}

.convert-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.convert-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.convert-btn:hover::before {
    left: 100%;
}

.convert-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow-md);
}

.cancel-btn {
    background: var(--danger-gradient);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 15px;
}

.cancel-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.cancel-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(229, 62, 62, 0.4);
}

.cancel-btn:hover::before {
    left: 100%;
}

.btn-icon {
    font-size: 1.2em;
    animation: pulse 2s ease-in-out infinite;
}

.btn-text {
    font-weight: 600;
    letter-spacing: 0.025em;
}

.estimated-time {
    background: var(--bg-secondary);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Progress Section */
.progress-section {
    margin-bottom: 40px;
    padding: 35px;
    background: linear-gradient(135deg, #f0fff4 0%, #f7fafc 100%);
    border-radius: var(--radius-lg);
    text-align: center;
    border: 2px solid rgba(72, 187, 120, 0.1);
    box-shadow: var(--shadow-md);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.progress-header h3 {
    color: var(--text-secondary);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.progress-stats {
    background: var(--bg-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.progress-container {
    position: relative;
    margin-bottom: 25px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--success-gradient);
    border-radius: 6px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    position: relative;
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

.progress-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6));
    animation: progressGlow 2s ease-in-out infinite;
}

.progress-percentage {
    position: absolute;
    top: -35px;
    right: 0;
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.progress-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.progress-text {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 1rem;
}

.progress-time {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.progress-time span {
    background: var(--bg-primary);
    padding: 6px 12px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.current-page-preview {
    margin-top: 20px;
    text-align: center;
}

.preview-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 500;
}

#previewCanvas {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    background: white;
}

@keyframes progressGlow {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Results Section */
.results-section {
    text-align: center;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-header h3 {
    color: #2d3748;
    font-size: 1.5rem;
}

.download-zip-btn {
    background: #48bb78;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-zip-btn:hover {
    background: #38a169;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.image-item {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    border: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
}

.image-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.image-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.image-item:hover::before {
    transform: scaleX(1);
}

.image-preview {
    width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.image-preview:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.image-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.page-number {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.image-size,
.file-size {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
    align-self: flex-start;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.download-single-btn,
.preview-btn {
    flex: 1;
    min-width: 120px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: var(--shadow-sm);
}

.preview-btn {
    background: var(--success-gradient);
}

.download-single-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.preview-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.3);
}

.new-conversion-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.new-conversion-btn:hover {
    background: #c53030;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 62, 62, 0.4);
}

/* Minimal Liquid Glass Footer */
.glass-footer {
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.glass-container {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.02) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px 25px 0 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
}

.glass-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4) 20%, 
        rgba(102, 126, 234, 0.6) 50%, 
        rgba(255, 255, 255, 0.4) 80%, 
        transparent
    );
    animation: liquidShimmer 3s ease-in-out infinite;
}

@keyframes liquidShimmer {
    0%, 100% { 
        opacity: 0.3;
        transform: translateX(-10px);
    }
    50% { 
        opacity: 1;
        transform: translateX(10px);
    }
}

.glass-content {
    padding: 30px 20px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.brand-minimal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.brand-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 8px rgba(102, 126, 234, 0.3));
    animation: floatIcon 4s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(2deg); }
}

.brand-name {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.footer-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.6) 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        rgba(118, 75, 162, 0.6) 100%
    );
    margin: 0 auto 15px;
    border-radius: 2px;
    animation: dividerPulse 2s ease-in-out infinite;
}

@keyframes dividerPulse {
    0%, 100% { 
        opacity: 0.6;
        transform: scaleX(1);
    }
    50% { 
        opacity: 1;
        transform: scaleX(1.1);
    }
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 12px;
    transition: var(--transition-normal);
    letter-spacing: 0.3px;
}

.footer-link:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    text-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.footer-separator {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    margin: 0 5px;
}

.footer-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.liquid-animation {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.1) 0%, 
        rgba(118, 75, 162, 0.05) 50%, 
        rgba(102, 126, 234, 0.1) 100%
    );
    overflow: hidden;
}

.liquid-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.1) 25%,
        rgba(102, 126, 234, 0.2) 50%,
        rgba(255, 255, 255, 0.1) 75%,
        transparent
    );
    animation: liquidWave 4s linear infinite;
}

@keyframes liquidWave {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.liquid-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 150%;
    height: 100%;
    background: radial-gradient(ellipse at center,
        rgba(102, 126, 234, 0.1) 0%,
        transparent 60%
    );
    animation: liquidPulse 3s ease-in-out infinite;
}

@keyframes liquidPulse {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.2);
    }
}

/* Minimal Liquid Glass Footer - Complete */

/* Liquid Glass Footer Responsive Design */
@media (max-width: 768px) {
    .glass-content {
        padding: 25px 15px;
    }
    
    .brand-minimal {
        flex-direction: column;
        gap: 8px;
    }
    
    .brand-icon {
        font-size: 1.5rem;
    }
    
    .brand-name {
        font-size: 1rem;
    }
    
    .footer-text {
        font-size: 0.85rem;
    }
}

/* Accessibility & Focus States */
.keyboard-focus {
    outline: 3px solid var(--primary-color) !important;
    outline-offset: 2px !important;
}

button:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Enhanced animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.upload-section {
    animation: fadeInUp 0.6s ease;
}

.controls-section {
    animation: fadeInUp 0.8s ease;
}

.progress-section {
    animation: scaleIn 0.5s ease;
}

.results-section {
    animation: fadeInUp 1s ease;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f7fafc;
        --text-secondary: #e2e8f0;
        --text-muted: #a0aec0;
        --bg-primary: #2d3748;
        --bg-secondary: #4a5568;
        --bg-tertiary: #718096;
        --border-color: #4a5568;
    }
    
    body {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    }
    
    main {
        background: var(--bg-primary);
        color: var(--text-primary);
    }
    
    .upload-area {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
        color: var(--text-primary);
    }
    
    .controls-section {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    }
}

/* Print styles */
@media print {
    .upload-section,
    .controls-section,
    .progress-section {
        display: none !important;
    }
    
    .results-section {
        page-break-inside: avoid;
    }
    
    .image-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-gradient: #000000;
        --secondary-gradient: #333333;
        --border-color: #000000;
    }
    
    .upload-area {
        border-color: #000000;
        border-width: 3px;
    }
    
    button {
        border: 2px solid #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;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    main {
        padding: clamp(20px, 5vw, 30px);
    }
    
    header h1 {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }
    
    .features-highlight {
        gap: 10px;
    }
    
    .features-highlight span {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    /* Glass footer responsive adjustments already defined above */
    
    .upload-area {
        padding: clamp(30px, 8vw, 50px) 15px;
    }
    
    .results-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .images-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .progress-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .progress-details {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .progress-time {
        justify-content: center;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .brand-text {
        font-size: 0.9rem;
        letter-spacing: 0.5px;
    }
    
    .features-highlight {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .features-highlight span {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
    
    .footer-sections {
        justify-content: center;
        text-align: center;
    }
    
    .footer-brand h3 {
        font-size: 1.2rem;
    }
    
    .brand-logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo-icon {
        font-size: 2rem;
    }
    
    .social-links {
        gap: 10px;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .modal-content {
        margin: 10px;
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 40px);
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
        max-height: calc(100vh - 200px);
    }
    
    .convert-btn {
        min-width: 100%;
        padding: 16px 20px;
    }
    
    .cancel-btn {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
    
    .image-item {
        padding: 15px;
    }
    
    .modal-content {
        margin: 10px;
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}