/* ============================================
   JPEG to JPG Converter - Modern Stylesheet
   Converts JFIF, JPE, JPEG to standard JPG
   Dark Mode Support with Light Mode Default
   Color Theme: Blue (#3399cc)
   ============================================ */

/* CSS Variables - Light Mode (Default) */
:root {
    --transition-speed: 0.25s;
    
    /* Primary Colors - Blue Theme */
    --primary: #3399cc;
    --primary-light: #E0F2FE;
    --primary-dark: #2d88b8;
    --accent: #0EA5E9;
    
    /* Status Colors */
    --success: #339966;
    --success-light: #E8F5E9;
    --warning: #f59e0b;
    --warning-light: #FEF3C7;
    --danger: #e64e4e;
    --danger-light: #FEE2E2;
    
    /* Background Colors */
    --bg: #F0F9FF;
    --bg-elevated: #ffffff;
    --bg-secondary: #F1F5F9;
    --bg-tertiary: #E2E8F0;
    
    /* Text Colors */
    --text: #1E293B;
    --text-secondary: #475569;
    --text-muted: #64748B;
    
    /* Border Colors */
    --border: #BAE6FD;
    --border-light: #E2E8F0;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --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(51, 153, 204, 0.25);
    --shadow-primary-hover: 0 6px 20px rgba(51, 153, 204, 0.35);
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Input */
    --input-bg: #ffffff;
    --input-border: #BAE6FD;
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --primary: #38bdf8;
    --primary-light: rgba(56, 189, 248, 0.15);
    --primary-dark: #0ea5e9;
    --accent: #7dd3fc;
    
    --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;
    --bg-tertiary: #475569;
    
    --text: #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    
    --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(56, 189, 248, 0.2);
    --shadow-primary-hover: 0 6px 20px rgba(56, 189, 248, 0.3);
    
    --input-bg: #334155;
    --input-border: #475569;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 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;
}

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

.tool-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin: 0;
    color: var(--primary);
}

.tool-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

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

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

/* 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);
    margin-bottom: 2rem;
}

/* 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(--bg-secondary);
    position: relative;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: var(--bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.upload-icon {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

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

.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.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.upload-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--success-light);
    color: var(--success);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Editor Section */
.editor-section {
    display: none;
}

.editor-section.active { display: block; }

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--bg-secondary);
    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 { color: var(--primary); }

.files-header-right { display: flex; gap: 0.5rem; }

.btn-text {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
}

.btn-text:hover { background: var(--primary-light); }

/* Files Grid */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    padding: 1.5rem 2rem;
    max-height: 400px;
    overflow-y: auto;
    border-bottom: 1px solid var(--border);
}

.file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    position: relative;
}

.file-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.file-preview {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

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

.file-name {
    font-size: 0.8rem;
    color: var(--text);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-ext {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 0.15rem;
}

.file-size {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.file-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.file-item:hover .file-remove { opacity: 1; }

.file-remove:hover { background: #dc2626; }

/* Settings Panel */
.settings-panel {
    padding: 1.5rem 2rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}

.settings-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.settings-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text);
    min-width: 120px;
}

.settings-label svg {
    color: var(--primary);
    width: 18px;
    height: 18px;
}

.quality-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.quality-slider {
    flex: 1;
    max-width: 300px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    outline: none;
}

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

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

.quality-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.quality-value {
    min-width: 60px;
    padding: 0.4rem 0.75rem;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    text-align: center;
}

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

.quality-preset {
    padding: 0.4rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

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

.quality-hint {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.6rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quality-hint svg {
    color: var(--primary);
    flex-shrink: 0;
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
}

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

.action-info svg { color: var(--primary); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text);
}

.btn-secondary:hover { background: var(--border); }

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #2d8659;
    transform: translateY(-2px);
}

/* Results Section */
.results-section {
    padding: 2rem;
    display: none;
}

.results-section.active { display: block; }

.results-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.results-icon {
    width: 56px;
    height: 56px;
    background: var(--success-light);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
}

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

.results-subtitle {
    color: var(--text-secondary);
    margin: 0.25rem 0 0;
}

.converted-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 200px));
    gap: 1.25rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.converted-file-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s ease;
}

.converted-file-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.converted-preview {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.converted-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.converted-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.converted-size {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.btn-download {
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
}

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

/* Error Message */
.error-message {
    display: none;
    padding: 1.25rem;
    background: var(--danger-light);
    border: 1px solid var(--danger);
    border-radius: var(--radius-md);
    margin: 1rem 2rem;
}

.error-message.active {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.error-icon { flex-shrink: 0; color: var(--danger); }

.error-content h4 {
    margin: 0 0 0.5rem;
    color: var(--danger);
    font-size: 1rem;
}

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

.error-content p:last-child { margin-top: 0.5rem; }

.error-content a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.error-content a:hover { text-decoration: underline; }

/* Info Cards */
.info-section { margin-top: 2rem; }

.info-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.info-card h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 1.25rem;
}

.info-card h2 svg {
    color: var(--primary);
    width: 24px;
    height: 24px;
}

.steps-list {
    margin: 0;
    padding-left: 1.5rem;
}

.steps-list li {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.steps-list li:last-child { margin-bottom: 0; }
.steps-list li strong { color: var(--text); }
.steps-list a { color: var(--primary); text-decoration: none; }
.steps-list a:hover { text-decoration: underline; }

.steps-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding: 1rem;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.steps-tip svg {
    flex-shrink: 0;
    color: var(--primary);
    margin-top: 2px;
}

.steps-tip a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.steps-tip a:hover { text-decoration: underline; }

/* Format Table */
.format-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.format-table th,
.format-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.format-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text);
}

.format-table td { color: var(--text-secondary); }
.format-table tr:last-child td { border-bottom: none; }

.format-table code {
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

/* Use Cases Grid */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.use-case {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.use-case-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.use-case-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--text);
}

.use-case-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.use-case-content p a { color: var(--primary); text-decoration: none; }
.use-case-content p a:hover { text-decoration: underline; }

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    text-align: left;
    transition: background 0.2s ease;
}

.faq-question:hover { background: var(--bg-tertiary); }

.faq-question svg {
    flex-shrink: 0;
    color: var(--primary);
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.faq-item.open .faq-question svg { transform: rotate(180deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer { max-height: 300px; }

.faq-answer p {
    padding: 1rem 1.25rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
}

.faq-answer a { color: var(--primary); text-decoration: none; }
.faq-answer a:hover { text-decoration: underline; }

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

.related-tool-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s ease;
}

.related-tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.related-tool-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.related-tool-info h4 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text);
}

.related-tool-info p {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Processing Overlay */
.processing-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.processing-overlay.active { display: flex; }

.processing-content {
    background: var(--bg-elevated);
    padding: 2rem 3rem;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-xl);
}

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

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

.processing-text {
    color: var(--text);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 900px) {
    .use-cases-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .tool-container { padding: 1rem; }
    .tool-title-row { gap: 0.75rem; }
    .tool-icon-wrapper { width: 50px; height: 50px; }
    .tool-icon-wrapper svg { width: 24px; height: 24px; }
    .upload-section { padding: 2rem 1.5rem; }
    .upload-area { padding: 2.5rem 1.5rem; }
    
    .files-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .files-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        padding: 1rem 1.5rem;
    }
    
    .file-preview { width: 60px; height: 60px; }
    
    .settings-panel { padding: 1.25rem 1.5rem; }
    
    .settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .quality-control { width: 100%; }
    .quality-slider { max-width: none; }
    .quality-presets { width: 100%; justify-content: space-between; }
    
    .action-bar {
        flex-direction: column;
        padding: 1.25rem;
        gap: 1rem;
    }
    
    .btn { width: 100%; }
    .results-section { padding: 1.5rem; }
    
    .converted-files-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 180px));
    }
    
    .results-actions { flex-direction: column; }
    .results-actions .btn { width: 100%; }
    .info-card { padding: 1.5rem; }
    .use-case { flex-direction: column; gap: 0.75rem; }
}

@media (max-width: 480px) {
    .tool-title-row { flex-direction: column; gap: 0.75rem; }
    .files-grid { grid-template-columns: repeat(2, 1fr); }
    
    .quality-presets { flex-wrap: wrap; }
    .quality-preset { flex: 1; min-width: 70px; text-align: center; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); border-radius: 4px; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* Selection */
::selection { background: rgba(51, 153, 204, 0.2); }
[data-theme="dark"] ::selection { background: rgba(56, 189, 248, 0.3); }

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

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

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