/* ============================================
   ICO to SVG Converter - Modern Stylesheet
   Teal/Green Color Theme for ConvertICO
   With Dark Mode Support
   ============================================ */

/* CSS Variables - Light Mode (Default) */
:root {
    --transition-speed: 0.25s;
    
    /* Primary Colors - Teal/Green Theme */
    --primary: #0D9488;
    --primary-light: #CCFBF1;
    --primary-dark: #0F766E;
    --accent: #14B8A6;
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    
    /* Background Colors */
    --bg: #f8fafc;
    --bg-elevated: #ffffff;
    --bg-secondary: #f1f5f9;
    
    /* 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);
    --shadow-primary: 0 4px 14px rgba(13, 148, 136, 0.25);
    --shadow-primary-hover: 0 6px 20px rgba(13, 148, 136, 0.35);
    
    /* 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, #ccfbf1 0%, #99f6e4 100%);
    
    /* Checkerboard for transparency */
    --checker-light: #f0f0f0;
    --checker-dark: #e0e0e0;
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --primary: #2DD4BF;
    --primary-light: rgba(45, 212, 191, 0.15);
    --primary-dark: #14B8A6;
    --accent: #5EEAD4;
    --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);
    --shadow-primary: 0 4px 14px rgba(45, 212, 191, 0.2);
    --shadow-primary-hover: 0 6px 20px rgba(45, 212, 191, 0.3);
    
    --upload-bg: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --upload-hover-bg: linear-gradient(135deg, rgba(13, 148, 136, 0.1) 0%, rgba(20, 184, 166, 0.2) 100%);
    
    --checker-light: #334155;
    --checker-dark: #475569;
}

/* 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-primary);
    flex-shrink: 0;
    transition: background-color var(--transition-speed), box-shadow 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);
    letter-spacing: -0.02em;
}

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

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

/* File Info Bar */
.file-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    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);
}

.file-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

.file-info-sizes {
    background: var(--primary-light);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    color: var(--primary);
    font-weight: 500;
}

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

/* Panel Styles */
.preview-panel, .controls-panel { padding: 2rem; }
.preview-panel { 
    border-right: 1px solid var(--border); 
    transition: border-color var(--transition-speed);
}

.panel-header { margin-bottom: 1.5rem; }
.panel-header h3 {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    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; 
}

/* Icon Sizes Preview */
.icon-sizes-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
    min-height: 120px;
}

.icon-preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-preview-item:hover { 
    border-color: var(--primary); 
}

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

.icon-preview-item img {
    max-width: 100%;
    max-height: 48px;
    margin-bottom: 0.5rem;
    image-rendering: pixelated;
}

.icon-preview-item .size-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.icon-preview-item.selected .size-label {
    color: var(--primary);
}

.preview-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.preview-hint svg, .preview-hint i { 
    color: var(--primary); 
    flex-shrink: 0; 
    width: 16px; 
    height: 16px; 
}

/* Control Sections */
.control-section { margin-bottom: 1.75rem; }
.control-section:last-child { margin-bottom: 0; }

.section-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
}
.section-label svg, .section-label i { 
    color: var(--primary); 
    width: 16px; 
    height: 16px; 
}
.label-hint {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Size Selection Grid */
.size-selection-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

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

.size-checkbox:hover { border-color: var(--primary); }
.size-checkbox.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.sizes-actions {
    display: flex;
    gap: 1rem;
}

.action-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.85rem;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0;
    font-weight: 500;
    transition: opacity 0.2s;
}
.action-link:hover { opacity: 0.8; }
.action-link svg, .action-link i { width: 14px; height: 14px; }

/* SVG Mode Selection */
.mode-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mode-option {
    cursor: pointer;
}

.mode-option input { display: none; }

.mode-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.mode-card svg, .mode-card i {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    margin-top: 2px;
    transition: color 0.2s ease;
}

.mode-info {
    flex: 1;
}

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

.mode-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.mode-option:hover .mode-card {
    border-color: var(--primary);
}

.mode-option input:checked + .mode-card {
    border-color: var(--primary);
    background: var(--primary-light);
}

.mode-option input:checked + .mode-card svg,
.mode-option input:checked + .mode-card i {
    color: var(--primary);
}

/* Trace Settings */
.trace-settings {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: background-color var(--transition-speed);
}

.setting-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-row label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.setting-control input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--border);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.setting-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.setting-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
}

.setting-control span {
    min-width: 70px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-align: right;
}

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

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

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

.checkbox-option .option-icon {
    display: none;
}

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

/* Styled Dropdown */
.option-row { margin-bottom: 0; }

.styled-dropdown {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

[data-theme="dark"] .styled-dropdown {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.styled-dropdown:hover { border-color: var(--primary); }
.styled-dropdown:focus { 
    outline: none; 
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
    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.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: var(--shadow-primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary-hover);
}

.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-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
}

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

/* Processing Overlay */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 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: 2.5rem;
    border-radius: var(--radius-xl);
    text-align: center;
    max-width: 350px;
    box-shadow: var(--shadow-xl);
    transition: background-color var(--transition-speed);
}

.processing-spinner {
    margin-bottom: 1.25rem;
    color: var(--primary);
}
.processing-spinner svg, .processing-spinner i { width: 48px; height: 48px; }
.processing-spinner .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 1rem;
}

.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);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: var(--radius-full);
}

.progress-text {
    font-size: 0.85rem;
    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: 48px;
    height: 48px;
    color: var(--success);
}
.success-badge h2 { 
    font-size: 1.5rem; 
    color: var(--text); 
    margin: 0; 
}

/* Converted Images Grid */
.converted-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.converted-image-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}
.converted-image-item:hover { 
    border-color: var(--primary); 
    box-shadow: var(--shadow-md);
}

.converted-image-item img,
.converted-image-item object,
.converted-image-item .svg-preview {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 0.5rem;
    background-image: 
        linear-gradient(45deg, var(--checker-light) 25%, transparent 25%),
        linear-gradient(-45deg, var(--checker-light) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--checker-light) 75%),
        linear-gradient(-45deg, transparent 75%, var(--checker-light) 75%);
    background-size: 10px 10px;
    background-position: 0 0, 0 5px, 5px -5px, -5px 0;
    border-radius: var(--radius-sm);
}

.image-size {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.image-filesize {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.download-single {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}
.download-single:hover { 
    background: var(--primary-dark); 
    transform: translateY(-1px);
}
.download-single svg, .download-single i { width: 14px; height: 14px; }

/* Results Info */
.results-info {
    max-width: 400px;
    margin: 0 auto 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-speed);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.info-row:last-child { border-bottom: none; }
.info-row span:first-child {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}
.info-row span:first-child svg, .info-row span:first-child i { color: var(--primary); }
.info-row span:last-child { 
    font-weight: 600; 
    color: var(--text); 
}

/* 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;
    background: var(--danger-light);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin: 1.25rem;
    font-weight: 500;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}
.error-message svg, .error-message i { flex-shrink: 0; width: 20px; height: 20px; }

/* Related Tools */
.related-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    margin: 2rem 0;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    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); width: 16px; height: 16px; }

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

.related-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
}
.related-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}
.related-link svg, .related-link i { width: 16px; height: 16px; }

/* Info Sections */
.info-sections { display: grid; gap: 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; 
}

/* Format Comparison */
.format-comparison {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

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

.format-badge {
    flex-shrink: 0;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
}

.format-badge.ico { background: #6366F1; }
.format-badge.svg { background: var(--primary); }

.format-details p { margin: 0; }

.format-note {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 1rem 1.25rem;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    margin-top: 0;
}

.format-note svg, .format-note i { 
    color: var(--primary); 
    flex-shrink: 0; 
    margin-top: 2px; 
    width: 18px; 
    height: 18px; 
}
.format-note span { 
    font-size: 0.9rem; 
    color: var(--text-secondary); 
    line-height: 1.5; 
}

/* Benefits List */
.benefits-list {
    display: grid;
    gap: 1rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: background-color var(--transition-speed);
}

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

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

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

/* 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 code {
    background: var(--bg-secondary);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--primary);
}

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

@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%; }
    .related-tools { flex-direction: column; text-align: center; }
    .related-links { justify-content: center; }
    .format-item { flex-direction: column; }
    .benefit-item { flex-direction: column; text-align: center; }
    .benefit-item i, .benefit-item svg { margin: 0 auto; }
    .mode-card { flex-direction: column; text-align: center; }
    .mode-card svg, .mode-card i { margin: 0 auto 0.5rem; }
}

@media (max-width: 480px) {
    .tool-title { font-size: 1.5rem; }
    .file-info-bar { 
        flex-direction: column; 
        gap: 0.75rem; 
        align-items: flex-start; 
    }
    .steps-list li { padding-left: 3rem; }
    .progress-bar-container { width: 100%; }
    .results-actions { flex-direction: column; }
    .converted-images-grid { grid-template-columns: repeat(2, 1fr); }
    .icon-sizes-preview { grid-template-columns: repeat(3, 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; 
    }
}
