/* ── Wrapper ─────────────────────────────────────────── */
.arcchat-demo-wrapper {
    position: relative;
    height: 404px;
    background: #0d1117;
    overflow: hidden;
    border-radius: 0 0 20px 20px;
}

/* ── Fake website mockup ─────────────────────────────── */
.arcchat-mockup-bg {
    position: absolute;
    inset: 0;
    padding: 14px 18px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mockup-navbar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 7px 12px;
}
.mockup-logo {
    width: 60px; height: 10px;
    background: rgba(255,255,255,0.25);
    border-radius: 4px;
}
.mockup-nav-links {
    display: flex; gap: 8px; flex: 1; justify-content: center;
}
.mockup-nav-links span {
    width: 30px; height: 8px;
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}
.mockup-nav-btn {
    width: 52px; height: 10px;
    background: #2563eb;
    border-radius: 4px;
    opacity: 0.7;
}

.mockup-hero {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 4px 0;
    flex: 1;
}
.mockup-hero-text { flex: 1; }
.mockup-line {
    height: 9px;
    background: rgba(255,255,255,0.18);
    border-radius: 4px;
}
.mockup-line.w-75 { width: 75%; }
.mockup-line.w-50 { width: 50%; }
.mockup-line.w-60 { width: 60%; }
.mockup-line.mt-1 { margin-top: 6px; }
.mockup-btns { display: flex; gap: 8px; margin-top: 12px; }
.mockup-btn-primary {
    width: 72px; height: 14px;
    background: #2563eb; border-radius: 5px; opacity: 0.8;
}
.mockup-btn-outline {
    width: 60px; height: 14px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 5px;
}
.mockup-hero-img {
    width: 90px; height: 70px;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    flex-shrink: 0;
}

.mockup-blur-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13,17,23,0.55);
    backdrop-filter: blur(2px);
}

/* ── Gradient glow ───────────────────────────────────── */
.arcchat-demo-wrapper::before {
    content: '';
    position: absolute;
    top: -60px; left: 50%;
    transform: translateX(-50%);
    width: 280px; height: 180px;
    background: radial-gradient(ellipse, rgba(37,99,235,0.3) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* ── Particles ───────────────────────────────────────── */
.arcchat-particles { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
    animation: floatParticle 6s ease-in-out infinite;
}
.p1 { width:5px; height:5px; background:#60a5fa; top:20%; left:10%; animation-delay:0s; }
.p2 { width:4px; height:4px; background:#3b82f6; top:60%; left:25%; animation-delay:1.5s; }
.p3 { width:6px; height:6px; background:#2563eb; top:30%; left:80%; animation-delay:3s; }
.p4 { width:3px; height:3px; background:#93c5fd; top:70%; left:65%; animation-delay:4.5s; }

@keyframes floatParticle {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
    50%       { transform: translateY(-12px) scale(1.3); opacity: 0.9; }
}

/* ── Widget ──────────────────────────────────────────── */
.arcchat-widget {
    position: absolute;
    bottom: 14px;
    right: 16px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* Bubble */
.arcchat-bubble {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border: none;
    color: #fff;
    font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37,99,235,0.55);
    position: relative;
    animation: bubbleFloat 3s ease-in-out infinite;
    transition: transform 0.2s;
}
.arcchat-bubble:hover { transform: scale(1.08); }

@keyframes bubbleFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-4px); }
}

.bubble-badge {
    position: absolute;
    top: -3px; right: -3px;
    width: 17px; height: 17px;
    background: #ef4444;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #0d1117;
    animation: badgePop 0.4s ease;
}

@keyframes badgePop {
    0% { transform: scale(0); }
    70% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Chat window */
.arcchat-window {
    width: 240px;
    background: #161b22;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.09);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(37,99,235,0.15);
    overflow: hidden;
    display: none;
    flex-direction: column;
    animation: windowSlideIn 0.35s cubic-bezier(0.34,1.56,0.64,1);
    transform-origin: bottom right;
}
.arcchat-window.open {
    display: flex;
}

@keyframes windowSlideIn {
    from { opacity: 0; transform: scale(0.85) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Header */
.arcchat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #1e2d4a, #1a2540);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.arcchat-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(37,99,235,0.5);
}
.arcchat-header-info { flex: 1; min-width: 0; }
.arcchat-name {
    font-size: 11px; font-weight: 700;
    color: #e2e8f0; line-height: 1;
}
.arcchat-status {
    display: flex; align-items: center; gap: 4px;
    font-size: 9px; color: rgba(255,255,255,0.45);
    margin-top: 2px;
}
.status-dot {
    width: 6px; height: 6px;
    background: #22c55e;
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes statusPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
    50%       { box-shadow: 0 0 0 4px rgba(34,197,94,0); }
}
.arcchat-header-actions {
    color: rgba(255,255,255,0.35);
    font-size: 13px; cursor: pointer;
}

/* Messages area */
.arcchat-messages {
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    overflow: hidden;
    min-height: 180px;
    max-height: 180px;
}

/* Message bubbles */
.msg {
    max-width: 85%;
    font-size: 10.5px;
    line-height: 1.45;
    padding: 7px 9px;
    border-radius: 10px;
    animation: msgSlideIn 0.3s ease;
    word-break: break-word;
}
@keyframes msgSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.msg-user {
    background: #2563eb;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 3px;
}
.msg-ai {
    background: rgba(255,255,255,0.07);
    color: #cbd5e1;
    align-self: flex-start;
    border-bottom-left-radius: 3px;
    border: 1px solid rgba(255,255,255,0.08);
}

.msg-time {
    font-size: 8.5px;
    color: rgba(255,255,255,0.3);
    margin-top: 2px;
    display: block;
}

/* CTA inside chat */
.msg-cta {
    display: inline-block;
    margin-top: 6px;
    padding: 5px 10px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff !important;
    font-size: 10px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    animation: ctaGlow 2s ease-in-out infinite;
}
@keyframes ctaGlow {
    0%, 100% { box-shadow: 0 0 6px rgba(37,99,235,0.5); }
    50%       { box-shadow: 0 0 14px rgba(37,99,235,0.9); }
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.07);
    border-radius: 10px;
    border-bottom-left-radius: 3px;
    border: 1px solid rgba(255,255,255,0.08);
    align-self: flex-start;
    animation: msgSlideIn 0.3s ease;
}
.typing-indicator span {
    width: 5px; height: 5px;
    background: #60a5fa;
    border-radius: 50%;
    animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%            { transform: translateY(-5px); opacity: 1; }
}

/* Input bar */
.arcchat-input-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-top: 1px solid rgba(255,255,255,0.07);
    background: #0d1117;
}
.arcchat-input-field {
    flex: 1;
    font-size: 9.5px;
    color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    padding: 5px 8px;
    pointer-events: none;
    user-select: none;
}
.arcchat-send {
    width: 24px; height: 24px;
    border-radius: 6px;
    background: #2563eb;
    border: none;
    color: #fff;
    font-size: 10px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .arcchat-bubble,
    .particle,
    .status-dot,
    .msg-cta,
    .typing-indicator span {
        animation: none !important;
    }
}
