:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --background: #ffffff;
    --text: #1f2937;
    --border: #e5e7eb;
    --card-bg: #f8fafc;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --background: #1a1a1a;
    --text: #f8fafc;
    --border: #374151;
    --card-bg: #1f2937;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.ab-bg-remover {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--background);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.ab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.ab-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ab-brand svg {
    color: var(--primary);
}

.ab-theme-toggle {
    background: none;
    border: 1px solid var(--border);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    gap: 0.5rem;
}

.ab-upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.ab-upload-area:hover {
    border-color: var(--primary);
    background: var(--card-bg);
}

.ab-upload-area.dragover {
    border-color: var(--primary);
    background: var(--card-bg);
    transform: scale(0.98);
}

.ab-upload-icon {
    margin-bottom: 1rem;
    color: var(--primary);
}

.ab-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.ab-preview-box {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.ab-preview-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-weight: 500;
}

.ab-image-preview {
    padding: 1rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ab-image-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    object-fit: contain;
}

.ab-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.ab-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ab-process {
    background: var(--primary);
    color: white;
}

.ab-process:hover {
    background: var(--primary-hover);
}

.ab-download {
    background: #10b981;
    color: white;
}

.ab-download:hover {
    background: #059669;
}

.ab-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    z-index: 1000;
}

.ab-loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}