/* ============================================
   TIFF to ICO Converter - Modern Stylesheet
   Teal/Cyan Color Theme for SURITD TOOLS
   With Dark Mode Support
   ============================================ */

/* CSS Variables - Light Mode (Default) */
:root {
    --transition-speed: 0.25s;
    
    /* Primary Colors - Teal/Cyan Theme */
    --primary: #0891B2;
    --primary-light: #CFFAFE;
    --primary-dark: #0E7490;
    --accent: #06B6D4;
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    
    /* Preset Colors */
    --favicon: #0891B2;
    --desktop: #0E7490;
    --modern: #06B6D4;
    
    /* 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, #ecfeff 0%, #cffafe 100%);
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --primary: #22d3ee;
    --primary-light: rgba(34, 211, 238, 0.15);
    --primary-dark: #06b6d4;
    --accent: #67e8f9;
    --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);
    
    --favicon: #22d3ee;
    --desktop: #06b6d4;
    --modern: #67e8f9;
    
    --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(8, 145, 178, 0.1) 0%, rgba(6, 182, 212, 0.2) 100%);
}

/* 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: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(8, 145, 178, 0.25);
    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;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    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-pages {
    background: var(--primary-light);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    color: var(--primary-dark);
    font-weight: 500;
}

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

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

/* Image Preview */
.image-preview-container {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview {
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    overflow: hidden;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.preview-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    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; }

/* Standard Sizes Grid */
.standard-sizes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.size-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem 0.5rem;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

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

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

.size-checkbox input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--primary); }
.size-label { font-weight: 500; color: var(--text); }

/* Size Presets */
.sizes-presets { display: flex; gap: 0.5rem; margin-top: 0.75rem; }

.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 {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

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

/* 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, #F59E0B, #10B981, var(--primary));
    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); }

/* Options Grid */
.options-grid, .tiff-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); }

/* Option Row */
.option-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }

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

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

.styled-dropdown {
    flex: 1;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background-color: var(--bg-elevated);
    color: var(--text);
    font-size: 0.85rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-theme="dark"] .styled-dropdown {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

.styled-dropdown:hover { border-color: var(--primary-light); }

.styled-dropdown:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}

[data-theme="dark"] .styled-dropdown:focus { box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15); }

/* 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: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(8, 145, 178, 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: linear-gradient(90deg, var(--primary), var(--accent));
    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-info {
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    transition: background-color var(--transition-speed);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.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:last-child { font-weight: 600; 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; }

/* 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; }
.info-card p a { color: var(--primary); text-decoration: none; font-weight: 500; border-bottom: 1px dotted var(--primary); }
.info-card p a:hover { border-bottom-style: solid; }

/* 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: linear-gradient(135deg, var(--primary), var(--primary-dark));
    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; }

/* Mode Explanations */
.mode-explanations { display: grid; gap: 1rem; }
.mode-explain { display: flex; gap: 1rem; align-items: flex-start; }

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

.mode-tag.favicon { background: linear-gradient(135deg, var(--favicon), #0E7490); }
.mode-tag.desktop { background: linear-gradient(135deg, var(--desktop), #155E75); }
.mode-tag.modern { background: linear-gradient(135deg, var(--modern), #0891B2); }
.mode-explain p { margin: 0; color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; }

/* Use Cases Tip */
.use-cases-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 1rem 1.25rem;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--primary);
    margin-top: 0;
}

.use-cases-tip svg, .use-cases-tip i { color: var(--primary); flex-shrink: 0; margin-top: 2px; width: 18px; height: 18px; }
.use-cases-tip span { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; }
.use-cases-tip a { color: var(--primary); text-decoration: none; font-weight: 500; }
.use-cases-tip a:hover { text-decoration: underline; }

/* 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); }
    .file-info-bar { justify-content: center; }
    .standard-sizes-grid { grid-template-columns: repeat(4, 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; }
    .standard-sizes-grid { grid-template-columns: repeat(2, 1fr); }
    .sizes-presets { flex-wrap: wrap; }
    .action-bar { flex-direction: column; padding: 1.5rem; }
    .btn { width: 100%; }
    .related-tools { flex-direction: column; text-align: center; }
    .related-links { justify-content: center; }
    .mode-explain { flex-direction: column; }
    .option-row { flex-direction: column; align-items: stretch; gap: 0.5rem; }
    .option-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; }
    .steps-list li { padding-left: 3rem; }
    .progress-bar-container { width: 100%; }
    .results-actions { flex-direction: column; }
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text-secondary);
    font-weight: 500;
}

.breadcrumb svg, .breadcrumb i {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Tool Description Links */
.tool-description a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.tool-description a:hover {
    text-decoration: underline;
}

/* Why Convert - Use Cases Grid */
.use-cases-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

.use-case-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.use-case-item strong {
    display: block;
    color: var(--text);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.use-case-item p {
    margin: 0;
    font-size: 0.95rem;
}

/* Info Card code blocks */
.info-card code {
    background: var(--bg-secondary);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--primary);
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* Responsive additions */
@media (max-width: 768px) {
    .use-case-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    .breadcrumb {
        margin-bottom: 1rem;
    }
}

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