/* Project Visual Animations */

.project-visual {
    margin: 15px auto;
    max-width: 380px;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* FORGE - Multi-Platform Agent Orchestration */
.visual-forge {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 320px;
}

/* Agent + Model Combinations */
.agent-combo {
    position: absolute;
    background: linear-gradient(135deg, #8B1A1A, #A52A2A);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.75rem;
    box-shadow: 0 4px 15px rgba(139, 26, 26, 0.4);
    z-index: 10;
    min-width: 90px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: pulse 3s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.agent-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
}

.model-name {
    font-size: 0.7rem;
    opacity: 0.85;
    color: rgba(255, 255, 255, 0.9);
}

/* Position agents in hexagonal formation around center */
.agent-1 {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.agent-2 {
    top: 80px;
    right: 40px;
    animation-delay: 0.2s;
}

.agent-3 {
    bottom: 80px;
    right: 40px;
    animation-delay: 0.4s;
}

.agent-4 {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0.6s;
}

.agent-5 {
    bottom: 80px;
    left: 40px;
    animation-delay: 0.8s;
}

.agent-6 {
    top: 80px;
    left: 40px;
    animation-delay: 1s;
}

@keyframes pulse {
    0%, 100% { opacity: 0.85; box-shadow: 0 4px 15px rgba(139, 26, 26, 0.4); }
    50% { opacity: 1; box-shadow: 0 6px 25px rgba(139, 26, 26, 0.6); }
}

/* Mobile: Scale down FORGE visual */
@media (max-width: 768px) {
    .visual-forge {
        height: 280px;
        transform: scale(0.75);
        transform-origin: center center;
    }

    .agent-combo {
        padding: 8px 10px;
        min-width: 70px;
        font-size: 0.65rem;
    }

    .agent-name {
        font-size: 0.7rem;
    }

    .model-name {
        font-size: 0.6rem;
    }

    .control-center {
        width: 90px;
        height: 90px;
    }

    .forge-label {
        font-size: 1rem;
    }

    .forge-subtitle {
        font-size: 0.55rem;
    }
}

/* FORGE Control Center */
.control-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #B8534E, #8B1A1A);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 5;
    box-shadow: 0 0 40px rgba(184, 83, 78, 0.6);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.forge-label {
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.forge-subtitle {
    font-size: 0.65rem;
    opacity: 0.9;
    margin-top: 4px;
    text-align: center;
    line-height: 1.2;
}

/* Interconnecting Pipes */
.forge-pipes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.pipe {
    position: absolute;
    background: linear-gradient(90deg,
        rgba(139, 26, 26, 0.3) 0%,
        rgba(184, 83, 78, 0.5) 50%,
        rgba(139, 26, 26, 0.3) 100%
    );
    overflow: hidden;
}

/* Pipe positions connecting agents to center (hexagonal) */
.pipe-1 {
    top: 70px;
    left: 50%;
    width: 3px;
    height: calc(50% - 70px);
    transform: translateX(-50%);
}

.pipe-2 {
    top: 140px;
    right: 130px;
    width: calc(50% - 130px);
    height: 3px;
}

.pipe-3 {
    bottom: 140px;
    right: 130px;
    width: calc(50% - 130px);
    height: 3px;
}

.pipe-4 {
    bottom: 70px;
    left: 50%;
    width: 3px;
    height: calc(50% - 70px);
    transform: translateX(-50%);
}

.pipe-5 {
    bottom: 140px;
    left: 130px;
    width: calc(50% - 130px);
    height: 3px;
}

.pipe-6 {
    top: 140px;
    left: 130px;
    width: calc(50% - 130px);
    height: 3px;
}

/* Flowing Data Animation */
.data-flow {
    position: absolute;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.8) 50%,
        transparent 100%
    );
    animation: flowData 2s linear infinite;
}

.pipe-1 .data-flow, .pipe-4 .data-flow {
    animation: flowDataRight 2s linear infinite;
}

.pipe-2 .data-flow, .pipe-5 .data-flow {
    animation: flowDataLeft 2s linear infinite;
}

.pipe-3 .data-flow, .pipe-6 .data-flow {
    width: 100%;
    height: 20px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(255, 255, 255, 0.8) 50%,
        transparent 100%
    );
    animation: flowDataDown 2s linear infinite;
}

.pipe-2 .data-flow, .pipe-5 .data-flow { animation-delay: 0.3s; }
.pipe-3 .data-flow { animation-delay: 0.6s; }
.pipe-6 .data-flow { animation-delay: 0.9s; }

@keyframes flowDataRight {
    0% { left: -20px; }
    100% { left: 100%; }
}

@keyframes flowDataLeft {
    0% { right: -20px; }
    100% { right: 100%; }
}

@keyframes flowDataDown {
    0% { top: -20px; }
    100% { top: 100%; }
}

/* Sun Simulator - Sun Path Arc Visualization */
.visual-sunsim {
    position: relative;
    width: 100%;
    height: 280px;
    background: linear-gradient(to bottom,
        #1a5f7a 0%,      /* Deep blue sky at top */
        #57a0d3 30%,     /* Mid blue */
        #87CEEB 60%,     /* Light blue */
        #FFE5B4 90%,     /* Peachy horizon */
        #d4a574 100%     /* Earth tone at bottom */
    );
    overflow: hidden;
}

/* Map-like background */
.map-background {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(135deg,
        rgba(139, 26, 26, 0.1) 0%,
        rgba(184, 83, 78, 0.15) 50%,
        rgba(139, 26, 26, 0.1) 100%
    );
    opacity: 0.4;
}

/* SVG sun arc */
.sun-arc {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.arc-path {
    filter: drop-shadow(0 0 8px rgba(253, 184, 19, 0.3));
}

.sun-marker {
    filter: drop-shadow(0 0 15px rgba(253, 184, 19, 0.8));
}

/* Compass rose in corner */
.compass-rose {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 85px;
    height: 85px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(29, 29, 31, 0.3);
    backdrop-filter: blur(5px);
}

.compass-direction {
    position: absolute;
    font-weight: 700;
    font-size: 0.75rem;
    color: white;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

.compass-direction.n {
    top: 1px;
    color: #FDB813;
}

.compass-direction.s {
    bottom: 1px;
}

.compass-direction.e {
    right: 3px;
}

.compass-direction.w {
    left: 3px;
}

/* Time indicators */
.time-indicators {
    position: absolute;
    bottom: 15px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.time-label {
    font-size: 0.7rem;
    color: white;
    background: rgba(29, 29, 31, 0.5);
    padding: 4px 8px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    font-weight: 600;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

/* Face Detection - Face Scan Animation */
.visual-face {
    position: relative;
    width: 300px;
    height: 280px;
}

.face-outline {
    width: 200px;
    height: 250px;
    margin: 0 auto;
    border: 3px solid #8B1A1A;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: relative;
}

.scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #E74C3C, transparent);
    animation: scan 3s ease-in-out infinite;
}

@keyframes scan {
    0%, 100% { top: 0; }
    50% { top: 100%; }
}

.detection-point {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #E74C3C;
    border-radius: 50%;
    animation: blink 1s ease-in-out infinite;
}

.detection-point:nth-child(2) { top: 30%; left: 30%; animation-delay: 0.2s; }
.detection-point:nth-child(3) { top: 30%; right: 30%; animation-delay: 0.4s; }
.detection-point:nth-child(4) { top: 50%; left: 50%; animation-delay: 0.6s; }

@keyframes blink {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}

/* Gait Analysis - Body with Skeleton Overlay */
.visual-gait {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gait-body-container {
    position: relative;
    width: 180px;
    height: 180px;
}

.gait-body-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    filter: brightness(0.95);
}

.skeleton-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.skeleton-overlay .bone {
    stroke: #00ff00;
    stroke-width: 3;
    stroke-linecap: round;
    filter: drop-shadow(0 0 3px rgba(0, 255, 0, 0.8));
    animation: bonePulse 2s ease-in-out infinite;
}

.skeleton-overlay .joint {
    fill: #ff3333;
    filter: drop-shadow(0 0 4px rgba(255, 50, 50, 0.9));
    animation: jointPulse 1.5s ease-in-out infinite;
}

.skeleton-overlay .head-joint {
    fill: #ffff00;
    filter: drop-shadow(0 0 5px rgba(255, 255, 0, 0.9));
}

@keyframes bonePulse {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
}

@keyframes jointPulse {
    0%, 100% { r: 4; }
    50% { r: 5; }
}

.joint {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #8B1A1A;
    border-radius: 50%;
}

/* Options Trading - Chart Animation with Marble */
.visual-options {
    width: 100%;
    height: 280px;
    position: relative;
    background: linear-gradient(to bottom, rgba(139, 26, 26, 0.02), rgba(139, 26, 26, 0.08));
    border-radius: 12px;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.chart-svg {
    position: absolute;
    bottom: 20%;
    left: 0;
    width: 100%;
    height: 60%;
}

.chart-path {
    stroke-dasharray: 5, 3;
    opacity: 0.6;
}

.chart-marble {
    position: absolute;
    width: 24px;
    height: 24px;
    background: radial-gradient(circle at 30% 30%, white 0%, #8B1A1A 50%, #6B1F1F 100%);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(139, 26, 26, 0.5), inset 0 -2px 4px rgba(0,0,0,0.2);
    animation: marbleRoll 4s ease-in-out infinite;
    left: 0;
    top: 50%;
}

@keyframes marbleRoll {
    0% { left: 5%; top: 65%; }
    25% { left: 30%; top: 40%; }
    50% { left: 55%; top: 30%; }
    75% { left: 80%; top: 45%; }
    100% { left: 95%; top: 55%; }
}

/* News Trading - News Feed Animation */
.visual-newstrading {
    width: 100%;
}

.news-ticker {
    background: #1D1D1F;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    animation: slideIn 2s ease-in-out infinite;
}

.news-ticker:nth-child(2) { animation-delay: 0.7s; opacity: 0; }
.news-ticker:nth-child(3) { animation-delay: 1.4s; opacity: 0; }

@keyframes slideIn {
    0% { transform: translateX(100%); opacity: 0; }
    20%, 80% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(-100%); opacity: 0; }
}

/* Asteroid - Space Scene */
.visual-asteroid {
    background: #000;
    width: 100%;
    height: 280px;
    position: relative;
    overflow: hidden;
}

.asteroid {
    position: absolute;
    background: #86868B;
    border-radius: 50%;
    animation: float 6s linear infinite;
}

.asteroid:nth-child(1) {
    width: 40px;
    height: 40px;
    top: 20%;
    animation-delay: 0s;
}

.asteroid:nth-child(2) {
    width: 30px;
    height: 30px;
    top: 50%;
    animation-delay: 2s;
}

.asteroid:nth-child(3) {
    width: 50px;
    height: 50px;
    top: 70%;
    animation-delay: 4s;
}

@keyframes float {
    from {
        left: -60px;
        transform: rotate(0deg);
    }
    to {
        left: calc(100% + 60px);
        transform: rotate(360deg);
    }
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Generic Tech Stack Visual */
.tech-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.tech-box {
    flex: 1;
    background: white;
    border: 2px solid #8B1A1A;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    color: #8B1A1A;
}

.flow-arrow {
    font-size: 2rem;
    color: #8B1A1A;
    animation: pulse 2s ease-in-out infinite;
}

/* CLASP - Multi-Provider API Proxy */
.visual-clasp {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 320px;
    width: 100%;
    padding: 20px;
    position: relative;
}

.clasp-source {
    display: flex;
    justify-content: center;
}

.provider-badge {
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.provider-badge.anthropic {
    background: linear-gradient(135deg, #da7756, #c25a3a);
    color: white;
}

.provider-badge.openai {
    background: linear-gradient(135deg, #10a37f, #0a7d5e);
    color: white;
}

.provider-badge.azure {
    background: linear-gradient(135deg, #0078d4, #005a9e);
    color: white;
}

.provider-badge.ollama {
    background: linear-gradient(135deg, #1D1D1F, #3d3d40);
    color: white;
}

.clasp-connector {
    width: 4px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(139, 26, 26, 0.3), rgba(139, 26, 26, 0.6));
    position: relative;
    overflow: hidden;
}

.api-packet {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #E74C3C;
    border-radius: 50%;
    left: 50%;
    transform: translateX(-50%);
    animation: flowDown 1.5s ease-in-out infinite;
}

.packet-2 {
    animation-delay: 0.75s;
}

@keyframes flowDown {
    0% { top: -8px; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.clasp-hub {
    width: 100px;
    height: 100px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hub-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid #8B1A1A;
    border-radius: 50%;
    animation: hubPulse 2s ease-in-out infinite;
}

@keyframes hubPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
}

.hub-core {
    background: linear-gradient(135deg, #8B1A1A, #B8534E);
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 2;
}

.clasp-outputs {
    display: flex;
    justify-content: center;
    gap: 60px;
    height: 40px;
    position: relative;
}

.output-line {
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, rgba(139, 26, 26, 0.6), rgba(139, 26, 26, 0.3));
    position: relative;
    overflow: hidden;
}

.output-line .api-packet {
    animation: flowDown 1.5s ease-in-out infinite;
}

.line-1 .api-packet { animation-delay: 0s; }
.line-2 .api-packet { animation-delay: 0.3s; }
.line-3 .api-packet { animation-delay: 0.6s; }

.clasp-targets {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* CCDash - Terminal UI Dashboard */
.visual-ccdash {
    width: 100%;
    height: 320px;
    background: white;
    border: 2px solid #1D1D1F;
    border-radius: 12px;
    padding: 15px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    color: #00ff00;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.tui-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.tui-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #8B1A1A;
}

.tui-time {
    font-size: 0.75rem;
    color: #86868B;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0.5; }
}

.tui-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    flex: 1;
}

.tui-panel {
    border: 1px solid #333;
    border-radius: 4px;
    padding: 8px;
    background: #2D2D30;
}

.panel-label {
    font-size: 0.65rem;
    color: #86868B;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cpu-graph {
    height: 35px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
}

.cpu-bar {
    width: 6px;
    background: linear-gradient(to top, #8B1A1A, #E74C3C);
    border-radius: 1px;
    animation: cpuMove 2s ease-in-out infinite;
}

.cpu-bar:nth-child(1) { height: 60%; animation-delay: 0s; }
.cpu-bar:nth-child(2) { height: 45%; animation-delay: 0.1s; }
.cpu-bar:nth-child(3) { height: 80%; animation-delay: 0.2s; }
.cpu-bar:nth-child(4) { height: 30%; animation-delay: 0.3s; }
.cpu-bar:nth-child(5) { height: 70%; animation-delay: 0.4s; }
.cpu-bar:nth-child(6) { height: 55%; animation-delay: 0.5s; }
.cpu-bar:nth-child(7) { height: 40%; animation-delay: 0.6s; }
.cpu-bar:nth-child(8) { height: 85%; animation-delay: 0.7s; }

@keyframes cpuMove {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; transform: scaleY(1.1); }
}

.memory-ring {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 4px solid #333;
    border-top-color: #8B1A1A;
    border-right-color: #8B1A1A;
    border-bottom-color: #8B1A1A;
    margin: 0 auto;
    position: relative;
    animation: memoryPulse 3s ease-in-out infinite;
}

.memory-ring::after {
    content: '72%';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    color: #00ff00;
}

@keyframes memoryPulse {
    0%, 100% { border-top-color: #8B1A1A; border-right-color: #8B1A1A; }
    50% { border-top-color: #E74C3C; border-right-color: #E74C3C; }
}

.token-counter {
    font-size: 1.2rem;
    font-weight: 700;
    color: #E74C3C;
    text-align: center;
    animation: tokenCount 3s ease-in-out infinite;
}

.token-label {
    font-size: 0.6rem;
    color: #86868B;
    text-align: center;
}

@keyframes tokenCount {
    0%, 100% { color: #E74C3C; }
    50% { color: #8B1A1A; }
}

.tmux-sessions {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tmux-session {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.65rem;
}

.session-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #00ff00;
}

.session-dot.active {
    animation: dotPulse 1s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.ccdash-corner-icon {
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    opacity: 0.6;
}

.ccdash-corner-icon svg {
    width: 100%;
    height: 100%;
}

/* MANA - Memory-Augmented Neural Assistant */
.visual-mana {
    width: 100%;
    height: 320px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mana-container {
    position: relative;
    width: 300px;
    height: 280px;
}

/* Knowledge Graph Nodes */
.knowledge-node {
    position: absolute;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #8B1A1A, #B8534E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(139, 26, 26, 0.4);
    animation: nodeFloat 3s ease-in-out infinite;
}

.knowledge-node.node-1 { top: 10px; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.knowledge-node.node-2 { top: 60px; left: 20%; animation-delay: 0.3s; }
.knowledge-node.node-3 { top: 60px; right: 20%; animation-delay: 0.6s; }
.knowledge-node.node-4 { top: 140px; left: 10%; animation-delay: 0.9s; }
.knowledge-node.node-5 { top: 140px; right: 10%; animation-delay: 1.2s; }

@keyframes nodeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.knowledge-node.node-1 {
    animation: nodeFloat1 3s ease-in-out infinite;
}

@keyframes nodeFloat1 {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

/* Connection Lines */
.mana-connections {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.mana-connections svg {
    width: 100%;
    height: 100%;
}

.connection-line {
    stroke: #8B1A1A;
    stroke-width: 2;
    stroke-dasharray: 5,5;
    animation: dashMove 2s linear infinite;
    opacity: 0.5;
}

@keyframes dashMove {
    to { stroke-dashoffset: -20; }
}

/* Central RAG Core */
.rag-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #B8534E, #8B1A1A);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 10;
    box-shadow: 0 0 30px rgba(184, 83, 78, 0.5);
}

.rag-label {
    font-weight: 900;
    font-size: 1rem;
}

.rag-sublabel {
    font-size: 0.55rem;
    opacity: 0.9;
}

/* Vector Embeddings Visualization */
.vector-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130px;
    height: 130px;
    border: 2px dashed rgba(139, 26, 26, 0.4);
    border-radius: 50%;
    animation: vectorRotate 10s linear infinite;
}

@keyframes vectorRotate {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.vector-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #E74C3C;
    border-radius: 50%;
    animation: vectorPulse 2s ease-in-out infinite;
}

.vector-dot:nth-child(1) { top: 0; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.vector-dot:nth-child(2) { top: 50%; right: 0; transform: translateY(-50%); animation-delay: 0.5s; }
.vector-dot:nth-child(3) { bottom: 0; left: 50%; transform: translateX(-50%); animation-delay: 1s; }
.vector-dot:nth-child(4) { top: 50%; left: 0; transform: translateY(-50%); animation-delay: 1.5s; }

@keyframes vectorPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Context Retrieval Labels */
.context-label {
    position: absolute;
    font-size: 0.6rem;
    color: #86868B;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.context-label.top { top: 0; left: 50%; transform: translateX(-50%); }
.context-label.bottom { bottom: 5px; left: 50%; transform: translateX(-50%); }

.memory-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
}

.memory-block {
    width: 20px;
    height: 6px;
    background: #8B1A1A;
    border-radius: 2px;
    animation: memoryFill 3s ease-in-out infinite;
}

.memory-block:nth-child(1) { animation-delay: 0s; }
.memory-block:nth-child(2) { animation-delay: 0.2s; }
.memory-block:nth-child(3) { animation-delay: 0.4s; }
.memory-block:nth-child(4) { animation-delay: 0.6s; }
.memory-block:nth-child(5) { animation-delay: 0.8s; }

@keyframes memoryFill {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* DUCK-E - Speech-to-Speech Debugging */
.visual-ducke {
    width: 100%;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ducke-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
    width: 100%;
    padding: 20px;
}

.voice-input, .voice-output {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mic-icon, .speaker-icon {
    font-size: 2rem;
    animation: iconPulse 2s ease-in-out infinite;
}

.mic-icon {
    animation-delay: 0s;
}

.speaker-icon {
    animation-delay: 1s;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 1; }
}

.sound-waves {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 60px;
}

.wave {
    width: 4px;
    background: linear-gradient(to top, #8B1A1A, #E74C3C);
    border-radius: 2px;
    animation: waveMove 1s ease-in-out infinite;
}

.input-waves .wave-1 { height: 20px; animation-delay: 0s; }
.input-waves .wave-2 { height: 40px; animation-delay: 0.15s; }
.input-waves .wave-3 { height: 30px; animation-delay: 0.3s; }

.output-waves .wave-1 { height: 30px; animation-delay: 0.5s; }
.output-waves .wave-2 { height: 45px; animation-delay: 0.65s; }
.output-waves .wave-3 { height: 25px; animation-delay: 0.8s; }

@keyframes waveMove {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.5); }
}

.ducke-center {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spaghetti-code {
    position: absolute;
    width: 120px;
    height: 80px;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.6;
    z-index: 0;
}

.spaghetti-svg {
    width: 100%;
    height: 100%;
}

.noodle {
    fill: none;
    stroke: #8B1A1A;
    stroke-width: 3;
    stroke-linecap: round;
    animation: noodleWiggle 3s ease-in-out infinite;
}

.noodle-1 { stroke: #A52A2A; animation-delay: 0s; }
.noodle-2 { stroke: #8B1A1A; animation-delay: 0.3s; }
.noodle-3 { stroke: #B8534E; animation-delay: 0.6s; }

@keyframes noodleWiggle {
    0%, 100% { d: path("M10 20 Q30 40, 50 20 T90 30"); }
    50% { d: path("M10 25 Q30 10, 50 30 T90 20"); }
}

.duck-bubble {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #FFD93D, #F4B400);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(244, 180, 0, 0.4);
    animation: duckBob 2s ease-in-out infinite;
    border: 4px solid rgba(255, 255, 255, 0.5);
}

.duck-icon {
    font-size: 3.5rem;
}

@keyframes duckBob {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-8px) rotate(3deg); }
}

.thought-bubbles {
    position: absolute;
    width: 150px;
    height: 150px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.thought {
    position: absolute;
    font-size: 1.2rem;
    background: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    animation: thoughtFloat 3s ease-in-out infinite;
}

.thought-1 {
    top: -10px;
    left: 10px;
    animation-delay: 0s;
}

.thought-2 {
    top: 20px;
    right: 0;
    animation-delay: 1s;
}

.thought-3 {
    bottom: 20px;
    right: 15px;
    animation-delay: 2s;
}

@keyframes thoughtFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-10px) scale(1.1);
        opacity: 1;
    }
}

.ducke-label {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #86868B;
    font-weight: 600;
    letter-spacing: 1px;
    white-space: nowrap;
}
