/* ============================================
   BMP to JPG Converter - Modern Stylesheet
   Matching ConvertICO design system
   ============================================ */

/* CSS Variables */
:root {
    --primary: #3B82F6;
    --primary-light: #BFDBFE;
    --primary-dark: #1D4ED8;
    --accent: #10B981;
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --danger: #EF4444;
    
    --bg: #f8fafc;
    --bg-elevated: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    
    --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-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--bg) 0%, #f1f5f9 100%);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Container */
.tool-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

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

/* Title Row - Icon and Title on same line */
.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(--accent));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(59, 130, 246, 0.2);
    flex-shrink: 0;
}

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

.tool-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.tool-description {
    font-size: 1.1rem;
    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);
}

/* 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: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(16, 185, 129, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: linear-gradient(135deg, #eff6ff 0%, #ecfdf5 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.upload-area:hover::before,
.upload-area.dragover::before {
    opacity: 1;
}

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

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

.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-block;
    background: var(--bg);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
}

/* Editor Section */
.editor-section {
    padding: 0;
}

/* Files Header */
.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border);
}

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

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

/* Files List */
.files-list {
    max-height: 300px;
    overflow-y: auto;
    border-bottom: 1px solid var(--border);
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: #fafafa;
}

.file-preview {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: #f0f0f0;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

.file-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

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

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

.file-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

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

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

/* Settings Panel */
.settings-panel {
    padding: 2rem;
}

.panel-header {
    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);
}

/* Quality Section */
.quality-section {
    margin-bottom: 1.5rem;
}

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

.quality-slider-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.slider-input {
    flex: 1;
    width: 100%;
    height: 12px;
    border-radius: var(--radius-full);
    background: linear-gradient(to right, #EF4444, #F59E0B, #10B981);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
}

.slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg), 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.slider-input::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
}

.quality-value-display {
    min-width: 60px;
    padding: 0.5rem 1rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.quality-presets {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

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

.preset-btn {
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: white;
    font-size: 0.85rem;
    font-weight: 600;
    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);
    border-color: var(--primary);
    color: white;
}

/* Quality Info */
.quality-info {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, #eff6ff, #ecfdf5);
    border-radius: var(--radius-md);
    border: 1px solid var(--primary-light);
}

.quality-info .info-icon {
    color: var(--primary);
    flex-shrink: 0;
}

.quality-info .info-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Action Bar */
.action-bar {
    display: flex;
    gap: 1rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid var(--border);
    justify-content: flex-end;
}

/* 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-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

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

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

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

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

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

.processing-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

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

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

.processing-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.progress-track {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    min-width: 40px;
    font-weight: 600;
    color: var(--primary);
}

.processing-status {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* Results Section */
.results-section {
    padding: 3rem;
}

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

.results-header .success-icon {
    width: 64px;
    height: 64px;
    background: var(--success-light);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--success);
}

.results-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

/* Results Stats */
.results-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stat-box {
    text-align: center;
    padding: 0.75rem 1.5rem;
}

.stat-box.savings {
    background: var(--success-light);
    border-radius: var(--radius-md);
}

.stat-box .stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

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

.stat-box.savings .stat-value {
    color: var(--success);
}

.stat-arrow {
    color: var(--text-muted);
}

/* Converted Files */
.converted-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

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

.converted-count svg,
.converted-count i {
    color: var(--primary);
}

.converted-files-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.converted-file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

.converted-file-item:last-child {
    border-bottom: none;
}

.converted-file-item:hover {
    background: #fafafa;
}

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

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

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

.converted-file-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.converted-file-meta .size-reduced {
    color: var(--success);
    font-weight: 600;
}

.converted-file-meta .size-increased {
    color: var(--danger);
    font-weight: 600;
}

.method-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--warning);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 0.5rem;
    vertical-align: middle;
}

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

.converted-file-download:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

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

/* Error Display */
.error-display {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin: 1rem 2rem;
    font-weight: 500;
}

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

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

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

.related-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--bg);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-full);
    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 {
    flex-shrink: 0;
}

/* Info Sections */
.info-sections {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

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

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

/* 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.25rem;
    counter-increment: step;
    color: var(--text-secondary);
    line-height: 1.6;
}

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

/* Circle number */
.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    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;
}

/* Format Explanations */
.format-explanations,
.quality-explanations {
    display: grid;
    gap: 1rem;
}

.format-explain,
.quality-explain {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.format-tag,
.quality-tag {
    flex-shrink: 0;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.format-tag.bmp {
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
}

.format-tag.jpg {
    background: linear-gradient(135deg, #F59E0B, #D97706);
}

.quality-tag.high {
    background: linear-gradient(135deg, #10B981, #059669);
}

.quality-tag.medium {
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
}

.quality-tag.low {
    background: linear-gradient(135deg, #F59E0B, #D97706);
}

.quality-tag.verylow {
    background: linear-gradient(135deg, #EF4444, #DC2626);
}

.format-explain p,
.quality-explain p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

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

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

.benefit-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-light), #E0F2FE);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

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

/* Stats Card */
.stats-card .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.stat-card-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.stat-icon-wrapper.blue {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.stat-icon-wrapper.green {
    background: linear-gradient(135deg, var(--success), #059669);
}

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.stat-label-display {
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

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

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

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

.faq-item.open .faq-answer {
    display: block;
}

.faq-answer p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Responsive */
@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;
    }
    
    .upload-area {
        padding: 2.5rem 1.5rem;
    }
    
    .settings-panel {
        padding: 1.5rem;
    }
    
    .action-bar {
        flex-direction: column;
        padding: 1.5rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .files-header {
        padding: 1rem 1.5rem;
    }
    
    .file-item {
        padding: 1rem 1.5rem;
    }
    
    .results-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-arrow {
        transform: rotate(90deg);
    }
    
    .related-tools {
        flex-direction: column;
        text-align: center;
    }
    
    .related-links {
        justify-content: center;
    }
    
    .format-explain,
    .quality-explain {
        flex-direction: column;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tool-title {
        font-size: 1.5rem;
    }
    
    .files-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .file-item {
        flex-wrap: wrap;
    }
    
    .file-preview {
        width: 40px;
        height: 40px;
    }
    
    .converted-file-item {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .steps-list li {
        padding-left: 3rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

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

.editor-section,
.results-section {
    animation: fadeIn 0.4s ease;
}

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