/* ============================================================
   pixPLace Onboarding Flow v3.0
   Cinema Intro + Smart Spotlight Tour (6 steps)
   ✅ Swappable: replace this file + onboarding.js for a new flow
   NEW: Multi-spotlight, model expand demo, upload pulse demo
   ============================================================ */

/* ─── CINEMA INTRO ──────────────────────────────────────────── */

.ob-cinema-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Semi-transparent: lets the neural animation show through */
    background: rgba(5, 5, 8, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.ob-cinema-overlay.ob-visible {
    opacity: 1;
}

.ob-cinema-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 44px 40px;
    max-width: 480px;
    width: calc(100% - 40px);
    /* Neutral dark glass — matches app's design language */
    background: rgba(15, 17, 22, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 24px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 24px 72px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    transform: translateY(20px) scale(0.97);
    opacity: 0;
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.65s ease;
}

.ob-cinema-card.ob-visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Subtle top border line */
.ob-cinema-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(200, 200, 220, 0.25),
            rgba(200, 200, 220, 0.4),
            rgba(200, 200, 220, 0.25),
            transparent);
    border-radius: 1px;
    animation: ob-shimmer 3s ease-in-out infinite;
}

@keyframes ob-shimmer {

    0%,
    100% {
        opacity: 0.4;
        width: 40%;
    }

    50% {
        opacity: 1;
        width: 60%;
    }
}

/* Logo container */
.ob-cinema-logo {
    margin-bottom: 24px;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.ob-cinema-logo.ob-visible {
    opacity: 1;
    transform: scale(1);
}

.ob-cinema-logo svg {
    width: 62px;
    height: 62px;
    color: rgba(220, 220, 235, 0.9);
    filter: drop-shadow(0 0 16px rgba(200, 200, 235, 0.2));
}

.ob-cinema-logo-ring {
    position: relative;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Subtle pulsing ring */
.ob-cinema-logo-ring::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: ob-pulse-ring 3s ease-out infinite;
}

@keyframes ob-pulse-ring {
    0% {
        transform: scale(0.9);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Title */
.ob-cinema-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.4px;
    line-height: 1.2;
    color: rgba(250, 250, 255, 0.95);
    margin: 0 0 10px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease 0.15s, transform 0.5s ease 0.15s;
}

.ob-cinema-title.ob-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tagline */
.ob-cinema-tagline {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.65;
    color: rgba(250, 250, 255, 0.45);
    margin: 0 0 32px;
    max-width: 320px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease 0.28s, transform 0.5s ease 0.28s;
}

.ob-cinema-tagline.ob-visible {
    opacity: 1;
    transform: translateY(0);
}

/* CTA Button — neutral, matches app's button style */
.ob-cinema-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(250, 250, 255, 0.9);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    opacity: 0;
    transform: translateY(8px) scale(0.97);
    transition: opacity 0.5s ease 0.42s,
        transform 0.5s ease 0.42s,
        background 0.2s ease,
        border-color 0.2s ease;
}

.ob-cinema-btn.ob-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.ob-cinema-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px) scale(1.01);
}

.ob-cinema-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Animated shine */
.ob-cinema-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.08) 50%, transparent 60%);
    transform: translateX(-100%);
    animation: ob-btn-shine 4s ease-in-out infinite 1s;
}

@keyframes ob-btn-shine {
    0% {
        transform: translateX(-100%);
    }

    25% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Skip button */
.ob-cinema-skip {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: rgba(250, 250, 255, 0.28);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.ob-cinema-skip:hover {
    color: rgba(250, 250, 255, 0.55);
    background: rgba(255, 255, 255, 0.05);
}

/* Progress dots in cinema */
.ob-progress-dots {
    display: flex;
    gap: 5px;
    margin-top: 24px;
    opacity: 0;
    transition: opacity 0.4s ease 0.55s;
}

.ob-progress-dots.ob-visible {
    opacity: 1;
}

.ob-progress-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.ob-progress-dot.ob-active {
    width: 18px;
    border-radius: 2.5px;
    background: rgba(200, 200, 220, 0.7);
}

.ob-progress-dot.ob-done {
    background: rgba(200, 200, 220, 0.35);
}

/* ─── SPOTLIGHT TOUR ─────────────────────────────────────────── */

.ob-tour-layer {
    position: fixed; inset: 0; z-index: 999997;
    pointer-events: none;
}
.ob-spotlight-svg {
    position: absolute; inset: 0; width: 100%; height: 100%;
}

.ob-spotlight-mask {
    fill: rgba(4, 4, 8, 0.78);
}

#ob-spotlight-hole,
#ob-spotlight-hole2,
#ob-spotlight-hole3 {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ob-spotlight-ring,
.ob-spotlight-ring2,
.ob-spotlight-ring3 {
    position: fixed;
    border-radius: 12px;
    pointer-events: none;
    box-shadow:
        0 0 0 2px rgba(200, 200, 220, 0.5),
        0 0 0 4px rgba(200, 200, 220, 0.08),
        0 0 16px rgba(200, 200, 240, 0.12);
    animation: ob-ring-pulse 2.2s ease-in-out infinite;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: none;
    z-index: 999998;
}

/* Modifier class for purple ring (used in tabs step) */
.ob-spotlight-ring-purple {
    box-shadow: 
        0 0 0 2px rgba(168, 85, 247, 0.6),
        0 0 0 4px rgba(168, 85, 247, 0.1),
        0 0 16px rgba(168, 85, 247, 0.2) !important;
    animation: none;
}

/* ============================================================
   v3.0 Demo Effects
   ============================================================ */

/* 1. Model cards expand demo fix: elevate cards over mask */
#modeCardsWrapper.expanded.ob-demo-active {
    position: relative;
    z-index: 999999 !important; /* Keep above mask */
    background: rgba(14, 16, 20, 0.96); /* Ensure background is solid enough */
    border-radius: 12px;
}

@keyframes ob-ring-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 2px rgba(200, 200, 220, 0.5), 0 0 0 4px rgba(200, 200, 220, 0.08), 0 0 16px rgba(200, 200, 240, 0.12);
    }

    50% {
        box-shadow: 0 0 0 2px rgba(220, 220, 240, 0.8), 0 0 0 8px rgba(200, 200, 220, 0.06), 0 0 28px rgba(200, 200, 240, 0.2);
    }
}

/* ─── TOOLTIP ────────────────────────────────────────────────── */

.ob-tooltip {
    position: fixed;
    z-index: 999999;
    width: 300px;
    max-width: calc(100vw - 32px);
    background: rgba(14, 16, 20, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 20px 56px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    pointer-events: all;
    opacity: 0;
    transform: translateY(6px) scale(0.97);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        top 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ob-tooltip.ob-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Arrow */
.ob-tooltip-arrow {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(14, 16, 20, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: rotate(45deg);
    left: 20px;
}

.ob-tooltip-arrow.ob-arrow-top {
    top: -6px;
    border-right: none;
    border-bottom: none;
}

.ob-tooltip-arrow.ob-arrow-bottom {
    bottom: -6px;
    border-left: none;
    border-top: none;
}

.ob-tooltip-arrow.ob-arrow-left {
    left: -6px;
    border-top: none;
    border-right: none;
}

.ob-tooltip-arrow.ob-arrow-right {
    right: -6px;
    border-bottom: none;
    border-left: none;
}

/* Step counter */
.ob-tooltip-step {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: rgba(200, 200, 220, 0.55);
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ob-tooltip-step::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00ff41; /* Matrix green */
    box-shadow: 0 0 8px #00ff41;
    animation: ob-dot-blink 1.5s ease-in-out infinite;
}

@keyframes ob-dot-blink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 10px #00ff41;
    }
    50% {
        opacity: 0.3;
        box-shadow: 0 0 4px #00ff41;
    }
}

/* Title */
.ob-tooltip-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: rgba(250, 250, 255, 0.95);
    margin: 0 0 7px;
    line-height: 1.3;
}

/* Description */
.ob-tooltip-desc {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(250, 250, 255, 0.45);
    margin: 0 0 16px;
}

/* Typewriter prompt demo */
.ob-typewriter-demo {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-family: 'Inter', system-ui, monospace;
    font-size: 11px;
    color: rgba(200, 220, 255, 0.75);
    line-height: 1.5;
    min-height: 36px;
    position: relative;
}

.ob-typewriter-cursor {
    display: inline-block;
    width: 1.5px;
    height: 12px;
    background: rgba(200, 220, 255, 0.6);
    margin-left: 1px;
    vertical-align: middle;
    animation: ob-cursor-blink 0.8s ease-in-out infinite;
}

@keyframes ob-cursor-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Tooltip footer */
.ob-tooltip-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* Progress dots in tooltip */
.ob-tooltip-dots {
    display: flex;
    gap: 4px;
    flex: 1;
}

.ob-tooltip-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    transition: all 0.25s ease;
}

.ob-tooltip-dot.ob-active {
    width: 12px;
    border-radius: 2px;
    background: rgba(200, 200, 220, 0.6);
}

.ob-tooltip-dot.ob-done {
    background: rgba(200, 200, 220, 0.28);
}

/* Buttons */
.ob-tooltip-buttons {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.ob-btn-skip {
    background: none;
    border: none;
    color: rgba(250, 250, 255, 0.28);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

.ob-btn-skip:hover {
    color: rgba(250, 250, 255, 0.55);
    background: rgba(255, 255, 255, 0.05);
}

.ob-btn-next {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(250, 250, 255, 0.9);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    white-space: nowrap;
}

.ob-btn-next:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.ob-btn-next:active {
    transform: translateY(0) scale(0.97);
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */

@media (max-width: 480px) {
    .ob-cinema-card {
        padding: 40px 24px 32px;
        border-radius: 20px;
    }

    .ob-cinema-title {
        font-size: 22px;
    }

    .ob-cinema-tagline {
        font-size: 13px;
    }

    .ob-tooltip {
        width: calc(100vw - 28px);
        border-radius: 14px;
        padding: 14px;
    }

    .ob-tooltip-title {
        font-size: 14px;
    }

    .ob-tooltip-desc {
        font-size: 11px;
        margin-bottom: 12px;
    }
}

/* ─── LIGHT THEME ────────────────────────────────────────────── */

[data-theme="light"] .ob-cinema-overlay {
    background: rgba(8, 10, 18, 0.78);
}

[data-theme="light"] .ob-spotlight-mask {
    fill: rgba(6, 8, 16, 0.76);
}

/* ─── v3.0: SECOND SPOTLIGHT RING (dual highlight) ─────────── */

.ob-spotlight-ring2 {
    position: fixed;
    border-radius: 12px;
    pointer-events: none;
    /* Different accent — soft violet for the second target */
    box-shadow:
        0 0 0 2px rgba(160, 180, 255, 0.55),
        0 0 0 4px rgba(160, 180, 255, 0.10),
        0 0 18px rgba(140, 160, 255, 0.16);
    animation: ob-ring2-pulse 2.6s ease-in-out infinite 0.4s;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999998;
}

@keyframes ob-ring2-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 2px rgba(160, 180, 255, 0.55),
            0 0 0 4px rgba(160, 180, 255, 0.10),
            0 0 18px rgba(140, 160, 255, 0.16);
    }
    50% {
        box-shadow:
            0 0 0 2px rgba(180, 200, 255, 0.80),
            0 0 0 8px rgba(160, 180, 255, 0.07),
            0 0 30px rgba(140, 160, 255, 0.24);
    }
}

/* ─── v3.0: MODEL CARD DEMO — hover + ripple ────────────────── */

[data-mode].ob-demo-hover {
    outline: 2px solid rgba(120, 160, 255, 0.70) !important;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(100, 140, 255, 0.12), 0 6px 24px rgba(80, 120, 255, 0.20) !important;
    transform: scale(1.02) !important;
    transition: all 0.25s ease !important;
    z-index: 3;
}

/* Ripple effect injected into Z-Image card */
.ob-demo-ripple {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(100, 160, 255, 0.35) 0%, transparent 70%);
    transform: scale(0);
    animation: ob-ripple-expand 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    pointer-events: none;
}

@keyframes ob-ripple-expand {
    0%   { transform: scale(0);   opacity: 1; }
    100% { transform: scale(2.2); opacity: 0; }
}

/* ─── v3.0: UPLOAD BUTTON DEMO PULSE ─────────────────────────── */

#urlInputContainer.ob-demo-pulse {
    animation: ob-upload-pulse 1.2s ease-in-out infinite !important;
    outline: 2px solid rgba(99, 179, 237, 0.65) !important;
    outline-offset: 3px;
}

@keyframes ob-upload-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(99, 179, 237, 0.45),
                    0 0 0 0 rgba(99, 179, 237, 0.25);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(99, 179, 237, 0.0),
                    0 0 0 16px rgba(99, 179, 237, 0.0);
    }
}

/* ─── v3.0: GLASS SHINE DEMO (For tabs) ───────────────────────── */
.ob-demo-glass-shine {
    position: relative;
    overflow: hidden;
    /* Soft elevation */
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15) !important;
    background: rgba(255, 255, 255, 0.8) !important;
}

[data-theme="dark"] .ob-demo-glass-shine {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

.ob-demo-glass-shine::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 150%;
    height: 100%;
    background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.8) 50%, transparent 80%);
    transform: translateX(-100%);
    animation: ob-shine-glass 3.5s cubic-bezier(0.25, 0.8, 0.25, 1) infinite;
    pointer-events: none;
    z-index: 2;
}

@keyframes ob-shine-glass {
    0% { transform: translateX(-100%); }
    25%, 100% { transform: translateX(100%); }
}

/* Ghost upload icon that floats over the button */
.ob-upload-ghost {
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(99, 179, 237, 0.15);
    border: 1.5px solid rgba(99, 179, 237, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 999999;
    backdrop-filter: blur(4px);
}

.ob-upload-ghost svg {
    width: 16px;
    height: 16px;
    color: rgba(99, 179, 237, 0.9);
}

@keyframes ob-ghost-bounce {
    0%   { transform: translateY(0);    opacity: 0; }
    15%  { opacity: 1; }
    50%  { transform: translateY(-10px); opacity: 1; }
    85%  { opacity: 1; }
    100% { transform: translateY(0);    opacity: 0; }
}

/* ─── v3.0: DEMO BADGE in tooltip ───────────────────────────── */

.ob-demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(99, 179, 237, 0.10);
    border: 1px solid rgba(99, 179, 237, 0.22);
    border-radius: 8px;
    padding: 4px 10px;
    margin-bottom: 12px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: rgba(99, 179, 237, 0.85);
    letter-spacing: 0.2px;
    animation: ob-badge-glow 2s ease-in-out infinite;
}

.ob-demo-badge svg {
    flex-shrink: 0;
    color: rgba(99, 179, 237, 0.75);
}

@keyframes ob-badge-glow {
    0%, 100% { border-color: rgba(99, 179, 237, 0.22); box-shadow: none; }
    50%       { border-color: rgba(99, 179, 237, 0.45); box-shadow: 0 0 10px rgba(99, 179, 237, 0.10); }
}

/* ============================================================
   PROMPT TEXTAREA EXPAND/COLLAPSE
   ============================================================ */
.prompt-collapsed {
    max-height: 120px !important;
    min-height: 100px !important;
    overflow-y: auto !important;
    transition: max-height 0.3s ease, min-height 0.3s ease !important;
}
#promptExpandBtn {
    z-index: 5;
    pointer-events: auto;
}
#promptExpandBtn svg {
    transition: transform 0.25s ease;
}
#promptExpandBtn:hover {
    opacity: 1 !important;
}

/* ============================================================
   PROMPT INJECTION ANIMATIONS — AI Decode Effect
   ============================================================ */

/* ─── Textarea Glow during injection ─────────────────────────── */
.prompt-inject-glow {
    animation: prompt-glow-pulse 1.2s ease-in-out infinite !important;
    box-shadow:
        0 0 0 2px rgba(139, 92, 246, 0.5),
        0 0 24px rgba(139, 92, 246, 0.2),
        0 0 48px rgba(139, 92, 246, 0.06) !important;
    border-color: rgba(139, 92, 246, 0.6) !important;
    transition: box-shadow 0.3s ease, border-color 0.3s ease !important;
}

@keyframes prompt-glow-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 2px rgba(139, 92, 246, 0.4),
            0 0 16px rgba(139, 92, 246, 0.15),
            0 0 32px rgba(139, 92, 246, 0.04);
    }
    50% {
        box-shadow:
            0 0 0 3px rgba(139, 92, 246, 0.6),
            0 0 32px rgba(139, 92, 246, 0.25),
            0 0 64px rgba(139, 92, 246, 0.1);
    }
}

/* Fade-out transition when injection completes */
.prompt-inject-glow-fade {
    animation: none !important;
    box-shadow:
        0 0 0 2px rgba(34, 197, 94, 0.5),
        0 0 24px rgba(34, 197, 94, 0.15) !important;
    border-color: rgba(34, 197, 94, 0.4) !important;
    transition: all 0.6s ease !important;
}

/* ─── Floating Badge ─────────────────────────────────────────── */
.prompt-inject-badge {
    position: fixed;
    z-index: 999990;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(15, 17, 24, 0.95);
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: -0.2px;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}
.prompt-inject-badge.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.prompt-inject-badge.fade-out {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.prompt-inject-badge .badge-icon {
    font-size: 15px;
    animation: badge-icon-zap 1.5s ease-in-out infinite;
}
@keyframes badge-icon-zap {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.25); filter: brightness(1.4); }
}
.prompt-inject-badge::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(105deg, transparent 30%, rgba(139, 92, 246, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: badge-shimmer 2.5s ease-in-out infinite 0.3s;
    pointer-events: none;
}
@keyframes badge-shimmer {
    0% { transform: translateX(-100%); }
    30%, 100% { transform: translateX(100%); }
}

/* ─── Image Floater (cinematic center → preview shrink) ──────── */
.image-inject-floater {
    position: fixed;
    z-index: 9999999;
    top: 50%;
    left: 50%;
    width: min(280px, 70vw);
    height: min(280px, 70vw);
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 0 0 2px rgba(59, 130, 246, 0.4),
        0 24px 80px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(59, 130, 246, 0.15);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}
.image-inject-floater.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.image-inject-floater img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ─── Image Glow ─────────────────────────────────────────────── */
.image-inject-glow {
    box-shadow:
        0 0 0 2px rgba(59, 130, 246, 0.45),
        0 0 20px rgba(59, 130, 246, 0.15) !important;
    transition: box-shadow 1.5s ease !important;
}

/* ─── Prompt Success Pulse ───────────────────────────────────── */
@keyframes prompt-success-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ─── Preview Lightbox ───────────────────────────────────────── */
.preview-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.preview-lightbox.visible {
    opacity: 1;
}
.preview-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.preview-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    transform: scale(0.92);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.preview-lightbox.visible .preview-lightbox-content {
    transform: scale(1);
}
.preview-lightbox-content img {
    display: block;
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
}
.preview-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
    backdrop-filter: blur(8px);
}
.preview-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}