/* ============================================
   App Icon Generator - Modern Stylesheet
   Blue/Indigo Theme for ConvertICO
   With Dark Mode Support
   ============================================ */

/* CSS Variables - Light Mode (Default) */
:root {
    --transition-speed: 0.25s;
    
    /* Primary Colors - Blue/Indigo Theme */
    --primary: #3b82f6;
    --primary-light: #dbeafe;
    --primary-dark: #2563eb;
    --accent: #6366f1;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    
    /* Platform Colors */
    --ios-color: #007aff;
    --android-color: #3ddc84;
    --macos-color: #a855f7;
    --web-color: #f97316;
    
    /* 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);
    
    /* 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, #eff6ff 0%, #dbeafe 100%);
    
    /* Checker pattern for transparency */
    --checker-color: #e5e7eb;
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-light: rgba(96, 165, 250, 0.15);
    --primary-dark: #3b82f6;
    --accent: #818cf8;
    --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);
    
    --ios-color: #60a5fa;
    --android-color: #4ade80;
    --macos-color: #c084fc;
    --web-color: #fb923c;
    
    --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(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 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;
}

.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);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    transition: background-color var(--transition-speed);
}

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

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

/* Preview Tabs */
.preview-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

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

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

.preview-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.preview-tab svg, .preview-tab i { width: 16px; height: 16px; }

/* Preview Content */
.preview-content {
    min-height: 280px;
}

.preview-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.preview-pane.active { display: block; }

.preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.preview-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    overflow: hidden;
    background: repeating-conic-gradient(var(--checker-color) 0% 25%, transparent 0% 50%) 50% / 10px 10px;
    border: 1px solid var(--border);
    transition: border-color var(--transition-speed), background var(--transition-speed);
}

.preview-icon img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* iOS icon styles */
.ios-icon { border-radius: 22.5%; }
.ios-icon.large { width: 80px; height: 80px; }
.ios-icon.medium { width: 60px; height: 60px; }
.ios-icon.small { width: 48px; height: 48px; }
.ios-icon.tiny { width: 36px; height: 36px; }

/* Android icon styles */
.android-legacy { border-radius: var(--radius-sm); }
.android-round { border-radius: 50%; }
.android-adaptive { 
    border-radius: 50%; 
    position: relative;
}
.android-squircle { 
    border-radius: 30%; 
    position: relative;
}

.android-adaptive .adaptive-bg,
.android-squircle .adaptive-bg {
    position: absolute;
    inset: 0;
    background: #ffffff;
    z-index: 0;
}

.android-adaptive .adaptive-fg,
.android-squircle .adaptive-fg {
    position: relative;
    z-index: 1;
    width: 70%;
    height: 70%;
}

.android-legacy.large,
.android-round.large,
.android-adaptive.large,
.android-squircle.large { width: 64px; height: 64px; }

/* macOS icon styles */
.macos-icon { border-radius: 22.5%; box-shadow: var(--shadow-sm); }
.macos-icon.xlarge { width: 80px; height: 80px; }
.macos-icon.large { width: 64px; height: 64px; }
.macos-icon.medium { width: 48px; height: 48px; }
.macos-icon.small { width: 32px; height: 32px; }

/* Web icon styles */
.web-icon { border-radius: var(--radius-sm); }
.web-icon.large { width: 64px; height: 64px; }
.web-icon.medium { width: 48px; height: 48px; }
.web-icon.small { width: 32px; height: 32px; }
.web-icon.tiny { width: 24px; height: 24px; }

.preview-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.125rem;
}

.preview-size {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.preview-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--primary-dark);
}

[data-theme="dark"] .preview-hint { color: var(--primary); }

.preview-hint svg, .preview-hint i { flex-shrink: 0; width: 16px; height: 16px; }

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

.label-hint { font-weight: 400; color: var(--text-muted); font-size: 0.8rem; }

/* Platform Grid */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.platform-checkbox {
    cursor: pointer;
}

.platform-checkbox input { display: none; }

.platform-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    text-align: center;
}

.platform-box svg, .platform-box i {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.platform-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0.125rem;
}

.platform-count {
    font-size: 0.7rem;
    color: var(--text-muted);
}

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

.platform-checkbox input:checked + .platform-box {
    border-color: var(--primary);
    background: var(--primary-light);
}

.platform-checkbox input:checked + .platform-box svg,
.platform-checkbox input:checked + .platform-box i {
    color: var(--primary);
}

/* Adaptive Icon Controls */
.adaptive-controls { display: flex; flex-direction: column; gap: 0.75rem; }

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.color-picker-row label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 140px;
}

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

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.color-input-wrapper input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
    background: none;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch {
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
}

.color-text {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: monospace;
    text-transform: uppercase;
    background: var(--bg-elevated);
    color: var(--text);
    transition: border-color 0.2s ease;
}

.color-text:focus {
    outline: none;
    border-color: var(--primary);
}

.color-presets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-preset {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.color-preset:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-sm);
}

.color-preset[data-color="#ffffff"] { background: #ffffff; }
.color-preset[data-color="#000000"] { background: #000000; }
.color-preset[data-color="#3b82f6"] { background: #3b82f6; }
.color-preset[data-color="#10b981"] { background: #10b981; }
.color-preset[data-color="#f59e0b"] { background: #f59e0b; }
.color-preset[data-color="#ef4444"] { background: #ef4444; }
.color-preset[data-color="#8b5cf6"] { background: #8b5cf6; }
.color-preset[data-color="#06b6d4"] { background: #06b6d4; }

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

/* Output Info */
.output-info {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all var(--transition-speed);
}

.output-stat {
    flex: 1;
    text-align: center;
}

.output-stat .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.output-stat .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* 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(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 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);
}

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

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

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

/* Results Summary */
.results-summary {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    flex-wrap: wrap;
    transition: background-color var(--transition-speed);
}

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

.summary-item svg, .summary-item i {
    color: var(--primary);
    width: 20px;
    height: 20px;
}

/* Platform Breakdown */
.platform-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.breakdown-item {
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    text-align: left;
    transition: all var(--transition-speed);
}

.breakdown-item h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: var(--text);
}

.breakdown-item h4 svg, .breakdown-item h4 i {
    width: 16px;
    height: 16px;
}

.breakdown-item.ios h4 svg, .breakdown-item.ios h4 i { color: var(--ios-color); }
.breakdown-item.android h4 svg, .breakdown-item.android h4 i { color: var(--android-color); }
.breakdown-item.macos h4 svg, .breakdown-item.macos h4 i { color: var(--macos-color); }
.breakdown-item.web h4 svg, .breakdown-item.web h4 i { color: var(--web-color); }

.breakdown-item p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

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

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

/* Sizes Grid */
.sizes-grid { display: grid; gap: 1rem; }

.size-category {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.category-tag {
    flex-shrink: 0;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 90px;
    justify-content: center;
}

.category-tag.ios-tag { background: var(--ios-color); }
.category-tag.android-tag { background: var(--android-color); }
.category-tag.macos-tag { background: var(--macos-color); }
.category-tag.web-tag { background: var(--web-color); }

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

/* Tip Box */
.tip-box {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 1rem 1.25rem;
    background: var(--warning-light);
    border-radius: var(--radius-md);
    border: 1px dashed var(--warning);
    margin-top: 1rem;
}

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

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

/* 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; }
    .platform-grid { grid-template-columns: repeat(2, 1fr); }
    .preview-grid { grid-template-columns: repeat(2, 1fr); }
}

@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; }
    .preview-tabs { flex-wrap: wrap; gap: 0.5rem; }
    .preview-tab { flex: 1; min-width: calc(50% - 0.5rem); justify-content: center; }
    .action-bar { flex-direction: column; padding: 1.5rem; }
    .btn { width: 100%; }
    .related-tools { flex-direction: column; text-align: center; }
    .related-links { justify-content: center; }
    .size-category { flex-direction: column; }
    .color-picker-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .color-picker-row label { min-width: auto; }
}

@media (max-width: 480px) {
    .tool-title { font-size: 1.5rem; }
    .file-info-bar { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
    .progress-bar-container { width: 100%; }
    .results-actions { flex-direction: column; }
    .results-summary { flex-direction: column; gap: 1rem; }
    .platform-breakdown { grid-template-columns: 1fr; }
    .output-info { flex-direction: column; gap: 0.5rem; }
}

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