/* ============================================
   HEIC to JPG Converter - Modern Stylesheet
   Orange/Amber Color Theme for ConvertICO
   With Dark Mode Support
   ============================================ */

/* CSS Variables - Light Mode (Default) */
:root {
    --transition-speed: 0.25s;
    
    /* Primary Colors - Orange/Amber Theme */
    --primary: #F59E0B;
    --primary-light: #FEF3C7;
    --primary-dark: #D97706;
    --accent: #FBBF24;
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    
    /* Background Colors */
    --bg: #FFFBEB;
    --bg-elevated: #ffffff;
    --bg-secondary: #FEF3C7;
    
    /* 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, #FFFBEB 0%, #FEF3C7 100%);
    
    /* Checker pattern for transparency */
    --checker-color: #e5e7eb;
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --primary: #FBBF24;
    --primary-light: rgba(251, 191, 36, 0.15);
    --primary-dark: #F59E0B;
    --accent: #FCD34D;
    --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(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 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 {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.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, .file-item.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.file-item-icon {
    color: var(--primary);
    flex-shrink: 0;
}

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

.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-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

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

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

/* Preview Container */
.preview-container {
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.preview-placeholder {
    text-align: center;
    color: var(--text-muted);
}

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

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

#previewImage {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-sm);
}

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

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

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

/* Quality Slider */
.quality-slider-wrapper { padding: 0.5rem 0; }

.quality-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #94a3b8, var(--primary), #10B981);
    outline: none;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.quality-slider:hover { opacity: 1; }

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.quality-slider::-webkit-slider-thumb:hover { transform: scale(1.1); }

.quality-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.quality-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.quality-labels span:nth-child(2) { font-weight: 600; color: var(--primary); }

/* Quality Presets */
.quality-presets { display: flex; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap; }

.preset-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

.preset-btn svg, .preset-btn i { width: 14px; height: 14px; }

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

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    color: var(--text);
}

.checkbox-option:hover {
    border-color: var(--primary-light);
    background: var(--primary-light);
}

.checkbox-option:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

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

.checkbox-option .option-icon { 
    width: 16px; 
    height: 16px; 
    color: var(--text-muted); 
    flex-shrink: 0; 
}

.checkbox-option:has(input:checked) .option-icon { color: var(--primary); }

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

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    color: var(--text);
}

.radio-option:hover {
    border-color: var(--primary-light);
    background: var(--primary-light);
}

.radio-option:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

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

.radio-label { font-weight: 500; }

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

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

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

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

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: var(--bg);
    border-top: 1px solid var(--border);
    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.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-lg svg, .btn-lg i { width: 22px; height: 22px; }

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

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

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

[data-theme="dark"] .processing-overlay { background: rgba(15, 23, 42, 0.95); }

.processing-content { text-align: center; padding: 2rem; }

.processing-spinner { color: var(--primary); margin-bottom: 1.5rem; }
.processing-spinner svg, .processing-spinner i { width: 48px; height: 48px; }
.processing-spinner .spin { animation: spin 1s linear infinite; }

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

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

.progress-bar-container {
    width: 300px;
    max-width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto 0.75rem;
}

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

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

/* Results Section */
.results-section { padding: 3rem; text-align: center; animation: fadeIn 0.4s ease; }
.results-header { margin-bottom: 2rem; }

.success-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--success-light);
    border-radius: var(--radius-full);
    color: #059669;
}

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

.success-badge svg, .success-badge i { flex-shrink: 0; width: 32px; height: 32px; }
.success-badge h2 { margin: 0; font-size: 1.25rem; font-weight: 600; }

/* Converted Files List */
.converted-files-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    margin-bottom: 2rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 1.5rem !important;
}

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

.converted-file-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--checker-color);
}

.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;
}

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

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

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

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

/* Results Stats - Scoped to avoid custom_styles.css conflicts */
.results-section .results-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    flex-wrap: wrap;
    transition: background-color var(--transition-speed);
}

.results-section .results-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    flex-direction: row;
    text-align: left;
    min-height: auto;
    background: none;
    border-radius: 0;
    box-shadow: none;
}

.results-section .results-stats .stat-item::after {
    display: none;
}

.results-section .results-stats .stat-item.highlight {
    background: var(--success-light);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
}

.results-section .results-stats .stat-item.highlight .stat-value { color: var(--success); }

.results-section .results-stats .stat-item.highlight.saved { background: var(--success-light); }
.results-section .results-stats .stat-item.highlight.saved .stat-value { color: var(--success); }

.results-section .results-stats .stat-item.highlight.increased { background: var(--danger-light); }
.results-section .results-stats .stat-item.highlight.increased .stat-value { color: var(--danger); }

.results-section .results-stats .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: inline;
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: normal;
}

.results-section .results-stats .stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

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

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

[data-theme="dark"] .error-message { color: var(--danger); }

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

.error-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.error-close:hover { opacity: 1; }
.error-close svg, .error-close i { width: 18px; height: 18px; }

/* Related Tools */
.related-tools {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.25rem 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.75rem; flex-wrap: wrap; }

.related-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    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; }

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

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

.feature-item > svg, .feature-item > i {
    color: var(--primary);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-top: 2px;
}

.feature-item strong {
    display: block;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.feature-item p {
    margin: 0;
    font-size: 0.9rem;
}

/* 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; }

/* 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.heic {
    border-color: var(--primary);
}

.format-column.jpg {
    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.heic .format-header {
    color: var(--primary);
}

.format-column.jpg .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; }

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.tool-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.tool-link svg, .tool-link i {
    color: var(--primary);
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.tool-link:hover svg, .tool-link:hover i { color: white; }

/* 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%; }
    .feature-grid, .benefits-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .tool-title { font-size: 1.5rem; }
    .quality-presets { flex-direction: column; }
    .preset-btn { width: 100%; justify-content: center; }
    .results-actions { flex-direction: column; }
    .tools-grid { grid-template-columns: 1fr 1fr; }
}

/* 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; 
    }
}
