/* Background Remover Styles */
:root {
    --br-primary: #6366f1;
    --br-primary-dark: #4f46e5;
    --br-secondary: #8b5cf6;
    --br-accent: #ec4899;
    --br-success: #10b981;
    --br-bg: #ffffff;
    --br-surface: #f8fafc;
    --br-border: #e2e8f0;
    --br-text: #1e293b;
    --br-text-light: #64748b;
    --br-radius: 12px;
    --br-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --br-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.bg-remover-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--br-text);
    line-height: 1.6;
}

/* Hero */
.br-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.br-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--br-primary), var(--br-secondary));
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.br-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin: 0 0 1rem;
    color: var(--br-text);
}

.br-subtitle {
    font-size: 1.25rem;
    color: var(--br-text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* Tool Wrapper */
.br-tool-wrapper {
    background: var(--br-surface);
    border-radius: var(--br-radius);
    padding: 2rem;
    margin-bottom: 3rem;
    border: 1px solid var(--br-border);
    box-shadow: var(--br-shadow-lg);
}

/* Upload Section */
.br-upload-section {
    text-align: center;
}

.br-drop-zone {
    border: 3px dashed var(--br-border);
    border-radius: var(--br-radius);
    padding: 3rem 2rem;
    background: white;
    transition: all 0.3s;
    cursor: pointer;
}

.br-drop-zone:hover, .br-drop-zone.drag-over {
    border-color: var(--br-primary);
    background: rgba(99, 102, 241, 0.05);
}

.br-drop-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.br-drop-zone h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.br-drop-zone p {
    color: var(--br-text-light);
    margin-bottom: 1.5rem;
}

.br-sample-images {
    margin-top: 2rem;
}

.br-sample-images > p {
    color: var(--br-text-light);
    margin-bottom: 1rem;
}

.br-samples-grid {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.br-sample-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: white;
    border: 1px solid var(--br-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.br-sample-btn:hover {
    border-color: var(--br-primary);
    color: var(--br-primary);
}

.br-sample-btn span {
    font-size: 1.25rem;
}

/* Buttons */
.br-btn {
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.br-btn-primary {
    background: linear-gradient(135deg, var(--br-primary), var(--br-secondary));
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.39);
}

.br-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.23);
}

.br-btn-secondary {
    background: white;
    color: var(--br-text);
    border: 1px solid var(--br-border);
}

.br-btn-secondary:hover {
    background: var(--br-surface);
    border-color: var(--br-primary);
}

.br-btn-compare {
    background: var(--br-surface);
    color: var(--br-text);
    border: 1px solid var(--br-border);
}

/* Processing Section */
.br-processing-section {
    text-align: center;
    padding: 3rem;
}

.br-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--br-border);
    border-top-color: var(--br-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.br-progress-container h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.br-progress-container > p {
    color: var(--br-text-light);
    margin-bottom: 1.5rem;
}

.br-progress-bar {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: var(--br-border);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto 1rem;
}

.br-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--br-primary), var(--br-secondary));
    width: 0%;
    transition: width 0.3s;
}

.br-progress-text {
    font-size: 0.875rem;
    color: var(--br-text-light);
}

/* Editor Section */
.br-editor-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.br-editor-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
}

@media (max-width: 968px) {
    .br-editor-layout {
        grid-template-columns: 1fr;
    }
}

/* Canvas */
.br-canvas-container {
    background: white;
    border-radius: var(--br-radius);
    border: 1px solid var(--br-border);
    overflow: hidden;
    position: relative;
}

.br-canvas-wrapper {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: 
        linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
        linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.br-canvas {
    max-width: 100%;
    max-height: 500px;
    box-shadow: var(--br-shadow);
}

.br-zoom-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--br-surface);
    border-top: 1px solid var(--br-border);
}

.br-zoom-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--br-border);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.br-zoom-btn:hover {
    background: var(--br-primary);
    color: white;
    border-color: var(--br-primary);
}

#zoomLevel {
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

/* Controls Panel */
.br-controls-panel {
    background: white;
    border-radius: var(--br-radius);
    border: 1px solid var(--br-border);
    padding: 1.5rem;
    height: fit-content;
}

.br-controls-panel h4 {
    margin: 0 0 1.5rem;
    font-size: 1.125rem;
}

.br-control-group {
    margin-bottom: 1.5rem;
}

.br-control-group > label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.br-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--br-border);
    outline: none;
    -webkit-appearance: none;
}

.br-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--br-primary);
    cursor: pointer;
}

.br-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--br-text-light);
    margin-top: 0.5rem;
}

/* Background Options */
.br-bg-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.br-bg-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: white;
    border: 2px solid var(--br-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.br-bg-btn.active {
    border-color: var(--br-primary);
    background: rgba(99, 102, 241, 0.05);
}

.bg-preview {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--br-border);
}

.bg-preview.transparent {
    background: white;
    position: relative;
}

.bg-preview.transparent::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, #ccc 25%, transparent 25%),
                linear-gradient(-45deg, #ccc 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #ccc 75%),
                linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 10px 10px;
    opacity: 0.3;
}

.bg-preview.white { background: white; }
.bg-preview.black { background: #1e293b; }

.br-color-picker {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Brush Tools */
.br-brush-tools {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.br-brush-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem;
    background: white;
    border: 1px solid var(--br-border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.br-brush-btn.active {
    border-color: var(--br-primary);
    background: rgba(99, 102, 241, 0.05);
}

.brush-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.brush-icon.keep { background: var(--br-success); color: white; }
.brush-icon.remove { background: var(--br-danger); color: white; }
.brush-icon.erase { background: var(--br-border); color: var(--br-text); }

.br-brush-size {
    margin-top: 0.75rem;
}

.br-brush-size label {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* Select */
.br-select {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--br-border);
    border-radius: 6px;
    font-size: 0.95rem;
    background: white;
}

/* Actions */
.br-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
}

.br-actions .br-btn {
    width: 100%;
    justify-content: center;
}

/* Comparison Section */
.br-comparison-section {
    background: white;
    border-radius: var(--br-radius);
    border: 1px solid var(--br-border);
    padding: 1.5rem;
}

.br-comparison-section h4 {
    margin: 0 0 1rem;
    font-size: 1rem;
}

.br-compare-slider {
    position: relative;
    height: 300px;
    background: var(--br-surface);
    border-radius: 8px;
    overflow: hidden;
    cursor: ew-resize;
}

.br-compare-before,
.br-compare-after {
    position: absolute;
    top: 0;
    height: 100%;
    width: 100%;
    background-size: cover;
    background-position: center;
}

.br-compare-before {
    z-index: 1;
    width: 50%;
}

.br-compare-after {
    z-index: 0;
}

.br-compare-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--br-shadow-lg);
    z-index: 2;
    cursor: ew-resize;
}

/* Details Section */
.br-details-section {
    background: white;
    border-radius: var(--br-radius);
    border: 1px solid var(--br-border);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.br-details-section h4 {
    margin: 0 0 1rem;
    font-size: 1.125rem;
}

.br-transformations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.br-transformation-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--br-surface);
    border-radius: 6px;
    font-size: 0.9rem;
}

.transformation-icon {
    font-size: 1.25rem;
}

/* Compare View */
.br-compare-view {
    background: white;
    border-radius: var(--br-radius);
    border: 1px solid var(--br-border);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.br-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .br-compare-grid {
        grid-template-columns: 1fr;
    }
}

.br-compare-col h5 {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--br-text-light);
}

.br-compare-text {
    background: var(--br-surface);
    border-radius: 6px;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    max-height: 200px;
    overflow: auto;
    white-space: pre-wrap;
}

/* Comparison Table */
.br-comparison-table {
    background: white;
    border-radius: var(--br-radius);
    border: 1px solid var(--br-border);
    overflow: hidden;
    margin: 2rem 0;
}

.br-compare-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border-bottom: 1px solid var(--br-border);
}

.br-compare-row:last-child {
    border-bottom: none;
}

.br-compare-header {
    background: var(--br-surface);
    font-weight: 700;
}

.br-compare-cell {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.br-compare-cell.highlight {
    background: rgba(99, 102, 241, 0.05);
    color: var(--br-primary);
    font-weight: 600;
}

/* Sections */
.br-section {
    margin-bottom: 3rem;
}

.br-section-title {
    font-size: 1.875rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--br-text);
}

/* Features */
.br-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.br-feature-card {
    background: white;
    border-radius: var(--br-radius);
    border: 1px solid var(--br-border);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.br-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--br-shadow-lg);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.br-feature-card h4 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.br-feature-card p {
    color: var(--br-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Steps */
.br-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.br-step {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: var(--br-radius);
    border: 1px solid var(--br-border);
}

.br-step .step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--br-primary), var(--br-secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.br-step h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.br-step p {
    color: var(--br-text-light);
    line-height: 1.6;
}

/* Use Cases */
.br-use-cases {
    margin-bottom: 3rem;
}

.br-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.br-case-card {
    background: white;
    border-radius: var(--br-radius);
    border: 1px solid var(--br-border);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.br-case-card:hover {
    box-shadow: var(--br-shadow-lg);
    transform: translateY(-3px);
}

.case-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.br-case-card h4 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.br-case-card p {
    color: var(--br-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* SEO Content */
.br-seo-content {
    margin-bottom: 3rem;
}

.br-seo-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: var(--br-text);
}

.br-seo-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    color: var(--br-text);
}

.br-seo-content p {
    margin-bottom: 1.25rem;
    color: var(--br-text-light);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* FAQ */
.br-faq-section {
    margin-bottom: 3rem;
}

.br-faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.br-faq-item {
    background: white;
    border: 1px solid var(--br-border);
    border-radius: var(--br-radius);
    margin-bottom: 1rem;
    overflow: hidden;
}

.br-faq-question {
    width: 100%;
    padding: 1.25rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--br-text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.br-faq-question:hover {
    background: var(--br-surface);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--br-primary);
    font-weight: 300;
    transition: transform 0.3s;
}

.br-faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.br-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.25rem;
}

.br-faq-item.active .br-faq-answer {
    max-height: 500px;
    padding: 0 1.25rem 1.25rem;
}

.br-faq-answer p {
    color: var(--br-text-light);
    line-height: 1.7;
    margin: 0;
}

/* CTA */
.br-cta-box {
    background: linear-gradient(135deg, var(--br-primary), var(--br-secondary));
    color: white;
    padding: 3rem;
    border-radius: var(--br-radius);
    text-align: center;
    box-shadow: var(--br-shadow-lg);
}

.br-cta-box h3 {
    font-size: 1.875rem;
    margin-bottom: 1rem;
}

.br-cta-box p {
    font-size: 1.125rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.br-cta-btn {
    background: white;
    color: var(--br-primary);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

.br-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .bg-remover-container {
        padding: 1rem;
    }
    
    .br-tool-wrapper {
        padding: 1rem;
    }
    
    .br-drop-zone {
        padding: 2rem 1rem;
    }
    
    .br-canvas-wrapper {
        min-height: 300px;
    }
    
    .br-controls-panel {
        padding: 1rem;
    }
    
    .br-bg-options {
        grid-template-columns: 1fr;
    }
    
    .br-brush-tools {
        flex-direction: column;
    }
    
    .br-compare-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .br-compare-header {
        display: none;
    }
    
    .br-cta-box {
        padding: 2rem 1.5rem;
    }
}