/* ============================================
   SVG Background Remover - Stylesheet
   Purple/Violet Color Theme with Dark Mode Support
   ============================================ */

/* CSS Variables - Purple/Violet Theme */
:root {
    --primary: #8B5CF6;
    --primary-light: #EDE9FE;
    --primary-dark: #7C3AED;
    --accent: #A78BFA;
    --accent-light: #DDD6FE;
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --danger: #EF4444;
    
    --bg: #FAF5FF;
    --bg-elevated: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #DDD6FE;
    
    --shadow-sm: 0 1px 3px rgba(139, 92, 246, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(139, 92, 246, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(139, 92, 246, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(139, 92, 246, 0.1);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* SVG preview backgrounds */
    --checker-light: #e0e0e0;
    --checker-dark: #f0f0f0;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary: #A78BFA;
    --primary-light: #3B2667;
    --primary-dark: #C4B5FD;
    --accent: #C4B5FD;
    --accent-light: #4C1D95;
    
    --bg: #0f172a;
    --bg-elevated: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #334155;
    
    --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.4);

    --checker-light: #2a2a3e;
    --checker-dark: #1a1a2e;
}

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

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

[data-theme="dark"] body {
    background: linear-gradient(135deg, var(--bg) 0%, #0f172a 100%);
}

/* Container */
.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(--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(139, 92, 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: 700px;
    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);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* 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, #FEFFFE 0%, #FAF5FF 100%);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .upload-area {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.upload-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(167, 139, 250, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

[data-theme="dark"] .upload-area:hover,
[data-theme="dark"] .upload-area.dragover,
[data-theme="dark"] .upload-area.active {
    background: linear-gradient(135deg, #3B2667 0%, #1e293b 100%);
}

.upload-area:hover::before,
.upload-area.dragover::before,
.upload-area.active::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-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
}

[data-theme="dark"] .upload-hint {
    background: var(--primary-light);
    color: var(--accent);
}

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

/* Editor Section */
.editor-section {
    padding: 0;
    animation: fadeIn 0.4s ease;
}

/* Preview Area */
.preview-area {
    padding: 1.5rem;
    background: linear-gradient(135deg, #FAF5FF 0%, #EDE9FE 100%);
    border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .preview-area {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.preview-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    min-height: 350px;
}

.preview-panel {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.preview-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--primary-light);
    border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .preview-panel .panel-header {
    background: var(--primary-light);
}

.preview-panel .panel-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.preview-panel .panel-header h3 svg,
.preview-panel .panel-header h3 i {
    color: var(--primary);
}

.panel-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
    position: relative;
}

/* Transparent background pattern */
.panel-content.checkered {
    background: 
        linear-gradient(45deg, var(--checker-light) 25%, transparent 25%),
        linear-gradient(-45deg, var(--checker-light) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--checker-light) 75%),
        linear-gradient(-45deg, transparent 75%, var(--checker-light) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    background-color: var(--checker-dark);
}

.svg-display {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.svg-display svg {
    max-width: 100%;
    max-height: 300px;
}

.file-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

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

.settings-panel > .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.settings-panel > .panel-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.settings-panel > .panel-header h3 svg,
.settings-panel > .panel-header h3 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);
}

/* Settings Sections */
.settings-section {
    margin-bottom: 1.5rem;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border);
}

.section-title svg,
.section-title i {
    color: var(--primary);
    width: 16px;
    height: 16px;
}

/* Setting Row */
.setting-row {
    margin-bottom: 1rem;
}

.setting-row:last-child {
    margin-bottom: 0;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

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

.setting-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Color Options */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.color-option input[type="radio"] {
    display: none;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 3px solid var(--border);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-swatch.transparent {
    background: 
        linear-gradient(45deg, #ddd 25%, transparent 25%),
        linear-gradient(-45deg, #ddd 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ddd 75%),
        linear-gradient(-45deg, transparent 75%, #ddd 75%);
    background-size: 10px 10px;
    background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
    background-color: #fff;
}

.color-swatch.white {
    background: #ffffff;
}

.color-swatch.black {
    background: #000000;
}

.color-swatch.custom {
    overflow: hidden;
    padding: 0;
}

.color-option input[type="radio"]:checked + .color-swatch {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.color-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.custom-color-input {
    width: 100%;
    height: 100%;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
}

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

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkbox-mark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-wrapper:hover .checkbox-mark {
    border-color: var(--primary);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-mark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-mark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text);
    cursor: pointer;
}

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

/* Styled Dropdown */
.styled-dropdown {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 0.95rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B5CF6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

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

/* Action Bar */
.action-bar {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 2rem;
    justify-content: center;
    flex-wrap: wrap;
    background: var(--primary-light);
    border-top: 1px solid var(--border);
}

[data-theme="dark"] .action-bar {
    background: var(--primary-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn svg,
.btn i {
    flex-shrink: 0;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-primary:disabled {
    background: #CBD5E1;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text);
    border: 2px solid var(--border);
}

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

/* Error Message */
.error-message {
    margin: 1rem 2rem;
    padding: 1rem 1.5rem;
    background: #FEE2E2;
    border: 1px solid #FECACA;
    border-radius: var(--radius-md);
    color: var(--danger);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-theme="dark"] .error-message {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Success Message */
.success-message {
    margin: 1rem 2rem;
    padding: 1rem 1.5rem;
    background: var(--success-light);
    border: 1px solid var(--success);
    border-radius: var(--radius-md);
    color: var(--success);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Browser Support Notice */
.browser-support {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--primary-light);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    color: var(--primary-dark);
}

[data-theme="dark"] .browser-support {
    color: var(--accent);
}

.browser-support svg,
.browser-support i {
    flex-shrink: 0;
    color: var(--primary);
}

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

.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);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

.steps-list li:not(:last-child)::after {
    content: '';
    position: absolute;
    left: calc(1rem - 1px);
    top: 2rem;
    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(--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;
}

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

.mode-tag.transparent {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

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

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

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

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

.tip-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.tip-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

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

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

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

.tip-content a {
    color: var(--primary);
    text-decoration: none;
}

.tip-content 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 0.2s ease;
}

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

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

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

[data-theme="dark"] .faq-answer code {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 900px) {
    .preview-panels {
        grid-template-columns: 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 {
        padding: 2rem 1.5rem;
    }
    
    .upload-area {
        padding: 2.5rem 1.5rem;
    }
    
    .preview-area {
        padding: 1rem;
    }
    
    .settings-panel {
        padding: 1.5rem;
    }
    
    .action-bar {
        flex-direction: column;
        padding: 1.5rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .related-tools {
        flex-direction: column;
        text-align: center;
    }
    
    .related-links {
        justify-content: center;
    }
    
    .mode-explain {
        flex-direction: column;
    }
    
    .browser-support {
        flex-direction: column;
        text-align: center;
    }
    
    .color-options {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .tool-title {
        font-size: 1.5rem;
    }
    
    .preview-panel .panel-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .steps-list li {
        padding-left: 3rem;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
}

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

/* Processing Animation */
.processing {
    position: relative;
    pointer-events: none;
}

.processing::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Success Animation */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn.success {
    animation: successPulse 0.3s ease;
    background: var(--success) !important;
    border-color: var(--success) !important;
    color: white !important;
}

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