.visualization-container {
    flex-wrap: nowrap;
    flex-direction: column;
}

.mode-switch {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 30px;
}

.mode-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.mode-btn.active {
    background: var(--primary);
    color: white;
}

.network-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
}

.entity {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.entity .viz-badge {
    width: 64px;
    height: 64px;
    border-radius: 16px;
}

.entity .viz-badge svg {
    width: 30px;
    height: 30px;
}

.network-flow .viz-connector {
    flex: 1;
    max-width: 100px;
    margin: 0 0.75rem;
}

.packet {
    width: 15px;
    height: 15px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%) scale(0);
    opacity: 0;
    box-shadow: 0 0 10px #fff;
    z-index: 10;
}

.explanation-text {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    min-height: 1.5em;
    text-align: center;
}

/* .controls flotan desde el main.css compartido (flujo bajo la animación) */
.visualization-container .controls {
    margin-top: 0.75rem;
}

/* Animations */
@keyframes flowStep1 {
    0% {
        left: 5%;
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }

    100% {
        left: 50%;
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

@keyframes flowStep2 {
    0% {
        left: 50%;
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }

    100% {
        left: 95%;
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}
