.jarvis-demo-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(9, 20, 52, .45);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    padding: 20px;
    box-sizing: border-box
}

.jarvis-demo-overlay.show {
    opacity: 1;
    pointer-events: auto
}

.jarvis-demo-panel {
    position: relative;
    width: 480px;
    max-width: 100%;
    max-height: 86vh;
    background: #ffffff;
    border: 1px solid #d9f2e3;
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(37, 211, 102, .18), 0 20px 60px rgba(9, 20, 52, .2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(.9) translateY(16px);
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1)
}

.jarvis-demo-overlay.show .jarvis-demo-panel {
    transform: scale(1) translateY(0)
}

.jarvis-demo-scanline {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    top: 0;
    background: linear-gradient(90deg, transparent, #25D366, transparent);
    box-shadow: 0 0 14px 2px rgba(37, 211, 102, .55);
    animation: jarvis-demo-scan 3.4s linear infinite;
    opacity: .7;
    pointer-events: none
}

@keyframes jarvis-demo-scan {
    0% {
        top: 0
    }
    100% {
        top: 100%
    }
}

.jarvis-demo-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    color: #091434;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    opacity: .6;
    transition: opacity .2s, transform .2s, color .2s
}

.jarvis-demo-close:hover {
    opacity: 1;
    color: #25D366;
    transform: scale(1.1)
}

.jarvis-demo-header {
    padding: 26px 26px 14px;
    text-align: center;
    border-bottom: 1px solid #eef7f1
}

.jarvis-demo-badge {
    display: inline-block;
    font-family: "Courier New", monospace;
    font-size: .68rem;
    letter-spacing: .12em;
    color: #159a4d;
    background: #f0fbf4;
    border: 1px solid #bfe9cf;
    border-radius: 12px;
    padding: 3px 10px;
    margin-bottom: 10px;
    animation: jarvis-demo-blink 2s ease-in-out infinite
}

@keyframes jarvis-demo-blink {
    0%, 100% {
        opacity: 1
    }
    50% {
        opacity: .55
    }
}

.jarvis-demo-header h3 {
    font-family: "Courier New", monospace;
    color: #159a4d;
    letter-spacing: .15em;
    font-size: 1.5rem;
    margin-bottom: 6px
}

.jarvis-demo-header p {
    color: #7c8594;
    font-size: .85rem
}

.jarvis-demo-chat {
    flex: 1;
    min-height: 180px;
    max-height: 42vh;
    overflow-y: auto;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px
}

.jarvis-demo-chat::-webkit-scrollbar {
    width: 6px
}

.jarvis-demo-chat::-webkit-scrollbar-thumb {
    background: #bfe9cf;
    border-radius: 4px
}

.jarvis-demo-msg {
    display: flex;
    max-width: 90%;
    animation: jarvis-demo-msg-in .3s ease
}

@keyframes jarvis-demo-msg-in {
    from {
        opacity: 0;
        transform: translateY(6px)
    }
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.jarvis-demo-msg--user {
    align-self: flex-end;
    background: #eafaf0;
    color: #091434;
    padding: 10px 14px;
    border-radius: 14px 14px 2px 14px;
    font-size: .88rem
}

.jarvis-demo-msg--agent {
    align-self: flex-start;
    gap: 10px
}

.jarvis-demo-avatar {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .78rem;
    box-shadow: 0 4px 10px rgba(9, 20, 52, .18)
}

.jarvis-demo-bubble {
    background: #f7faf8;
    border: 1px solid #e5f2e9;
    border-radius: 2px 14px 14px 14px;
    padding: 9px 13px;
    font-size: .86rem;
    color: #3B2712;
    display: flex;
    flex-direction: column;
    gap: 4px
}

.jarvis-demo-agent-name {
    font-family: "Courier New", monospace;
    font-size: .68rem;
    letter-spacing: .06em;
    color: #2f8a56;
    text-transform: uppercase
}

.jarvis-demo-text {
    line-height: 1.4
}

.jarvis-demo-dots {
    display: flex;
    gap: 4px;
    padding: 2px 0
}

.jarvis-demo-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #25D366;
    display: inline-block;
    animation: jarvis-demo-bounce 1.1s ease-in-out infinite
}

.jarvis-demo-dots i:nth-child(2) {
    animation-delay: .15s
}

.jarvis-demo-dots i:nth-child(3) {
    animation-delay: .3s
}

@keyframes jarvis-demo-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: .5
    }
    30% {
        transform: translateY(-4px);
        opacity: 1
    }
}

.jarvis-demo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 20px 6px;
    border-top: 1px solid #eef7f1
}

.jarvis-demo-chips.jarvis-demo-chips--busy {
    opacity: .5;
    pointer-events: none
}

.jarvis-demo-chips button {
    appearance: none;
    background: transparent;
    border: 1px solid #25D366;
    color: #159a4d;
    font-family: Poppins, sans-serif;
    font-size: .76rem;
    font-weight: 500;
    padding: 7px 13px;
    border-radius: 16px;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .2s
}

.jarvis-demo-chips button:hover {
    background: #eafaf0;
    border-color: #1ebd5a;
    transform: translateY(-1px)
}

.jarvis-demo-chips button.jarvis-demo-chip-done {
    opacity: .55
}

.jarvis-demo-chips button.jarvis-demo-chip-done::after {
    content: " ✓"
}

.jarvis-demo-cta {
    padding: 16px 20px 20px;
    display: flex;
    justify-content: center;
    animation: jarvis-demo-msg-in .4s ease
}

.jarvis-demo-cta-button {
    display: inline-block;
    background: #25D366;
    color: #fff;
    font-weight: 700;
    font-family: Poppins, sans-serif;
    font-size: .9rem;
    padding: 11px 24px;
    border-radius: 24px;
    box-shadow: 0 10px 24px rgba(37, 211, 102, .35);
    transition: transform .2s, box-shadow .2s, background .2s
}

.jarvis-demo-cta-button:hover {
    background: #1ebd5a;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37, 211, 102, .5)
}

@media (max-width: 480px) {
    .jarvis-demo-panel {
        border-radius: 16px
    }
    .jarvis-demo-header {
        padding: 22px 18px 12px
    }
    .jarvis-demo-chat {
        padding: 14px
    }
}
