.bg-remover-widget {
    width: 100%;
    margin: 0;
    padding: 0;
}

.bg-remover-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.bg-remover-header {
    text-align: center;
    margin-bottom: 40px;
}

.bg-remover-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px 0;
    padding: 0;
}

.bg-remover-header p {
    font-size: 16px;
    color: #6B7280;
    margin: 0;
    padding: 0;
}

.bg-remover-content {
    width: 100%;
}

.bg-remover-upload-area {
    border: 2px dashed #D1D5DB;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.bg-remover-upload-area:hover {
    border-color: #2563eb;
    background-color: #f0f7ff;
}

.bg-remover-upload-area.dragover {
    border-color: #2563eb;
    background-color: #eff6ff;
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: #9CA3AF;
    display: inline-block;
}

.upload-text {
    font-size: 18px;
    font-weight: 500;
    color: #374151;
    margin: 0 0 8px 0;
    padding: 0;
}

.upload-subtext {
    font-size: 14px;
    color: #6B7280;
    margin: 0;
    padding: 0;
}

.bg-remover-loader {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #E5E7EB;
    border-top-color: #2563eb;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: bg-remover-spin 1s linear infinite;
}

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

.bg-remover-loader p {
    font-size: 16px;
    font-weight: 500;
    color: #6B7280;
    margin: 0;
    padding: 0;
}

.bg-remover-results {
    width: 100%;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
    width: 100%;
}

.image-column h3 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
    padding: 0;
}

.image-wrapper {
    position: relative;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    width: 100%;
}

.image-wrapper img,
.image-wrapper canvas {
    width: 100%;
    height: auto;
    display: block;
}

.processed-wrapper {
    background-image:
        linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
        linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
        linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    background-color: white;
}

.color-picker-section {
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
    margin-bottom: 32px;
    width: 100%;
}

.color-picker-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 16px 0;
    padding: 0;
}

.color-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.bg-remover-color-btn {
    width: 48px;
    height: 48px;
    border: 2px solid #D1D5DB;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    padding: 0;
    background-color: white;
    flex-shrink: 0;
}

.bg-remover-color-btn:hover {
    transform: scale(1.05);
    border-color: #2563eb;
}

.bg-remover-color-btn.active {
    border-color: #2563eb;
    border-width: 3px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.bg-remover-color-btn[data-color="transparent"] {
    background-image:
        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;
    background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
    background-color: white;
}

.bg-remover-color-btn[data-color="#FFFFFF"] { background-color: #FFFFFF; }
.bg-remover-color-btn[data-color="#E5E7EB"] { background-color: #E5E7EB; }
.bg-remover-color-btn[data-color="#38BDF8"] { background-color: #38BDF8; }
.bg-remover-color-btn[data-color="#6EE7B7"] { background-color: #6EE7B7; }
.bg-remover-color-btn[data-color="#FB7185"] { background-color: #FB7185; }
.bg-remover-color-btn[data-color="#C4B5FD"] { background-color: #C4B5FD; }
.bg-remover-color-btn[data-color="#FED7AA"] { background-color: #FED7AA; }
.bg-remover-color-btn[data-color="#1E3A8A"] { background-color: #1E3A8A; }
.bg-remover-color-btn[data-color="#000000"] { background-color: #000000; }

.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.bg-remover-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.bg-remover-btn svg {
    width: 20px;
    height: 20px;
}

.bg-remover-btn-primary {
    background-color: #2563eb;
    color: white;
}

.bg-remover-btn-primary:hover {
    background-color: #1d4ed8;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.bg-remover-btn-secondary {
    background-color: #4B5563;
    color: white;
}

.bg-remover-btn-secondary:hover {
    background-color: #374151;
}

@media (max-width: 768px) {
    .bg-remover-container {
        padding: 24px;
    }

    .bg-remover-header h2 {
        font-size: 24px;
    }

    .bg-remover-upload-area {
        padding: 40px 16px;
    }

    .image-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .action-buttons {
        gap: 12px;
    }

    .bg-remover-btn {
        flex: 1;
        min-width: 140px;
    }
}