/* Import Google Fonts with font-display optimization */
/* Google Fonts disabled for demo - uncomment when needed */
/* @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); */

/* Critical CSS - Above the fold styles */
/* These styles are loaded immediately for better performance */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Arial', sans-serif;
}

:root {
    --primary-color: #4a6cf7;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    background-color: #f5f8ff;
    color: var(--dark-color);
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: none;
    position: sticky;
    top: 0;
    background: rgba(245, 248, 255, 0.8);
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 20px rgba(74, 108, 247, 0.1);
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 3.5rem;
    font-weight: 700;
}

header p {
    color: var(--secondary-color);
    font-size: 1.1rem;
}



/* Main Content Layout */
.main-content {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.conversion-workspace {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.main-content-row {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}



.premium-sidebar .upgrade-btn {
    width: 100%;
    margin-bottom: 20px;
    font-size: 16px;
    padding: 15px;
}

/* Pricing Preview Styles */
.pricing-preview {
    margin-bottom: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pricing-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
}

.price-option {
    color: white;
    font-weight: 600;
    font-size: 14px;
    padding: 4px 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    backdrop-filter: blur(10px);
}

.pricing-preview.mobile {
    margin-bottom: 10px;
    padding: 8px;
}

.pricing-preview.mobile .price-option {
    font-size: 12px;
    padding: 3px 6px;
}

/* Mobile Premium Section */
.mobile-premium-section {
    display: none;
}

@media (max-width: 768px) {
    .mobile-premium-section {
        display: block;
    }
}

.mobile-premium-section .upgrade-btn {
    padding: 8px 12px;
    font-size: 12px;
    min-width: auto;
    flex: 0 0 auto;
}

/* Desktop Convert Actions */
.desktop-convert-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

/* Mobile Convert Actions */
.mobile-convert-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Media queries for responsive convert actions */
@media (max-width: 768px) {
    .desktop-convert-actions {
        display: none;
    }
    
    .mobile-convert-actions {
        display: flex;
    }
}

.upload-section {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 2px solid #e8f4fd;
}

.convert-controls-section {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 2px solid #e8f4fd;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.upload-container {
    background-color: white;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    border: 3px dashed var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow-color);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.upload-container:hover {
    border-color: var(--primary-color);
    background-color: #f8fafc;
}

.upload-container.drag-over {
    border-color: var(--primary-color);
    background-color: #e6f3ff;
    transform: scale(1.02);
}

.selected-files-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 2px solid #e8f4fd;
    margin-top: 20px;
    width: 100%;
}

/* Progress Bar Styles */
.upload-progress {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 2px solid #e8f4fd;
    margin-top: 20px;
    display: none;
}

/* Screen blur overlay during upload */
.upload-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(245, 248, 255, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.upload-overlay.show {
    display: flex;
}

.upload-modal {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(74, 108, 247, 0.15);
    border: 1px solid rgba(74, 108, 247, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.upload-counter {
    font-size: 2.5rem;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 1rem;
}

.upload-status {
    font-size: 1.2rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.upload-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.upload-progress-bar {
    width: 100%;
    height: 16px;
    background: #e5e7eb;
    border-radius: 8px;
    margin: 1.5rem 0;
    overflow: hidden;
    border: 1px solid #d1d5db;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 8px;
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

.progress-files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.progress-file-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 6px;
}

.progress-file-item.completed {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.progress-file-item .file-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #6c757d;
}

.progress-file-item.completed .file-status {
    background: #28a745;
}

.selected-files-preview {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px var(--shadow-color);
    overflow-y: auto;
    flex: 1;
}

.selected-files-preview h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-top: 0;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

/* Three-column layout */
.upload-section {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

.convert-controls-section {
    flex: 0 0 350px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-content-row {
    display: flex;
    gap: 30px;
    align-items: stretch;
    justify-content: space-between;
}

.content-row {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    justify-content: space-between;
}

.controls-section {
    flex: 0 0 350px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Premium Sidebar */
.premium-sidebar {
    flex: 0 0 350px;
    background: linear-gradient(135deg, #fff9e6, #fff3d3);
    border: 2px solid #ffd700;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.2);
    display: flex;
    flex-direction: column;
}



.upload-container {
    flex: 1;
    min-width: 300px;
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    border: 2px dashed var(--border-color);
    transition: border-color 0.3s;
    box-shadow: 0 5px 15px var(--shadow-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.upload-container.highlight {
    border-color: var(--primary-color);
    background-color: rgba(74, 108, 247, 0.05);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.upload-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin: 15px 0;
    transition: background-color 0.3s;
}

.upload-btn:hover {
    background-color: #3a5bd9;
}

.supported-formats {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-top: 15px;
    margin-bottom: 5px;
}

.format-note {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.3;
}

.preview-container {
    flex: 2;
    min-width: 300px;
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.preview-container h2 {
    margin-bottom: 20px;
    color: var(--dark-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.preview-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.preview-item {
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 3px 10px var(--shadow-color);
    cursor: move;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.preview-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.page-number {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.preview-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.preview-item .remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 6px;
    height: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.3s;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.preview-item .remove-btn:hover {
    opacity: 1;
}

.preview-item .file-name {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.preview-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s, opacity 0.3s;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #3a5bd9;
}

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

.btn-secondary:hover:not(:disabled) {
    background-color: #5a6268;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
}

.request-format-container {
    margin-top: 20px;
    padding: 15px;
    border-top: 1px solid var(--border-color);
}

.request-format-container .btn {
    font-size: 0.9rem;
    padding: 8px 16px;
}

.request-format-container .btn i {
    margin-right: 8px;
}

/* Convert Section Styles */
.convert-section {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 5px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.convert-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.upgrade-btn {
    order: 3;
    margin-top: 15px;
    width: 100%;
}

/* Premium Features Section */
.premium-features-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #f59e0b;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.2);
    position: relative;
    overflow: hidden;
}

.premium-crown-decoration {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    animation: crownPulse 2s ease-in-out infinite;
    z-index: 2;
}

.premium-crown-decoration i {
    font-size: 24px;
    color: #b45309;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes crownPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
    }
}

.premium-features-section h4 {
    color: #92400e;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.premium-features-section h4 i {
    margin-right: 8px;
    color: #f59e0b;
}

.premium-features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    font-size: 0.9rem;
    color: #92400e;
    font-weight: 500;
}

.feature-item i {
    color: #f59e0b;
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

.convert-actions .btn {
    flex: 1;
    min-width: 120px;
    max-width: 200px;
}

/* Compact Layout Styles */
.convert-actions-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-large {
    padding: 15px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    min-height: 50px;
}

.btn-large i {
    margin-right: 8px;
    font-size: 1.2rem;
}

.settings-compact {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--border-color);
}

.settings-compact h4 {
    margin-bottom: 12px;
    color: var(--dark-color);
    font-size: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.setting-compact {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.setting-compact label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.setting-compact input,
.setting-compact select {
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.preview-mini {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    border: 1px solid var(--border-color);
}

.preview-mini h4 {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--dark-color);
}

.preview-list-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 120px;
    overflow-y: auto;
}

.preview-item-mini {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    font-size: 0.7rem;
    color: var(--secondary-color);
    position: relative;
}

.premium-upsell-compact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.premium-upsell-compact h4 {
    margin-bottom: 10px;
    font-size: 1rem;
}

.premium-upsell-compact ul {
    list-style: none;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.premium-upsell-compact li {
    margin-bottom: 4px;
}

.premium-upsell-compact li i {
    margin-right: 6px;
    color: #4ade80;
}

.btn-premium {
    background: #fbbf24;
    color: #1f2937;
    border: none;
    font-weight: 600;
    width: 100%;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.btn-premium:hover {
    background: #f59e0b;
}

/* Authentication & Premium Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.premium-modal-content {
    max-width: 800px;
    padding: 40px;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #333;
}

.auth-form h3 {
    margin-bottom: 25px;
    text-align: center;
    color: var(--dark-color);
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-full {
    width: 100%;
    margin-top: 10px;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--secondary-color);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #1f2937;
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 10000;
    max-width: 350px;
    font-size: 14px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: #10b981;
}

.notification-error {
    background: #ef4444;
}

.notification-info {
    background: #3b82f6;
}

.notification i {
    font-size: 16px;
    flex-shrink: 0;
}

/* Header Authentication */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo-link {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-link:hover .logo {
    transform: scale(1.05);
}

.auth-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 5px;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    transition: background-color 0.3s, color 0.3s;
    font-weight: bold;
}

.user-profile:hover {
    background-color: var(--primary-color);
    color: white;
}

.user-profile:hover .user-name-header {
    color: white;
}

.user-profile .fas.fa-chevron-down {
    display: none;
}

.user-avatar-small {
    display: none;
}

.user-name-header {
    font-weight: bold;
    color: inherit;
}

/* User Menu Dropdown */
.user-menu {
    position: absolute;
    top: 70px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    min-width: 250px;
    z-index: 1000;
    display: none !important;
}

.user-info {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
}

.user-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 4px;
}

.user-plan {
    font-size: 0.85rem;
    color: var(--secondary-color);
    padding: 2px 8px;
    background: #e3f2fd;
    border-radius: 12px;
    display: inline-block;
}

.menu-items {
    padding: 10px 0;
}

.menu-items a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--dark-color);
    text-decoration: none;
    transition: background-color 0.3s;
}

.menu-items a:hover {
    background-color: #f8f9fa;
}

.menu-items a i {
    width: 16px;
    color: var(--secondary-color);
}

/* Premium Pricing Plans */
.premium-header {
    text-align: center;
    margin-bottom: 30px;
}

.premium-header h2 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.premium-header p {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.pricing-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.plan {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.plan:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.plan-popular {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.plan h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.price span {
    font-size: 1rem;
    color: var(--secondary-color);
    font-weight: 400;
}

.savings {
    background: #4ade80;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
}

.plan ul {
    list-style: none;
    margin-bottom: 25px;
    text-align: left;
}

.plan li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan li i {
    color: #4ade80;
    font-size: 0.9rem;
}

/* Free Tier Limitations */
.tier-limitation {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 12px 15px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tier-limitation i {
    color: #f39c12;
}

.tier-limitation-text {
    font-size: 0.9rem;
    color: #856404;
}

.upgrade-prompt {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1f2937;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
    animation: slideIn 0.3s ease;
}

.upgrade-prompt h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.upgrade-prompt p {
    margin: 0 0 15px 0;
    font-size: 14px;
    opacity: 0.9;
}

.btn-upgrade {
    background: #1f2937;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-upgrade:hover {
    background: #374151;
    transform: translateY(-1px);
}

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

/* Responsive adjustments for notifications */
@media (max-width: 768px) {
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .upgrade-prompt {
        margin: 15px 0;
        padding: 15px;
    }
}

.settings-panel {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.settings-panel h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.setting {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.setting label {
    flex: 1;
    font-weight: bold;
}

.setting input,
.setting select {
    flex: 2;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

footer {
    text-align: center;
    padding: 20px 0;
    color: var(--secondary-color);
    border-top: 1px solid var(--border-color);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    color: white;
    font-size: 1.2rem;
}

/* Mobile-first responsive design */

/* Base mobile styles (320px+) */
.container {
    padding: 15px;
}

header h1 {
    font-size: 1.8rem;
}

header p {
    font-size: 1rem;
}

main {
    flex-direction: column;
    gap: 20px;
}

.upload-section,
.preview-section {
    width: 100%;
}

.upload-area {
    min-height: 200px;
    padding: 20px;
}

.preview-list {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.preview-item img {
    height: 100px;
}

.setting {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.setting label {
    font-size: 0.9rem;
    font-weight: 600;
}

.setting input,
.setting select {
    width: 100%;
    min-height: 44px; /* Touch-friendly */
    font-size: 16px; /* Prevent zoom on iOS */
}

button {
    min-height: 44px;
    font-size: 16px;
    padding: 12px 20px;
}

.btn-primary {
    width: 100%;
    margin-bottom: 10px;
}

/* Small tablets (576px+) */
@media (min-width: 576px) {
    .container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    .preview-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .preview-item img {
        height: 120px;
    }
    
    .btn-primary {
        width: auto;
        margin-bottom: 0;
    }
}

/* Tablets (768px+) */
@media (min-width: 768px) {
    main {
        flex-direction: row;
        gap: 30px;
    }
    
    .upload-section {
        flex: 1;
        max-width: 400px;
    }
    
    .convert-controls-section {
        flex: 1;
        max-width: 400px;
        overflow-y: auto;
    }
    
    .preview-section {
        flex: 2;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    .setting {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }
    
    .setting input,
    .setting select {
        width: auto;
        min-width: 200px;
    }
}

/* Desktop (992px+) */
@media (min-width: 992px) {
    .container {
        max-width: 1200px;
    }
    
    .preview-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .preview-item img {
        height: 150px;
    }
}

/* Large desktop (1200px+) */
@media (min-width: 1200px) {
    .upload-area {
        min-height: 300px;
    }
    
    .preview-list {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .preview-item img {
        height: 180px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .upload-area:hover {
        background-color: var(--light-color);
        transform: none;
    }
    
    button:hover {
        transform: none;
    }
    
    .preview-item:hover {
        transform: none;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .preview-item img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Performance Optimizations */
/* Enable hardware acceleration for smooth animations */
.upload-area,
.preview-item,
button,
.premium-upsell {
    will-change: transform;
    transform: translateZ(0);
}

/* Optimize image loading */
img {
    loading: lazy;
    decoding: async;
}

/* Reduce paint complexity */
.container {
    contain: layout style paint;
}

/* Optimize font rendering */
body {
    font-display: swap;
    text-rendering: optimizeSpeed;
}

/* Critical resource hints */
.preview-item img {
    content-visibility: auto;
    contain-intrinsic-size: 150px 150px;
}

/* Reduce layout thrashing */
.preview-list {
    contain: layout;
}

html {
    scroll-behavior: smooth;
}

/* Optimize animations for 60fps */
@media (prefers-reduced-motion: no-preference) {
    * {
        scroll-behavior: smooth;
    }
    
    .upload-area,
    .preview-item,
    button {
        transition-duration: 0.2s;
        transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}



/* Premium Features Upsell */
.premium-upsell {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.premium-upsell h3 {
    margin: 0 0 15px 0;
    font-size: 1.4rem;
    color: #ffd700;
}

.premium-upsell ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.premium-upsell li {
    padding: 5px 0;
    font-size: 0.95rem;
}

.premium-upsell li i {
    color: #4ade80;
    margin-right: 8px;
}

.btn-premium {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #1a1a1a;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .main-content-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .upload-section {
        flex: none;
        width: 100%;
    }
    
    .convert-controls-section {
        flex: none;
        width: 100%;
    }
    
    .premium-sidebar {
        display: none;
    }
    
    .mobile-premium-section {
         display: block;
         background: linear-gradient(135deg, #fff9e6, #fff3d3);
         border: 2px solid #ffd700;
         border-radius: 15px;
         padding: 20px;
         box-shadow: 0 8px 25px rgba(255, 215, 0, 0.2);
         margin: 20px 0;
     }
     
     .mobile-premium-section h4 {
         color: #b8860b;
         margin-bottom: 15px;
         font-size: 18px;
         text-align: center;
     }
     
     .mobile-premium-section .premium-features-list {
         display: grid;
         grid-template-columns: 1fr;
         gap: 10px;
         margin-bottom: 20px;
     }
     
     .mobile-premium-section .feature-item {
         display: flex;
         align-items: center;
         gap: 10px;
         font-size: 14px;
     }
     
     .mobile-premium-section .feature-item i {
         color: #ffd700;
         width: 16px;
     }
     
     .mobile-premium-section .upgrade-btn {
         width: 100%;
         margin-top: 10px;
     }
    
    .desktop-convert-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .upload-container {
        padding: 30px 20px;
        min-height: 250px;
    }
    
    .selected-files-section {
        flex: none;
        width: 100%;
        min-width: auto;
        margin-top: 20px;
    }
    
    .selected-files-preview {
        min-height: 300px;
        padding: 15px;
    }
    
    .convert-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .upgrade-btn {
        order: unset;
        margin-top: 0;
        width: 100%;
    }
    
    .premium-features-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .premium-features-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .feature-item {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .btn-large {
        width: 100%;
        padding: 15px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    .upload-container {
        padding: 15px;
    }
    
    .btn-large {
        padding: 12px 24px;
        font-size: 1rem;
        width: 100%;
    }
    
    .controls-premium-section {
        padding: 12px;
    }
    
    .selected-files-preview {
        padding: 12px;
    }
    

}

/* Feedback Section Styles */
.feedback-section {
    background-color: #f8f9fa;
    padding: 40px 20px;
    margin: 40px 0;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.feedback-section h3 {
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.feedback-section p {
    color: var(--secondary-color);
    margin-bottom: 25px;
}

.feedback-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover:not(:disabled) {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.feedback-status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

.success-message {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 15px;
    border-radius: 5px;
}

.success-message i {
    margin-right: 8px;
    color: #28a745;
}

@media (max-width: 768px) {
    .feedback-section {
        padding: 30px 15px;
        margin: 30px 0;
    }
    
    .feedback-section h3 {
        font-size: 1.3rem;
    }
}

/* Lazy loading and image optimization styles */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.lazy.loaded {
    opacity: 1;
    background: none;
    animation: none;
}

.lazy.error {
    opacity: 0.5;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 12px;
}

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

/* WebP support detection */
.webp .preview-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Performance optimizations */
.preview-image {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Intersection observer loading states */
.preview-item img {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.preview-item img.loading {
    opacity: 0.7;
    transform: scale(0.95);
}

.preview-item img.loaded {
    opacity: 1;
    transform: scale(1);
}