/* ============================================
   TIFF to PNG Converter - Modern Stylesheet
   Blue Color Theme for ConvertICO
   With Dark Mode Support
   ============================================ */

/* CSS Variables - Light Mode (Default) */
:root {
    --transition-speed: 0.25s;
    
    /* Primary Colors - Blue Theme */
    --primary: #3399cc;
    --primary-light: #e6f4fb;
    --primary-dark: #2a7da8;
    --accent: #4db8e8;
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    
    /* Background Colors */
    --bg: #f0f8fc;
    --bg-elevated: #ffffff;
    --bg-secondary: #e6f4fb;
    
    /* Text Colors */
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    /* Border Colors */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1);
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Upload area */
    --upload-bg: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    --upload-hover-bg: linear-gradient(135deg, #f0f8fc 0%, #e6f4fb 100%);
    
    /* Checker pattern for transparency */
    --checker-color: #e5e7eb;
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --primary: #4db8e8;
    --primary-light: rgba(77, 184, 232, 0.15);
    --primary-dark: #3399cc;
    --accent: #6bc9f0;
    --success: #4ade80;
    --success-light: rgba(74, 222, 128, 0.15);
    --warning: #fbbf24;
    --warning-light: rgba(251, 191, 36, 0.15);
    --danger: #f87171;
    --danger-light: rgba(248, 113, 113, 0.15);
    
    --bg: #0f172a;
    --bg-elevated: #1e293b;
    --bg-secondary: #334155;
    
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border: #334155;
    --border-light: #475569;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.5);
    
    --upload-bg: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --upload-hover-bg: linear-gradient(135deg, rgba(51, 153, 204, 0.1) 0%, rgba(77, 184, 232, 0.2) 100%);
    
    --checker-color: #374151;
}

/* Base */
* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.tool-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.tool-header { text-align: center; margin-bottom: 2rem; }

.tool-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tool-icon-wrapper {
    width: 64px;
    height: 64px;
    background: var(--primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
    transition: background-color var(--transition-speed);
}

.tool-icon-wrapper svg, .tool-icon-wrapper i { width: 32px; height: 32px; }

.tool-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin: 0;
    color: var(--primary);
}

.tool-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Main Tool Area */
.tool-main {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    position: relative;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

/* Upload Section */
.upload-section { padding: 3rem; }

.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--upload-bg);
    position: relative;
    overflow: hidden;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary);
    background: var(--upload-hover-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.upload-content { position: relative; z-index: 1; }

.upload-icon {
    color: var(--primary);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.upload-icon svg, .upload-icon i { width: 64px; height: 64px; }
.upload-area:hover .upload-icon { transform: translateY(-5px); }

.upload-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.5rem;
}

.upload-subtitle {
    color: var(--text-secondary);
    margin: 0 0 1rem;
    font-size: 1rem;
}

.file-types {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.file-type-badge {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

[data-theme="dark"] .file-type-badge { color: var(--primary); }

.upload-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    transition: background-color var(--transition-speed);
}

.upload-hint svg, .upload-hint i { width: 14px; height: 14px; }

/* Editor Section */
.editor-section { padding: 0; animation: fadeIn 0.4s ease; }

/* Files Header */
.files-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.files-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.files-header-left svg, .files-header-left i {
    color: var(--primary);
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.files-header-right {
    display: flex;
    gap: 0.5rem;
}

.btn-text {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.btn-text:hover {
    background: var(--primary-light);
}

.btn-text svg, .btn-text i { width: 16px; height: 16px; }

/* Editor Grid */
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }

.preview-panel, .controls-panel { padding: 2rem; }

.preview-panel {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.panel-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.panel-header h3 svg, .panel-header h3 i {
    color: var(--primary);
    width: 20px;
    height: 20px;
}

/* File List */
.file-list {
    max-height: 180px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-item:hover { border-color: var(--primary); }
.file-item.selected {
    background: var(--primary-light);
    border-color: var(--primary);
}

.file-item-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
    transition: background-color var(--transition-speed);
}

.file-item-icon svg, .file-item-icon i { width: 18px; height: 18px; }

.file-item-info { flex: 1; min-width: 0; }

.file-item-name {
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
}

.file-item-size {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-item-pages {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
}

.file-item-remove {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.file-item-remove:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.file-item-remove svg, .file-item-remove i { width: 14px; height: 14px; }

/* Preview Container */
.preview-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: repeating-conic-gradient(var(--checker-color) 0% 25%, transparent 0% 50%) 50% / 16px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color var(--transition-speed);
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
}

.preview-placeholder svg, .preview-placeholder i {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

.preview-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

.preview-placeholder small {
    font-size: 0.8rem;
    opacity: 0.7;
}

#previewCanvas {
    max-width: 100%;
    max-height: 300px;
    display: block;
}

/* Controls Panel */
.controls-panel {
    background: var(--bg-elevated);
    transition: background-color var(--transition-speed);
}

/* Format Info Banner */
.format-info-banner {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    transition: background-color var(--transition-speed);
}

.format-info-banner > svg, .format-info-banner > i {
    color: var(--primary);
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.format-info-banner strong {
    display: block;
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.format-info-banner p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Control Sections */
.control-section { margin-bottom: 1.5rem; }

.section-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.section-label svg, .section-label i {
    color: var(--primary);
    width: 18px;
    height: 18px;
}

/* Options Grid */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-option:hover { background: var(--bg-secondary); }

.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-option .option-icon {
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.checkbox-option span {
    font-size: 0.9rem;
    color: var(--text);
}

/* Resize Options */
.resize-options {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-option:hover { background: var(--bg-secondary); }

.radio-option input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.radio-label {
    font-size: 0.9rem;
    color: var(--text);
}

/* Privacy Notice */
.privacy-notice {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--success-light);
    border-radius: var(--radius-md);
    margin-top: 1rem;
    transition: background-color var(--transition-speed);
}

.privacy-notice > svg, .privacy-notice > i {
    color: var(--success);
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.privacy-notice strong {
    display: block;
    color: var(--text);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.privacy-notice p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Action Bar */
.action-bar {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    justify-content: flex-end;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn svg, .btn i { width: 18px; height: 18px; }

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(51, 153, 204, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(51, 153, 204, 0.4);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg);
    border-color: var(--text-muted);
}

.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }

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

/* Processing Overlay */
.processing-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.processing-content {
    background: var(--bg-elevated);
    padding: 3rem;
    border-radius: var(--radius-xl);
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    transition: background-color var(--transition-speed);
}

.processing-spinner {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.processing-spinner svg, .processing-spinner i { width: 48px; height: 48px; }

.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.processing-status {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 1.5rem;
}

.progress-bar-container {
    height: 8px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Results Section */
.results-section { padding: 3rem; animation: fadeIn 0.4s ease; }

.results-header { text-align: center; margin-bottom: 2rem; }

.success-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.success-badge > svg, .success-badge > i {
    width: 56px;
    height: 56px;
    color: var(--success);
}

.success-badge h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text);
}

/* Results Stats */
.results-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    min-width: 120px;
    transition: background-color var(--transition-speed);
}

.stat-item.highlight { background: var(--primary-light); }
.stat-item.highlight .stat-value { color: var(--primary); }
.stat-item.saved { background: var(--success-light); }
.stat-item.saved .stat-value { color: var(--success); }
.stat-item.increased { background: var(--warning-light); }
.stat-item.increased .stat-value { color: var(--warning); }

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

/* Converted Files List */
.converted-files-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.converted-file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    transition: background-color var(--transition-speed);
}

.converted-file-thumb {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: repeating-conic-gradient(var(--checker-color) 0% 25%, transparent 0% 50%) 50% / 8px 8px;
}

.converted-file-info { flex: 1; min-width: 0; }

.converted-file-name {
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
}

.converted-file-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.converted-file-download {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.converted-file-download:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.converted-file-download svg, .converted-file-download i { width: 18px; height: 18px; }

/* Results Actions */
.results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Error Message */
.error-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--danger-light);
    border: 1px solid var(--danger);
    border-radius: var(--radius-md);
    margin: 1.5rem;
    color: var(--danger);
    transition: background-color var(--transition-speed);
}

.error-message > svg, .error-message > i { flex-shrink: 0; width: 20px; height: 20px; }
.error-message span { flex: 1; font-weight: 500; }

.error-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--danger);
    cursor: pointer;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.error-close:hover { background: rgba(239, 68, 68, 0.2); }
.error-close svg, .error-close i { width: 16px; height: 16px; }

/* Related Tools */
.related-tools {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    flex-wrap: wrap;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.related-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

.related-label svg, .related-label i { color: var(--primary); }

.related-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.related-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.875rem;
    background: var(--bg);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.2s ease;
}

.related-link:hover { 
    background: var(--primary); 
    color: white; 
    border-color: var(--primary); 
}

.related-link svg, .related-link i { width: 14px; height: 14px; }

/* Info Sections */
.info-sections { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 2rem; }

.info-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.info-card h2 { 
    display: flex; 
    align-items: center; 
    gap: 0.75rem; 
    font-size: 1.35rem; 
    color: var(--text); 
    margin: 0 0 1.5rem; 
}

.info-card h2 svg, .info-card h2 i { 
    color: var(--primary); 
    flex-shrink: 0; 
    width: 24px; 
    height: 24px; 
}

.info-card p { color: var(--text-secondary); line-height: 1.7; margin: 0 0 1rem; }
.info-card p:last-child { margin-bottom: 0; }
.info-card p a { color: var(--primary); text-decoration: none; font-weight: 500; }
.info-card p a:hover { text-decoration: underline; }

/* Steps List */
.steps-list { list-style: none; padding: 0; margin: 0; counter-reset: step; }

.steps-list li {
    position: relative;
    padding-left: 3.5rem;
    padding-bottom: 1.5rem;
    counter-increment: step;
}

.steps-list li:not(:last-child)::after {
    content: '';
    position: absolute;
    left: calc(1rem - 1px);
    top: 2.5rem;
    bottom: 0;
    width: 2px;
    background: var(--primary-light);
}

.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    z-index: 1;
}

.step-content strong { display: block; color: var(--text); margin-bottom: 0.25rem; }
.step-content p { margin: 0; color: var(--text-secondary); font-size: 0.95rem; }
.step-content p a { color: var(--primary); text-decoration: none; font-weight: 500; }
.step-content p a:hover { text-decoration: underline; }

/* Tip Note */
.tip-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.tip-note svg, .tip-note i { color: var(--primary); flex-shrink: 0; }
.tip-note a { color: var(--primary); font-weight: 600; text-decoration: none; }
.tip-note a:hover { text-decoration: underline; }

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.benefit-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.benefit-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
    transition: background-color var(--transition-speed);
}

.benefit-icon svg, .benefit-icon i { width: 20px; height: 20px; }

.benefit-content h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    color: var(--text);
}

.benefit-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Format Comparison */
.format-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.format-column {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.format-column.tiff {
    border-color: var(--primary);
}

.format-column.png {
    border-color: var(--success);
}

.format-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.format-column.tiff .format-header {
    color: var(--primary);
}

.format-column.png .format-header {
    color: var(--success);
}

.format-header svg, .format-header i {
    width: 24px;
    height: 24px;
}

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

.format-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.format-features li svg, .format-features li i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.format-features li svg[data-lucide="check"], 
.format-features li i[data-lucide="check"] {
    color: var(--success);
}

.format-features li svg[data-lucide="x"], 
.format-features li i[data-lucide="x"] {
    color: var(--danger);
}

@media (max-width: 600px) {
    .format-comparison {
        grid-template-columns: 1fr;
    }
}

/* FAQ */
.faq-list { display: grid; gap: 0.75rem; }

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-speed);
}

.faq-question {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg);
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.faq-question:hover { background: var(--bg-elevated); }

.faq-question svg, .faq-question i { 
    color: var(--primary); 
    transition: transform 0.3s ease; 
    flex-shrink: 0; 
    width: 20px; 
    height: 20px; 
}

.faq-item.open .faq-question svg, .faq-item.open .faq-question i { transform: rotate(180deg); }

.faq-answer {
    display: none;
    padding: 0 1.25rem 1rem;
    background: var(--bg-elevated);
    transition: background-color var(--transition-speed);
}

.faq-item.open .faq-answer { display: block; }
.faq-answer p { margin: 0; color: var(--text-secondary); line-height: 1.7; }
.faq-answer a { color: var(--primary); text-decoration: none; font-weight: 500; }
.faq-answer a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 900px) {
    .editor-grid { grid-template-columns: 1fr; }
    .preview-panel { border-right: none; border-bottom: 1px solid var(--border); }
}

@media (max-width: 768px) {
    .tool-container { padding: 1rem; }
    .tool-title-row { flex-direction: row; gap: 0.75rem; }
    .tool-icon-wrapper { width: 48px; height: 48px; }
    .tool-icon-wrapper svg, .tool-icon-wrapper i { width: 24px; height: 24px; }
    .upload-section, .results-section { padding: 2rem 1.5rem; }
    .preview-panel, .controls-panel { padding: 1.5rem; }
    .action-bar { flex-direction: column; padding: 1.5rem; }
    .btn { width: 100%; }
    .files-header { flex-direction: column; align-items: flex-start; }
    .files-header-right { width: 100%; justify-content: space-between; }
    .related-tools { flex-direction: column; text-align: center; }
    .related-links { justify-content: center; }
    .results-section .results-stats { flex-direction: column; gap: 0.75rem; }
    .results-section .results-stats .stat-item { justify-content: space-between; width: 100%; }
    .benefits-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .tool-title { font-size: 1.5rem; }
    .results-actions { flex-direction: column; }
}

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

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { 
        animation-duration: 0.01ms !important; 
        transition-duration: 0.01ms !important; 
    }
}
