/* Volumetric Sunlight & Cyan/Emerald Light Cone */
.volumetric-portal-cone {
    clip-path: polygon(0% 18%, 100% 0%, 100% 100%, 0% 82%);
    background: linear-gradient(90deg, 
        rgba(251, 191, 36, 0.20) 0%, 
        rgba(14, 165, 233, 0.22) 28%, 
        rgba(16, 185, 129, 0.14) 62%, 
        transparent 100%);
    filter: blur(18px);
}

/* Smooth Multi-Lane 3D Trajectories Across the Full Left Input Zone into the Mirror Core */
@keyframes artifact-flow-lane-1 {
    0%   { transform: translate3d(-340px, -145px, 30px) scale(0.92) rotate(-8deg); opacity: 0; }
    12%  { opacity: 1; }
    55%  { transform: translate3d(-165px, -95px, 18px) scale(0.90) rotate(-4deg); opacity: 1; }
    88%  { transform: translate3d(-35px, -28px, 4px) scale(0.68) rotate(-2deg); opacity: 0.95; }
    100% { transform: translate3d(18px, 0px, -18px) scale(0.08) rotate(6deg); opacity: 0; }
}
@keyframes artifact-flow-lane-2 {
    0%   { transform: translate3d(-350px, -85px, 24px) scale(0.94) rotate(6deg); opacity: 0; }
    12%  { opacity: 1; }
    55%  { transform: translate3d(-175px, -55px, 14px) scale(0.90) rotate(3deg); opacity: 1; }
    88%  { transform: translate3d(-35px, -16px, 4px) scale(0.68) rotate(1deg); opacity: 0.95; }
    100% { transform: translate3d(18px, 0px, -18px) scale(0.08) rotate(-6deg); opacity: 0; }
}
@keyframes artifact-flow-lane-3 {
    0%   { transform: translate3d(-360px, -25px, 20px) scale(0.95) rotate(-5deg); opacity: 0; }
    12%  { opacity: 1; }
    55%  { transform: translate3d(-180px, -18px, 12px) scale(0.90) rotate(-2deg); opacity: 1; }
    88%  { transform: translate3d(-35px, -5px, 4px) scale(0.68) rotate(0deg); opacity: 0.95; }
    100% { transform: translate3d(18px, 0px, -18px) scale(0.08) rotate(5deg); opacity: 0; }
}
@keyframes artifact-flow-lane-4 {
    0%   { transform: translate3d(-360px, 35px, 22px) scale(0.95) rotate(5deg); opacity: 0; }
    12%  { opacity: 1; }
    55%  { transform: translate3d(-180px, 24px, 12px) scale(0.90) rotate(2deg); opacity: 1; }
    88%  { transform: translate3d(-35px, 8px, 4px) scale(0.68) rotate(1deg); opacity: 0.95; }
    100% { transform: translate3d(18px, 0px, -18px) scale(0.08) rotate(-5deg); opacity: 0; }
}
@keyframes artifact-flow-lane-5 {
    0%   { transform: translate3d(-350px, 95px, 26px) scale(0.94) rotate(-7deg); opacity: 0; }
    12%  { opacity: 1; }
    55%  { transform: translate3d(-175px, 62px, 15px) scale(0.90) rotate(-3deg); opacity: 1; }
    88%  { transform: translate3d(-35px, 18px, 4px) scale(0.68) rotate(-1deg); opacity: 0.95; }
    100% { transform: translate3d(18px, 0px, -18px) scale(0.08) rotate(7deg); opacity: 0; }
}
@keyframes artifact-flow-lane-6 {
    0%   { transform: translate3d(-340px, 150px, 30px) scale(0.92) rotate(8deg); opacity: 0; }
    12%  { opacity: 1; }
    55%  { transform: translate3d(-165px, 98px, 18px) scale(0.90) rotate(4deg); opacity: 1; }
    88%  { transform: translate3d(-35px, 28px, 4px) scale(0.68) rotate(2deg); opacity: 0.95; }
    100% { transform: translate3d(18px, 0px, -18px) scale(0.08) rotate(-8deg); opacity: 0; }
}

.ent-stream-a { opacity: 0; animation: artifact-flow-lane-1 7.2s linear 0.0s infinite both; will-change: transform, opacity; }
.ent-stream-b { opacity: 0; animation: artifact-flow-lane-3 7.2s linear 0.6s infinite both; will-change: transform, opacity; }
.ent-stream-c { opacity: 0; animation: artifact-flow-lane-5 7.2s linear 1.2s infinite both; will-change: transform, opacity; }
.ent-stream-d { opacity: 0; animation: artifact-flow-lane-2 7.2s linear 1.8s infinite both; will-change: transform, opacity; }
.ent-stream-e { opacity: 0; animation: artifact-flow-lane-4 7.2s linear 2.4s infinite both; will-change: transform, opacity; }
.ent-stream-f { opacity: 0; animation: artifact-flow-lane-6 7.2s linear 0.9s infinite both; will-change: transform, opacity; }
.ent-stream-g { opacity: 0; animation: artifact-flow-lane-1 7.2s linear 3.6s infinite both; will-change: transform, opacity; }
.ent-stream-h { opacity: 0; animation: artifact-flow-lane-3 7.2s linear 4.2s infinite both; will-change: transform, opacity; }
.ent-stream-i { opacity: 0; animation: artifact-flow-lane-5 7.2s linear 4.8s infinite both; will-change: transform, opacity; }
.ent-stream-j { opacity: 0; animation: artifact-flow-lane-2 7.2s linear 5.4s infinite both; will-change: transform, opacity; }
.ent-stream-k { opacity: 0; animation: artifact-flow-lane-4 7.2s linear 6.0s infinite both; will-change: transform, opacity; }
.ent-stream-l { opacity: 0; animation: artifact-flow-lane-6 7.2s linear 6.6s infinite both; will-change: transform, opacity; }

/* Explicit 3D Keyframes for Outgoing Pure Code Streams (Fanned Out Across Right Portal Space) */
@keyframes code-flow-right {
    0% {
        transform: perspective(1000px) rotateY(-12deg) translate3d(0px, 0px, -10px) scale(0.84);
        opacity: 0;
    }
    12% {
        opacity: 1;
    }
    85% {
        opacity: 0.95;
    }
    100% {
        transform: perspective(1000px) rotateY(-5deg) translate3d(420px, 0px, 20px) scale(1);
        opacity: 0;
    }
}

.code-line-stream {
    position: absolute;
    left: 0;
    white-space: nowrap;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    will-change: transform, opacity;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9), 0 0 12px rgba(56, 189, 248, 0.25);
}

.code-out-1  { top: 10%; animation: code-flow-right 6.0s linear infinite 0.0s; }
.code-out-2  { top: 16%; animation: code-flow-right 6.0s linear infinite 0.85s; }
.code-out-3  { top: 22%; animation: code-flow-right 6.0s linear infinite 1.7s; }
.code-out-4  { top: 28%; animation: code-flow-right 6.0s linear infinite 2.55s; }
.code-out-5  { top: 34%; animation: code-flow-right 6.0s linear infinite 3.4s; }
.code-out-6  { top: 40%; animation: code-flow-right 6.0s linear infinite 4.25s; }
.code-out-7  { top: 46%; animation: code-flow-right 6.0s linear infinite 5.1s; }
.code-out-8  { top: 52%; animation: code-flow-right 6.0s linear infinite 0.4s; }
.code-out-9  { top: 58%; animation: code-flow-right 6.0s linear infinite 1.25s; }
.code-out-10 { top: 64%; animation: code-flow-right 6.0s linear infinite 2.1s; }
.code-out-11 { top: 70%; animation: code-flow-right 6.0s linear infinite 2.95s; }
.code-out-12 { top: 76%; animation: code-flow-right 6.0s linear infinite 3.8s; }
.code-out-13 { top: 82%; animation: code-flow-right 6.0s linear infinite 4.65s; }
.code-out-14 { top: 88%; animation: code-flow-right 6.0s linear infinite 5.5s; }

@keyframes matrix-fall {             
    0% { transform: translate3d(0, -25%, 0); opacity: 0; }             
    20%, 80% { opacity: 0.32; }             
    100% { transform: translate3d(0, 25%, 0); opacity: 0; }         
}         
.matrix-col {             
    writing-mode: vertical-rl;             
    text-orientation: upright;             
    animation: matrix-fall 6s linear infinite;         
}          

/* Terminal Scroll Animation */         
@keyframes terminal-scroll {             
    0% { transform: translate3d(0, 0, 0); }             
    100% { transform: translate3d(0, -50%, 0); }         
}         
.animate-terminal {             
    will-change: transform;
    animation: terminal-scroll 24s linear infinite;         
}                  

/* Integrations Marquee */         
@keyframes scroll-marquee {             
    0% { transform: translate3d(0, 0, 0); }             
    100% { transform: translate3d(-50%, 0, 0); }         
}         
.animate-marquee {             
    will-change: transform;
    animation: scroll-marquee 32s linear infinite;         
}         
.mask-edges {             
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);             
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);         
}          

/* ==========================================            
   INTERACTIVE COMMAND CENTER TOPOLOGY STYLES            
   ========================================== */         
@keyframes pulse-beam {
    0% { stroke-dashoffset: 48; }
    100% { stroke-dashoffset: 0; }
}
.cmd-svg-beam {
    stroke-dasharray: 8 6;
    animation: pulse-beam 1.2s linear infinite;
}
.cmd-node-btn {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.28s ease,
                background-color 0.28s ease;
    user-select: none;
}
.cmd-node-btn:hover {
    transform: translate(-50%, -50%) scale(1.06);
}
.cmd-node-btn.is-selected {
    transform: translate(-50%, -50%) scale(1.10);
}

/* Ghost-Like Glossy Frosted Glass Contact Widget */
.ghost-gloss-widget {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.14) 50%, rgba(240, 249, 255, 0.26) 100%);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow: 
        0 20px 50px -10px rgba(15, 23, 42, 0.14),
        0 4px 16px rgba(14, 165, 233, 0.08),
        inset 0 1.5px 2px rgba(255, 255, 255, 0.98),
        inset 0 -1px 2px rgba(14, 165, 233, 0.18);
}

/* ==========================================
   SLOTGUARD AI DEMO BACKGROUNDS & ANIMATIONS
   ========================================== */
.ns-bg-grid {
    background-size: 36px 36px;
    background-image:
        linear-gradient(to right, rgba(56, 189, 248, 0.055) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(56, 189, 248, 0.055) 1px, transparent 1px);
    mask-image: radial-gradient(ellipse at 50% 45%, black 35%, transparent 92%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 45%, black 35%, transparent 92%);
}

@keyframes ns-orb-drift-a {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(42px, 28px, 0) scale(1.12); }
}
@keyframes ns-orb-drift-b {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-46px, -32px, 0) scale(1.14); }
}
@keyframes ns-orb-drift-c {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-24px, 34px, 0) scale(1.08); }
}

.ns-orb-a { animation: ns-orb-drift-a 15s ease-in-out infinite; will-change: transform; }
.ns-orb-b { animation: ns-orb-drift-b 18s ease-in-out infinite; will-change: transform; }
.ns-orb-c { animation: ns-orb-drift-c 13s ease-in-out infinite; will-change: transform; }

/* Phase-reactive ambient backdrop washes */
#ns-shell .ns-phase-wash {
    transition: opacity 0.7s ease, background 0.7s ease;
}
#ns-shell.ns-theme-A .ns-phase-wash {
    background: radial-gradient(ellipse at 18% 12%, rgba(244, 63, 94, 0.14), transparent 52%),
                radial-gradient(ellipse at 84% 85%, rgba(245, 158, 11, 0.08), transparent 50%);
}
#ns-shell.ns-theme-B .ns-phase-wash {
    background: radial-gradient(ellipse at 50% 10%, rgba(14, 165, 233, 0.16), transparent 55%),
                radial-gradient(ellipse at 84% 84%, rgba(16, 185, 129, 0.12), transparent 52%);
}
#ns-shell.ns-theme-C .ns-phase-wash {
    background: radial-gradient(ellipse at 75% 15%, rgba(99, 102, 241, 0.16), transparent 54%),
                radial-gradient(ellipse at 25% 84%, rgba(16, 185, 129, 0.13), transparent 52%);
}

/* Message & Recap Stagger Entrance */
@keyframes ns-msg-in {
    from { opacity: 0; transform: translate3d(0, 10px, 0) scale(0.97); }
    to   { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
.ns-msg-in {
    animation: ns-msg-in 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes ns-recap-pop {
    from { opacity: 0; transform: translate3d(0, 16px, 0) scale(0.96); }
    to   { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
.ns-recap-card {
    animation: ns-recap-pop 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.ns-recap-step {
    animation: ns-msg-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Automated Cursor Click Ripple */
@keyframes ns-click-ripple {
    0%   { transform: translate(-50%, -50%) scale(0.35); opacity: 0.95; }
    100% { transform: translate(-50%, -50%) scale(2.4); opacity: 0; }
}
.ns-cursor-ripple-active {
    animation: ns-click-ripple 0.48s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Slot Alert & Recovery Shimmer */
@keyframes ns-slot-alert-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.55); }
    70%  { box-shadow: 0 0 0 12px rgba(244, 63, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}
@keyframes ns-slot-saved-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    70%  { box-shadow: 0 0 0 14px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.ns-slot-alert { animation: ns-slot-alert-pulse 1.1s ease-out 2; }
.ns-slot-saved { animation: ns-slot-saved-pulse 1.1s ease-out 2; }

/* KPI Counter Pop */
@keyframes ns-kpi-pop {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.16); }
    100% { transform: scale(1); }
}
.ns-kpi-pop { display: inline-block; animation: ns-kpi-pop 0.45s cubic-bezier(0.16, 1, 0.3, 1); }

/* Cybernetic Radar Scan Sweep & Telemetry Data Beams */
@keyframes ns-radar-sweep {
    0%   { transform: translate3d(0, -15%, 0); opacity: 0; }
    15%  { opacity: 0.7; }
    85%  { opacity: 0.7; }
    100% { transform: translate3d(0, 115%, 0); opacity: 0; }
}
.ns-radar-scan {
    height: 110px;
    background: linear-gradient(to bottom, transparent, rgba(56, 189, 248, 0.09) 65%, rgba(56, 189, 248, 0.24) 98%, transparent 100%);
    animation: ns-radar-sweep 7.5s linear infinite;
    will-change: transform, opacity;
}

@keyframes ns-circuit-flow {
    to { stroke-dashoffset: -44; }
}
.ns-circuit-beam {
    stroke-dasharray: 8 14;
    animation: ns-circuit-flow 1.8s linear infinite;
}

/* Counter-Rotating Chronometer Rings */
@keyframes ns-spin-cw  { to { transform: rotate(360deg); } }
@keyframes ns-spin-ccw { to { transform: rotate(-360deg); } }
.ns-orbit-cw  { animation: ns-spin-cw 2.2s linear infinite; }
.ns-orbit-ccw { animation: ns-spin-ccw 3.1s linear infinite; }

/* AI Neural Signal Equalizer Bars */
@keyframes ns-eq-pulse {
    0%, 100% { transform: scaleY(0.35); }
    50%      { transform: scaleY(1); }
}
.ns-eq-bar {
    transform-origin: bottom;
    animation: ns-eq-pulse 0.9s ease-in-out infinite;
}
.ns-eq-idle .ns-eq-bar {
    animation-play-state: paused;
    transform: scaleY(0.35);
    opacity: 0.4;
}

/* Futuristic Button Sheen */
@keyframes ns-btn-sheen {
    0%   { transform: translateX(-140%) skewX(-18deg); }
    35%, 100% { transform: translateX(260%) skewX(-18deg); }
}
.ns-scan-btn {
    position: relative;
    overflow: hidden;
}
.ns-scan-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 45%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
    animation: ns-btn-sheen 4.5s ease-in-out infinite;
    pointer-events: none;
}
