/* ===================================================
   RemoveBG Pro — style.css  v2 (Lasso + Color modes)
=================================================== */

/* ── Variables ──────────────────────────────────── */
:root {
    --bg-base:       #0a0a0f;
    --bg-card:       rgba(255,255,255,0.04);
    --border:        rgba(255,255,255,0.08);
    --border-hover:  rgba(139,92,246,0.4);
    --text-primary:  #f0f0ff;
    --text-muted:    #8888aa;
    --accent-blue:   #667eea;
    --accent-purple: #8b5cf6;
    --accent-green:  #10b981;
    --gradient-1:    linear-gradient(135deg,#667eea 0%,#764ba2 100%);
    --gradient-3:    linear-gradient(135deg,#11998e 0%,#38ef7d 100%);
    --shadow-glow:   0 0 40px rgba(102,126,234,0.15);
    --radius-card:   20px;
    --radius-btn:    12px;
    --font:          'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(102,126,234,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(139,92,246,0.10) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 50% 50%, rgba(16,185,129,0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: bgShift 15s ease-in-out infinite alternate;
}
@keyframes bgShift {
    0%   { opacity: 1; }
    100% { opacity: 0.6; transform: scale(1.05); }
}

/* ── Particles ──────────────────────────────────── */
.particles { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.particle {
    position: absolute;
    width: 2px; height: 2px;
    background: rgba(139,92,246,0.6);
    border-radius: 50%;
    animation: float linear infinite;
}
@keyframes float {
    0%   { transform: translateY(100vh) scale(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 0.5; }
    100% { transform: translateY(-100px) scale(1.5); opacity: 0; }
}

/* ── Navbar ─────────────────────────────────────── */
.glass-nav {
    background: rgba(10,10,15,0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    z-index: 1000;
}
.brand-icon {
    width: 38px; height: 38px;
    background: var(--gradient-1);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}
.navbar-brand {
    color: #ffffff !important;
    text-decoration: none;
    transition: opacity .2s;
}
.navbar-brand:hover, .navbar-brand:focus {
    color: #ffffff !important;
    opacity: 0.92;
}
.brand-text {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff !important;
}
.brand-accent {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.badge-free {
    background: linear-gradient(135deg,rgba(16,185,129,.2),rgba(56,239,125,.1));
    border: 1px solid rgba(16,185,129,.3);
    color: #38ef7d;
    font-size: .75rem; font-weight: 600;
    padding: 6px 14px; border-radius: 20px;
}

/* ── Hero ───────────────────────────────────────── */
.hero-section { position: relative; z-index: 1; padding: 140px 0 40px; text-align: center; }
.hero-badge {
    display: inline-flex; align-items: center;
    background: rgba(102,126,234,.12);
    border: 1px solid rgba(102,126,234,.25);
    color: #a5b4fc;
    font-size: .82rem; font-weight: 600;
    padding: 8px 20px; border-radius: 30px;
    animation: fadeDown .6s ease;
}
.hero-title {
    font-size: clamp(2.2rem,5vw,3.8rem);
    font-weight: 900; line-height: 1.1;
    letter-spacing: -2px; margin-bottom: 20px;
    animation: fadeDown .7s ease .1s both;
}
.gradient-text {
    background: linear-gradient(135deg,#667eea,#a855f7,#ec4899);
    background-size: 200% 200%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease infinite;
}
@keyframes gradientShift { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }
.hero-subtitle {
    font-size: 1.05rem; color: var(--text-muted);
    max-width: 520px; margin: 0 auto; line-height: 1.7;
    animation: fadeDown .8s ease .2s both;
}
.hero-subtitle strong { color: #c4b5fd; }

@keyframes fadeDown { from{opacity:0;transform:translateY(-20px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeUp   { from{opacity:0;transform:translateY(30px)}  to{opacity:1;transform:translateY(0)} }

/* ── Tool Section ───────────────────────────────── */
.tool-section { position: relative; z-index: 1; padding: 20px 0 60px; }

/* ── Panel Cards ────────────────────────────────── */
.panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 28px;
    backdrop-filter: blur(10px);
    transition: border-color .3s, box-shadow .3s;
    animation: fadeUp .5s ease both;
}
.panel-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-glow); }

.panel-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.panel-icon {
    width: 46px; height: 46px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.panel-icon-blue   { background: linear-gradient(135deg,#667eea22,#764ba222); color: #a5b4fc; border: 1px solid rgba(102,126,234,.3); }
.panel-icon-purple { background: linear-gradient(135deg,#8b5cf622,#ec489922); color: #e879f9; border: 1px solid rgba(139,92,246,.3); }
.panel-title   { font-size: 1.1rem; font-weight: 700; margin: 0; }
.panel-subtitle { font-size: .82rem; color: var(--text-muted); margin: 2px 0 0; }

/* ── Step Label ─────────────────────────────────── */
.step-label {
    display: flex; align-items: center; gap: 10px;
    font-size: .82rem; font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .5px;
    margin-bottom: 10px;
}
.step-num {
    width: 22px; height: 22px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem; font-weight: 800; color: #fff;
    flex-shrink: 0;
}
.btn-step-back {
    margin-left: auto;
    background: none; border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .75rem; padding: 4px 12px; border-radius: 20px;
    cursor: pointer; transition: all .2s;
}
.btn-step-back:hover { border-color: var(--border-hover); color: var(--text-primary); }

/* ── Drop Zone ──────────────────────────────────── */
.drop-zone {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: 16px;
    min-height: 220px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all .3s ease;
    overflow: hidden;
    background: rgba(255,255,255,.02);
}
.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--accent-purple);
    background: rgba(139,92,246,.06);
    box-shadow: 0 0 30px rgba(139,92,246,.15);
}
.drop-zone-content { text-align: center; padding: 35px 20px; pointer-events: none; }
.drop-icon { font-size: 3.2rem; color: var(--accent-purple); margin-bottom: 12px; opacity: .8; transition: transform .3s; }
.drop-zone:hover .drop-icon { transform: scale(1.1) translateY(-4px); }
.drop-title   { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.drop-subtitle { font-size: .85rem; color: var(--text-muted); margin-bottom: 8px; }
.drop-formats  { font-size: .75rem; color: rgba(255,255,255,.35); font-family: monospace; }
.file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

/* ── Vista previa de imagen cargada ─────────────── */
.color-mode-preview {
    display: flex; align-items: center; gap: 14px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 16px;
}
.color-preview-img {
    width: 65px; height: 65px;
    object-fit: cover; border-radius: 10px;
    border: 1px solid rgba(255,255,255,.1);
}

/* ── Tarjeta Informativa de Configuración ────────── */
.settings-card {
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
}

/* ── Barra de Progreso IA ────────────────────────── */
.ai-progress-card {
    background: rgba(139,92,246,.08);
    border: 1px solid rgba(139,92,246,.25);
    border-radius: 14px;
    padding: 16px;
}
.ai-progress-status {
    display: flex; justify-content: space-between; align-items: center;
    font-size: .85rem; font-weight: 600; color: #c4b5fd; margin-bottom: 8px;
}
.ai-progress-bar-wrap {
    width: 100%; height: 8px;
    background: rgba(255,255,255,.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.ai-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #667eea, #a855f7, #38ef7d);
    background-size: 200% 100%;
    border-radius: 4px;
    transition: width .3s ease;
    animation: gradientShift 2s ease infinite;
}

/* ── Process Button ─────────────────────────────── */
.btn-process {
    width: 100%; padding: 15px 24px;
    background: var(--gradient-1);
    border: none; border-radius: var(--radius-btn);
    color: #fff; font-size: 1rem; font-weight: 700;
    cursor: pointer; position: relative; overflow: hidden;
    transition: all .3s;
    box-shadow: 0 4px 20px rgba(102,126,234,.4);
}
.btn-process::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg,#764ba2 0%,#667eea 100%);
    opacity: 0; transition: opacity .3s;
}
.btn-process:hover  { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(102,126,234,.6); }
.btn-process:hover::before { opacity: 1; }
.btn-process:active { transform: translateY(0); }
.btn-process-text, .btn-process-loading {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: center;
}

/* ── Result Area ────────────────────────────────── */
.result-area { display: flex; flex-direction: column; }
.result-bg-selector { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.result-bg-label { font-size: .78rem; color: var(--text-muted); font-weight: 500; }
.bg-options { display: flex; gap: 6px; }
.bg-opt {
    width: 32px; height: 32px; border-radius: 8px;
    border: 2px solid var(--border);
    cursor: pointer; font-size: .7rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card); color: var(--text-muted);
    transition: all .2s;
}
.bg-opt:hover  { border-color: var(--accent-purple); transform: scale(1.1); }
.bg-opt.active { border-color: var(--accent-purple); box-shadow: 0 0 10px rgba(139,92,246,.4); }

.result-image-wrap {
    border-radius: 16px; overflow: hidden;
    min-height: 200px;
    display: flex; align-items: center; justify-content: center;
    transition: background .3s;
}
.checkerboard {
    background-image:
        linear-gradient(45deg,#333 25%,transparent 25%),
        linear-gradient(-45deg,#333 25%,transparent 25%),
        linear-gradient(45deg,transparent 75%,#333 75%),
        linear-gradient(-45deg,transparent 75%,#333 75%);
    background-size: 20px 20px;
    background-position: 0 0,0 10px,10px -10px,-10px 0;
    background-color: #1a1a1a;
}
.result-image { max-width: 100%; max-height: 350px; object-fit: contain; display: block; }
.result-actions { display: flex; gap: 10px; }
.btn-download {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 12px 20px;
    background: var(--gradient-3);
    color: #fff; text-decoration: none;
    border-radius: var(--radius-btn); font-weight: 700; font-size: .9rem;
    transition: all .3s;
    box-shadow: 0 4px 15px rgba(17,153,142,.3);
}
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(17,153,142,.5); color: #fff; }
.btn-copy {
    padding: 12px 20px;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    color: var(--text-primary); font-size: .9rem; font-weight: 600;
    cursor: pointer; transition: all .2s;
    display: flex; align-items: center;
}
.btn-copy:hover { background: rgba(255,255,255,.1); border-color: var(--border-hover); }

/* ── Empty State ────────────────────────────────── */
.result-empty {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 60px 20px; text-align: center;
}
.empty-icon { font-size: 4rem; color: rgba(255,255,255,.1); margin-bottom: 16px; animation: pulse 2.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{transform:scale(1);opacity:.4} 50%{transform:scale(1.08);opacity:.6} }
.empty-title   { font-size: 1rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.empty-subtitle { font-size: .82rem; color: rgba(255,255,255,.25); max-width: 260px; line-height: 1.5; }

/* ── Alerts ─────────────────────────────────────── */
.alert-custom {
    position: relative; display: flex; align-items: center;
    padding: 14px 20px; border-radius: 12px;
    font-size: .9rem; font-weight: 500; gap: 10px;
    animation: slideIn .3s ease;
}
@keyframes slideIn { from{opacity:0;transform:translateY(-10px)} to{opacity:1;transform:translateY(0)} }
.alert-error   { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; }
.alert-success { background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.3); color: #6ee7b7; }
.btn-close-custom { margin-left: auto; background: none; border: none; color: inherit; cursor: pointer; padding: 4px; opacity: .7; transition: opacity .2s; }
.btn-close-custom:hover { opacity: 1; }

/* ── Feature Cards ──────────────────────────────── */
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 26px; text-align: center;
    transition: all .3s;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--border-hover); box-shadow: var(--shadow-glow); }
.feature-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; margin: 0 auto 14px; }
.feature-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feature-desc  { font-size: .85rem; color: var(--text-muted); line-height: 1.6; }

/* ── Footer ─────────────────────────────────────── */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--border); padding: 24px 0; margin-top: 20px; }
.footer-text { font-size: .85rem; color: var(--text-muted); margin: 0; }

/* ── Scrollbar ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,.4); border-radius: 3px; }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
    .hero-section { padding: 100px 0 20px; }
    .panel-card   { padding: 18px; }
    .result-actions { flex-direction: column; }
    .lasso-toolbar  { gap: 6px; }
    .lasso-hint     { display: none; }
}
