/* BG Remover Pro Styles */

:root {
    --bgr-primary: #6366f1;
    --bgr-primary-dark: #4f46e5;
    --bgr-secondary: #10b981;
    --bgr-danger: #ef4444;
    --bgr-text: #1f2937;
    --bgr-text-light: #6b7280;
    --bgr-border: #e5e7eb;
    --bgr-bg: #ffffff;
    --bgr-bg-light: #f9fafb;
    --bgr-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --bgr-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Container */
.bgr-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Header */
.bgr-header {
    text-align: center;
    margin-bottom: 40px;
}

.bgr-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--bgr-text);
    margin: 0 0 10px 0;
}

.bgr-subtitle {
    font-size: 1.25rem;
    color: var(--bgr-text-light);
    margin: 0;
}

/* Sections */
.bgr-section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

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

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

/* Upload Area */
.bgr-upload-area {
    background: var(--bgr-bg);
    border: 3px dashed var(--bgr-border);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.bgr-upload-area:hover,
.bgr-upload-area.drag-over {
    border-color: var(--bgr-primary);
    background: var(--bgr-bg-light);
}

.bgr-upload-content {
    max-width: 500px;
    margin: 0 auto;
}

.bgr-upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: var(--bgr-primary);
}

.bgr-upload-area h3 {
    font-size: 1.5rem;
    color: var(--bgr-text);
    margin: 0 0 10px 0;
}

.bgr-upload-hint {
    color: var(--bgr-text-light);
    margin: 0 0 30px 0;
}

/* Buttons */
.bgr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

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

.bgr-btn-primary:hover {
    background: var(--bgr-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--bgr-shadow-lg);
}

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

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

.bgr-btn-download {
    background: var(--bgr-secondary);
    color: white;
    font-size: 1.125rem;
    padding: 16px 40px;
}

.bgr-btn-download:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--bgr-shadow-lg);
}

/* Sample Images */
.bgr-samples {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--bgr-border);
}

.bgr-samples-title {
    color: var(--bgr-text-light);
    font-size: 0.875rem;
    margin: 0 0 15px 0;
}

.bgr-samples-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.bgr-sample-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
}

.bgr-sample-img:hover {
    border-color: var(--bgr-primary);
    transform: scale(1.05);
}

/* Processing */
.bgr-processing-content {
    text-align: center;
    padding: 60px 20px;
}

.bgr-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 30px;
    border: 4px solid var(--bgr-border);
    border-top-color: var(--bgr-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.bgr-processing-content h3 {
    font-size: 1.5rem;
    color: var(--bgr-text);
    margin: 0 0 10px 0;
}

.bgr-processing-content p {
    color: var(--bgr-text-light);
    margin: 0 0 30px 0;
}

.bgr-progress-bar {
    max-width: 400px;
    margin: 0 auto;
    height: 8px;
    background: var(--bgr-border);
    border-radius: 4px;
    overflow: hidden;
}

.bgr-progress-fill {
    height: 100%;
    background: var(--bgr-primary);
    width: 0%;
    transition: width 0.3s ease;
}

/* Results */
.bgr-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.bgr-results-header h3 {
    font-size: 1.75rem;
    color: var(--bgr-text);
    margin: 0;
}

.bgr-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
    margin-bottom: 40px;
}

.bgr-image-box h4 {
    font-size: 1.125rem;
    color: var(--bgr-text);
    margin: 0 0 15px 0;
    text-align: center;
}

.bgr-image-wrapper {
    background: var(--bgr-bg);
    border: 2px solid var(--bgr-border);
    border-radius: 12px;
    padding: 20px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bgr-transparent-bg {
    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;
}

.bgr-image-wrapper img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    border-radius: 8px;
}

.bgr-arrow {
    color: var(--bgr-primary);
}

.bgr-arrow svg {
    width: 40px;
    height: 40px;
}

/* Download Section */
.bgr-download-section {
    text-align: center;
    padding: 40px 20px;
    background: var(--bgr-bg-light);
    border-radius: 12px;
    margin-bottom: 30px;
}

.bgr-download-options {
    margin-top: 20px;
}

.bgr-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--bgr-text);
}

.bgr-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* CTA Box */
.bgr-cta-box {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, var(--bgr-primary), #8b5cf6);
    border-radius: 12px;
    color: white;
}

.bgr-cta-box h4 {
    font-size: 1.5rem;
    margin: 0 0 10px 0;
}

.bgr-cta-box p {
    margin: 0 0 20px 0;
    opacity: 0.9;
}

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

.bgr-cta-box .bgr-btn-primary:hover {
    background: var(--bgr-bg-light);
}

/* Credits Info */
.bgr-credits-info {
    text-align: center;
    padding: 20px;
    background: var(--bgr-bg-light);
    border-radius: 8px;
}

.bgr-credits-info p {
    margin: 0 0 10px 0;
    color: var(--bgr-text);
}

.bgr-link {
    color: var(--bgr-primary);
    text-decoration: none;
    font-weight: 600;
}

.bgr-link:hover {
    text-decoration: underline;
}

/* Error Section */
.bgr-error-content {
    text-align: center;
    padding: 60px 20px;
}

.bgr-error-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: var(--bgr-danger);
}

.bgr-error-content h3 {
    font-size: 1.5rem;
    color: var(--bgr-text);
    margin: 0 0 10px 0;
}

.bgr-error-content p {
    color: var(--bgr-text-light);
    margin: 0 0 30px 0;
}

/* User Info Badge */
.bgr-user-info {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.bgr-credits-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border-radius: 50px;
    box-shadow: var(--bgr-shadow);
    color: var(--bgr-text);
    font-weight: 600;
}

.bgr-credits-badge svg {
    width: 20px;
    height: 20px;
    color: var(--bgr-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .bgr-title {
        font-size: 2rem;
    }
    
    .bgr-comparison {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .bgr-arrow {
        transform: rotate(90deg);
    }
    
    .bgr-results-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bgr-samples-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bgr-upload-area {
        padding: 40px 20px;
    }
    
    .bgr-user-info {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .bgr-title {
        font-size: 1.5rem;
    }
    
    .bgr-subtitle {
        font-size: 1rem;
    }
    
    .bgr-btn {
        width: 100%;
    }
    
    .bgr-samples-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.bgr-loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.bgr-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
