/* ═══════════════════════════════════════════════════════════════
   BG Remover – Premium Styles (UtiliKit Design System)
   ═══════════════════════════════════════════════════════════════ */

/* ── Gradient Title ── */
h1.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.intro-section p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 0;
}

/* ── Drop Zone ── */
.drop-zone {
    background: var(--input-bg);
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.drop-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

.drop-zone:hover {
    border-color: #FF8E53;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.15);
}

.drop-zone:hover::before {
    opacity: 0.04;
}

.drop-zone.dragover {
    border-color: #FF6B6B;
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.2);
}

.drop-zone.dragover::before {
    opacity: 0.08;
}

.drop-zone .icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.drop-zone h2 {
    font-size: 1.3rem;
    color: var(--text-heading);
    margin-bottom: 8px;
    position: relative;
}

.drop-zone p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
    position: relative;
}

/* ── Model Selector ── */
.settings-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.settings-bar label {
    font-weight: 600;
    color: var(--text-heading);
    font-size: 0.95rem;
    white-space: nowrap;
}

.settings-bar select {
    max-width: 300px;
    font-size: 0.95rem;
}

/* ── Processing / Loading State ── */
.processing-card {
    text-align: center;
    padding: 60px 30px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-left-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
    position: relative;
}

/* Gradient ring effect */
.spinner::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-left-color: #FF6B6B;
    animation: spin 0.8s linear infinite reverse;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.process-text {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-heading);
    margin-top: 16px;
}

.process-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    opacity: 0.7;
    margin-top: 8px;
}

.progress-container {
    width: 100%;
    max-width: 320px;
    margin: 20px auto 0;
    height: 6px;
    background: var(--input-bg);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ── Result Section ── */
.result-card {
    padding: 0;
    overflow: hidden;
}

/* ── Before / After Comparison Slider ── */
.comparison-container {
    position: relative;
    width: 100%;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    cursor: ew-resize;
    /* Transparency checkerboard */
    background-image:
        linear-gradient(45deg, #e0e0e0 25%, transparent 25%),
        linear-gradient(-45deg, #e0e0e0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e0e0e0 75%),
        linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    background-color: #f8f8f8;
}

[data-theme="dark"] .comparison-container {
    background-image:
        linear-gradient(45deg, #3a3a3a 25%, transparent 25%),
        linear-gradient(-45deg, #3a3a3a 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #3a3a3a 75%),
        linear-gradient(-45deg, transparent 75%, #3a3a3a 75%);
    background-color: #2a2a2a;
}

/* Original image layer (right side of slider) */
.comparison-original {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: inset(0 0 0 50%);
}

/* Result image layer (clipped) */
.comparison-result {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: inset(0 50% 0 0);
    z-index: 2;
}

.comparison-container img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
}

/* Slider divider line */
.slider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: #ffffff;
    z-index: 10;
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

/* Slider handle circle */
.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: #ffffff;
    border-radius: 50%;
    z-index: 11;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    cursor: ew-resize;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.slider-handle:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.slider-handle svg {
    width: 22px;
    height: 22px;
    color: #555;
}

/* Labels */
.comparison-label {
    position: absolute;
    top: 14px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    pointer-events: none;
    z-index: 5;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.comparison-label.label-result {
    left: 14px;
}

.comparison-label.label-original {
    right: 14px;
}

/* ── Action Buttons ── */
.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 24px 30px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    font-family: 'Poppins', sans-serif;
}

.btn.primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(255, 107, 107, 0.4);
}

.btn.primary:active {
    transform: translateY(0);
}

.btn.secondary {
    background: var(--input-bg);
    color: var(--text-heading);
    border: 1px solid var(--border-color);
}

.btn.secondary:hover {
    background: var(--bg-surface-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ── SEO Content Section ── */
.seo-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
}

.seo-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-heading);
}

.seo-section p {
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    background: var(--bg-surface);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.feature-card h4 {
    margin-bottom: 10px;
    color: var(--text-heading);
    font-size: 1.05rem;
}

.feature-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    h1.gradient-text {
        font-size: 1.8rem;
    }

    .drop-zone {
        padding: 30px 15px;
    }

    .drop-zone .icon {
        font-size: 2.5rem;
    }

    .comparison-container {
        height: 300px;
    }

    .result-actions {
        padding: 20px 15px;
    }

    .btn {
        width: 100%;
    }

    .slider-handle {
        width: 36px;
        height: 36px;
    }

    .slider-handle svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    h1.gradient-text {
        font-size: 1.5rem !important;
    }

    .comparison-container {
        height: 250px;
    }

    .settings-bar {
        flex-direction: column;
        gap: 8px;
    }

    .settings-bar select {
        max-width: 100%;
        width: 100%;
    }

    .comparison-label {
        font-size: 0.7rem;
        padding: 4px 10px;
    }
}