/* Neural Architecture Visualization Styles */

#neural-architecture {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

/* Container for the diagram */
.architecture-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
    position: relative;
    padding: 4rem 0;
}

@media (min-width: 1024px) {
    .architecture-diagram {
        flex-direction: row;
        justify-content: center;
        align-items: stretch;
        gap: 2rem;
    }
}

/* --- Common Components --- */
.arch-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(66, 133, 244, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 0.6rem 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    text-align: center;
}

.arch-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(66, 133, 244, 0.15);
    border-color: rgba(66, 133, 244, 0.4);
}

.arch-card h4 {
    color: #202124;
    font-weight: 600;
    font-size: 0.75rem;
    margin: 0;
}

.arch-group-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #5f6368;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 700;
}

/* --- Stage 1: Ingestion (Left/Top) --- */
.stage-ingestion {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 300px;
    justify-content: center;
}

.data-source {
    background: #f1f3f4;
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    font-size: 0.75rem;
    color: #3c4043;
    font-weight: 500;
    border: 1px solid transparent;
}

.data-source:hover {
    background: #e8f0fe;
    color: #1967d2;
    border-color: #d2e3fc;
}

/* --- Stage 2: The Core (Center) --- */
.stage-core {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 300px;
}

/* The Glowing Orb */
.cdp-orb {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF9900 0%, #EA4335 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 40px rgba(234, 67, 53, 0.4);
    animation: corePulse 3s infinite ease-in-out;
    z-index: 10;
}

.cdp-orb::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4285F4 0%, #34A853 100%);
    opacity: 0.3;
    filter: blur(15px);
    z-index: -1;
    animation: spinSlow 10s linear infinite;
}

.cdp-title {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cdp-subtitle {
    font-size: 0.6rem;
    opacity: 0.9;
    max-width: 90%;
    line-height: 1.1;
}

/* Core System Bar */
.core-system-bar {
    margin-top: 2rem;
    background: #4285F4;
    color: white;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    width: 100%;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
    position: relative;
}

/* Recommendation Chips underneath */
.rec-chips {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.rec-chip {
    background: white;
    border: 1px solid #dadce0;
    color: #5f6368;
    padding: 0.35rem 0.8rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* --- Stage 3: LLM Engine (Right) --- */
.stage-llm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 300px;
    position: relative;
}

.llm-card {
    border-left: 4px solid #34A853;
    /* Success Green */
}

/* The Main Generator */
.llm-generator {
    background: #34A853;
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 12px rgba(52, 168, 83, 0.3);
    margin: 1rem 0;
    position: relative;
}

/* --- Stage 4: User (Far Right / Bottom) --- */
.stage-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.user-node {
    background: #202124;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 5;
}

/* --- Connectors (SVG Lines) --- */
.connectors-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.connection-path {
    fill: none;
    stroke: #dadce0;
    stroke-width: 2;
    stroke-dasharray: 4 4;
}

.connection-flow {
    fill: none;
    stroke: #4285F4;
    stroke-width: 3;
    stroke-dasharray: 10 20;
    stroke-linecap: round;
    opacity: 0.6;
    animation: flowDash 1s linear infinite;
}

/* Animations */
@keyframes corePulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 40px rgba(234, 67, 53, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 60px rgba(234, 67, 53, 0.6);
    }
}

@keyframes spinSlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes flowDash {
    to {
        stroke-dashoffset: -30;
    }
}

/* Responsive Handling for SVG lines would need JS or complex CSS
   For simplicity, we will use pseudo-elements for local visual connectors
   on smaller screens, and rely on the flexible layout.
   The JS will refine the SVG paths based on positions. */